Cache a copy of the user's shell on macOS
[external/binutils.git] / gdb / ChangeLog
1 2018-10-27  Tom Tromey  <tom@tromey.com>
2
3         PR cli/23364:
4         * darwin-nat.c (copied_shell): New global.
5         (may_have_sip): Rename from should_disable_startup_with_shell.
6         (copy_shell_to_cache, maybe_cache_shell): New functions.
7         (darwin_nat_target::create_inferior): Update.  Use
8         copied_shell.
9
10 2018-10-27  Tom Tromey  <tom@tromey.com>
11
12         * unittests/scoped_fd-selftests.c (test_to_file): New function.
13         (run_tests): Call test_to_file.
14         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
15         temporary files.
16         * common/scoped_fd.h (scoped_fd::to_file): New method.
17
18 2018-10-27  Tom Tromey  <tom@tromey.com>
19
20         * unittests/scoped_mmap-selftests.c (test_normal): Use
21         gdb_mkostemp_cloexec.
22         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
23         Use gdb_mkostemp_cloexec.
24         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
25         gnulib/config.in, gnulib/configure,
26         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
27         gnulib/import/m4/gnulib-cache.m4,
28         gnulib/import/m4/gnulib-comp.m4: Update.
29         * gnulib/import/m4/mkostemp.m4: New file.
30         * gnulib/import/m4/mkstemp.m4: Remove.
31         * gnulib/import/mkostemp.c: New file.
32         * gnulib/import/mkstemp.m4: Remove.
33         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
34         mkstemp, add mkostemp.  Apply new patch.
35         * gnulib/import/stdlib.in.h: Apply patch.
36         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
37         New file.
38         * dwarf-index-write.c (write_psymtabs_to_index): Use
39         gdb_mkostemp_cloexec.
40         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
41
42 2018-10-27  Tom Tromey  <tom@tromey.com>
43
44         * unittests/mkdir-recursive-selftests.c: New file.
45         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
46         unittests/mkdir-recursive-selftests.c.
47         * dwarf-index-cache.c (mkdir_recursive): Move to
48         common/filestuff.c.
49         (index_cache::store): Check return value of mkdir_recursive.
50         (create_dir_and_check, test_mkdir_recursive): Move to new file.
51         (_initialize_index_cache): Don't register test.
52         * common/filestuff.h (mkdir_recursive): Declare.
53         * common/filestuff.c (mkdir_recursive): Move from
54         dwarf-index-cache.c.  Return bool.
55
56 2018-10-27  Tom Tromey  <tom@tromey.com>
57
58         * dwarf-index-write.c (write_psymtabs_to_index): Move
59         make_temp_filename to common/pathstuff.c.
60         * common/pathstuff.h (make_temp_filename): Declare.
61         * common/pathstuff.c (make_temp_filename): New function, moved
62         from dwarf-index-write.c.
63
64 2018-10-27  Tom Tromey  <tom@tromey.com>
65
66         * procfs.c (procfs_target::create_inferior): Use get_shell.
67         * cli/cli-cmds.c (shell_escape): Use get_shell.
68         * windows-nat.c (windows_nat_target::create_inferior): Use
69         get_shell.
70         * common/pathstuff.c (get_shell): New function.
71         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
72         (fork_inferior): Use get_shell.
73         * common/pathstuff.h (get_shell): Declare.
74
75 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
76
77         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
78
79 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
80
81         * stack.c (print_variable_and_value_data): Add preg and treg.
82         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
83         and update callers.
84         (print_frame_arg_vars): Likewise.
85         (prepare_reg): New function.
86         (info_locals_command): Extract info print args and use them.
87         (info_args_command): Likewise.
88         (_initialize_stack): Modify on-line help.
89         * symtab.c (treg_matches_sym_type_name): New function.
90         (search_symbols): New arg t_regexp.
91         (symtab_symbol_info): New args quiet, regexp, t_regexp.
92         (info_variables_command): Extract info print args and use them.
93         (info_functions_command): Likewise.
94         (info_types_command): Update call to symtab_symbol_info.
95         (_initialize_symtab): Modify on-line help.
96         * symtab.h (treg_matches_sym_type_name): New function.
97         (search_symbols): New t_regexp arg.
98
99 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
100
101         * cli-utils.c (extract_arg_maybe_quoted): New function.
102         (extract_info_print_args): New function.
103         (info_print_args_help): New function.
104         (report_unrecognized_option_error): New function.
105         * cli-utils.h (extract_arg_maybe_quoted): New function.
106         (extract_info_print_args): New function.
107         (info_print_args_help): New function.
108         (report_unrecognized_option_error): New function.
109
110 2018-10-26  Tom Tromey  <tom@tromey.com>
111
112         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
113         (compute_compunit_symtab_includes): Update.
114         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
115         (compunit_symtab_ptr): Likewise.
116
117 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
118
119         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
120         default_print_auxv_entry for specific tag values.
121
122 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
123
124         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
125
126 2018-10-26  Jim Wilson  <jimw@sifive.com>
127
128         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
129         (riscv_linux_sigframe_init): Declare.
130         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
131         (riscv_linux_sigframe): New.
132         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
133         (riscv_linux_sigframe_init): Define.
134         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
135
136         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
137         (riscv_isa_flen): Likewise.  Drop static.
138         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
139         (riscv_isa_flen): Likewise.  Declare.
140
141 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
142             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
143
144         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
145         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
146         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
147         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
148         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
149         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
150         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
151         Define.
152         (struct ppc_linux_features) <htm>: New field.
153         (ppc_linux_no_features): Add initializer for htm field.
154         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
155         new tdescs.
156         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
157         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
158         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
159         Define if not already defined.
160         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
161         and rs6000/powerpc-isa207-htm-vsx64l.
162         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
163         rs6000/powerpc-isa207-htm-vsx64l.xml.
164         * features/rs6000/power-htm-spr.xml: New file.
165         * features/rs6000/power-htm-core.xml: New file.
166         * features/rs6000/power64-htm-core.xml: New file.
167         * features/rs6000/power-htm-fpu.xml: New file.
168         * features/rs6000/power-htm-altivec.xml: New file.
169         * features/rs6000/power-htm-vsx.xml: New file.
170         * features/rs6000/power-htm-ppr.xml: New file.
171         * features/rs6000/power-htm-dscr.xml: New file.
172         * features/rs6000/power-htm-tar.xml: New file.
173         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
174         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
175         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
176         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
177         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
178         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
179         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
180         fetch_regset with HTM regsets.
181         (store_register, store_ppc_registers): Call store_regset with HTM
182         regsets.
183         (ppc_linux_nat_target::read_description): Set htm field in the
184         features struct if needed.
185         * ppc-linux-tdep.c: Include
186         features/rs6000/powerpc-isa207-htm-vsx32l.c and
187         features/rs6000/powerpc-isa207-htm-vsx64l.c.
188         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
189         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
190         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
191         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
192         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
193         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
194         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
195         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
196         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
197         (ppc32_linux_ctarregset): New globals.
198         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
199         (ppc_linux_collect_core_cpgrregset): New function.
200         (ppc_linux_iterate_over_regset_sections): Call back with the htm
201         regsets.
202         (ppc_linux_core_read_description): Check if the tm spr section is
203         present and set htm in the features struct.
204         (_initialize_ppc_linux_tdep): Call
205         initialize_tdesc_powerpc_isa207_htm_vsx32l and
206         initialize_tdesc_powerpc_isa207_htm_vsx64l.
207         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
208         Declare.
209         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
210         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
211         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
212         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
213         New fields.
214         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
215         Likewise.
216         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
217         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
218         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
219         New enum fields.
220         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
221         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
222         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
223         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
224         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
225         <PPC_CTAR_REGNUM>: Likewise.
226         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
227         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
228         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
229         (IS_CEFP_PSEUDOREG): Define.
230         (rs6000_register_name): Hide the upper halves of checkpointed VSX
231         registers.  Return names for the checkpointed DFP, VSX, and EFP
232         pseudo registers.
233         (rs6000_pseudo_register_type): Remove initial assert and raise an
234         internal error in the else clause instead.  Return types for the
235         checkpointed DFP, VSX, and EFP pseudo registers.
236         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
237         checkpointed DFP pseudo registers.
238         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
239         checkpointed VSX pseudo registers.
240         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
241         from efpr_pseudo_register_read and
242         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
243         registers.
244         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
245         Handle checkpointed DFP, VSX, and EFP registers.
246         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
247         (efp_ax_pseudo_register_collect): New functions.
248         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
249         register logic to new functions.  Handle checkpointed DFP, VSX,
250         and EFP pseudo registers.
251         (rs6000_gdbarch_init): Look for and validate the htm features.
252         Include checkpointed DFP, VSX and EFP pseudo-registers.
253         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
254         HTM registers.
255
256 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
257
258         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
259         without altivec or fpu.
260
261 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
262             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
263
264         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
265         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
266         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
267         Define if not already defined.
268         * features/rs6000/power-ebb.xml: New file.
269         * features/rs6000/power-linux-pmu.xml: New file.
270         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
271         features.
272         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
273         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
274         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
275         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
276         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
277         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
278         fetch_regset with ebb and pmu regsets.
279         (store_register, store_ppc_registers): Call store_regset with ebb
280         and pmu regsets.
281         (ppc_linux_nat_target::read_description): Set isa207 field in the
282         features struct if ebb and pmu are avaiable.
283         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
284         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
285         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
286         and pmu regsets.
287         (ppc_linux_core_read_description): Check if the pmu section is
288         present and set isa207 in the features struct.
289         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
290         (ppc32_linux_pmuregset): Declare.
291         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
292         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
293         <ppc_sier_regnum>: New field.
294         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
295         New enum values.
296         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
297         values.
298         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
299         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
300         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
301         ebb and pmu features.
302
303 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
304             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
305
306         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
307         (tdesc_powerpc_isa207_vsx64l): Declare.
308         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
309         (struct ppc_linux_features) <isa207>: New field.
310         (ppc_linux_no_features): Add initializer for isa207 field.
311         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
312         new tdescs.
313         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
314         (NT_PPC_TAR): Define if not already defined.
315         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
316         rs6000/powerpc-isa207-vsx64l.
317         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
318         rs6000/powerpc-isa207-vsx64l.xml.
319         * features/rs6000/power-tar.xml: New file.
320         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
321         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
322         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
323         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
324         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
325         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
326         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
327         fetch_regset with the TAR regset.
328         (store_register, store_ppc_registers): Call store_regset with the
329         TAR regset.
330         (ppc_linux_nat_target::read_description): Set isa207 field in the
331         features struct if needed.
332         * ppc-linux-tdep.c: Include
333         features/rs6000/powerpc-isa207-vsx32l.c and
334         features/rs6000/powerpc-isa207-vsx64l.c.
335         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
336         (ppc_linux_iterate_over_regset_sections): Call back with the tar
337         regset.
338         (ppc_linux_core_read_description): Check if the tar section is
339         present and set isa207 in the features struct.
340         (_initialize_ppc_linux_tdep): Call
341         initialize_tdesc_powerpc_isa207_vsx32l and
342         initialize_tdesc_powerpc_isa207_vsx64l.
343         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
344         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
345         (enum) <PPC_TAR_REGNUM>: New enum value.
346         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
347         feature.
348         (ppc_process_record_op31): Record changes to TAR.
349
350 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
351             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
352
353         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
354         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
355         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
356         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
357         (struct ppc_linux_features) <ppr_dscr>: New field.
358         (ppc_linux_no_features): Add initializer for ppr_dscr field.
359         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
360         new tdescs.
361         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
362         Define if not already defined.
363         * features/Makefile (WHICH): Add
364         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
365         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
366         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
367         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
368         * features/rs6000/power-dscr.xml: New file.
369         * features/rs6000/power-ppr.xml: New file.
370         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
371         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
372         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
373         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
374         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
375         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
376         * ppc-linux-nat.c: Include <sys/uio.h>.
377         (fetch_regset, store_regset, check_regset): New functions.
378         (fetch_register, fetch_ppc_registers): Call fetch_regset with
379         DSCR and PPR regsets.
380         (store_register, store_ppc_registers): Call store_regset with
381         DSCR and PPR regsets.
382         (ppc_linux_get_hwcap2): New function.
383         (ppc_linux_nat_target::read_description): Call
384         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
385         features struct if needed.
386         * ppc-linux-tdep.c: Include
387         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
388         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
389         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
390         (ppc32_linux_dscrregset): New globals.
391         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
392         and dscr regsets.
393         (ppc_linux_core_read_description): Check if the ppr and dscr
394         sections are present and set ppr_dscr in the features struct.
395         (_initialize_ppc_linux_tdep): Call
396         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
397         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
398         * ppc-linux-tdep.h (ppc32_linux_pprregset)
399         (ppc32_linux_dscrregset): Declare.
400         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
401         <ppc_dscr_regnum>: New field.
402         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
403         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
404         and dscr features.
405         (ppc_process_record_op31): Record changes to PPR and DSCR.
406
407 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
408
409         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
410         second initializer line for the have_* variables.  Initialize
411         have_fpu to 0 instead of 1.
412
413 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
414
415         * arch/ppc-linux-common.c (ppc_linux_match_description):
416         Parenthesize tdesc assignements and indent them properly.
417
418 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
419
420         * ppc-linux-nat.c (fetch_register): Change if statement to else
421         if.
422         (store_register): Likewise.
423
424 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
425
426         * rs6000-tdep.c: Remove reggroups.h include.
427         (rs6000_pseudo_register_reggroup_p): Remove.
428         (rs6000_gdbarch_init): Remove call to
429         set_tdesc_pseudo_register_reggroup_p.
430
431 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
432
433         * reggroups.c (default_register_reggroup_p): Return true for
434         decfloat registers and float_reggroup.
435
436 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
437
438         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
439         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
440         ppc_linux_collect_vrregset by regcache_collect_regset.
441
442 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
443
444         * linux-tdep.c (linux_collect_regset_section_cb): Use
445         std::vector<gdb_byte> instead of char * and malloc for buf.
446         Remove xfree.
447
448 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
449
450         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
451         symtab_start instead of always using language_unknown.
452
453 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
454
455         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
456         READ_P parameter, catch and ignore register access errors from
457         either the old or new MISA location.
458         (riscv_has_feature): Update call to riscv_read_misa_reg.
459
460 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
461
462         * python/py-function.c (convert_values_to_python): Return
463         gdbpy_ref<>.  Add header comment.
464         (fnpy_call): Adjust.
465
466 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
467
468         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
469         (cmdpy_completer_handle_brkchars): Adjust.
470         (cmdpy_completer): Adjust.
471
472 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
473
474         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
475         Pass correct regnum to raw_supply_zeroed.
476
477 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
478
479         * regcache.c (cooked_read_test): Add CSKY to the list of
480         architectures with a save_reggroup
481
482 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
483
484         PR gdb/23368
485         * infrun.c (follow_exec): In the follow_exec_mode_new case,
486         transfer terminal state from old new new inferior.
487         * terminal.h (swap_terminal_info): New function.
488         * inflow.c (swap_terminal_info): New function.
489
490 2018-10-23  Tom Tromey  <tom@tromey.com>
491
492         * record-btrace.c (get_thread_current_frame_id): Rename from
493         get_thread_current_frame.  Return a frame_id.
494         (record_btrace_start_replaying): Update.
495
496 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
497
498         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
499         for CSRs.
500
501 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
502
503         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
504         have_nonsteppable_watchpoint attribute to 1.
505
506 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
507
508         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
509         register names.
510         (struct register_alias): Rename to...
511         (struct riscv_register_alias): ...this, and update comment.
512         (riscv_register_aliases): Update type, and alias names.  Remove
513         CSR names from this list.
514         (riscv_register_name): Use riscv_gdb_reg_names for int and float
515         register names.  Add an extra assertion.
516         (riscv_is_regnum_a_named_csr): New function.
517         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
518
519 2018-10-22  Jim Wilson  <jimw@sifive.com>
520
521         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
522         FP reg smaller than FP reg size, and fill with -1 instead of 0.
523
524         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
525         (riscv_register_type): Use them.
526         (riscv_print_one_register_info): Handle union of floats same as float.
527         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
528         riscv_fpreg_q_type fields.
529
530 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
531
532         * gdbarch.sh (gdbarch_num_cooked_regs): New.
533         * gdbarch.h: Re-generate.
534         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
535         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
536         * eval.c (evaluate_subexp_standard): Likewise.
537         * findvar.c (value_of_register): Likewise.
538         (value_of_register_lazy): Likewise.
539         (address_from_register): Likewise.
540         * frame.c (get_frame_register_bytes): Likewise.
541         * gdbarch-selftests.c (register_to_value_test): Likewise.
542         * h8300-tdep.c (h8300_register_type): Likewise.
543         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
544         (i386_svr4_reg_to_regnum): Likewise.
545         * infcmd.c (default_print_registers_info): Likewise.
546         (registers_info): Likewise.
547         (print_vector_info): Likewise.
548         (default_print_float_info): Likewise.
549         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
550         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
551         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
552         (mi_cmd_data_list_changed_registers): Likewise.
553         (mi_cmd_data_list_register_values): Likewise.
554         (mi_cmd_data_write_register_values): Likewise.
555         (mi_cmd_trace_frame_collected): Likewise.
556         * mips-tdep.c (print_gp_register_row): Likewise.
557         (mips_print_registers_info): Likewise.
558         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
559         * regcache.c (init_regcache_descr): Likewise.
560         (register_size): Likewise.
561         (register_dump::dump): Likewise.
562         (cooked_read_test): Likewise.
563         (cooked_write_test): Likewise.
564         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
565         (rs6000_gdbarch_init): Likewise.
566         * stabsread.c (stab_reg_to_regnum): Likewise.
567         * stack.c (info_frame_command): Likewise.
568         * target-descriptions.c (tdesc_register_name): Likewise.
569         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
570         * tui/tui-regs.c (tui_show_register_group): Likewise.
571         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
572         (user_reg_map_regnum_to_name): Likewise.
573         (value_of_user_reg): Likewise.
574         (maintenance_print_user_registers): Likewise.
575         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
576         (xtensa_register_name): Likewise.
577         (xtensa_register_type): Likewise.
578         (xtensa_reg_to_regnum): Likewise.
579         (xtensa_pseudo_register_read): Likewise.
580         (xtensa_pseudo_register_write): Likewise.
581
582 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
583
584         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
585         correctly-sized buffer with raw_read.
586         (amd64_pseudo_register_write): Use correctly-sized buffer for
587         raw_read/raw_write.
588
589 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
590
591         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
592         in add_prefix_cmd of set print type.
593
594 2018-10-19  Tom Tromey  <tom@tromey.com>
595
596         PR tui/18388:
597         * NEWS: Mention tabset deprecation.
598         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
599         (update_tab_width): New function.
600         (tui_set_tab_width, tui_show_tab_width): New functions.
601         (tui_set_tab_width_command): Use update_tab_width.
602         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
603         Add new "set tui tab-width" command.
604         * tui/tui-source.c (tui_set_source_content): Update.
605         * tui/tui-disasm.c (tui_set_disassem_content): Update.
606         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
607         Don't declare.
608         (tui_tab_width): Declare.
609         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
610         (tui_set_default_tab_len): Remove.
611
612 2018-10-19  Tom Tromey  <tom@tromey.com>
613
614         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
615         (key_is_backspace, tui_getc): Don't declare.
616         * tui/tui-io.c (key_is_start_sequence): Now static.
617         (key_is_end_sequence, key_is_backspace): Remove.
618         (tui_getc): Now static.
619
620 2018-10-19  Tom Tromey  <tom@tromey.com>
621
622         * symfile.c (reread_symbols): Clear "static_links".
623
624 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
625
626         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
627         define.
628         (aarch64_linux_sigframe_init): Extra boundary checks.
629
630 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
631
632         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
633         the possibly non-existent tdesc type 'vec128', but the type of raw
634         register v16 instead.
635
636 2018-10-19  Gary Benson <gbenson@redhat.com>
637
638         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
639
640 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
641
642         PR cli/23785
643         * cli/cli-dump.c (restore_binary_file): Check if "file" is
644         NULL.
645
646 2018-10-17  Paul Koning  <paul_koning@dell.com>
647
648         * charset.c (convert_between_encodings): Fix unsigned overflow.
649
650 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
651
652         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
653         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
654         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
655         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
656         New functions.
657         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
658         and fbsd_info_proc_mappings_header.
659         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
660         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
661         New.
662
663 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
664
665         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
666         Solaris Maintainer.
667
668 2018-10-15  Tom Tromey  <tom@tromey.com>
669
670         * tui/tui.c (strcat_to_buf): Remove casts.
671         * tui/tui-winsource.c (tui_show_source_line)
672         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
673         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
674         * tui/tui-windata.c (tui_first_data_item_displayed)
675         (tui_delete_data_content_windows, tui_erase_data_content)
676         (tui_display_all_data, tui_display_data_from)
677         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
678         * tui/tui-win.c (tui_set_win_height)
679         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
680         casts.
681         * tui/tui-win.c (tui_resize_all): Remove casts.
682         (tui_scroll_backward_command, tui_set_focus)
683         (tui_set_tab_width_command): Likewise.
684         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
685         * tui/tui-regs.c (tui_show_register_group): Remove cast.
686         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
687         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
688         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
689         Remove casts.
690
691 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
692
693         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
694         AArch64/ARM maintainer.
695
696 2018-10-11  Gary Benson <gbenson@redhat.com>
697
698         * interps.h (interp::m_name): Make private and mutable.
699         * interps.c (interp::~interp): Free m_name.
700
701 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
702             Simon Marchi <simark@simark.ca>
703
704         * README (`configure' options): Add documentation for new
705         "--enable-unit-tests" option.
706         * acinclude.m4: Include "selftest.m4".
707         * configure: Regenerate.
708         * configure.ac: Use "GDB_AC_SELFTEST".
709         * maint.c (maintenance_selftest): Update message informing
710         that selftests have been disabled.
711         (maintenance_info_selftests): Likewise.
712         * selftest.m4: New file.
713
714 2018-10-10  Gary Benson <gbenson@redhat.com>
715
716         * remote.c (remote_target::remote_send_printf): Add
717         missing va_end found by Coverity.
718
719 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
720
721         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
722
723 2018-10-09  Tom Tromey  <tom@tromey.com>
724
725         * configure: Rebuild.
726         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
727         * NEWS: Update --enable-ubsan documentation.
728
729 2018-10-09  Gary Benson <gbenson@redhat.com>
730
731         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
732         found by Coverity.
733
734 2018-10-08  Tom Tromey  <tom@tromey.com>
735
736         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
737         variable.
738         (riscv_fbsd_init_abi): Likewise.
739
740 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
741         * valops.c (value_struct_elt_for_reference): Rename local variable
742         to work around the shadowing a previous local warning.
743
744 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
745
746         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
747         * NEWS: Mention new FreeBSD/riscv native configuration.
748         * configure.host: Add riscv*-*-freebsd*.
749         * configure.nat: Likewise.
750         * riscv-fbsd-nat.c: New file.
751
752 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
753
754         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
755         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
756         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
757         * NEWS: Mention new FreeBSD/riscv target.
758         * configure.tgt: Add riscv*-*-freebsd*.
759         * riscv-fbsd-tdep.c: New file.
760         * riscv-fbsd-tdep.h: New file.
761
762 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
763
764         * regcache.h (struct regcache_map_entry): Note that this type can
765         be used with traditional frame caches.
766         * trad-frame.c (trad_frame_set_reg_regmap): New.
767         * trad-frame.h (trad_frame_set_reg_regmap): New.
768
769 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
770
771         PR c++/16841
772         * valops.c (get_virtual_base_offset): New function.
773         (value_struct_elt_for_reference): Use it to get virtual base offset
774         and add it in calculating class member address.
775
776 2018-10-08   John Darrington <john@darrington.wattle.id.au>
777
778     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
779       (check_producer): Check if the producer is codewarrior.
780       (producer_is_codewarrior): New function.
781       (lnp_state_machine::record_line): Ignore is_stmt flag for records
782        produced by codewarrior.
783       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
784
785 2018-10-06  Tom Tromey  <tom@tromey.com>
786
787         PR python/19399:
788         * python/py-inferior.c: Add "architecture" entry.
789         (infpy_architecture): New function.
790
791 2018-10-06  Tom Tromey  <tom@tromey.com>
792
793         PR python/21765:
794         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
795         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
796         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
797         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
798
799 2018-10-06  Tom Tromey  <tom@tromey.com>
800
801         PR build/17077:
802         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
803         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
804         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
805         #include.
806
807 2018-10-06  Tom Tromey  <tom@tromey.com>
808
809         * python/py-breakpoint.c (bppy_get_location): Handle a
810         bp_breakpoint without a location.
811
812 2018-10-06  Tom Tromey  <tom@tromey.com>
813
814         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
815         (_RegEx): Reformat help text.
816         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
817         (AnyCallerIs, AnyCallerMatches): Reformat help text.
818         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
819         text.
820         * python/lib/gdb/command/xmethods.py (InfoXMethod)
821         (EnableXMethod, DisableXMethod): Remove help indentation.
822         Capitalize meta-syntactic variables.
823         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
824         (EnableUnwinder, DisableUnwinder): Remove help indentation.
825         Capitalize meta-syntactic variables.
826         * python/lib/gdb/command/explore.py (ExploreCommand)
827         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
828         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
829         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
830         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
831         Remove help indentation.
832         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
833         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
834         (DisableFrameFilter, SetFrameFilterPriority)
835         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
836
837 2018-10-06  Tom Tromey  <tom@tromey.com>
838
839         PR tui/28819:
840         * tui/tui-io.c (gdb_wgetch): New function.
841         (tui_mld_getc, tui_getc): Use it.
842
843 2018-10-05  Tom Tromey  <tom@tromey.com>
844
845         * sol-thread.c (sol_thread_target::wait): Rename inner
846         "save_ptid".
847
848 2018-10-04  Tom Tromey  <tom@tromey.com>
849
850         * configure: Rebuild.
851         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
852
853 2018-10-04  Tom Tromey  <tom@tromey.com>
854
855         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
856         declaration of "block".
857
858 2018-10-04  Tom Tromey  <tom@tromey.com>
859
860         * common/filestuff.c (fdwalk): Remove inner declaration of
861         "result".
862
863 2018-10-04  Tom Tromey  <tom@tromey.com>
864
865         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
866         "structs_addr" and hoist declaration.
867
868 2018-10-04  Tom Tromey  <tom@tromey.com>
869
870         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
871         variable "size".
872
873 2018-10-04  Tom Tromey  <tom@tromey.com>
874
875         * mdebugread.c (parse_partial_symbols): Use std::string.
876
877 2018-10-04  Tom Tromey  <tom@tromey.com>
878
879         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
880         * p-valprint.c (pascal_val_print): Split inner "i" variable.
881         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
882         header.
883         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
884         more inner scope.
885         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
886         * varobj.c (varobj_update): Rename inner "newobj",
887         "type_changed".
888         * valprint.c (generic_emit_char): Rename inner "buf".
889         * valops.c (find_overload_match): Rename inner "temp".
890         (value_struct_elt_for_reference): Declare "v" in more inner
891         scope.
892         * v850-tdep.c (v850_push_dummy_call): Rename "len".
893         * unittests/array-view-selftests.c (run_tests): Rename inner
894         "vec".
895         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
896         header.
897         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
898         "tsv" in more inner scope.
899         (print_one_static_tracepoint_marker): Rename inner
900         "tuple_emitter".
901         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
902         (tic6x_push_dummy_call): Don't redeclare "addr".
903         * target-float.c: Declare "dto" lower.
904         * symtab.c (lookup_local_symbol): Rename inner "sym".
905         (find_pc_sect_line): Rename inner "pc".
906         * stack.c (print_frame): Don't redeclare "gdbarch".
907         (return_command): Rename inner "gdbarch".
908         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
909         "sp".
910         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
911         header.
912         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
913         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
914         scope.
915         * remote.c (remote_target::update_thread_list): Don't redeclare
916         "tp".
917         (remote_target::process_initial_stop_replies): Rename inner
918         "thread".
919         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
920         (remote_target::wait_as): Don't redeclare "stop_reply".
921         (remote_target::get_thread_local_address): Rename inner
922         "result".
923         (remote_target::get_tib_address): Likewise.
924
925         * regcache.c (cooked_read_test): Rename "regnum".
926         * record-btrace.c (cmd_record_btrace_start): Rename inner
927         "exception".
928         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
929         loop header.
930         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
931         header.
932         (ppu2spu_sniffer): Rename inner "buf".
933         * parse.c (operator_check_standard): Rename inner "type",
934         "objfile".
935         * p-valprint.c (pascal_val_print): Introduce new scope for
936         "low_bound", "high_bound".
937         * p-exp.y (yylex): Declare "i" in loop header.
938         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
939         Lower declaration of "s".
940         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
941         header.
942         (nios2_push_dummy_call): Rename "len".
943         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
944         "buf".
945         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
946         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
947         (linux_xfer_osdata_modules): Likewise.
948         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
949         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
950         (mips_o64_push_dummy_call): Likewise.
951         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
952         "op".
953         * mi/mi-main.c (list_available_thread_groups): Rename inner
954         "tuple_emitter".
955         (mi_cmd_data_read_memory): Rename inner "opts".
956         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
957         "tuple_emitter".
958         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
959         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
960         more inner scope.
961         (parse_partial_symbols): Rename inner "pst", "p", "name"
962         * main.c (captured_main_1): Rename inner "i"s.
963         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
964         "oso2".
965         * linux-tdep.c (linux_info_proc): Rename inner "filename".
966         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
967         * infrun.c (handle_no_resumed): Don't redeclare "thread".
968         (handle_signal_stop): Rename inner "gdbarch".
969         (handle_command): Declare "signum" in loop header.
970         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
971         "status".
972         (examine_prologue): Rename inner "sol" and "sof".
973         (ia64_extract_return_value): Rename inner "val".  Declare another
974         "val" in a more inner scope.
975         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
976         inner scope.
977         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
978         "except".
979         * findvar.c (default_read_var_value): Don't redeclare "addr".
980         * f-exp.y (yylex): Declare "i" in loop header.
981         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
982         Rename inner "type", "expect_type".
983         (evaluate_subexp_for_sizeof): Rename inner "pc".
984         * elfread.c (elf_symfile_read): Rename inner "abfd".
985         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
986         "bytes_read".
987         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
988         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
989         (dwarf_decode_line_header): Rename inner "lh".
990         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
991         "offset".  Declare "i" in loop header.
992         (disassemble_dwarf_expression): Rename inner "addr_size".
993         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
994         inner "result".
995         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
996         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
997         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
998         "inner_list_emitter".
999         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1000         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1001         declaration in a block.
1002         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1003         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1004         "obstack_final_size".
1005         * cp-support.c (inspect_type): Declare "i" in loop header.
1006         * compile/compile.c (compile_instance::insert_symbol_error):
1007         Rename inner "e".
1008         * common/agent.c (agent_run_command): Remove inner "ret"
1009         declaration.
1010         * coffread.c (coff_symfile_read): Rename inner "name".
1011         (coff_symfile_read): Rename inner "abfd".
1012         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1013         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1014         "high".
1015         * c-exp.y (lex_one_token): Move "len" declaration lower.
1016         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1017         "gdbarch".
1018         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1019         "b".
1020         (watch_command_1): Declare "mark" later.
1021         (clear_command): Don't shadow "a" or "b".
1022         (delete_command): Rename inner "b".
1023         (delete_trace_command): Likewise.
1024         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1025         "op".
1026         (arm_gdbarch_init): Remove inner "e_flags".
1027         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1028         "offset" in inner blocks.
1029
1030 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1031
1032         * dwarf-index-write.c (file_write): Don't write if the vector is
1033         empty.
1034
1035 2018-10-05  Tom de Vries  <tdevries@suse.de>
1036
1037         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1038         PyArg_ParseTuple call.
1039
1040 2018-10-05  Tom de Vries  <tdevries@suse.de>
1041
1042         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1043         PyArg_ParseTuple call.
1044
1045 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1046
1047         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1048         to avoid exceeding 80 characters per line limit.
1049
1050 2018-10-04  Tom Tromey  <tom@tromey.com>
1051
1052         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1053         (reread_symbols): Update.
1054         * complaints.h (clear_complaints): Remove argument.
1055         * complaints.c (enum complaint_series): Remove.
1056         (series): Remove global.
1057         (complaint_internal): Update.
1058         (clear_complaints): Remove argument.
1059
1060 2018-10-04  Tom Tromey  <tom@tromey.com>
1061
1062         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1063         debugging symbols" message if there is a separate debug objfile.
1064
1065 2018-10-04  Tom Tromey  <tom@tromey.com>
1066
1067         PR cli/19551:
1068         * symfile.c (symbol_file_add_with_addrs): Update output.
1069         * psymtab.c (require_partial_symbols): Update output.
1070
1071 2018-10-04  Tom Tromey  <tom@tromey.com>
1072
1073         PR cli/22234:
1074         * complaints.c: Emit \n.
1075
1076 2018-10-04  Tom Tromey  <tom@tromey.com>
1077
1078         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1079         (separate_debug_file_exists, find_separate_debug_file)
1080         (add_symbol_file_command, reread_symbols, allocate_symtab)
1081         (allocate_compunit_symtab): Use filtered printing, not
1082         unfiltered.
1083         * psymtab.c (require_partial_symbols, dump_psymtab)
1084         (allocate_psymtab): Use filtered printing, not unfiltered.
1085
1086 2018-10-04  Tom Tromey  <tom@tromey.com>
1087
1088         * complaints.c (complaint_internal): Correctly check complaint
1089         count.
1090
1091 2018-10-04  Tom Tromey  <tom@tromey.com>
1092
1093         * complaints.h (struct complaints): Remove declaration.
1094         * complaints.c (clear_complaints): Remove an unused variable.
1095
1096 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1097
1098         * MAINTAINERS (Write After Approval): Add self.
1099
1100 2018-10-03  Tom Tromey  <tom@tromey.com>
1101
1102         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1103         "buffer_contents".
1104         * coffread.c (coff_symtab_read): Initialize "newobj".
1105
1106 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1107
1108         * dwarf2read.c (read_func_scope): Remove struct keyword in
1109         range-based for.
1110
1111 2018-10-03  Tom Tromey  <tom@tromey.com>
1112
1113         * README: Mention --enable-ubsan.
1114         * NEWS: Mention --enable-ubsan.
1115         * acinclude.m4: Include sanitize.m4.
1116         * configure: Rebuild.
1117         * configure.ac: Call AM_GDB_UBSAN.
1118         * sanitize.m4: New file.
1119
1120 2018-10-03  Tom Tromey  <tom@tromey.com>
1121
1122         * expression.h (enum exp_opcode): Use uint8_t as base type.
1123         * expprint.c (op_name): Handle invalid opcodes.
1124
1125 2018-10-03  Tom Tromey  <tom@tromey.com>
1126
1127         * parse.c (prefixify_expression): Add assert.
1128         (parse_exp_in_context_1): Throw exception if the expression is
1129         empty.
1130
1131 2018-10-03  Tom Tromey  <tom@tromey.com>
1132
1133         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1134
1135 2018-10-03  Tom Tromey  <tom@tromey.com>
1136
1137         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1138
1139 2018-10-03  Tom Tromey  <tom@tromey.com>
1140
1141         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1142         unsigned.
1143
1144 2018-10-03  Tom Tromey  <tom@tromey.com>
1145
1146         * findvar.c (extract_integer): Do work in an unsigned type.
1147
1148 2018-10-03  Tom Tromey  <tom@tromey.com>
1149
1150         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1151         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1152         base type.
1153         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1154         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1155         type.
1156         * c-lang.h (enum c_string_type_values): Use unsigned as base
1157         type.
1158         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1159
1160 2018-10-03  Tom Tromey  <tom@tromey.com>
1161
1162         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1163         <~dwarf2_frame_state_reg_info>: Update.
1164         <dwarf2_frame_state_reg_info>: Update.
1165         <alloc_regs>: Add assertion.  Update.
1166         <reg>: Now a std::vector.
1167         <num_regs>: Remove.
1168         <swap>: Update.
1169         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1170         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1171
1172 2018-10-03  Tom Tromey  <tom@tromey.com>
1173
1174         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1175
1176 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1177
1178         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1179
1180 2018-10-02  Tom Tromey  <tom@tromey.com>
1181
1182         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1183
1184 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1185
1186         * NEWS: Mention changed commands.
1187         * ser-uds.c: New file.
1188         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1189         * configure: Regenerate.
1190         * Makefile.in: Add new file.
1191         * serial.c (serial_open): Check if filename is a socket
1192           and lookup the appropriate interface accordingly.
1193
1194 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1195
1196         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1197         define.
1198         (AARCH64_EXTRA_MAGIC): Likewise.
1199         (AARCH64_FPSIMD_MAGIC): Likewise.
1200         (AARCH64_SVE_MAGIC): Likewise.
1201         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1202         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1203         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1204         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1205         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1206         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1207         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1208         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1209         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1210         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1211         (read_aarch64_ctx): Add function.
1212         (aarch64_linux_sigframe_init): Detect FP registers.
1213
1214 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1215
1216         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1217         (AARCH64_D0_REGNUM): Likewise.
1218         (AARCH64_S0_REGNUM): Likewise.
1219         (AARCH64_H0_REGNUM): Likewise.
1220         (AARCH64_B0_REGNUM): Likewise.
1221         (AARCH64_SVE_V0_REGNUM): Likewise.
1222         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1223         (AARCH64_D0_REGNUM): Likewise.
1224         (AARCH64_S0_REGNUM): Likewise.
1225         (AARCH64_H0_REGNUM): Likewise.
1226         (AARCH64_B0_REGNUM): Likewise.
1227         (AARCH64_SVE_V0_REGNUM): Likewise.
1228
1229 2018-10-01  Gary Benson <gbenson@redhat.com>
1230
1231         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1232         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1233         prfpregset_t instead of gdb_prfpregset_t.
1234         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1235         * configure, config.in: Rebuild.
1236
1237 2018-10-01  Gary Benson <gbenson@redhat.com>
1238
1239         * common/gdb_proc_service.h: New file, factored out from...
1240         * gdb_proc_service.h: Moved common code to the above file.
1241         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1242
1243 2018-10-01  Gary Benson <gbenson@redhat.com>
1244
1245         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1246         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1247
1248 2018-10-01  Gary Benson <gbenson@redhat.com>
1249
1250         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1251         (AC_CHECK_HEADERS): Check for linux/elf.h.
1252         * configure, config.in: Rebuild.
1253         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1254         doesn't define elf_fpregset_t.
1255
1256 2018-10-01  Gary Benson <gbenson@redhat.com>
1257
1258         * gdb_proc_service.h: Whitespace change.
1259
1260 2018-10-01  Tom Tromey  <tom@tromey.com>
1261
1262         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1263         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1264         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1265
1266 2018-10-01  Tom Tromey  <tom@tromey.com>
1267
1268         * README: Minor change.
1269
1270 2018-09-30  Pedro Alves  <palves@redhat.com>
1271
1272         * darwin-nat-info.c (darwin_debug_regions_recurse)
1273         (info_mach_exceptions_command): Remove unused local variables.
1274         * darwin-nat.c (darwin_decode_notify_message)
1275         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1276         (darwin_stop_inferior, darwin_setup_exceptions)
1277         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1278         (darwin_nat_target::attach, darwin_nat_target::detach)
1279         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1280         local variables.
1281         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1282         variables.
1283
1284 2018-09-29  Tom Tromey  <tom@tromey.com>
1285
1286         * README: Remove some leftover text.
1287
1288 2018-09-29  Tom Tromey  <tom@tromey.com>
1289
1290         * PROBLEMS: Rewrite.
1291         * README: Update.
1292
1293 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1294
1295         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1296         case with explicit breakpoint kind.
1297         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1298         'additional_info' and related logic.
1299         (riscv_debug_breakpoints): New variable.
1300         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1301         instruction to determine the breakpoint kind.
1302         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1303         flag.  Update description of 'set/show riscv
1304         use-compressed-breakpoints' flag.
1305
1306 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1307
1308         (NEWS): Mention changes to frame related commands.
1309         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1310         (add_prefix_cmd_suppress_notification): New function.
1311         (add_com_suppress_notification): Call
1312         add_cmd_suppress_notification.
1313         * command.h (add_cmd_suppress_notification): Declare.
1314         (add_prefix_cmd_suppress_notification): Declare.
1315         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1316         (parse_frame_specification): Moved from stack.c, with
1317         simplification to handle a single argument.
1318         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1319         switch to the selected frame.  Add a header comment.
1320         * stack.c: Remove 'safe-ctype.h' include.
1321         (find_frame_for_function): Add declaration.
1322         (find_frame_for_address): New function.
1323         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1324         (frame_selection_by_function_completer): New function.
1325         (info_frame_command): Rename to...
1326         (info_frame_command_core): ...this, and update parameter types.
1327         (select_frame_command): Rename to...
1328         (select_frame_command_core): ...this, and update parameter types.
1329         (frame_command): Rename to...
1330         (frame_command_core): ...this, and update parameter types.
1331         (class frame_command_helper): New class to wrap implementations of
1332         frame related sub-commands.
1333         (frame_apply_cmd_list): New static global.
1334         (frame_cmd_list): Make static.
1335         (select_frame_cmd_list): New global for sub-commands.
1336         (info_frame_cmd_list): New global for sub-commands.
1337         (_initialize_stack): Register sub-commands for 'frame',
1338         'select-frame', and 'info frame'.  Update 'frame apply' commands
1339         to use frame_apply_cmd_list.  Move function local static
1340         frame_apply_list to file static frame_apply_cmd_list for
1341         consistency.
1342         * stack.h (select_frame_command): Delete declarationn.
1343         (select_frame_for_mi): Declare new function.
1344
1345 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1346
1347         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1348         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1349         and NOP.
1350
1351 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1352
1353         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1354
1355 2018-09-26  Tom Tromey  <tom@tromey.com>
1356
1357         * valops.c (auto_abandon): Remove dead code.
1358
1359 2018-09-26  Tom Tromey  <tom@tromey.com>
1360
1361         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1362
1363 2018-09-24  Tom Tromey  <tom@tromey.com>
1364
1365         * common/pathstuff.c (get_standard_cache_dir): Make
1366         "xdg_cache_home" and "home" const.
1367         * top.c (init_history): Make "tmpenv" const.
1368         * main.c (get_init_files): Make "homedir" const.
1369
1370 2018-09-23  Tom Tromey  <tom@tromey.com>
1371
1372         PR python/18852:
1373         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1374
1375 2018-09-23  Tom Tromey  <tom@tromey.com>
1376
1377         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1378         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1379         * python/python-internal.h (gdbpy_handle_exception): Declare.
1380         * python/py-utils.c (gdbpy_handle_exception): New function.
1381
1382 2018-09-23  Tom Tromey  <tom@tromey.com>
1383
1384         PR python/17284:
1385         * python/py-type.c (typy_template_argument): Check for negative
1386         argument number.
1387
1388 2018-09-23  Tom Tromey  <tom@tromey.com>
1389
1390         PR python/14062:
1391         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1392
1393 2018-09-23  Tom Tromey  <tom@tromey.com>
1394
1395         PR python/18170:
1396         * python/py-value.c (valpy_int): Allow conversion from pointer
1397         type.
1398
1399 2018-09-23  Tom Tromey  <tom@tromey.com>
1400
1401         PR python/20126:
1402         * python/py-value.c (valpy_int): Respect type sign.
1403
1404 2018-09-23  Tom Tromey  <tom@tromey.com>
1405
1406         PR python/18352;
1407         * python/py-value.c (valpy_float): Allow conversions from int or
1408         char.
1409         (valpy_int, valpy_long): Allow conversions from float.
1410
1411 2018-09-23  Tom Tromey  <tom@tromey.com>
1412
1413         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1414         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1415
1416 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1417
1418         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1419         __sighndlr.
1420         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1421
1422 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1423
1424         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1425         target_terminal::ours().
1426
1427 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1428
1429         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1430         of vl to ULONGEST.
1431
1432 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1433
1434         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1435         redundant condition.
1436
1437 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1438
1439         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1440
1441         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1442         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1443         * sol-thread.c (ps_pdmodel): Don't guard definition.
1444
1445         * procfs.c: Fix formatting.
1446
1447         * procfs.c (sysset_t_alloc): Remove.
1448         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1449         (procfs_debug_inferior): Likewise.
1450         (procfs_set_exec_trap): Likewise.
1451         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1452         (proc_set_traced_sysexit): Likewise.
1453
1454         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1455         (dead_procinfo): Likewise.
1456         (proc_warn): Likewise.
1457         (proc_error): Likewise.
1458         (proc_get_LDT_entry): Likewise.
1459         (do_attach): Likewise.
1460         (procfs_target::pid_to_str): Likewise.
1461         (iterate_over_mappings): Likewise.
1462
1463         * procfs.c (create_procinfo): Fix ARI warning.
1464         (proc_get_status): Likewise.
1465         (proc_stop_process): Likewise.
1466         (proc_run_process): Likewise.
1467         (proc_kill): Likewise.
1468         (proc_get_LDT_entry): Likewise.
1469         (procfs_find_LDT_entry): Likewise.
1470         (proc_update_threads): Likewise.
1471         (proc_iterate_over_threads): Likewise.
1472         (do_attach): Likewise.
1473         (procfs_xfer_memory): Likewise.
1474         (invalidate_cache): Likewise.
1475         (procfs_target::resume): Likewise.
1476         (procfs_init_inferior): Likewise.
1477         (procfs_set_exec_trap): Likewise.
1478         (procfs_target::thread_alive): Likewise.
1479         (procfs_target::pid_to_exec_file): Likewise.
1480         (iterate_over_mappings): Likewise.
1481         (procfs_target::make_corefile_notes): Likewise.
1482         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1483
1484         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1485         (procfs_find_LDT_entry): Likewise.
1486         * sol-thread.c (ps_lgetLDT): Likewise.
1487
1488 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1489
1490         PR tdep/17903
1491         * procfs.c (procfs_target): Declare pid_to_exec_file.
1492         (procfs_target::pid_to_exec_file): New.
1493
1494 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1495
1496         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1497         renaming.
1498         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1499         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1500
1501 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1502
1503         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1504         (supply_fpregset, fill_fpregset): Move ...
1505         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1506         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1507         Remove references to ioctl-based procfs.
1508         Include <sys/reg.h>.
1509         Remove PR_MODEL_NATIVE guards.
1510         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1511         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1512
1513 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1514
1515         PR gdb/20981:
1516         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1517         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1518         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1519
1520 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1521
1522         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1523         (fbsd_print_sockaddr_in6): Likewise.
1524
1525 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1526             Chris January  <chris.january@arm.com>
1527
1528         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1529         (evaluate_subexp_standard): Return a dummy type when
1530         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1531         OP_F77_UNDETERMINED_ARGLIST case.
1532         * expression.h (enum noside): Update comment.
1533
1534 2018-09-19  George Vasick <george.vasick@oracle.com>
1535
1536         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1537
1538 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1539             April Chin <april.chin@oracle.com>
1540             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1541
1542         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1543         uint_t lwpid_t.
1544         (create_procinfo): Print pids in /proc without leading zeros.
1545
1546 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1547
1548         * nios2-tdep.c (nios2_gcc_target_options): New.
1549         (nios2_gdb_arch_init): Install new hook.
1550
1551 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1552
1553         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1554         New file.
1555         * update-gnulib.sh: Apply patch.
1556         * configure: Re-generate.
1557
1558 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1559
1560         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1561         description.  Make "info proc" command descriptions more
1562         consistent.
1563
1564 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1565
1566         * NEWS: Mention 'info proc files' command.
1567
1568 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1569
1570         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1571         descriptors for IP_FILES and IP_ALL.
1572
1573 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1574
1575         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1576         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1577         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1578         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1579         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1580         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1581         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1582         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1583         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1584         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1585         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1586         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1587         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1588         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1589         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1590         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1591         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1592         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1593         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1594         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1595         (struct fbsd_sockaddr_un): New types.
1596         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1597         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1598         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1599         (fbsd_core_info_proc_files): New functions.
1600         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1601         IP_ALL.
1602         * fbsd-tdep.h (fbsd_info_proc_files_header)
1603         (fbsd_info_proc_files_entry): New.
1604
1605 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1606
1607         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1608         * infcmd.c (info_proc_cmd_files): New function.
1609         (_initialize_infcmd): Register 'info proc files' command.
1610
1611 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1612
1613         * gnulib/aclocal-m4-deps.mk: Re-generate.
1614         * gnulib/aclocal.m4: Re-generate.
1615         * gnulib/config.in: Re-generate.
1616         * gnulib/configure: Re-generate.
1617         * gnulib/import/Makefile.am: Re-generate.
1618         * gnulib/import/Makefile.in: Re-generate.
1619         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1620         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1621         * gnulib/import/arpa_inet.in.h: New file.
1622         * gnulib/import/inet_ntop.c: New file.
1623         * gnulib/import/m4/arpa_inet_h.m4: New file.
1624         * gnulib/import/m4/inet_ntop.m4: New file.
1625         * gnulib/import/m4/netinet_in_h.m4: New file.
1626         * gnulib/import/m4/socklen.m4: New file.
1627         * gnulib/import/m4/sockpfaf.m4: New file.
1628         * gnulib/import/m4/stdalign.m4: New file.
1629         * gnulib/import/m4/sys_uio_h.m4: New file.
1630         * gnulib/import/netinet_in.in.h: New file.
1631         * gnulib/import/stdalign.in.h: New file.
1632         * gnulib/import/sys_socket.c: New file.
1633         * gnulib/import/sys_socket.in.h: New file.
1634         * gnulib/import/sys_uio.in.h: New file.
1635         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1636         module.
1637
1638 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1639
1640         * gnulib/aclocal-m4-deps.mk: New file.
1641         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1642         deterministically.
1643
1644 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1645
1646         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1647         KVE_PATH.
1648
1649 2018-09-18  Tom Tromey  <tom@tromey.com>
1650
1651         * compile/compile-object-load.c (struct
1652         link_hash_table_cleanup_data): Add constructor and destructor.
1653         Use DISABLE_COPY_AND_ASSIGN.
1654         (~link_hash_table_cleanup_data): Rename from
1655         link_hash_table_free.  Now a destructor.
1656         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1657
1658 2018-09-18  Tom Tromey  <tom@tromey.com>
1659
1660         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1661         * compile/compile-object-load.c (struct munmap_list): Move to
1662         header file.
1663         (munmap_list::add): Rename from munmap_list_add; rewrite.
1664         (munmap_list::~munmap_list): Rename from munmap_list_free.
1665         (munmap_listp_free_cleanup): Remove.
1666         (compile_object_load): Update.
1667         * compile/compile-object-load.h (struct munmap_list): Move from
1668         compile-object-load.c.  Rewrite.
1669
1670 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1671
1672         * aarch64-tdep.c (pass_in_v): Use register size.
1673         (aarch64_extract_return_value): Likewise.
1674         (aarch64_store_return_value): Likewise.
1675
1676 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1677
1678         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1679         rlim_t.
1680
1681 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1682
1683         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1684         Fix short help line.
1685
1686 2018-09-17  Tom Tromey  <tom@tromey.com>
1687
1688         PR python/20445:
1689         * configure: Rebuild.
1690         * configure.ac: Conditionally use -DNDEBUG for Python.
1691
1692 2018-09-17  Tom Tromey  <tom@tromey.com>
1693
1694         * configure: Rebuild.
1695         * configure.ac: Use gmp as a library dependency when checking for
1696         mpfr.
1697
1698 2018-09-17  Pedro Alves  <palves@redhat.com>
1699
1700         * python/py-inferior.c (find_inferior_object): Delete.
1701
1702 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1703
1704         * compile/compile-cplus-types.c
1705         (compile_cplus_instance::enter_scope): Don't use new_scope after
1706         std::move.
1707
1708 2018-09-17  Tom Tromey  <tom@tromey.com>
1709
1710         * common/pathstuff.c (get_standard_cache_dir): Use
1711         ~/Library/Caches on macOS.
1712         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1713
1714 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1715
1716         PR python/23669
1717         * breakpoint.c (commands_cmd_element): New.
1718         (_initialize_breakpoint): Assign commands_cmd_element.
1719         * breakpoint.h (commands_cmd_element): New.
1720         * cli/cli-script.c (while_cmd_element, if_command,
1721         define_cmd_element): New.
1722         (command_name_equals): Remove.
1723         (process_next_line): Compare commands by pointer, not by name.
1724         (_initialize_cli_script): Assign the various cmd_list_element
1725         variables.
1726         * compile/compile.c (compile_cmd_element): New.
1727         (_initialize_compile): Assign compile_cmd_element.
1728         * compile/compile.h (compile_cmd_element): New.
1729         * guile/guile.c (guile_cmd_element): New.
1730         (install_gdb_commands): Assign guile_cmd_element.
1731         * guile/guile.h (guile_cmd_element): New.
1732         * python/python.c (python_cmd_element): New.
1733         (_initialize_python): Assign python_cmd_element.
1734         * python/python.h (python_cmd_element): New.
1735         * tracepoint.c (while_stepping_cmd_element): New.
1736         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1737         * tracepoint.h (while_stepping_cmd_element): New.
1738
1739 2018-09-17  Tom Tromey  <tom@tromey.com>
1740
1741         * infrun.c (save_infcall_suspend_state): Return
1742         infcall_suspend_state_up.
1743         (save_infcall_control_state): Return infcall_control_state_up.
1744         * inferior.h (save_infcall_suspend_state)
1745         (save_infcall_control_state): Declare later.  Return unique
1746         pointers.
1747
1748 2018-09-17  Tom Tromey  <tom@tromey.com>
1749
1750         * infrun.c (struct stop_context): Declare constructor,
1751         destructor, "changed" method.
1752         (stop_context::stop_context): Rename from save_stop_context.
1753         (stop_context::~stop_context): Rename from
1754         release_stop_context_cleanup.
1755         (normal_stop): Update.
1756         (stop_context::changed): Rename from stop_context_changed.  Return
1757         bool.
1758
1759 2018-09-17  Tom Tromey  <tom@tromey.com>
1760
1761         * inferior.h (struct infcall_suspend_state_deleter): New.
1762         (infcall_suspend_state_up): New typedef.
1763         (struct infcall_control_state_deleter): New.
1764         (infcall_control_state_up): New typedef.
1765         (make_cleanup_restore_infcall_suspend_state)
1766         (make_cleanup_restore_infcall_control_state): Don't declare.
1767         * infcall.c (call_function_by_hand_dummy): Update.
1768         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1769         (make_cleanup_restore_infcall_suspend_state): Remove.
1770         (do_restore_infcall_control_state_cleanup)
1771         (make_cleanup_restore_infcall_control_state): Remove.
1772
1773 2018-09-17  Tom Tromey  <tom@tromey.com>
1774
1775         * gdbthread.h (struct thread_control_state): Add initializer.
1776         (class thread_info) <control>: Remove initializer.
1777         * inferior.h (struct inferior_control_state): Add initializer.
1778         (class inferior) <control>: Remove initializer.
1779         (exit_inferior_1): Update.
1780         * infrun.c (struct infcall_control_state): Add constructors.
1781         (save_infcall_control_state): Use new.
1782         (restore_infcall_control_state, discard_infcall_control_state):
1783         Use delete.
1784
1785 2018-09-17  Tom Tromey  <tom@tromey.com>
1786
1787         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1788         unique_ptr.
1789         <siginfo_data>: Now a unique_xmalloc_ptr.
1790         (save_infcall_suspend_state, restore_infcall_suspend_state)
1791         (discard_infcall_suspend_state)
1792         (get_infcall_suspend_state_regcache): Update.
1793
1794 2018-09-17  Tom Tromey  <tom@tromey.com>
1795
1796         * gdbthread.h (struct thread_suspend_state): Add initializers.
1797         (class thread_info) <suspend>: Remove initializer.
1798         * infrun.c (struct infcall_suspend_state): Add initializers.
1799         (save_infcall_suspend_state): Use new.
1800         (discard_infcall_suspend_state): Use delete.
1801
1802 2018-09-16  Tom Tromey  <tom@tromey.com>
1803
1804         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1805         Remove.
1806         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1807         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1808         (py_varobj_iter_new): Likewise.
1809         (py_varobj_get_iterator): Use gdbpy_ref.
1810
1811 2018-09-16  Tom Tromey  <tom@tromey.com>
1812
1813         * python/py-threadevent.c (py_get_event_thread): Simplify.
1814         * python/py-inferior.c (infpy_thread_from_thread_handle):
1815         Return immediately after calling thread_to_thread_object.  Use
1816         Py_RETURN_NONE.
1817         (thread_to_thread_object): Set the exception on a NULL return.
1818
1819 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1820
1821         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1822
1823 2018-09-16  Tom Tromey  <tom@tromey.com>
1824
1825         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1826         Remove.
1827
1828 2018-09-16  Tom Tromey  <tom@tromey.com>
1829
1830         * python/python-internal.h (thread_to_thread_object): Change
1831         return type.
1832         * python/py-inferior.c (thread_to_thread_object): Return a new
1833         reference.
1834         (infpy_thread_from_thread_handle): Update.
1835         * python/py-infthread.c (gdbpy_selected_thread): Update.
1836         * python/py-stopevent.c (create_stop_event_object): Update.
1837         * python/py-threadevent.c (py_get_event_thread): Return a new
1838         reference.
1839         (py_get_event_thread): Update.
1840         * python/py-event.h (py_get_event_thread): Change return type.
1841         * python/py-continueevent.c (create_continue_event_object):
1842         Update.
1843
1844 2018-09-16  Tom Tromey  <tom@tromey.com>
1845
1846         * python/py-progspace.c (pspy_get_objfiles): Update.
1847         * python/python-internal.h (objfile_to_objfile_object): Change
1848         return type.
1849         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1850         Update.
1851         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1852         Update.
1853         * python/python.c (gdbpy_get_current_objfile): Update.
1854         (gdbpy_objfiles): Update.
1855         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1856         Update.
1857         (objfile_to_objfile_object): Return a new reference.
1858         * python/py-symtab.c (stpy_get_objfile): Update.
1859         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1860         Update.
1861
1862 2018-09-16  Tom Tromey  <tom@tromey.com>
1863
1864         * python/py-inferior.c (infpy_get_progspace): Update.
1865         * python/python-internal.h (pspace_to_pspace_object): Change
1866         return type.
1867         * python/py-newobjfileevent.c
1868         (create_clear_objfiles_event_object): Update.
1869         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1870         Update.
1871         * python/python.c (gdbpy_get_current_progspace): Update.
1872         (gdbpy_progspaces): Update.
1873         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1874         reference.
1875         * python/py-objfile.c (objfpy_get_progspace): Update.
1876         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1877         Update.
1878
1879 2018-09-16  Tom Tromey  <tom@tromey.com>
1880
1881         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1882         (solib_name, block_for_pc, find_pc_line): New functions.
1883         (execute_unwinders): Update.
1884         * python/py-block.c (gdbpy_block_for_pc): Remove.
1885         * python/py-inferior.c (infpy_get_progspace): New function.
1886         (inferior_object_getset) <progspace>: Add.
1887         * python/py-progspace.c (pspy_objfiles): Rewrite.
1888         (pspy_solib_name, pspy_block_for_pc)
1889         (pspy_find_pc_line, pspy_is_valid): New functions.
1890         (progspace_object_methods): Add entries for solib_name,
1891         block_for_pc, find_pc_line, is_valid.
1892         * python/python-internal.h (gdbpy_block_for_pc)
1893         (build_objfiles_list): Don't declare.
1894         * python/python.c: Don't include solib.h.
1895         (gdbpy_solib_name, gdbpy_find_pc_line)
1896         (gdbpy_get_current_progspace, build_objfiles_list)
1897         (gdbpy_objfiles): Remove.
1898         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1899         solib_name, find_pc_line>: Remove entries.
1900
1901 2018-09-16  Tom Tromey  <tom@tromey.com>
1902
1903         * top.c (new_ui_command): Use GNU style for metasyntactic
1904         variables.
1905         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1906         variables.
1907         * maint.c (maintenance_translate_address): Remove "<>" around
1908         text.
1909         * interps.c (interpreter_exec_cmd): Use GNU style for
1910         metasyntactic variables.
1911         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1912         metasyntactic variables.
1913         * tracepoint.c (tfind_range_command): Use GNU style for
1914         metasyntactic variables.
1915         (tfind_outside_command): Likewise.
1916         (_initialize_tracepoint): Likewise.
1917         * remote.c (extended_remote_target::create_inferior): Use GNU
1918         style for metasyntactic variables.
1919         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1920         metasyntactic variables.
1921         (adi_assign_command): Likewise.
1922
1923 2018-09-16  Tom Tromey  <tom@tromey.com>
1924
1925         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1926         metasyntactic variables.  Print message if no disassembler options
1927         are available.
1928
1929 2018-09-15  Tom Tromey  <tom@tromey.com>
1930
1931         * infcmd.c (get_inferior_args): Return const char *.
1932         * inferior.h (get_inferior_args): Return type now const.
1933         * linux-tdep.c (linux_fill_prpsinfo): Update.
1934         * procfs.c (procfs_target::make_corefile_notes): Update.
1935
1936 2018-09-07  Tom Tromey  <tom@tromey.com>
1937
1938         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1939         inside the TRY.
1940
1941 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1942
1943         * nios2-tdep.c (nios2_type_align): New.
1944         (nios2_gdb_arch_init): Install type_align hook.
1945
1946 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1947
1948         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1949         type that is neither object file owned, nor gdbarch owned.
1950         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1951         gdbarch is non-NULL.
1952         (alloc_type_instance): Allocate non-objfile owned types on the
1953         gdbarch obstack.
1954         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1955         using TYPE_ALLOC to ensure memory is allocated on the correct
1956         obstack.
1957         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1958         obstack, or the gdbarch obstack.
1959         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1960
1961 2018-09-14  Tom Tromey  <tom@tromey.com>
1962
1963         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1964         block.
1965
1966 2018-09-14  Tom Tromey  <tom@tromey.com>
1967
1968         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1969
1970 2018-09-13  Tom Tromey  <tom@tromey.com>
1971
1972         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1973         static.
1974
1975 2018-09-13  Tom Tromey  <tom@tromey.com>
1976
1977         * exec.c (try_open_exec_file): Use std::string.
1978
1979 2018-09-13  Tom Tromey  <tom@tromey.com>
1980
1981         * utils.h (gdb_bfd_errmsg): Return std::string.
1982         * exec.c (exec_file_attach): Update.
1983         * compile/compile-object-load.c (compile_object_load): Update.
1984         * utils.c (gdb_bfd_errmsg): Return std::string.
1985
1986 2018-09-13  Tom Tromey  <tom@tromey.com>
1987
1988         * procfs.c (struct procinfo_deleter): New.
1989         (procinfo_up): New typedef.
1990         (do_destroy_procinfo_cleanup): Remove.
1991         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1992
1993 2018-09-13  Tom Tromey  <tom@tromey.com>
1994
1995         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1996
1997 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1998 2018-09-13  Tom Tromey  <tom@tromey.com>
1999
2000         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2001         (pspy_get_objfiles): New function.
2002         (progspace_object_methods): New.
2003         (pspace_object_type): Add tp_methods callback.
2004         * python/python-internal.h (build_objfiles_list): New
2005         declaration.
2006         * python/python.c (build_objfiles_list): New function.
2007         (gdbpy_objfiles): Implement using build_objfiles_list.
2008         * NEWS: Mention the Progspace.objfiles method.
2009
2010 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2011
2012         * python/py-inferior.c (infpy_get_progspace): New function.
2013         (inferior_object_getset): Add progspace property.
2014         * NEWS: Mention the new property.
2015
2016 2018-09-13  Tom Tromey  <tom@tromey.com>
2017
2018         PR rust/23650:
2019         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2020
2021 2018-09-13  Tom Tromey  <tom@tromey.com>
2022
2023         PR rust/23626:
2024         * rust-lang.c (rust_enum_variant): Now static.
2025         (rust_empty_enum_p): New function.
2026         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2027         Handle empty enum.
2028
2029 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2030
2031         * python/py-inferior.c (infpy_repr): New.
2032         (inferior_object_type): Register infpy_repr.
2033         * python/py-objfile.c (objfpy_repr): New.
2034         (objfile_object_type): Register objfpy_repr.
2035
2036 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2037
2038         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2039
2040 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2041
2042         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2043         typo.
2044
2045 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2046
2047         * common/common-utils.c: Don't include '<sys/stat.h>'.
2048         (is_regular_file): Move to...
2049         * common/filestuff.c (is_regular_file): ... here.
2050         * common/common-utils.h (is_regular_file): Move to...
2051         * common/filestuff.h (is_regular_file): ... here.
2052
2053 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2054
2055         * skip.c (debug_skip): New variable.
2056         (skiplist_entry::do_skip_file_p): Add debug output.
2057         (skiplist_entry::do_skip_gfile_p): Likewise.
2058         (skiplist_entry::skip_function_p): Likewise.
2059         (_initialize_step_skip): Create debug command.
2060         * NEWS: Mention set/show debug skip.
2061
2062 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2063
2064         * darwin-nat.c (should_disable_startup_with_shell):
2065         New function.
2066         (darwin_nat_target::create_inferior): Add call.
2067
2068 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2069
2070         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2071         inf_port, msg_state>: Initialize.
2072         (struct darwin_thread_info) <signaled, single_step>: Change
2073         type and initialize.
2074         (struct darwin_thread_info) <event>: Initialize.
2075
2076 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2077
2078         PR gdb/23555
2079         PR gdb/23558
2080         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2081         guesses.
2082
2083 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2084
2085         Revert:
2086         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2087
2088         PR gdb/23555
2089         PR gdb/23558
2090         * gnulib/aclocal.m4: Regenerate.
2091         * gnulib/config.in: Regenerate.
2092         * gnulib/configure: Regenerate.
2093         * gnulib/import/Makefile.am: Update.
2094         * gnulib/import/Makefile.in: Update.
2095         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2096         * gnulib/import/_Noreturn.h: ... this.
2097         * gnulib/import/alloca.in.h: Update.
2098         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2099         * gnulib/import/arg-nonnull.h: ... this.
2100         * gnulib/import/assure.h: Update.
2101         * gnulib/import/at-func.c: Update.
2102         * gnulib/import/basename-lgpl.c: Update.
2103         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2104         * gnulib/import/c++defs.h: ... this.
2105         * gnulib/import/canonicalize-lgpl.c: Update.
2106         * gnulib/import/cdefs.h: Update.
2107         * gnulib/import/chdir-long.c: Update.
2108         * gnulib/import/chdir-long.h: Update.
2109         * gnulib/import/cloexec.c: Update.
2110         * gnulib/import/cloexec.h: Update.
2111         * gnulib/import/close.c: Update.
2112         * gnulib/import/closedir.c: Update.
2113         * gnulib/import/config.charset: Update.
2114         * gnulib/import/dirent-private.h: Update.
2115         * gnulib/import/dirent.in.h: Update.
2116         * gnulib/import/dirfd.c: Update.
2117         * gnulib/import/dirname-lgpl.c: Update.
2118         * gnulib/import/dirname.h: Update.
2119         * gnulib/import/dosname.h: Update.
2120         * gnulib/import/dup-safer-flag.c: Update.
2121         * gnulib/import/dup-safer.c: Update.
2122         * gnulib/import/dup.c: Update.
2123         * gnulib/import/dup2.c: Update.
2124         * gnulib/import/errno.in.h: Update.
2125         * gnulib/import/error.c: Update.
2126         * gnulib/import/error.h: Update.
2127         * gnulib/import/exitfail.c: Update.
2128         * gnulib/import/exitfail.h: Update.
2129         * gnulib/import/extra/update-copyright: Update.
2130         * gnulib/import/fchdir.c: Update.
2131         * gnulib/import/fcntl.c: Update.
2132         * gnulib/import/fcntl.in.h: Update.
2133         * gnulib/import/fd-hook.c: Update.
2134         * gnulib/import/fd-hook.h: Update.
2135         * gnulib/import/fd-safer-flag.c: Update.
2136         * gnulib/import/fd-safer.c: Update.
2137         * gnulib/import/fdopendir.c: Update.
2138         * gnulib/import/filename.h: Update.
2139         * gnulib/import/filenamecat-lgpl.c: Update.
2140         * gnulib/import/filenamecat.h: Update.
2141         * gnulib/import/flexmember.h: Update.
2142         * gnulib/import/float+.h: Update.
2143         * gnulib/import/float.c: Update.
2144         * gnulib/import/float.in.h: Update.
2145         * gnulib/import/fnmatch.c: Update.
2146         * gnulib/import/fnmatch.in.h: Update.
2147         * gnulib/import/fnmatch_loop.c: Update.
2148         * gnulib/import/fpucw.h: Update.
2149         * gnulib/import/frexp.c: Update.
2150         * gnulib/import/frexpl.c: Update.
2151         * gnulib/import/fstat.c: Update.
2152         * gnulib/import/fstatat.c: Update.
2153         * gnulib/import/getcwd-lgpl.c: Update.
2154         * gnulib/import/getcwd.c: Update.
2155         * gnulib/import/getdtablesize.c: Update.
2156         * gnulib/import/getlogin_r.c: Update.
2157         * gnulib/import/getprogname.c: Update.
2158         * gnulib/import/getprogname.h: Update.
2159         * gnulib/import/gettext.h: Update.
2160         * gnulib/import/gettimeofday.c: Update.
2161         * gnulib/import/glob-libc.h: Update.
2162         * gnulib/import/glob.c: Update.
2163         * gnulib/import/glob.in.h: Update.
2164         * gnulib/import/glob_internal.h: Update.
2165         * gnulib/import/glob_pattern_p.c: Update.
2166         * gnulib/import/globfree.c: Update.
2167         * gnulib/import/hard-locale.c: Update.
2168         * gnulib/import/hard-locale.h: Update.
2169         * gnulib/import/intprops.h: Update.
2170         * gnulib/import/inttypes.in.h: Update.
2171         * gnulib/import/isnan.c: Update.
2172         * gnulib/import/isnand-nolibm.h: Update.
2173         * gnulib/import/isnand.c: Update.
2174         * gnulib/import/isnanl-nolibm.h: Update.
2175         * gnulib/import/isnanl.c: Update.
2176         * gnulib/import/itold.c: Update.
2177         * gnulib/import/libc-config.h: Update.
2178         * gnulib/import/limits.in.h: Update.
2179         * gnulib/import/localcharset.c: Update.
2180         * gnulib/import/localcharset.h: Update.
2181         * gnulib/import/localtime-buffer.c: Update.
2182         * gnulib/import/localtime-buffer.h: Update.
2183         * gnulib/import/lstat.c: Update.
2184         * gnulib/import/m4/00gnulib.m4: Update.
2185         * gnulib/import/m4/__inline.m4: Update.
2186         * gnulib/import/m4/absolute-header.m4: Update.
2187         * gnulib/import/m4/alloca.m4: Update.
2188         * gnulib/import/m4/builtin-expect.m4: Update.
2189         * gnulib/import/m4/canonicalize.m4: Update.
2190         * gnulib/import/m4/chdir-long.m4: Update.
2191         * gnulib/import/m4/close.m4: Update.
2192         * gnulib/import/m4/closedir.m4: Update.
2193         * gnulib/import/m4/configmake.m4: Update.
2194         * gnulib/import/m4/d-ino.m4: Update.
2195         * gnulib/import/m4/d-type.m4: Update.
2196         * gnulib/import/m4/dirent_h.m4: Update.
2197         * gnulib/import/m4/dirfd.m4: Update.
2198         * gnulib/import/m4/dirname.m4: Update.
2199         * gnulib/import/m4/double-slash-root.m4: Update.
2200         * gnulib/import/m4/dup.m4: Update.
2201         * gnulib/import/m4/dup2.m4: Update.
2202         * gnulib/import/m4/eealloc.m4: Update.
2203         * gnulib/import/m4/environ.m4: Update.
2204         * gnulib/import/m4/errno_h.m4: Update.
2205         * gnulib/import/m4/error.m4: Update.
2206         * gnulib/import/m4/exponentd.m4: Update.
2207         * gnulib/import/m4/exponentl.m4: Update.
2208         * gnulib/import/m4/extensions.m4: Update.
2209         * gnulib/import/m4/extern-inline.m4: Update.
2210         * gnulib/import/m4/fchdir.m4: Update.
2211         * gnulib/import/m4/fcntl-o.m4: Update.
2212         * gnulib/import/m4/fcntl.m4: Update.
2213         * gnulib/import/m4/fcntl_h.m4: Update.
2214         * gnulib/import/m4/fdopendir.m4: Update.
2215         * gnulib/import/m4/filenamecat.m4: Update.
2216         * gnulib/import/m4/flexmember.m4: Update.
2217         * gnulib/import/m4/float_h.m4: Update.
2218         * gnulib/import/m4/fnmatch.m4: Update.
2219         * gnulib/import/m4/fnmatch_h.m4: Update.
2220         * gnulib/import/m4/fpieee.m4: Update.
2221         * gnulib/import/m4/frexp.m4: Update.
2222         * gnulib/import/m4/frexpl.m4: Update.
2223         * gnulib/import/m4/fstat.m4: Update.
2224         * gnulib/import/m4/fstatat.m4: Update.
2225         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2226         * gnulib/import/m4/getcwd-path-max.m4: Update.
2227         * gnulib/import/m4/getcwd.m4: Update.
2228         * gnulib/import/m4/getdtablesize.m4: Update.
2229         * gnulib/import/m4/getlogin.m4: Update.
2230         * gnulib/import/m4/getlogin_r.m4: Update.
2231         * gnulib/import/m4/getpagesize.m4: Update.
2232         * gnulib/import/m4/getprogname.m4: Update.
2233         * gnulib/import/m4/gettimeofday.m4: Update.
2234         * gnulib/import/m4/glibc21.m4: Update.
2235         * gnulib/import/m4/glob.m4: Update.
2236         * gnulib/import/m4/glob_h.m4: Update.
2237         * gnulib/import/m4/gnulib-cache.m4: Update.
2238         * gnulib/import/m4/gnulib-common.m4: Update.
2239         * gnulib/import/m4/gnulib-comp.m4: Update.
2240         * gnulib/import/m4/gnulib-tool.m4: Update.
2241         * gnulib/import/m4/hard-locale.m4: Update.
2242         * gnulib/import/m4/include_next.m4: Update.
2243         * gnulib/import/m4/inttypes-pri.m4: Update.
2244         * gnulib/import/m4/inttypes.m4: Update.
2245         * gnulib/import/m4/isnand.m4: Update.
2246         * gnulib/import/m4/isnanl.m4: Update.
2247         * gnulib/import/m4/largefile.m4: Update.
2248         * gnulib/import/m4/limits-h.m4: Update.
2249         * gnulib/import/m4/localcharset.m4: Update.
2250         * gnulib/import/m4/locale-fr.m4: Update.
2251         * gnulib/import/m4/locale-ja.m4: Update.
2252         * gnulib/import/m4/locale-zh.m4: Update.
2253         * gnulib/import/m4/localtime-buffer.m4: Update.
2254         * gnulib/import/m4/longlong.m4: Update.
2255         * gnulib/import/m4/lstat.m4: Update.
2256         * gnulib/import/m4/malloc.m4: Update.
2257         * gnulib/import/m4/malloca.m4: Update.
2258         * gnulib/import/m4/math_h.m4: Update.
2259         * gnulib/import/m4/mbrtowc.m4: Update.
2260         * gnulib/import/m4/mbsinit.m4: Update.
2261         * gnulib/import/m4/mbsrtowcs.m4: Update.
2262         * gnulib/import/m4/mbstate_t.m4: Update.
2263         * gnulib/import/m4/memchr.m4: Update.
2264         * gnulib/import/m4/memmem.m4: Update.
2265         * gnulib/import/m4/mempcpy.m4: Update.
2266         * gnulib/import/m4/memrchr.m4: Update.
2267         * gnulib/import/m4/mkdir.m4: Update.
2268         * gnulib/import/m4/mkstemp.m4: Update.
2269         * gnulib/import/m4/mmap-anon.m4: Update.
2270         * gnulib/import/m4/mode_t.m4: Update.
2271         * gnulib/import/m4/msvc-inval.m4: Update.
2272         * gnulib/import/m4/msvc-nothrow.m4: Update.
2273         * gnulib/import/m4/multiarch.m4: Update.
2274         * gnulib/import/m4/nocrash.m4: Update.
2275         * gnulib/import/m4/off_t.m4: Update.
2276         * gnulib/import/m4/onceonly.m4: Update.
2277         * gnulib/import/m4/open-cloexec.m4: Update.
2278         * gnulib/import/m4/open.m4: Update.
2279         * gnulib/import/m4/openat.m4: Update.
2280         * gnulib/import/m4/opendir.m4: Update.
2281         * gnulib/import/m4/pathmax.m4: Update.
2282         * gnulib/import/m4/rawmemchr.m4: Update.
2283         * gnulib/import/m4/readdir.m4: Update.
2284         * gnulib/import/m4/readlink.m4: Update.
2285         * gnulib/import/m4/realloc.m4: Update.
2286         * gnulib/import/m4/rename.m4: Update.
2287         * gnulib/import/m4/rewinddir.m4: Update.
2288         * gnulib/import/m4/rmdir.m4: Update.
2289         * gnulib/import/m4/save-cwd.m4: Update.
2290         * gnulib/import/m4/secure_getenv.m4: Update.
2291         * gnulib/import/m4/setenv.m4: Update.
2292         * gnulib/import/m4/signal_h.m4: Update.
2293         * gnulib/import/m4/ssize_t.m4: Update.
2294         * gnulib/import/m4/stat-time.m4: Update.
2295         * gnulib/import/m4/stat.m4: Update.
2296         * gnulib/import/m4/std-gnu11.m4: Update.
2297         * gnulib/import/m4/stdbool.m4: Update.
2298         * gnulib/import/m4/stddef_h.m4: Update.
2299         * gnulib/import/m4/stdint.m4: Update.
2300         * gnulib/import/m4/stdio_h.m4: Update.
2301         * gnulib/import/m4/stdlib_h.m4: Update.
2302         * gnulib/import/m4/strchrnul.m4: Update.
2303         * gnulib/import/m4/strdup.m4: Update.
2304         * gnulib/import/m4/strerror.m4: Update.
2305         * gnulib/import/m4/string_h.m4: Update.
2306         * gnulib/import/m4/strstr.m4: Update.
2307         * gnulib/import/m4/strtok_r.m4: Update.
2308         * gnulib/import/m4/sys_socket_h.m4: Update.
2309         * gnulib/import/m4/sys_stat_h.m4: Update.
2310         * gnulib/import/m4/sys_time_h.m4: Update.
2311         * gnulib/import/m4/sys_types_h.m4: Update.
2312         * gnulib/import/m4/tempname.m4: Update.
2313         * gnulib/import/m4/time_h.m4: Update.
2314         * gnulib/import/m4/unistd-safer.m4: Update.
2315         * gnulib/import/m4/unistd_h.m4: Update.
2316         * gnulib/import/m4/warn-on-use.m4: Update.
2317         * gnulib/import/m4/wchar_h.m4: Update.
2318         * gnulib/import/m4/wchar_t.m4: Update.
2319         * gnulib/import/m4/wctype_h.m4: Update.
2320         * gnulib/import/m4/wint_t.m4: Update.
2321         * gnulib/import/malloc.c: Update.
2322         * gnulib/import/malloc/scratch_buffer.h: Update.
2323         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2324         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2325         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2326         * gnulib/import/malloca.c: Update.
2327         * gnulib/import/malloca.h: Update.
2328         * gnulib/import/malloca.valgrind: Update.
2329         * gnulib/import/math.in.h: Update.
2330         * gnulib/import/mbrtowc.c: Update.
2331         * gnulib/import/mbsinit.c: Update.
2332         * gnulib/import/mbsrtowcs-impl.h: Update.
2333         * gnulib/import/mbsrtowcs-state.c: Update.
2334         * gnulib/import/mbsrtowcs.c: Update.
2335         * gnulib/import/memchr.c: Update.
2336         * gnulib/import/memmem.c: Update.
2337         * gnulib/import/mempcpy.c: Update.
2338         * gnulib/import/memrchr.c: Update.
2339         * gnulib/import/mkdir.c: Update.
2340         * gnulib/import/mkstemp.c: Update.
2341         * gnulib/import/msvc-inval.c: Update.
2342         * gnulib/import/msvc-inval.h: Update.
2343         * gnulib/import/msvc-nothrow.c: Update.
2344         * gnulib/import/msvc-nothrow.h: Update.
2345         * gnulib/import/open.c: Update.
2346         * gnulib/import/openat-die.c: Update.
2347         * gnulib/import/openat-priv.h: Update.
2348         * gnulib/import/openat-proc.c: Update.
2349         * gnulib/import/openat.c: Update.
2350         * gnulib/import/openat.h: Update.
2351         * gnulib/import/opendir.c: Update.
2352         * gnulib/import/pathmax.h: Update.
2353         * gnulib/import/pipe-safer.c: Update.
2354         * gnulib/import/rawmemchr.c: Update.
2355         * gnulib/import/readdir.c: Update.
2356         * gnulib/import/readlink.c: Update.
2357         * gnulib/import/realloc.c: Update.
2358         * gnulib/import/ref-add.sin: Update.
2359         * gnulib/import/ref-del.sin: Update.
2360         * gnulib/import/rename.c: Update.
2361         * gnulib/import/rewinddir.c: Update.
2362         * gnulib/import/rmdir.c: Update.
2363         * gnulib/import/same-inode.h: Update.
2364         * gnulib/import/save-cwd.c: Update.
2365         * gnulib/import/save-cwd.h: Update.
2366         * gnulib/import/scratch_buffer.h: Update.
2367         * gnulib/import/secure_getenv.c: Update.
2368         * gnulib/import/setenv.c: Update.
2369         * gnulib/import/signal.in.h: Update.
2370         * gnulib/import/stat-time.c: Update.
2371         * gnulib/import/stat-time.h: Update.
2372         * gnulib/import/stat-w32.c: Update.
2373         * gnulib/import/stat-w32.h: Update.
2374         * gnulib/import/stat.c: Update.
2375         * gnulib/import/stdbool.in.h: Update.
2376         * gnulib/import/stddef.in.h: Update.
2377         * gnulib/import/stdint.in.h: Update.
2378         * gnulib/import/stdio.in.h: Update.
2379         * gnulib/import/stdlib.in.h: Update.
2380         * gnulib/import/str-two-way.h: Update.
2381         * gnulib/import/strchrnul.c: Update.
2382         * gnulib/import/strdup.c: Update.
2383         * gnulib/import/streq.h: Update.
2384         * gnulib/import/strerror-override.c: Update.
2385         * gnulib/import/strerror-override.h: Update.
2386         * gnulib/import/strerror.c: Update.
2387         * gnulib/import/string.in.h: Update.
2388         * gnulib/import/stripslash.c: Update.
2389         * gnulib/import/strnlen1.c: Update.
2390         * gnulib/import/strnlen1.h: Update.
2391         * gnulib/import/strstr.c: Update.
2392         * gnulib/import/strtok_r.c: Update.
2393         * gnulib/import/sys_stat.in.h: Update.
2394         * gnulib/import/sys_time.in.h: Update.
2395         * gnulib/import/sys_types.in.h: Update.
2396         * gnulib/import/tempname.c: Update.
2397         * gnulib/import/tempname.h: Update.
2398         * gnulib/import/time.in.h: Update.
2399         * gnulib/import/unistd--.h: Update.
2400         * gnulib/import/unistd-safer.h: Update.
2401         * gnulib/import/unistd.in.h: Update.
2402         * gnulib/import/unsetenv.c: Update.
2403         * gnulib/import/verify.h: Update.
2404         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2405         * gnulib/import/wchar.in.h: Update.
2406         * gnulib/import/wctype.in.h: Update.
2407         * gnulib/import/xalloc-oversized.h: Update.
2408         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2409         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2410
2411 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2412
2413         * record-btrace.c (get_thread_current_frame): Remove
2414         old_inferior_ptid.
2415
2416 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2417
2418         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2419         with check_tag to 1 if and only if the type is tagged and the
2420         component being searched cannot been found in the current
2421         view. Otherwise, always call ada_to_fixed_type with
2422         check_tag to 0.
2423
2424 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2425
2426         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2427         declaration.
2428         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2429         * ada-varobj.c (ada_varobj_get_number_of_children,
2430         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2431
2432 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2433
2434         * ada-valprint.c (ada_value_print): Use type instead of
2435         enclosing type.
2436
2437 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2438
2439         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2440         an array of access to unconstrained array.
2441
2442 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2443
2444         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2445         (ada_check_typedef): Use it.
2446
2447 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2448
2449         * ada-varobj.c (ada_varobj_describe_struct_child)
2450         (ada_varobj_describe_child): Handle union case like struct one.
2451
2452 2018-09-10  Tom Tromey  <tom@tromey.com>
2453
2454         PR python/18380:
2455         * python/python.c (_initialize_python): Make example in "python"
2456         help work in Python 3.
2457
2458 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2459
2460         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2461         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2462         $(EXEEXT) to the script, as it is not a program.
2463
2464 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2465
2466         * python/py-prettyprint.c (pretty_print_one_value): Return
2467         gdbpy_ref<>.
2468         (print_string_repr): Adjust.
2469         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2470         * python/python-internal.h (apply_varobj_pretty_printer): Return
2471         gdbpy_ref<>.
2472         * varobj.c (varobj_value_get_print_value): Adjust.
2473
2474 2018-09-08  Tom Tromey  <tom@tromey.com>
2475
2476         PR python/16047:
2477         * python/py-prettyprint.c (pretty_print_one_value): Check for
2478         to_string method.
2479
2480 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2481
2482         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2483         replace_operator_with_call.
2484
2485 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2486
2487         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2488
2489 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2490
2491         * ada-typeprint.c (print_range): Print the bounds using TYPE
2492         rather than its TYPE_TARGET_TYPE.
2493
2494 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2495
2496         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2497         call to ada_to_fixed_value_create.
2498
2499 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2500
2501         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2502
2503 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2504
2505         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2506         by calls to error.
2507
2508 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2509
2510         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2511         Move update of loop variable "fi".
2512
2513 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2514
2515         * ada-lang.c (value_assign_to_component): In the case of
2516         big-endian targets, extract the bits of the given VAL
2517         using an src_offset of zero if container is not a scalar.
2518
2519 2018-09-06  Simon Ser  <contact@emersion.fr>
2520
2521         PR gdb/23105
2522         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2523         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2524         * fbsd-tdep.c (fbsd_make_note_desc): New.
2525         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2526         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2527         * target.h (enum target_object) Add FreeBSD-specific
2528         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2529
2530 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2531
2532         * compile/compile-c.h (generate_c_for_variable_locations):
2533         Change reference to pointer.
2534         * compile/compile-c-support.c (compile_program) <compute>:
2535         Likewise.
2536         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2537         (generate_c_for_for_one_variable): Likewise
2538         (generate_c_for_variable_locations): Likewise
2539         * compile/compile-c-types.c (compile_c_instance::convert_type):
2540         Likewise
2541         * compile/compile-cplus-symbols.c (convert_one_symbol):
2542         std::move the scope passed to enter_scope.
2543         * compile/compile-cplus-types.c
2544         (compile_cplus_instance::enter_scope): Make parameter
2545         rvalue-reference.
2546         (compile_cplus_instance::new_scope): Change reference to
2547         pointer.
2548         (compile_cplus_instance::convert_type): Likewise
2549         (compile_cplus_convert_typedef): std::move the scope passed to
2550         enter_scope.
2551         (compile_cplus_convert_struct_or_union): Likewise.
2552         (compile_cplus_convert_enum): Likewise.
2553         (compile_cplus_convert_namespace): Likewise.
2554         * compile/compile-cplus.h (compile_cplus_instance)
2555         <enter_scope>: Make parameter rvalue-reference.
2556         * compile/compile-internal.h (compile_instance)
2557         <get_cached_type>: Likewise
2558         * compile/compile-loc2c.c (push): Likewise
2559         (pushf): Likewise
2560         (unary): Likewise
2561         (binary): Likewise
2562         (print_label): Likewise
2563         (pushf_register_address): Likewise
2564         (pushf_register): Likewise
2565         (do_compile_dwarf_expr_to_c): Likewise
2566         (compile_dwarf_expr_to_c): Likewise
2567         (compile_dwarf_bounds_to_c): Likewise
2568         * compile/compile.c (compile_instance::get_cached_type):
2569         Likewise
2570         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2571         (compile_dwarf_bounds_to_c): Likewise
2572         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2573         (dwarf2_compile_property_to_c): Likewise
2574         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2575         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2576         Likewise
2577
2578 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2579
2580         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2581         * tui/tui-data.c (init_content_element): Don't initialize it.
2582
2583 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2584
2585         * tui/tui-data.h (struct tui_win_info)
2586         <detail::opaque>: Remove.
2587         * tui/tui-data.c (init_win_info): Remove assignment.
2588
2589 2018-09-05  Tom Tromey  <tom@tromey.com>
2590
2591         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2592         -Wformat-nonliteral.
2593         * target-float.c (host_float_ops<T>::to_string)
2594         (host_float_ops<T>::from_string): Use
2595         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2596         * configure: Rebuild.
2597
2598 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2599
2600         * printcmd.c (printf_c_string): Use
2601         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2602         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2603
2604 2018-09-05  Tom Tromey  <tom@tromey.com>
2605
2606         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2607
2608 2018-09-05  Tom de Vries  <tdevries@suse.de>
2609
2610         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2611         with resolve_abstract_p == true.
2612         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2613         defaulting to false. Propagate resolve_abstract_p to
2614         dwarf2_fetch_die_loc_sect_off.
2615         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2616         parameter, defaulting to false.
2617         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2618         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2619         parameter.
2620         * dwarf2read.h (struct die_info): Forward-declare.
2621         (die_info_ptr): New typedef.
2622         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2623
2624 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2625
2626         GDB 8.2 released.
2627
2628 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2629             Pedro Alves  <palves@redhat.com>
2630
2631         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2632         "aclocal-m4-deps.mk".  Include file here.
2633         $(srcdir)/aclocal.m4: Add "configure.ac".
2634         * gnulib/aclocal-m4-deps.mk: New file.
2635         * gnulib/update-gnulib.sh: Automatically update
2636         "aclocal-m4-deps.mk".
2637
2638 2018-09-04  Tom Tromey  <tom@tromey.com>
2639
2640         * configure: Rebuild.
2641         * configure.ac: Remove multi-ice code.
2642
2643 2018-09-04  Tom Tromey  <tom@tromey.com>
2644
2645         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2646         (ada-exp.o): Update.
2647
2648 2018-09-04  Tom Tromey  <tom@tromey.com>
2649
2650         * Makefile.in (printcmd.o, target-float.o): Remove.
2651         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2652
2653 2018-09-04  Tom Tromey  <tom@tromey.com>
2654
2655         * gnulib/Makefile.in: Remove obsolete comment.
2656         * Makefile.in: Remove obsolete comment.
2657
2658 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2659
2660         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2661         line with '+'.
2662
2663 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2664
2665         * riscv-tdep.c: Add 'prologue-value.h' include.
2666         (struct riscv_unwind_cache): New struct.
2667         (riscv_debug_unwinder): New global.
2668         (riscv_scan_prologue): Update arguments, capture register details
2669         from prologue scan.
2670         (riscv_skip_prologue): Reformat arguments line, move end of
2671         prologue calculation into riscv_scan_prologue.
2672         (riscv_frame_cache): Update return type, create
2673         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2674         details.
2675         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2676         (riscv_frame_prev_register): Use the trad_frame within the
2677         riscv_unwind_cache.
2678         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2679         flag.
2680
2681 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2682
2683         * trad-frame.h (trad_frame_set_realreg): Declare.
2684         (trad_frame_set_addr): Declare.
2685         * trad-frame.c (trad_frame_set_realreg): Define new function.
2686         (trad_frame_set_addr): Define new function.
2687         (trad_frame_set_reg_realreg): Use new function.
2688         (trad_frame_set_reg_addr): Use new function.
2689
2690 2018-09-01  Keith Seitz  <keiths@redhat.com>
2691
2692         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2693         pulongest instead of "%lld".
2694         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2695         ATTRIBUTE_UNUSED.
2696
2697 2018-08-31  Tom Tromey  <tom@tromey.com>
2698
2699         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2700         variant part type.
2701
2702 2018-08-31  Pedro Alves  <palves@redhat.com>
2703
2704         * gdbarch.h: Regenerate.
2705
2706 2018-08-31  Pedro Alves  <palves@redhat.com>
2707
2708         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2709         * target.h (Hardware watchpoint interfaces): Describe
2710         continuable/steppable/non-steppable watchpoints.
2711         * gdbarch.h, gdbarch.c: Regenerate.
2712
2713 2018-08-31  Pedro Alves  <palves@redhat.com>
2714
2715         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2716         Delete.
2717         * s390-linux-nat.c
2718         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2719         * target.h (target_ops::have_continuable_watchpoint): Delete.
2720         (target_have_continuable_watchpoint): Delete.
2721         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2722         * target-delegates.c: Regenerate.
2723
2724 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2725
2726         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2727         the files present in "gnulib/import/m4/".
2728
2729 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2730
2731         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2732         c.sw, c.swsp, and c.sdsp.
2733
2734 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2735
2736         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2737         (riscv_read_misa_reg): Don't cache value read into inferior data.
2738         (riscv_new_inferior_data): Delete.
2739         (riscv_inferior_data_cleanup): Delete.
2740         (riscv_inferior_data): Delete.
2741         (riscv_invalidate_inferior_data): Delete.
2742         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2743
2744 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2745
2746         * compile/compile-cplus-types.c
2747         (compile_cplus_instance::leave_scope): Take the address of scope
2748         object.
2749         (compile_cplus_instance::convert_qualified_base): Compare quals
2750         to 0.
2751
2752 2018-08-30  Keith Seitz  <keiths@redhat.com>
2753
2754         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2755         Use "%s" and host_address_to_string instead of "%p" in printf.
2756
2757 2018-08-29  Keith Seitz  <keiths@redhat.com>
2758
2759         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2760         and compile-cplus-types.c.
2761         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2762         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2763         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2764         Declare.
2765         * compile/compile-c-support.c: Include compile-cplus.h.
2766         (load_libcompile): Templatize.
2767         (get_compile_context): "New" function.
2768         (c_get_compile_context): Use get_compile_context.
2769         (cplus_get_compile_context): New function.
2770         (cplus_push_user_expression, cplus_pop_user_expression)
2771         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2772         (cplus_compute_program): Define new structs/functions.
2773         * compile/compile-cplus-symmbols.c: New file.
2774         * compile/compile-cplus-types.c: New file.
2775         * compile/compile-cplus.h: New file.
2776         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2777         Declare.
2778         * compile/compile-object-load.c (get_out_value_type): Use
2779         strncmp_iw when comparing symbol names.
2780         (compile_object_load): Add mst_bss and mst_data.
2781         * compile/compile.c (_initialize_compile): Remove
2782         -Wno-implicit-function-declaration from `compile_args'.
2783         * compile/gcc-cp-plugin.h: New file.
2784         * NEWS: Mention C++ compile support and new debug options.
2785
2786 2018-08-29  Keith Seitz  <keiths@redhat.com>
2787
2788         * linespec.c (collect_info::add_symbol): Make virtual.
2789         (struct symbol_searcher_collect_info): New struct.
2790         (symbol_searcher::find_all_symbols): New method.
2791         * symtab.h (class symbol_searcher): New class.
2792
2793 2018-08-29  Keith Seitz  <keiths@redhat.com>
2794
2795         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2796         Change to vector of block_symbol.  Update all users.
2797         (struct collect_info) <symbols>: Likewise.
2798         (collect_info::add_symbol): Take block_symbol as argument.
2799         Update all callers.
2800         (decode_compound_collector) <m_symbols>: Change type to vector
2801         of block_symbol.  Update all users.
2802         (decode_compound_collector::operator ()): Change parameter type
2803         to block_symbol.
2804         (find_method, find_function_symbols, find_linespec_symbols)
2805         (find_label_symbols_in_block, find_label_symbols): Change symbol
2806         vectors to block_symbol vectors.
2807         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2808         block_symbol.
2809
2810 2018-08-29  Keith Seitz  <keiths@redhat.com>
2811
2812         * linespec.c (symbolp): Remove typedef and VEC definitions.
2813         (bound_minimal_symbol_d): Likewise.
2814
2815 2018-08-29  Keith Seitz  <keiths@redhat.com>
2816
2817         * linespec.c (decode_compound_collector::decode_compound_collector):
2818         Remove initialization for `m_symtabs'.
2819         (decode_compound_collector::release_symbols): Change return type
2820         to std::vector.  Update all callers.
2821         (class decode_compound_collector) <m_symbols>: Change type to
2822         std::vector.
2823         (lookup_prefix_sym): Change return type to std::vector.  Update all
2824         callers.
2825         (compare_symbols): Remove.
2826         (std_compare_symbols): Rename to `compare_symbols'.
2827         (find_method): Change `sym_classes' parameter to std::vector.
2828         Update all callers.  Use std::sort to sort sym_classes.
2829         (find_linespec_symbols): Remove cleanup.
2830
2831 2018-08-29  Keith Seitz  <keiths@redhat.com>
2832
2833         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2834         std::vector.  Update all users.
2835         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2836         (struct collect_info) <minimal_symbols>: Likewise.
2837         (compare_msymbols): Return bool.  Change parameters to const
2838         bound_minimal_symbol references.
2839         (find_method, find_function_symbols, find_linespec_symbols): Change
2840         `minsyms' parameter to std::vector.  Update all callers.
2841
2842 2018-08-29  Keith Seitz  <keiths@redhat.com>
2843
2844         * linespec.c (struct linespec) <label_symbols>: Change type to
2845         std::vector.  Update all users.
2846         (find_label_symbols_in_block): Change `result' parameter to
2847         std::vector.  Update all callers.
2848         (find_label_symbols): Return std::vector.  Update all callers.
2849
2850 2018-08-29  Keith Seitz  <keiths@redhat.com>
2851
2852         * linespec.c (struct linespec) <function_symbols>: Change type to
2853         std::vector.  Update all users.
2854         (struct collect_info) <function_symbols>: Likewise.
2855         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2856         (std_compare_symbols): New function.
2857         (find_method, find_function_symbols, find_linespec_symbols)
2858         (find_label_symbols_in_block): Change `symbols' parameter to
2859         std::vector.  Update all callers.
2860         (find_label_symbols): Likewise for `function_symbols' and
2861         `label_funcs_ret'.
2862
2863 2018-08-29  Keith Seitz  <keiths@redhat.com>
2864
2865         * linespec.c (symtab_vector_up): Define.
2866         (struct linespec) <file_symtabs>: Change type to std::vector *.
2867         Update all uses.
2868         (struct collect_info) <file_symtabs>: Likewise.
2869         (collect_symtabs_from_filename): Return symtab_vector_up.
2870         Update all callers.
2871         (decode_objc): Remove cleanup.
2872         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2873         (symtab_collector::release_symtabs): Return symtab_vector_up.
2874         Update all callers.
2875         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2876         Update all users.
2877         (collect_symtabs_from_filename, symtabs_from_filename): Return
2878         symtab_vector_up.  Update all callers.
2879
2880 2018-08-29  Tom Tromey  <tom@tromey.com>
2881
2882         * csky-tdep.c (csky_analyze_prologue): Use
2883         core_addr_to_string_nz.
2884
2885 2018-08-29  Tom Tromey  <tom@tromey.com>
2886
2887         * windows-nat.c (struct xlate_exception) <them>: Change type to
2888         DWORD.
2889         (xlate): Fix formatting.  Remove last entry.
2890         (struct xlate_exception, xlate): Comment out.
2891         (windows_nat_target::resume): Use ranged for.
2892
2893 2018-08-29  Jim Wilson  <jimw@sifive.com>
2894
2895         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2896         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2897         of NT_PRFPREG.
2898         (riscv_linux_nat_target::store_registers): Likewise.
2899
2900 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2901
2902         PR gdb/23555
2903         PR gdb/23558
2904         * gnulib/aclocal.m4: Regenerate.
2905         * gnulib/config.in: Regenerate.
2906         * gnulib/configure: Regenerate.
2907         * gnulib/import/Makefile.am: Update.
2908         * gnulib/import/Makefile.in: Update.
2909         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2910         * gnulib/import/_Noreturn.h: ... this.
2911         * gnulib/import/alloca.in.h: Update.
2912         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2913         * gnulib/import/arg-nonnull.h: ... this.
2914         * gnulib/import/assure.h: Update.
2915         * gnulib/import/at-func.c: Update.
2916         * gnulib/import/basename-lgpl.c: Update.
2917         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2918         * gnulib/import/c++defs.h: ... this.
2919         * gnulib/import/canonicalize-lgpl.c: Update.
2920         * gnulib/import/cdefs.h: Update.
2921         * gnulib/import/chdir-long.c: Update.
2922         * gnulib/import/chdir-long.h: Update.
2923         * gnulib/import/cloexec.c: Update.
2924         * gnulib/import/cloexec.h: Update.
2925         * gnulib/import/close.c: Update.
2926         * gnulib/import/closedir.c: Update.
2927         * gnulib/import/config.charset: Update.
2928         * gnulib/import/dirent-private.h: Update.
2929         * gnulib/import/dirent.in.h: Update.
2930         * gnulib/import/dirfd.c: Update.
2931         * gnulib/import/dirname-lgpl.c: Update.
2932         * gnulib/import/dirname.h: Update.
2933         * gnulib/import/dosname.h: Update.
2934         * gnulib/import/dup-safer-flag.c: Update.
2935         * gnulib/import/dup-safer.c: Update.
2936         * gnulib/import/dup.c: Update.
2937         * gnulib/import/dup2.c: Update.
2938         * gnulib/import/errno.in.h: Update.
2939         * gnulib/import/error.c: Update.
2940         * gnulib/import/error.h: Update.
2941         * gnulib/import/exitfail.c: Update.
2942         * gnulib/import/exitfail.h: Update.
2943         * gnulib/import/extra/update-copyright: Update.
2944         * gnulib/import/fchdir.c: Update.
2945         * gnulib/import/fcntl.c: Update.
2946         * gnulib/import/fcntl.in.h: Update.
2947         * gnulib/import/fd-hook.c: Update.
2948         * gnulib/import/fd-hook.h: Update.
2949         * gnulib/import/fd-safer-flag.c: Update.
2950         * gnulib/import/fd-safer.c: Update.
2951         * gnulib/import/fdopendir.c: Update.
2952         * gnulib/import/filename.h: Update.
2953         * gnulib/import/filenamecat-lgpl.c: Update.
2954         * gnulib/import/filenamecat.h: Update.
2955         * gnulib/import/flexmember.h: Update.
2956         * gnulib/import/float+.h: Update.
2957         * gnulib/import/float.c: Update.
2958         * gnulib/import/float.in.h: Update.
2959         * gnulib/import/fnmatch.c: Update.
2960         * gnulib/import/fnmatch.in.h: Update.
2961         * gnulib/import/fnmatch_loop.c: Update.
2962         * gnulib/import/fpucw.h: Update.
2963         * gnulib/import/frexp.c: Update.
2964         * gnulib/import/frexpl.c: Update.
2965         * gnulib/import/fstat.c: Update.
2966         * gnulib/import/fstatat.c: Update.
2967         * gnulib/import/getcwd-lgpl.c: Update.
2968         * gnulib/import/getcwd.c: Update.
2969         * gnulib/import/getdtablesize.c: Update.
2970         * gnulib/import/getlogin_r.c: Update.
2971         * gnulib/import/getprogname.c: Update.
2972         * gnulib/import/getprogname.h: Update.
2973         * gnulib/import/gettext.h: Update.
2974         * gnulib/import/gettimeofday.c: Update.
2975         * gnulib/import/glob-libc.h: Update.
2976         * gnulib/import/glob.c: Update.
2977         * gnulib/import/glob.in.h: Update.
2978         * gnulib/import/glob_internal.h: Update.
2979         * gnulib/import/glob_pattern_p.c: Update.
2980         * gnulib/import/globfree.c: Update.
2981         * gnulib/import/hard-locale.c: Update.
2982         * gnulib/import/hard-locale.h: Update.
2983         * gnulib/import/intprops.h: Update.
2984         * gnulib/import/inttypes.in.h: Update.
2985         * gnulib/import/isnan.c: Update.
2986         * gnulib/import/isnand-nolibm.h: Update.
2987         * gnulib/import/isnand.c: Update.
2988         * gnulib/import/isnanl-nolibm.h: Update.
2989         * gnulib/import/isnanl.c: Update.
2990         * gnulib/import/itold.c: Update.
2991         * gnulib/import/libc-config.h: Update.
2992         * gnulib/import/limits.in.h: Update.
2993         * gnulib/import/localcharset.c: Update.
2994         * gnulib/import/localcharset.h: Update.
2995         * gnulib/import/localtime-buffer.c: Update.
2996         * gnulib/import/localtime-buffer.h: Update.
2997         * gnulib/import/lstat.c: Update.
2998         * gnulib/import/m4/00gnulib.m4: Update.
2999         * gnulib/import/m4/__inline.m4: Update.
3000         * gnulib/import/m4/absolute-header.m4: Update.
3001         * gnulib/import/m4/alloca.m4: Update.
3002         * gnulib/import/m4/builtin-expect.m4: Update.
3003         * gnulib/import/m4/canonicalize.m4: Update.
3004         * gnulib/import/m4/chdir-long.m4: Update.
3005         * gnulib/import/m4/close.m4: Update.
3006         * gnulib/import/m4/closedir.m4: Update.
3007         * gnulib/import/m4/configmake.m4: Update.
3008         * gnulib/import/m4/d-ino.m4: Update.
3009         * gnulib/import/m4/d-type.m4: Update.
3010         * gnulib/import/m4/dirent_h.m4: Update.
3011         * gnulib/import/m4/dirfd.m4: Update.
3012         * gnulib/import/m4/dirname.m4: Update.
3013         * gnulib/import/m4/double-slash-root.m4: Update.
3014         * gnulib/import/m4/dup.m4: Update.
3015         * gnulib/import/m4/dup2.m4: Update.
3016         * gnulib/import/m4/eealloc.m4: Update.
3017         * gnulib/import/m4/environ.m4: Update.
3018         * gnulib/import/m4/errno_h.m4: Update.
3019         * gnulib/import/m4/error.m4: Update.
3020         * gnulib/import/m4/exponentd.m4: Update.
3021         * gnulib/import/m4/exponentl.m4: Update.
3022         * gnulib/import/m4/extensions.m4: Update.
3023         * gnulib/import/m4/extern-inline.m4: Update.
3024         * gnulib/import/m4/fchdir.m4: Update.
3025         * gnulib/import/m4/fcntl-o.m4: Update.
3026         * gnulib/import/m4/fcntl.m4: Update.
3027         * gnulib/import/m4/fcntl_h.m4: Update.
3028         * gnulib/import/m4/fdopendir.m4: Update.
3029         * gnulib/import/m4/filenamecat.m4: Update.
3030         * gnulib/import/m4/flexmember.m4: Update.
3031         * gnulib/import/m4/float_h.m4: Update.
3032         * gnulib/import/m4/fnmatch.m4: Update.
3033         * gnulib/import/m4/fnmatch_h.m4: Update.
3034         * gnulib/import/m4/fpieee.m4: Update.
3035         * gnulib/import/m4/frexp.m4: Update.
3036         * gnulib/import/m4/frexpl.m4: Update.
3037         * gnulib/import/m4/fstat.m4: Update.
3038         * gnulib/import/m4/fstatat.m4: Update.
3039         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3040         * gnulib/import/m4/getcwd-path-max.m4: Update.
3041         * gnulib/import/m4/getcwd.m4: Update.
3042         * gnulib/import/m4/getdtablesize.m4: Update.
3043         * gnulib/import/m4/getlogin.m4: Update.
3044         * gnulib/import/m4/getlogin_r.m4: Update.
3045         * gnulib/import/m4/getpagesize.m4: Update.
3046         * gnulib/import/m4/getprogname.m4: Update.
3047         * gnulib/import/m4/gettimeofday.m4: Update.
3048         * gnulib/import/m4/glibc21.m4: Update.
3049         * gnulib/import/m4/glob.m4: Update.
3050         * gnulib/import/m4/glob_h.m4: Update.
3051         * gnulib/import/m4/gnulib-cache.m4: Update.
3052         * gnulib/import/m4/gnulib-common.m4: Update.
3053         * gnulib/import/m4/gnulib-comp.m4: Update.
3054         * gnulib/import/m4/gnulib-tool.m4: Update.
3055         * gnulib/import/m4/hard-locale.m4: Update.
3056         * gnulib/import/m4/include_next.m4: Update.
3057         * gnulib/import/m4/inttypes-pri.m4: Update.
3058         * gnulib/import/m4/inttypes.m4: Update.
3059         * gnulib/import/m4/isnand.m4: Update.
3060         * gnulib/import/m4/isnanl.m4: Update.
3061         * gnulib/import/m4/largefile.m4: Update.
3062         * gnulib/import/m4/limits-h.m4: Update.
3063         * gnulib/import/m4/localcharset.m4: Update.
3064         * gnulib/import/m4/locale-fr.m4: Update.
3065         * gnulib/import/m4/locale-ja.m4: Update.
3066         * gnulib/import/m4/locale-zh.m4: Update.
3067         * gnulib/import/m4/localtime-buffer.m4: Update.
3068         * gnulib/import/m4/longlong.m4: Update.
3069         * gnulib/import/m4/lstat.m4: Update.
3070         * gnulib/import/m4/malloc.m4: Update.
3071         * gnulib/import/m4/malloca.m4: Update.
3072         * gnulib/import/m4/math_h.m4: Update.
3073         * gnulib/import/m4/mbrtowc.m4: Update.
3074         * gnulib/import/m4/mbsinit.m4: Update.
3075         * gnulib/import/m4/mbsrtowcs.m4: Update.
3076         * gnulib/import/m4/mbstate_t.m4: Update.
3077         * gnulib/import/m4/memchr.m4: Update.
3078         * gnulib/import/m4/memmem.m4: Update.
3079         * gnulib/import/m4/mempcpy.m4: Update.
3080         * gnulib/import/m4/memrchr.m4: Update.
3081         * gnulib/import/m4/mkdir.m4: Update.
3082         * gnulib/import/m4/mkstemp.m4: Update.
3083         * gnulib/import/m4/mmap-anon.m4: Update.
3084         * gnulib/import/m4/mode_t.m4: Update.
3085         * gnulib/import/m4/msvc-inval.m4: Update.
3086         * gnulib/import/m4/msvc-nothrow.m4: Update.
3087         * gnulib/import/m4/multiarch.m4: Update.
3088         * gnulib/import/m4/nocrash.m4: Update.
3089         * gnulib/import/m4/off_t.m4: Update.
3090         * gnulib/import/m4/onceonly.m4: Update.
3091         * gnulib/import/m4/open-cloexec.m4: Update.
3092         * gnulib/import/m4/open.m4: Update.
3093         * gnulib/import/m4/openat.m4: Update.
3094         * gnulib/import/m4/opendir.m4: Update.
3095         * gnulib/import/m4/pathmax.m4: Update.
3096         * gnulib/import/m4/rawmemchr.m4: Update.
3097         * gnulib/import/m4/readdir.m4: Update.
3098         * gnulib/import/m4/readlink.m4: Update.
3099         * gnulib/import/m4/realloc.m4: Update.
3100         * gnulib/import/m4/rename.m4: Update.
3101         * gnulib/import/m4/rewinddir.m4: Update.
3102         * gnulib/import/m4/rmdir.m4: Update.
3103         * gnulib/import/m4/save-cwd.m4: Update.
3104         * gnulib/import/m4/secure_getenv.m4: Update.
3105         * gnulib/import/m4/setenv.m4: Update.
3106         * gnulib/import/m4/signal_h.m4: Update.
3107         * gnulib/import/m4/ssize_t.m4: Update.
3108         * gnulib/import/m4/stat-time.m4: Update.
3109         * gnulib/import/m4/stat.m4: Update.
3110         * gnulib/import/m4/std-gnu11.m4: Update.
3111         * gnulib/import/m4/stdbool.m4: Update.
3112         * gnulib/import/m4/stddef_h.m4: Update.
3113         * gnulib/import/m4/stdint.m4: Update.
3114         * gnulib/import/m4/stdio_h.m4: Update.
3115         * gnulib/import/m4/stdlib_h.m4: Update.
3116         * gnulib/import/m4/strchrnul.m4: Update.
3117         * gnulib/import/m4/strdup.m4: Update.
3118         * gnulib/import/m4/strerror.m4: Update.
3119         * gnulib/import/m4/string_h.m4: Update.
3120         * gnulib/import/m4/strstr.m4: Update.
3121         * gnulib/import/m4/strtok_r.m4: Update.
3122         * gnulib/import/m4/sys_socket_h.m4: Update.
3123         * gnulib/import/m4/sys_stat_h.m4: Update.
3124         * gnulib/import/m4/sys_time_h.m4: Update.
3125         * gnulib/import/m4/sys_types_h.m4: Update.
3126         * gnulib/import/m4/tempname.m4: Update.
3127         * gnulib/import/m4/time_h.m4: Update.
3128         * gnulib/import/m4/unistd-safer.m4: Update.
3129         * gnulib/import/m4/unistd_h.m4: Update.
3130         * gnulib/import/m4/warn-on-use.m4: Update.
3131         * gnulib/import/m4/wchar_h.m4: Update.
3132         * gnulib/import/m4/wchar_t.m4: Update.
3133         * gnulib/import/m4/wctype_h.m4: Update.
3134         * gnulib/import/m4/wint_t.m4: Update.
3135         * gnulib/import/malloc.c: Update.
3136         * gnulib/import/malloc/scratch_buffer.h: Update.
3137         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3138         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3139         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3140         * gnulib/import/malloca.c: Update.
3141         * gnulib/import/malloca.h: Update.
3142         * gnulib/import/malloca.valgrind: Update.
3143         * gnulib/import/math.in.h: Update.
3144         * gnulib/import/mbrtowc.c: Update.
3145         * gnulib/import/mbsinit.c: Update.
3146         * gnulib/import/mbsrtowcs-impl.h: Update.
3147         * gnulib/import/mbsrtowcs-state.c: Update.
3148         * gnulib/import/mbsrtowcs.c: Update.
3149         * gnulib/import/memchr.c: Update.
3150         * gnulib/import/memmem.c: Update.
3151         * gnulib/import/mempcpy.c: Update.
3152         * gnulib/import/memrchr.c: Update.
3153         * gnulib/import/mkdir.c: Update.
3154         * gnulib/import/mkstemp.c: Update.
3155         * gnulib/import/msvc-inval.c: Update.
3156         * gnulib/import/msvc-inval.h: Update.
3157         * gnulib/import/msvc-nothrow.c: Update.
3158         * gnulib/import/msvc-nothrow.h: Update.
3159         * gnulib/import/open.c: Update.
3160         * gnulib/import/openat-die.c: Update.
3161         * gnulib/import/openat-priv.h: Update.
3162         * gnulib/import/openat-proc.c: Update.
3163         * gnulib/import/openat.c: Update.
3164         * gnulib/import/openat.h: Update.
3165         * gnulib/import/opendir.c: Update.
3166         * gnulib/import/pathmax.h: Update.
3167         * gnulib/import/pipe-safer.c: Update.
3168         * gnulib/import/rawmemchr.c: Update.
3169         * gnulib/import/readdir.c: Update.
3170         * gnulib/import/readlink.c: Update.
3171         * gnulib/import/realloc.c: Update.
3172         * gnulib/import/ref-add.sin: Update.
3173         * gnulib/import/ref-del.sin: Update.
3174         * gnulib/import/rename.c: Update.
3175         * gnulib/import/rewinddir.c: Update.
3176         * gnulib/import/rmdir.c: Update.
3177         * gnulib/import/same-inode.h: Update.
3178         * gnulib/import/save-cwd.c: Update.
3179         * gnulib/import/save-cwd.h: Update.
3180         * gnulib/import/scratch_buffer.h: Update.
3181         * gnulib/import/secure_getenv.c: Update.
3182         * gnulib/import/setenv.c: Update.
3183         * gnulib/import/signal.in.h: Update.
3184         * gnulib/import/stat-time.c: Update.
3185         * gnulib/import/stat-time.h: Update.
3186         * gnulib/import/stat-w32.c: Update.
3187         * gnulib/import/stat-w32.h: Update.
3188         * gnulib/import/stat.c: Update.
3189         * gnulib/import/stdbool.in.h: Update.
3190         * gnulib/import/stddef.in.h: Update.
3191         * gnulib/import/stdint.in.h: Update.
3192         * gnulib/import/stdio.in.h: Update.
3193         * gnulib/import/stdlib.in.h: Update.
3194         * gnulib/import/str-two-way.h: Update.
3195         * gnulib/import/strchrnul.c: Update.
3196         * gnulib/import/strdup.c: Update.
3197         * gnulib/import/streq.h: Update.
3198         * gnulib/import/strerror-override.c: Update.
3199         * gnulib/import/strerror-override.h: Update.
3200         * gnulib/import/strerror.c: Update.
3201         * gnulib/import/string.in.h: Update.
3202         * gnulib/import/stripslash.c: Update.
3203         * gnulib/import/strnlen1.c: Update.
3204         * gnulib/import/strnlen1.h: Update.
3205         * gnulib/import/strstr.c: Update.
3206         * gnulib/import/strtok_r.c: Update.
3207         * gnulib/import/sys_stat.in.h: Update.
3208         * gnulib/import/sys_time.in.h: Update.
3209         * gnulib/import/sys_types.in.h: Update.
3210         * gnulib/import/tempname.c: Update.
3211         * gnulib/import/tempname.h: Update.
3212         * gnulib/import/time.in.h: Update.
3213         * gnulib/import/unistd--.h: Update.
3214         * gnulib/import/unistd-safer.h: Update.
3215         * gnulib/import/unistd.in.h: Update.
3216         * gnulib/import/unsetenv.c: Update.
3217         * gnulib/import/verify.h: Update.
3218         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3219         * gnulib/import/wchar.in.h: Update.
3220         * gnulib/import/wctype.in.h: Update.
3221         * gnulib/import/xalloc-oversized.h: Update.
3222         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3223         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3224
3225 2018-08-16  Gary Benson <gbenson@redhat.com>
3226
3227         PR gdb/13000:
3228         * gdb/main.c (captured_main_1): Exit with nonzero status
3229         in batch mode if the last command to be executed failed.
3230         * NEWS: Mention the above.
3231
3232 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3233
3234         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3235         end of warning message.
3236
3237 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3238
3239         PR gdb/22943:
3240         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3241         (aarch64_extract_return_value): Use
3242         aapcs_is_vfp_call_or_return_candidate.
3243         (aarch64_return_in_memory): Likewise.
3244         (aarch64_store_return_value): Likewise.
3245
3246 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3247
3248         * aarch64-tdep.c
3249         (aapcs_is_vfp_call_or_return_candidate): Make static
3250         (pass_in_v_or_stack): Remove function.
3251         (pass_in_v_vfp_candidate): New function.
3252         (aarch64_push_dummy_call): Check for float register candidates.
3253
3254 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3255
3256         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3257         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3258         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3259
3260 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3261
3262         PR build/23399
3263         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3264         (struct ipa_sym_addresses): Rename to...
3265         (struct ipa_sym_addresses_common): ... this.
3266         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3267
3268 2018-08-28  Tom Tromey  <tom@tromey.com>
3269
3270         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3271         (token_fifo): Now a std::vector.
3272         (yylex, c_parse): Update.
3273         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3274         (token_fifo): Now a std::vector.
3275         (yylex, d_parse): Update.
3276         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3277         (token_fifo): Now a std::vector.
3278         (yylex, go_parse): Update.
3279
3280 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3281
3282         * parser-defs.h (struct type_stack) <elements>: Change type to
3283         std::vector<union type_stack_elt>.
3284         <depth, size>: Remove.
3285         * parse.c (parse_exp_in_context_1): Adjust.
3286         (type_stack_reserve): Remove.
3287         (check_type_stack_depth): Remove.
3288         (insert_into_type_stack): Adjust to std::vector.
3289         (insert_type): Likewise.
3290         (push_type): Likewise.
3291         (push_type_int): Likewise.
3292         (insert_type_address_space): Likewise.
3293         (pop_type): Likewise.
3294         (pop_type_int): Likewise.
3295         (pop_typelist): Likewise.
3296         (pop_type_stack): Likewise.
3297         (append_type_stack): Likewise.
3298         (push_type_stack): Likewise.
3299         (get_type_stack): Likewise.
3300         (type_stack_cleanup): Likewise.
3301         (push_typelist): Likewise.
3302         (follow_types): Likewise.
3303         (_initialize_parse): Likewise.
3304
3305 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3306
3307         * NEWS: Mention csky target.
3308
3309 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3310             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3311             Don Breazeal  <donb@codesourcery.com>
3312
3313         * csky-linux-tdep.c: New file.
3314         * csky-tdep.c: Likewise.
3315         * csky-tdep.h: Likewise.
3316         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3317         csky-tdep.o.
3318         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3319         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3320         * configure.tgt: Add csky support.
3321
3322 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3323
3324         * python/py-framefilter.c (py_print_frame): Print frame architecture
3325         when printing on an MI output.
3326
3327 2018-08-27  Tom Tromey  <tom@tromey.com>
3328
3329         PR build/23087:
3330         * configure: Rebuild.
3331         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3332
3333 2018-08-27  Tom Tromey  <tom@tromey.com>
3334
3335         * aarch64-linux-tdep.c
3336         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3337         casts to int.
3338
3339 2018-08-27  Tom Tromey  <tom@tromey.com>
3340
3341         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3342         unsigned.
3343         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3344         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3345         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3346         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3347         unsigned.
3348
3349 2018-08-27  Tom Tromey  <tom@tromey.com>
3350
3351         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3352         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3353
3354 2018-08-27  Tom Tromey  <tom@tromey.com>
3355
3356         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3357         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3358         ULONGEST_MAX.
3359         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3360         ULONGEST_MAX.
3361         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3362         ULONGEST_MAX.
3363         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3364         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3365         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3366         ULONGEST_MAX.
3367         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3368         (ppc64_linux_sigaction_tramp_frame)
3369         (ppc32_linux_sighandler_tramp_frame)
3370         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3371         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3372         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3373         * mn10300-linux-tdep.c (am33_linux_sigframe)
3374         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3375         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3376         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3377         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3378         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3379         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3380         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3381         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3382         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3383         * microblaze-linux-tdep.c
3384         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3385         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3386         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3387         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3388         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3389         * common/common-types.h (ULONGEST_MAX): New define.
3390         (CORE_ADDR_MAX): Fix formatting.
3391         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3392         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3393         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3394         (arm_linux_rt_sigreturn_tramp_frame)
3395         (arm_eabi_linux_sigreturn_tramp_frame)
3396         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3397         (thumb2_eabi_linux_sigreturn_tramp_frame)
3398         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3399         (arm_linux_restart_syscall_tramp_frame)
3400         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3401         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3402         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3403         ULONGEST_MAX.
3404         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3405
3406 2018-08-27  Tom Tromey  <tom@tromey.com>
3407
3408         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3409         CORE_ADDR_MAX.
3410         * mips-tdep.c (mips_deal_with_atomic_sequence)
3411         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3412         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3413         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3414         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3415         CORE_ADDR_MAX.
3416         * aarch64-tdep.c (aarch64_software_single_step): Use
3417         CORE_ADDR_MAX.
3418
3419 2018-08-27  Tom Tromey  <tom@tromey.com>
3420
3421         * linespec.c (complete_linespec_component): Add cast to "char".
3422         * completer.c (completion_tracker::build_completion_result): Add
3423         cast to "char".
3424
3425 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3426
3427         * solist.h (struct solist, struct target_so_ops): Fix
3428         indentation.
3429
3430 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3431
3432         * ada-tasks.c (ada_task_info_s): Remove typedef.
3433         (DEF_VEC_O(ada_task_info_s)): Remove.
3434         (struct ada_tasks_inferior_data): Initialize fields.
3435         <task_list>: Make an std::vector.
3436         (get_ada_tasks_inferior_data): Allocate with new.
3437         (ada_get_task_number): Adjust.
3438         (get_task_number_from_id): Likewise.
3439         (valid_task_id): Likewise.
3440         (ada_get_task_info_from_ptid): Likewise.
3441         (iterate_over_live_ada_tasks): Likewise.
3442         (add_ada_task): Likewise.
3443         (read_known_tasks): Likewise.
3444         (ada_build_task_list): Likewise.
3445         (print_ada_task_info): Likewise.
3446         (info_task): Likewise.
3447         (task_command_1): Likewise.
3448
3449 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3450
3451         * ada-lang.c (add_angle_brackets): Return std::string.
3452
3453 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3454
3455         * python/py-threadevent.c (py_get_event_thread): Initialize
3456         pythread.
3457
3458 2018-08-24  Pedro Alves  <palves@redhat.com>
3459
3460         * python/py-bpevent.c (create_breakpoint_event_object): Use
3461         copy-initialization.
3462         * python/py-continueevent.c (emit_continue_event): Use
3463         copy-initialization.
3464         * python/py-exitedevent.c (create_exited_event_object): Return a
3465         gdbpy_ref<>.
3466         (emit_exited_event): Use copy-initialization.
3467         * python/py-inferior.c (python_new_inferior)
3468         (python_inferior_deleted, add_thread_object): Use
3469         copy-initialization.
3470         * python/py-infevents.c (create_inferior_call_event_object)
3471         (create_register_changed_event_object)
3472         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3473         (emit_inferior_call_event, emit_memory_changed_event)
3474         (emit_register_changed_event): Use copy-initialization.
3475         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3476         Return a gdbpy_ref<>.
3477         (emit_new_objfile_event): Use copy-initialization.
3478         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3479         (emit_clear_objfiles_event): Use copy-initialization.
3480         * python/py-signalevent.c (create_signal_event_object): Use
3481         copy-initialization.
3482         * python/py-threadevent.c (create_thread_event_object): Use
3483         copy-initialization.
3484
3485 2018-08-24  Pedro Alves  <palves@redhat.com>
3486             Simon Marchi  <simon.marchi@ericsson.com>
3487
3488         PR gdb/23379
3489         * python/py-continueevent.c: Include "gdbthread.h".
3490         (create_continue_event_object): Add intro comment.  Add 'ptid'
3491         parameter.  Use it to find thread to pass to
3492         create_thread_event_object.
3493         (emit_continue_event): Pass PTID down to
3494         create_continue_event_object.
3495         * python/py-event.h (py_get_event_thread): Declare.
3496         (create_thread_event_object): Remove default from 'thread'
3497         parameter.
3498         * python/py-stopevent.c (create_stop_event_object): Use
3499         py_get_event_thread.
3500         * python/py-threadevent.c (get_event_thread): Rename to ...
3501         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3502         and use it to find the thread.
3503         (create_thread_event_object): Assert that THREAD isn't null.
3504         Don't find the event thread here.
3505
3506 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3507
3508         * block.h (blockrange, blockranges): New struct declarations.
3509         (struct block): Add new field named `ranges'.
3510         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3511         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3512         macros for accessing ranges in struct block.
3513         (make_blockranges): New declaration.
3514         block.c (make_blockranges): New function.
3515         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3516         for block.
3517         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3518         * blockframe.c (cache_pc_function_block): New static global.
3519         (clear_pc_function_cache): Clear cache_pc_function_block.
3520         (find_pc_partial_function): Move comment to symtab.h.  Add
3521         support for non-contiguous blocks.
3522         * cli/cli-cmds.c (block.h): Include.
3523         (print_disassembly): Handle printing of non-contiguous blocks.
3524         (disassemble_current_function): Likewise.
3525         (disassemble_command): Likewise.
3526
3527         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3528         BLOCK_START.
3529         * blockframe.c (get_pc_function_start): Likewise.
3530         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3531         (gcc_symbol_address): Likewise.
3532         * compile/compile-object-run.c (compile_object_run): Likewise.
3533         * compile/compile.c (get_expr_block_and_pc): Likewise.
3534         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3535         (func_addr_to_tail_call_list): Likewise.
3536         * findvar.c (default_read_var_value): Likewise.
3537         * inline-frame.c (inline_frame_this_id): Likewise.
3538         (skip-inline_frames): Likewise.
3539         * infcmd.c (until_next_command): Likewise.
3540         * linespec.c (convert_linespec_to_sals): Likewise.
3541         * parse.c (parse_exp_in_context_1): Likewise.
3542         * printcmd.c (build_address_symbolic): likewise.
3543         (info_address_command): Likewise.
3544         symtab.c (find_function_start_sal): Likewise.
3545         (skip_prologue_sal): Likewise.
3546         (find_function_alias_target): Likewise.
3547         (find_gnu_ifunc): Likewise.
3548         * stack.c (find_frame_funname): Likewise.
3549         * symtab.c (fixup_symbol_section): Likewise.
3550         (find_function_start_sal): Likewise.
3551         (skip_prologue_sal): Likewsie.
3552         (find_function_alias_target): Likewise.
3553         (find_gnu_ifunc): Likewise.
3554         * tracepoint.c (info_scope_command): Likewise.
3555         * value.c (value_fn_field): Likewise.
3556
3557         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3558         in place of find_pc_partial_function.
3559         * blockframe.c (find_function_entry_range_from_pc): New function.
3560         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3561         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3562         for each range in a block.
3563
3564
3565 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3566
3567         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3568         incrementation.
3569
3570 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3571
3572         * solib-svr4.c (read_program_headers_from_bfd): Return
3573         gdb::optional<gdb::byte_vector>.
3574         (svr4_exec_displacement): Adjust.
3575
3576 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3577
3578         * solib-svr4.c (read_program_header): Return
3579         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3580         (find_program_interpreter): Return
3581         gdb::optional<gdb::byte_vector>.
3582         (scan_dyntag_auxv): Adjust.
3583         (enable_break): Adjust.
3584         (svr4_exec_displacement): Adjust.
3585
3586 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3587
3588         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3589         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3590
3591 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3592
3593         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3594         string_vprintf.
3595         * guile/scm-utils.c (gdbscm_printf): Likewise.
3596         * serial.c (serial_printf): Likewise.
3597         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3598
3599 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3600
3601         * stack.c (print_frame): Print frame architecture when printing on
3602         an MI output.
3603         * NEWS: Mention new "arch" attribute in frame output.
3604
3605 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3606
3607         * arch/aarch64.h (aarch64_regnum): Update comment.
3608
3609 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3610
3611         * NEWS: Add SVE to 8.2 section.
3612
3613 2018-08-21  Pedro Alves  <palves@redhat.com>
3614
3615         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3616         out from gdbscm_parse_function_args.
3617         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3618         gdbscm_parse_function_args_1.
3619
3620 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3621
3622         PR gdb/17816
3623         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3624         operator.
3625
3626 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3627
3628         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3629
3630 2018-08-19  Michael Spang  <spang@google.com>
3631
3632         PR gdb/11786
3633         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3634         for PT_TLS segments.
3635
3636 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3637
3638         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3639         dwarf_variable_value.
3640         * dwarf2-frame.c (class dwarf_expr_executor):
3641         Add override for dwarf_variable_value.
3642         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3643         (class symbol_needs_eval_context): Likewise.
3644         (indirect_synthetic_pointer): Add forward declaration.
3645         (sect_variable_value): New function.
3646         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3647         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3648         for DW_OP_GNU_variable_value.
3649
3650 2018-08-16  Tom Tromey  <tom@tromey.com>
3651
3652         * top.c (read_command_file): Update.
3653         (command_line_input): Remove "repeat" argument.
3654         * ada-lang.c (get_selections): Update.
3655         * linespec.c (decode_line_2): Update.
3656         * defs.h (command_line_input): Remove argument.
3657         * cli/cli-script.c (read_next_line): Update.
3658         * python/py-gdb-readline.c: Update.
3659
3660 2018-08-17  Tom Tromey  <tom@tromey.com>
3661
3662         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3663         command_line_input.
3664
3665 2018-08-15  Tom Tromey  <tom@tromey.com>
3666
3667         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3668
3669 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3670
3671         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3672         If used, use find_pc_partial_function to find address range
3673         to disassemble.
3674         * mi/mi-main.c (mi_cmd_list_features): Report
3675         "data-disassemble-a-option" feature.
3676         * NEWS: Mention new -data-disassemble option -a.
3677
3678 2018-08-13  Tom Tromey  <tom@tromey.com>
3679
3680         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3681
3682 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3683
3684         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3685         (aarch64_linux_collect_sve_regset): Likewise.
3686         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3687         * regcache.h (regcache_map_entry_size): New function.
3688
3689 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3690
3691         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3692         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3693         (SVE_HEADER_VL_LENGTH): Likewise.
3694         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3695         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3696         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3697         (SVE_HEADER_SIZE_OFFSET): Likewise.
3698         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3699         (SVE_HEADER_VL_OFFSET): Likewise.
3700         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3701         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3702         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3703         (SVE_HEADER_SIZE): Likewise.
3704         (aarch64_linux_core_read_vq): Add function.
3705         (aarch64_linux_core_read_description): Check for SVE section.
3706
3707 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3708
3709         * aarch64-fbsd-tdep.c
3710         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3711         collect_size.
3712         * aarch64-linux-tdep.c
3713         (aarch64_linux_iterate_over_regset_sections): Likewise.
3714         * alpha-linux-tdep.c
3715         (alpha_linux_iterate_over_regset_sections):
3716         * alpha-nbsd-tdep.c
3717         (alphanbsd_iterate_over_regset_sections): Likewise.
3718         * amd64-fbsd-tdep.c
3719         (amd64fbsd_iterate_over_regset_sections): Likewise.
3720         * amd64-linux-tdep.c
3721         (amd64_linux_iterate_over_regset_sections): Likewise.
3722         * arm-bsd-tdep.c
3723         (armbsd_iterate_over_regset_sections): Likewise.
3724         * arm-fbsd-tdep.c
3725         (arm_fbsd_iterate_over_regset_sections): Likewise.
3726         * arm-linux-tdep.c
3727         (arm_linux_iterate_over_regset_sections): Likewise.
3728         * corelow.c (get_core_registers_cb): Likewise.
3729         (core_target::fetch_registers): Likewise.
3730         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3731         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3732         * gdbarch.h (void): Regenerate.
3733         * gdbarch.sh: Add supply_size and collect_size.
3734         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3735         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3736         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3737         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3738         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3739         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3740         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3741         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3742         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3743         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3744         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3745         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3746         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3747         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3748         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3749         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3750         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3751         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3752         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3753         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3754         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3755         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3756         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3757         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3758         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3759         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3760         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3761         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3762         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3763         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3764
3765 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3766
3767         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3768         with string_printf.
3769
3770 2018-08-10  Keith Seitz  <keiths@redhat.com>
3771
3772         * compile/compile-c-support.c (add_code_header, add_code_footer):
3773         Move into policy class.
3774         (c_push_user_expression, pop_user_expression_nop)
3775         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3776         (compile_program): New host class.
3777         (c_compile_program): New typedef.
3778         (c_compute_porgram): Use c_compile_program.
3779
3780 2018-08-10  Keith Seitz  <keiths@redhat.com>
3781
3782         * compile/compile-internal.h (compile_instance::~compile_instance):
3783         Remove calls to htab_delete.
3784         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3785         * compile.c (compile_instance::compile_instance): Initialize
3786         htab unique pointers.
3787         (compile_instance::get_cached_type, compile_instance::insert_type)
3788         (compile_instance::error_symbol_once): Update for unique_ptr.
3789
3790 2018-08-10  Keith Seitz  <keiths@redhat.com>
3791
3792         * compile/compile-c-symbols.c (struct symbol_error)
3793         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3794         (compile_instance::insert_symbol_error)
3795         (compile_instance::error_symbol_once): Move to ...
3796         * compile/compile.c: ... here.
3797
3798 2018-08-10  Keith Seitz  <keiths@redhat.com>
3799
3800         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3801         instead of `new_compile_instance'.
3802         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3803         Update description.
3804         If the symbol error map is not initialized, create it.
3805         (generate_c_for_for_one_symbol): Do not check/initialize
3806         the symbol error map.
3807         * compile/compile-c-types.c (compile_c_instance): Make a class.
3808         Update all callers.
3809         (compile_instance::compile_instance): Initialize the type cache.
3810         (get_cached_type): New function.
3811         (insert_type): Update description.
3812         (compile_c_instance::m_default_cflags): Define.
3813         (convert_type): Update description.  Use get_cached_type.
3814         (delete_instance): Moved to destructor.
3815         (new_compile_instance): Moved to constructor.
3816         * compile/compile-c.h (compile_c_instance): Make class inheriting
3817         from compile_instance.
3818         <base>: Remove field.
3819         <type_map, symbol_err_map>: Move to base class.
3820         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3821         * compile/compile-internal.h (compile_instance): Make class.
3822         <type_map_t, symbol_err_map_t>: Define.
3823         <fe>: Rename to `m_gcc_fe'.
3824         <scope, block, gcc_target_options>: Add `m_' prefix.
3825         <m_type_map, m_symbol_err_map>: New fields, moved from
3826         compile_c_instance.
3827         <destroy>: Remove.
3828         (convert_type, new_compile_instance): Remove.
3829         * compile/compile.c (cleanup_compile_instance): Remove.
3830         (compile_to_object): Use unique_ptr to eliminate cleanups.
3831         (compile_instance::set_print_callback, compile_instance::version)
3832         (compile_instance::set_verbose)
3833         (compile_instance::set_driver_filename)
3834         (compile_instance::set_triplet_regexp)
3835         (compile_instance::set_arguments)
3836         (compile_instance::set_source_file)
3837         (compile_instance::compile): Define.
3838
3839 2018-08-10  Keith Seitz  <keiths@redhat.com>
3840
3841         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3842         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3843         gcc-c-fe.def to define C plugin.
3844         (delete_instance): Delete `c_plugin'.
3845         (new_compile_instance): Initialize `c_plugin'.
3846         * compile/compile-c.h: Include gcc_c_plugin.h.
3847         (struct compile_c_instance) <c_plugin>: New member.
3848         * gcc-c-plugin.h: New file.
3849         Update all callers with API change.
3850
3851 2018-08-10  Keith Seitz  <keiths@redhat.com>
3852
3853         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3854         (HFILES_NO_SRCDIR): ... to here.
3855         Add compile-internal.h and compile-c.h.
3856         * compile/compile-c-support.c: Include compile-c.h.
3857         * compile/compile-c-symbols.c: Include compile-c.h.
3858         (generate_c_for_variable_locations): Update comment.
3859         * compile/compile-c-types.c: Include compile-c.h.
3860         * compile/compile-c.h: New file -- moved C language declarations
3861         from other files here.
3862         * compile/compile-internal.h: Do not include hashtab.h or
3863         common/enum-flags.h.
3864         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3865         (gcc_convert_symbol, gcc_symbol_address)
3866         (generate_c_for_variable_locations, c_get_mode_for_size)
3867         (c_get_range_decl_name): Definitions moved to compile-c.h.
3868         * compile/compile-loc2c.c: Include compile-c.h.
3869
3870 2018-08-10  Keith Seitz  <keiths@redhat.com>
3871
3872         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3873         (c_symbol_substitution_name): ... this.
3874         Update all callers.
3875
3876 2018-08-10  Keith Seitz  <keiths@redhat.com>
3877
3878         * compile/compile-c-support.c (c_compute_program): Use
3879         unique_xmalloc_ptr to eliminate cleanup.
3880         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3881         Return a unique_xmalloc_ptr and eliminate cleanup.
3882         * compile/compile-internal.h (generate_c_for_variable_locations):
3883         Return unique_xmalloc_ptr and update description.
3884
3885 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3886
3887         * corelow.c (core_target::get_core_register_section): Rename
3888         min_size to section_min_size.
3889
3890 2018-08-09  Jim Wilson  <jimw@sifive.com>
3891
3892         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3893         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3894         * NEWS: Mention new GNU/Linux RISC-V target.
3895         * configure.host: Add riscv*-*-linux*.
3896         * configure.nat: Add riscv*.
3897         * configure.tgt: Add riscv*-*-linux*.
3898         * riscv-linux-nat.c: New file.
3899         * riscv-linux-tdep.c: New file.
3900
3901 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3902
3903         * infrun.c (resume): Make static, add forward declaration.
3904         (proceed): Update header comment.
3905         * infrun.h (resume): Delete declaration.
3906
3907 2018-08-09  Tom Tromey  <tom@tromey.com>
3908
3909         * riscv-tdep.h: Minor formatting fixes.
3910
3911 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3912
3913         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3914         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3915         (test_mkdir_recursive): Likewise.
3916         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3917
3918 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3919
3920         * valarith.c (value_subscripted_rvalue): If an array is not in
3921         memory, and we don't know the upper bound, then we can't know that
3922         the requested element exists or not.
3923
3924 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3925
3926         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3927         (target_options_to_string): Add comment.
3928
3929 2018-08-08  Tom Tromey  <tom@tromey.com>
3930
3931         * unittests/scoped_mmap-selftests.c: Check result of "write".
3932
3933 2018-08-08  Jim Wilson  <jimw@sifive.com>
3934
3935         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3936         (decode_register_index_short): New.
3937         (decode_j_type_insn, decode_cj_type_insn): New.
3938         (decode_b_type_insn, decode_cb_type_insn): New.
3939         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3940         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3941         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3942         is_c_sw_insn instead of is_sw_insn.
3943         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3944         (riscv_software_single_step): New.
3945         * riscv-tdep.h (riscv_software_single_step): Declare.
3946
3947         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3948         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3949
3950 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3951
3952         PR gdb/18050:
3953         * target.c (dispose_inferior): Don't dispose of inferiors that are
3954         already killed.
3955
3956 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3957
3958         * remote.c (remote_target::download_tracepoint): Change char* to
3959         const char*.
3960
3961 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3962
3963         * target.h (target_options_to_string): Return an std::string.
3964         * target.c (str_comma_list_concat_elem): Return void, use
3965         std::string.
3966         (do_option): Likewise.
3967         (target_options_to_string): Return an std::string.
3968         * linux-nat.c (linux_nat_target::wait): Adjust.
3969         * target-debug.h (target_debug_print_options): Adjust.
3970
3971 2018-08-07  Tom Tromey  <tom@tromey.com>
3972
3973         * Makefile.in (CPPFLAGS): New variable.
3974         (INTERNAL_CPPFLAGS): Use it.
3975
3976 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3977
3978         * NEWS: Mention the index cache.
3979
3980 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3981
3982         * common/pathstuff.h (get_standard_cache_dir): New.
3983         * common/pathstuff.c (get_standard_cache_dir): New.
3984         * build-id.h (build_id_to_string): New.
3985         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3986         DEBUG_STR_SUFFIX): Move to here.
3987         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3988         DEBUG_STR_SUFFIX): Move from there.
3989         (write_psymtabs_to_index): Make non-static, add basename
3990         parameter.  Write to temporary files, rename when done.
3991         (save_gdb_index_command): Adjust call to
3992         write_psymtabs_to_index.
3993         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3994         field.
3995         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3996         (get_gdb_index_contents_from_cache): New.
3997         (get_gdb_index_contents_from_cache_dwz): New.
3998         (dwarf2_initialize_objfile): Read index from cache.
3999         (dwarf2_build_psymtabs): Save to index.
4000         * dwarf-index-cache.h: New file.
4001         * dwarf-index-cache.c: New file.
4002         * dwarf-index-write.h: New file.
4003
4004 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4005
4006         * gnulib/aclocal.m4: Re-generate.
4007         * gnulib/config.in: Re-generate.
4008         * gnulib/configure: Re-generate.
4009         * gnulib/import/Makefile.am: Re-generate.
4010         * gnulib/import/Makefile.in: Re-generate.
4011         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4012         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4013         * gnulib/import/m4/mkdir.m4: New file.
4014         * gnulib/import/mkdir.c: New file.
4015         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4016         module.
4017
4018 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4019
4020         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4021         * common/scoped_mmap.c: New file.
4022         * common/scoped_mmap.h (destroy): New method.
4023         (~scoped_mmap, reset): Use destroy.
4024         (scoped_mmap): New move constructor.
4025         (mmap_file): New declaration.
4026         * unittests/scoped_mmap-selftests.c (test_normal,
4027         test_invalid_filename, run_tests): New functions.
4028         (_initialize_scoped_mmap_selftests): Register selftest.
4029
4030 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4031
4032         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4033         (read_gdb_index_from_buffer): ... this.  Remove section
4034         parameter, add buffer parameter.
4035         (get_gdb_index_contents_ftype,
4036         get_gdb_index_contents_dwz_ftype): New typedefs.
4037         (dwarf2_read_gdb_index): Add callback parameters to get the
4038         index contents.
4039         (get_gdb_index_contents_from_section): New.
4040         (dwarf2_initialize_objfile): Update call to
4041         dwarf2_read_gdb_index.
4042
4043 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4044
4045         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4046         (gdb_open_cloexec): Likewise.
4047         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4048         (commandline_from_pid): Likewise.
4049         (linux_xfer_osdata_threads): Likewise.
4050         (linux_xfer_osdata_fds): Likewise.
4051         * ada-lang.c (is_package_name): Likewise.
4052         * auxv.c (procfs_xfer_auxv): Likewise.
4053         * breakpoint.c (print_one_breakpoint_location): Use
4054         uiout::field_fmt.
4055         (print_one_catch_solib): Use string_printf.
4056         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4057         (add_pe_forwarded_sym): Likewise.
4058         * dwarf2read.c (create_type_unit_group): Likewise.
4059         (build_error_marker_type): Likewise.
4060         * infcall.c (get_function_name): Likewise.
4061         * valprint.c (print_converted_chars_to_obstack): Likewise.
4062         * xtensa-tdep.c (xtensa_register_type): Likewise.
4063
4064 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4065
4066         * remote.c (remote_target::download_tracepoint): Fix format
4067         string errors.
4068
4069 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4070
4071         * tracefile.c: Include common/byte-vector.h.
4072         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4073         with trace_regblock_size if needed.  Update uses of buf.
4074
4075 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4076
4077         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4078         std::vector<unsigned char>.
4079         * tracepoint.c (collection_list::collection_list): Remove
4080         m_regs_mask initializer from initializer list.  Resize
4081         m_regs_mask using the largest remote register number.
4082         (collection_list::add_remote_register): Remove size check on
4083         m_regs_mask.  Use at to access element.
4084         (collection_list::stringify): Change type of temp_buf to
4085         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4086         stringify the register mask.  Use pack_hex_byte for the register
4087         mask.
4088
4089 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4090
4091         * tracepoint.h (class collection_list) <add_register>: Remove.
4092         <add_remote_register, add_ax_registers, add_local_register>:
4093         Declare.
4094         <add_memrange>: Add scope parameter.
4095         * tracepoint.c (encode_actions_1): Likewise.
4096         (collection_list::add_register): Rename to ...
4097         (collection_list::add_remote_register): ... this.  Update
4098         comment.
4099         (collection_list::add_ax_registers, add_local_register): New
4100         methods.
4101         (collection_list::add_memrange): Add scope parameter.  Call
4102         add_local_register instead of add_register.
4103         (finalize_tracepoint_aexpr): New function.
4104         (collection_list::collect_symbol): Update calls to add_memrange.
4105         Call add_local_register instead of add_register.  Call
4106         add_ax_registers.  Call finalize_tracepoint_aexpr.
4107         (encode_actions_1): Get remote regnos for $reg action.  Call
4108         add_remote_register, add_ax_registers, and add_local_register.
4109         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4110         (validate_actionline): Call finalize_tracepoint_aexpr.
4111
4112 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4113
4114         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4115         Replace array buf with gdb::char_vector buf, of size
4116         get_remote_packet_size ().  Replace references to buf and
4117         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4118         and xsnprintf with snprintf.  Raise errors if the buffer is too
4119         small.
4120
4121 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4122
4123         * remote.c (remote_target::download_tracepoint): Fix the has_more
4124         predicate in the QTDP action list iteration.
4125
4126 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4127
4128         * remote.c (remote_target::download_tracepoint): Fix indentation
4129         in for block.
4130
4131 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4132
4133         * proc-api.c (_initialize_proc_api): Remove c, unused.
4134         * procfs.c (procfs_init_inferior): Remove signals, unused.
4135         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4136         unused.
4137
4138 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4139             Andrew Burgess  <andrew.burgess@embecosm.com>
4140
4141         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4142         'W_STOPCODE (0)' as this could be ambiguous.
4143
4144 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4145
4146         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4147         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4148         "ai_socktype").
4149
4150 2018-08-02  Tom Tromey  <tom@tromey.com>
4151
4152         PR symtab/16842.
4153         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4154         symbols.
4155         (process_structure_scope): Likewise.
4156
4157 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4158
4159         PR gdb/22629:
4160         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4161         kill inferior.
4162
4163 2018-08-02  Tom Tromey  <tom@tromey.com>
4164
4165         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4166         (darwin_suspend_inferior, darwin_resume_inferior)
4167         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4168         (darwin_check_new_threads): Check result of get_darwin_inferior.
4169
4170 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4171
4172         GDB 8.1.1 released.
4173
4174 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4175
4176         * varobj.c (varobj_get_path_expr_parent): Report an error if
4177         parent is a dynamic varobj.
4178
4179 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4180
4181         * gnulib/aclocal.m4: Re-generate.
4182         * gnulib/config.in: Re-generate.
4183         * gnulib/configure: Re-generate.
4184         * gnulib/import/Makefile.in: Re-generate.
4185         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4186         * gnulib/import/m4/onceonly.m4: Re-generate.
4187
4188 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4189
4190         * target-descriptions.c (struct xml_test_tdesc): New.
4191         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4192         (record_xml_tdesc): Update.
4193         (maintenance_check_xml_descriptions): Update.
4194         * target-descriptions.h (record_xml_tdesc): Update comment.
4195
4196 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4197
4198         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4199         checking array bounds are defined.
4200
4201 2018-07-30  Tom Tromey  <tom@tromey.com>
4202
4203         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4204         irreflexivity violation.
4205
4206 2018-07-30  Tom Tromey  <tom@tromey.com>
4207
4208         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4209         * value.c (unpack_long): Remove lint code.
4210         * valops.c (value_ind): Remove lint code.
4211         * valarith.c (value_x_binop, value_x_unop, value_equal)
4212         (value_pos): Remove lint code.
4213
4214 2018-07-28  Tom de Vries  <tdevries@suse.de>
4215
4216         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4217         with undefined upper bound as <optimized out>.
4218
4219 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4220
4221         * gcore.in: Rename variable "name" to "prefix".  Expand
4222         "usage" text.
4223
4224 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4225
4226         * windows-nat.c (windows_nat_target::create_inferior): Update to
4227         call close() in global namespace.
4228
4229 2018-07-26  Tom Tromey  <tom@tromey.com>
4230
4231         * dwarf-index-write.c (add_address_entry): Don't add objfile
4232         offsets.
4233         * dbxread.c (find_stab_function): Rename from
4234         find_stab_function_addr.  Return a bound_minimal_symbol.
4235         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4236         Don't add objfile offsets.
4237         (end_psymtab): Use raw_text_low, raw_text_high,
4238         MSYMBOL_VALUE_RAW_ADDRESS.
4239         (read_ofile_symtab): Update.
4240         (process_one_symbol): Update.
4241         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4242         offsets.
4243         (dw2_relocate): Remove.
4244         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4245         searching addrmap.
4246         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4247         Update.
4248         (process_psymtab_comp_unit_reader, add_partial_symbol)
4249         (add_partial_subprogram, dwarf2_ranges_read): Update.
4250         (load_partial_dies): Update.
4251         (add_address_entry): Don't add objfile offsets.
4252         (dwarf2_build_include_psymtabs): Update.
4253         (create_addrmap_from_aranges): Don't add objfile offsets.
4254         (dw2_find_pc_sect_compunit_symtab): Update.
4255         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4256         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4257         Update.
4258         (parse_partial_symbols): Don't add objfile offsets.  Use
4259         raw_text_low, raw_text_high.  Update.
4260         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4261         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4262         or call 'relocate' quick function.  Clear psymbol_map.
4263         * psympriv.h (struct partial_symbol) <address>: Add section
4264         offset.
4265         <set_unrelocated_address>: Rename from set_address.
4266         <raw_text_low, raw_text_high>: New methods.
4267         <text_low, text_high>: Add objfile parameter.
4268         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4269         set_unrelocated_address.
4270         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4271         (find_pc_psymbol): Update.
4272         (fixup_psymbol_section, relocate_psymtabs): Remove.
4273         (dump_psymtab, psym_functions): Update.
4274         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4275         parameter.
4276         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4277         (start_psymtab_common): Update.
4278         * symfile-debug.c (debug_qf_relocate): Remove.
4279         (debug_sym_quick_functions): Update.
4280         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4281         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4282         Update.
4283
4284 2018-07-26  Tom Tromey  <tromey@redhat.com>
4285
4286         * dbxread.c (end_psymtab): Use text_high_valid and
4287         text_low_valid.
4288         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4289         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4290         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4291         Update comment.
4292         <text_low_valid, text_high_valid>: New fields.
4293         <set_text_low, set_text_high>: Update.
4294         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4295
4296 2018-07-26  Tom Tromey  <tom@tromey.com>
4297
4298         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4299         Update.
4300         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4301         textlow and texthigh fields.
4302         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4303         Update.
4304         * mdebugread.c (parse_lines, parse_partial_symbols)
4305         (psymtab_to_symtab_1): Update.
4306         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4307         Rename fields.  Update comment.  Now private.
4308         <text_low, text_high, set_text_low, set_text_high>: New methods.
4309         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4310         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4311         (start_psymtab_common, maintenance_info_psymtabs)
4312         (maintenance_check_psymtabs): Update.
4313         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4314         texthigh fields.
4315         (scan_xcoff_symtab): Update.
4316
4317 2018-07-26  Tom Tromey  <tromey@redhat.com>
4318
4319         * psympriv.h (struct partial_symbol) <unrelocated_address,
4320         address, set_address>: New methods.
4321         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4322         (fixup_psymbol_section, relocate_psymtabs): Update.
4323         (print_partial_symbols): Add 'objfile' parameter.  Update.
4324         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4325         Update.
4326
4327 2018-07-26  Tom Tromey  <tom@tromey.com>
4328
4329         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4330         (debug_names::write_psymbols): Update.
4331         * psympriv.h (struct partial_symbol): Derive from
4332         general_symbol_info.
4333         <obj_section>: New method.
4334         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4335         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4336         (find_pc_sect_psymbol, fixup_psymbol_section)
4337         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4338         (print_partial_symbols, recursively_search_psymtabs)
4339         (compare_psymbols, psymbol_hash, psymbol_compare)
4340         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4341         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4342
4343 2018-07-26  Tom Tromey  <tromey@redhat.com>
4344
4345         * dbxread.c (end_psymtab): Remove dead code.
4346
4347 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4348
4349         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4350         DWARF unwinders are disabled.
4351         * dwarf2-frame.c: Add dwarf2read.h include.
4352         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4353         disabled.
4354         (dwarf2_frame_unwinders_enabled_p): Define.
4355         (show_dwarf_unwinders_enabled_p): New function.
4356         (_initialize_dwarf2_frame): Register switch to control DWARF
4357         unwinder use.
4358         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4359         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4360         (show_dwarf_cmdlist): Remove static keyword.
4361         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4362         (show_dwarf_cmdlist): Declare.
4363         * NEWS: Document new feature.
4364
4365 2018-07-26  Tom de Vries  <tdevries@suse.de>
4366
4367         PR breakpoints/23366
4368         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4369
4370 2018-07-26  Tom de Vries  <tdevries@suse.de>
4371
4372         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4373         DW_AT_count can't be translated to a dynamic prop.
4374
4375 2018-07-25  Tom de Vries  <tdevries@suse.de>
4376
4377         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4378         try/catch.
4379
4380 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4381
4382         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4383
4384 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4385
4386         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4387
4388 2018-07-24  Keith Seitz  <keiths@redhat.comt
4389
4390         PR symtab/23010
4391         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4392         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4393         instead of add_symbol_to_list.
4394         (read_file_scope): Call prepare_one_comp_unit before reading
4395         any other DIEs.
4396
4397 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4398
4399         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4400
4401 2018-07-24  Tom Tromey  <tom@tromey.com>
4402
4403         * utils.c (malloc, realloc, free): Don't declare.
4404         * configure, config.in: Rebuild.
4405         * configure.ac: Don't check for declarations of free, malloc, or
4406         realloc.
4407
4408 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4409
4410         * aarch64-linux-nat.c
4411         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4412         variable.
4413         * arm-linux-nat.c (fetch_regs): Likewise.
4414         (store_regs): Likewise.
4415         (fetch_vfp_regs): Likewise.
4416         (store_vfp_regs): Likewise.
4417         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4418         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4419         (arm_linux_nat_target::insert_watchpoint): Likewise.
4420         (arm_linux_nat_target::remove_watchpoint): Likewise.
4421         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4422         Likewise.
4423         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4424         Likewise.
4425         * ppc-linux-nat.c (fetch_register): Likewise.
4426         (fetch_all_gp_regs): Likewise.
4427         (fetch_ppc_registers): Likewise.
4428         (store_all_gp_regs): Likewise.
4429         (store_ppc_registers): Likewise.
4430         (hwdebug_insert_point): Likewise.
4431         (can_use_watchpoint_cond_accel): Likewise.
4432         * remote-sim.c (gdb_os_write_stdout): Likewise.
4433
4434 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4435             Tom Tromey  <tom@tromey.com>
4436
4437         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4438         test for it.
4439         * configure: Rebuild.
4440
4441 2018-07-22  Tom Tromey  <tom@tromey.com>
4442
4443         * regformats/regdat.sh: Define xmltarget_${name} inside
4444         #ifndef IN_PROCESS_AGENT.
4445
4446 2018-07-22  Tom Tromey  <tom@tromey.com>
4447
4448         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4449
4450 2018-07-22  Tom Tromey  <tom@tromey.com>
4451
4452         * symfile.c (reread_symbols): Notify iter, not objfile.
4453
4454 2018-07-22  Tom Tromey  <tom@tromey.com>
4455
4456         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4457         Use arch_ops.
4458         (ravenscar_thread_target::prepare_to_store): Likewise.
4459
4460 2018-07-22  Tom Tromey  <tom@tromey.com>
4461
4462         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4463         unused variable.  Call value_fetch_lazy when needed.
4464         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4465         Remove unused variable.  Call value_fetch_lazy when needed.
4466
4467 2018-07-22  Tom Tromey  <tom@tromey.com>
4468
4469         * m32c-tdep.c (mark_dma): Return void.
4470         (make_regs): Remove unused declarations.
4471
4472 2018-07-22  Tom Tromey  <tom@tromey.com>
4473
4474         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4475         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4476         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4477         bkscm_get_valid_block_smob_arg_unsafe for effect.
4478
4479 2018-07-22  Tom Tromey  <tom@tromey.com>
4480
4481         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4482         value_type.
4483
4484 2018-07-22  Tom Tromey  <tom@tromey.com>
4485
4486         * windows-nat.c (saved_context): Conditionally define.
4487         * remote.c (remote_target::remote_btrace_maybe_reopen):
4488         Conditionally declare "warned".
4489         * inflow.c (sigquit_ours): Conditionally define.
4490         (new_tty): Move "tty" declaration inside #if.
4491         * guile/guile.c (guile_datadir): Conditionally define.
4492         * charset.c (set_be_le_names): Move some declarations inside #if.
4493         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4494         #if.
4495         (parse_xml_btrace_conf): Likewise.
4496
4497 2018-07-22  Tom Tromey  <tom@tromey.com>
4498
4499         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4500
4501 2018-07-22  Tom Tromey  <tom@tromey.com>
4502
4503         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4504         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4505         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4506         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4507         * stack.c (frame_apply_level_command): Remove unused variable.
4508         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4509         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4510         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4511         unused variable.
4512         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4513         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4514         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4515         variable.
4516         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4517         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4518         variable.
4519         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4520         Remove unused variable.
4521         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4522         variable.
4523         * common/tdesc.c (print_xml_feature::visit): Remove unused
4524         variable.
4525         * compile/compile-object-load.c (store_regs): Remove unused
4526         variables.
4527         * complaints.c (clear_complaints): Remove unused variable.
4528         * corelow.c (core_target_open): Remove unused variable.
4529         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4530         variable.
4531         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4532         variable.
4533         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4534         variable.
4535         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4536         variable.
4537         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4538         variable.
4539         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4540         variable.
4541         * ia64-tdep.c (examine_prologue): Remove unused variable.
4542         * infcall.c (run_inferior_call): Remove unused variable.
4543         * inferior.c (exit_inferior): Remove unused variable.
4544         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4545         * linespec.c (decode_line_2): Remove unused variable.
4546         * linux-nat.c (super_close): Remove.
4547         * linux-tdep.c (linux_info_proc): Remove unused variable.
4548         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4549         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4550         Remove unused variable.
4551         * parse.c (find_minsym_type_and_address): Remove unused variable.
4552         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4553         variable.
4554         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4555         variable.
4556         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4557         variables.
4558         * record-btrace.c (record_btrace_target::store_registers): Remove
4559         unused variable.
4560         (cmd_show_record_btrace_cpu): Remove unused variable.
4561         * riscv-tdep.c (riscv_register_reggroup_p)
4562         (riscv_push_dummy_call, riscv_return_value): Remove unused
4563         variable.
4564         * rust-exp.y (literal): Remove unused variable.
4565         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4566         unused variable.
4567         <STRUCTOP_ANONYMOUS>: Likewise.
4568         * s390-linux-tdep.c (s390_linux_init_abi_31)
4569         (s390_linux_init_abi_64): Remove unused variable.
4570         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4571         (file_select_thread, net_windows_open, _initialize_ser_windows):
4572         Remove unused variables.
4573         * symtab.c (find_pc_sect_line): Remove unused variable.
4574         * target-memory.c (compute_garbled_blocks): Remove unused
4575         variable.
4576         (target_write_memory_blocks): Remove unused variable.
4577         * target.c (target_stack::unpush): Remove unused variables.
4578         * tracepoint.c (start_tracing, all_tracepoint_actions)
4579         (merge_uploaded_trace_state_variables)
4580         (print_one_static_tracepoint_marker): Remove unused variable.
4581         * unittests/basic_string_view/element_access/char/1.cc (test01):
4582         Remove unused variable.
4583         * windows-nat.c (windows_continue, windows_add_all_dlls)
4584         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4585         Remove unused variables.
4586
4587 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4588
4589         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4590         attr_profile in HAVE_ELF.
4591         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4592         HAVE_ELF.
4593
4594 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4595
4596         * frame.c (frame_register_unwind): Change parameter name.
4597         (frame_unwind_register): Likewise.
4598         (frame_unwind_register_value): Likewise.
4599         (frame_unwind_register_signed): Likewise.
4600         (frame_unwind_register_unsigned): Likewise.
4601         * frame.h (frame_register_unwind): Likewise.
4602         (frame_unwind_register): Likewise.
4603         (frame_unwind_register_value): Likewise.
4604         (frame_unwind_register_signed): Likewise.
4605         (frame_unwind_register_unsigned): Likewise.
4606         (frame_unwind_arch): Likewise.
4607
4608 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4609
4610         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4611         ISA maintenance.
4612
4613 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4614
4615         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4616         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4617         hand.
4618
4619 2018-07-20  Keith Seitz  <keiths@redhat.com>
4620
4621         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4622         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4623         m_compunit_symtab, m_language>: Add "m_" prefix.
4624         Update all uses.
4625         * buildsym.c: Update all uses.
4626
4627 2018-07-20  Tom Tromey  <tom@tromey.com>
4628
4629         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4630         * buildsym.h (record_line_ftype): Remove typedef.
4631
4632 2018-07-20  Tom Tromey  <tom@tromey.com>
4633
4634         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4635         (end_expandable_symtab): Likewise.
4636         (end_symtab_get_static_block): Likewise.
4637         (end_symtab_from_static_block): Likewise.
4638         * buildsym-legacy.c (augment_type_symtab): Remove.
4639         (end_expandable_symtab): Remove.
4640         (end_symtab_get_static_block): Remove.
4641         (end_symtab_from_static_block): Remove.
4642
4643 2018-07-20  Tom Tromey  <tom@tromey.com>
4644
4645         * dwarf2read.c: Include buildsym.h.
4646         (struct dwarf2_cu) <builder>: New method.
4647         (fixup_go_packaging): Update.
4648         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4649         use scoped_free_pendings.
4650         (using_directives): Add "cu" parameter, remove "language".
4651         (read_import_statement, setup_type_unit_groups, )
4652         (read_func_scope, read_lexical_block_scope)
4653         (dwarf2_record_block_ranges, read_namespace): Update.
4654         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4655         (lnp_state_machine::handle_end_sequence): Update.
4656         (class lnp_state_machine) <m_cu>: New member.
4657         <m_record_line_callback>: Remove.
4658         <m_currently_recording_lines>: New member.
4659         (lnp_state_machine::handle_set_file): Update.
4660         (noop_record_line): Remove.
4661         (dwarf_record_line_p): Add cu parameter.
4662         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4663         (lnp_state_machine::record_line)
4664         (lnp_state_machine::lnp_state_machine)
4665         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4666         (dwarf_decode_lines): Update.
4667         (dwarf2_start_subfile): Add cu parameter.
4668         (dwarf2_start_symtab, new_symbol): Update.
4669         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4670         Remove dwarf2_per_objfile parameter.
4671         (dwarf_decode_macros): Update.
4672
4673 2018-07-20  Tom Tromey  <tom@tromey.com>
4674
4675         * stabsread.c (define_symbol): Update.
4676         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4677         * dwarf2read.c (new_symbol): Update.
4678         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4679         * cp-namespace.c: Include buildsym.h.
4680         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4681         * buildsym-legacy.c (get_buildsym_compunit): New function.
4682
4683 2018-07-20  Tom Tromey  <tom@tromey.com>
4684
4685         * xcoffread.c: Include buildsym-legacy.h.
4686         * windows-nat.c: Include buildsym-legacy.h.
4687         * stabsread.c: Include buildsym-legacy.h.
4688         * mdebugread.c: Include buildsym-legacy.h.
4689         * buildsym-legacy.h: New file.
4690         * buildsym-legacy.c: New file, from buildsym.c.
4691         * go32-nat.c: Include buildsym-legacy.h.
4692         * dwarf2read.c: Include buildsym-legacy.h.
4693         * dbxread.c: Include buildsym-legacy.h.
4694         * cp-namespace.c: Include buildsym-legacy.h.
4695         * coffread.c: Include buildsym-legacy.h.
4696         * buildsym.h: Move some contents to buildsym-legacy.h.
4697         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4698         buildsym-legacy.c.
4699         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4700
4701 2018-07-20  Tom Tromey  <tom@tromey.com>
4702
4703         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4704         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4705         (buildsym_compunit::buildsym_compunit)
4706         (buildsym_compunit::~buildsym_compunit)
4707         (buildsym_compunit::get_macro_table): Define.
4708
4709 2018-07-20  Tom Tromey  <tom@tromey.com>
4710
4711         * buildsym.c (reset_symtab_globals): Remove.
4712         (buildsym_compunit::end_symtab_from_static_block): Update.
4713         (buildsym_compunit::augment_type_symtab): Update.
4714         (end_symtab_from_static_block): Call free_buildsym_compunit.
4715         (augment_type_symtab, end_symtab, end_expandable_symtab):
4716         Likewise.
4717
4718 2018-07-20  Tom Tromey  <tom@tromey.com>
4719
4720         * arch-utils.c: Do not include buildsym.h.
4721         * mipsread.c: Do not include buildsym.h.
4722         * machoread.c: Do not include buildsym.h.
4723         * elfread.c: Do not include buildsym.h.
4724
4725 2018-07-20  Tom Tromey  <tom@tromey.com>
4726
4727         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4728         initialization.
4729         (buildsym_compunit): Add new constructor.
4730         (struct buildsym_compunit) <get_last_source_file, finish_block,
4731         record_block_range, start_subfile, patch_subfile_names,
4732         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4733         set_last_source_start_addr, get_last_source_start_addr,
4734         get_local_using_directives, set_local_using_directives,
4735         get_global_using_directives, outermost_context_p,
4736         get_current_context_stack, get_context_stack_depth,
4737         get_current_subfile, get_local_symbols, get_file_symbols,
4738         get_global_symbols, record_debugformat, record_producer,
4739         push_context, pop_context, end_symtab_get_static_block,
4740         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4741         New public methods.
4742         <record_pending_block, finish_block_internal, make_blockvector,
4743         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4744         private methods.
4745         Update all users.
4746
4747 2018-05-22  Tom Tromey  <tom@tromey.com>
4748
4749         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4750         parameter.
4751         (finish_block_internal): Update.
4752
4753 2018-07-20  Tom Tromey  <tom@tromey.com>
4754
4755         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4756         parameter.
4757         (finish_block_internal): Update.
4758
4759 2018-07-20  Tom Tromey  <tom@tromey.com>
4760
4761         * buildsym.h (EXTERN): Don't define or undef.
4762         * buildsym.c (EXTERN): Don't define.
4763
4764 2018-07-20  Tom Tromey  <tom@tromey.com>
4765
4766         * buildsym.c: Remove TODO comment.
4767
4768 2018-07-20  Tom Tromey  <tom@tromey.com>
4769
4770         * coffread.c (coff_symtab_read): Update.
4771         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4772         (xcoff_new_init): Update.
4773         * mipsread.c (mipscoff_new_init): Update.
4774         * mdebugread.c (mdebug_build_psymtabs): Update.
4775         * elfread.c (elf_new_init): Update.
4776         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4777         Update.
4778         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4779         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4780         (stabsect_build_psymtabs): Update.
4781         * buildsym.h (buildsym_init): Don't declare.
4782         * buildsym.c: Update comment.
4783         (prepare_for_building): Remove.
4784         (start_symtab, restart_symtab): Update.
4785         (reset_symtab_globals): Update comment.
4786         (buildsym_init): Remove.
4787
4788 2018-07-20  Tom Tromey  <tom@tromey.com>
4789
4790         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4791         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4792         (read_enum_type, common_block_start, common_block_end)
4793         (cleanup_undefined_types_1, finish_global_stabs): Update.
4794         * mdebugread.c (psymtab_to_symtab_1): Update.
4795         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4796         (read_lexical_block_scope, new_symbol): Update.
4797         * dbxread.c (process_one_symbol): Update.
4798         * coffread.c (coff_symtab_read, process_coff_symbol)
4799         (coff_read_enum_type): Update.
4800         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4801         declare.
4802         (get_local_symbols, get_file_symbols, get_global_symbols): New
4803         functions.
4804         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4805         m_global_symbols.
4806         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4807         (~scoped_free_pendings): Update.
4808         (finish_block, prepare_for_building, reset_symtab_globals)
4809         (end_symtab_get_static_block, end_symtab_with_blockvector)
4810         (augment_type_symtab, push_context): Update.
4811         (get_local_symbols, get_file_symbols, get_global_symbols): New
4812         functions.
4813         (buildsym_init): Update.
4814
4815 2018-07-20  Tom Tromey  <tom@tromey.com>
4816
4817         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4818         (process_full_type_unit): Likewise.
4819         (dwarf2_start_symtab): Set list_in_scope.
4820
4821 2018-07-20  Tom Tromey  <tom@tromey.com>
4822
4823         * dwarf2read.c (process_psymtab_comp_unit_reader)
4824         (build_type_psymtabs_reader): Do not set list_in_scope.
4825
4826 2018-07-20  Tom Tromey  <tom@tromey.com>
4827
4828         * buildsym.c (free_pendings): Remove.
4829         (add_symbol_to_list, scoped_free_pendings)
4830         (finish_block_internal, buildsym_init): Update.
4831
4832 2018-07-20  Tom Tromey  <tom@tromey.com>
4833
4834         * xcoffread.c (read_xcoff_symtab): Update.
4835         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4836         Update.
4837         * dbxread.c (process_one_symbol): Update.
4838         * coffread.c (coff_symtab_read): Update.
4839         * buildsym.h (finish_block): Update.
4840         * buildsym.c (finish_block): Remove "listhead" argument.
4841         (end_symtab_get_static_block): Update.
4842
4843 2018-07-20  Tom Tromey  <tom@tromey.com>
4844
4845         * buildsym.h (class scoped_free_pendings): Remove constructor.
4846         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4847         method.
4848         <m_pending_block_obstack, m_pending_blocks>: New members.
4849         (pending_block_obstack, pending_blocks): Remove.
4850         (scoped_free_pendings::scoped_free_pendings): Default.
4851         (~scoped_free_pendings): Update.
4852         (free_pending_blocks): Remove.
4853         (finish_block_internal, record_pending_block, make_blockvector)
4854         (end_symtab_get_static_block, augment_type_symtab, push_context)
4855         (buildsym_init): Update.
4856
4857 2018-07-20  Tom Tromey  <tom@tromey.com>
4858
4859         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4860         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4861         members.
4862         (pending_addrmap, pending_addrmap_obstack)
4863         (pending_addrmap_interesting): Remove.
4864         (scoped_free_pendings, record_block_range, make_blockvector)
4865         (prepare_for_building, reset_symtab_globals, buildsym_init):
4866         Update.
4867
4868 2018-07-20  Tom Tromey  <tom@tromey.com>
4869
4870         * xcoffread.c (process_linenos): Update.
4871         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4872         * mdebugread.c (psymtab_to_symtab_1): Update.
4873         * dwarf2read.c (setup_type_unit_groups)
4874         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4875         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4876         * dbxread.c (process_one_symbol): Update.
4877         * coffread.c (coff_symtab_read, enter_linenos)
4878         (process_coff_symbol): Update.
4879         * buildsym.h (current_subfile): Don't declare.
4880         (get_current_subfile): Declare.
4881         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4882         member.
4883         (start_subfile, free_buildsym_compunit, push_subfile)
4884         (prepare_for_building, start_symtab): Update.
4885         (get_current_subfile): New function.
4886
4887 2018-07-20  Tom Tromey  <tom@tromey.com>
4888
4889         * coffread.c (coff_symtab_read): Update.
4890         * xcoffread.c (read_xcoff_symtab): Update.
4891         * dwarf2read.c (new_symbol): Update.
4892         (read_func_scope, read_lexical_block_scope): Update.
4893         * dbxread.c (process_one_symbol): Update.
4894         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4895         (outermost_context_p): Remove macro.
4896         (outermost_context_p, get_current_context_stack)
4897         (get_context_stack_depth): Declare.
4898         (pop_context): Return struct context_stack.
4899         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4900         member.
4901         (context_stack_size): Remove.
4902         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4903         (prepare_for_building, end_symtab_get_static_block)
4904         (augment_type_symtab, push_context): Update.
4905         (pop_context): Return struct context_stack.
4906         (outermost_context_p, get_current_context_stack)
4907         (get_context_stack_depth): New functions.
4908         (buildsym_init): Update.
4909
4910 2018-07-20  Tom Tromey  <tom@tromey.com>
4911
4912         * rust-exp.y: Now a pure parser.  Update all rules.
4913         (%union): Move earlier.
4914         (current_parser, work_obstack): Remove globals.
4915         (rust_parser, ~rust_parser): Update.
4916         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4917         lex_character, lex_number, lex_string, lex_identifier,
4918         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4919         convert_name, convert_params_to_expression,
4920         convert_ast_to_expression, ast_basic_type, ast_operation,
4921         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4922         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4923         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4924         ast_array_type, ast_slice_type, ast_reference_type,
4925         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4926         (rust_parse): Update.
4927         (rustyyerror, rustyylex): Add parser parameter.
4928         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4929         (rust_lex_stringish_test, rust_lex_test_sequence)
4930         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4931         (rust_lex_test_push_back, rust_lex_tests): Update.
4932
4933 2018-07-19  Pedro Alves  <palves@redhat.com>
4934
4935         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4936         gdb::unique_xmalloc_ptr.
4937         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4938         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4939         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4940         copy-initialization.
4941         * guile/scm-pretty-print.c (ppscm_print_children): Use
4942         gdb::unique_xmalloc_ptr instead of cleanups.
4943         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4944         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4945         gdb::unique_xmalloc_ptr.
4946         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4947         Adjust to use gdb::unique_xmalloc_ptr.
4948         * guile/scm-utils.c (extract_arg): Adjust.
4949         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4950         gdb::unique_xmalloc_ptr instead of a cleanup.
4951
4952 2018-07-19  Tom Tromey  <tom@tromey.com>
4953
4954         * utils.c (do_value_free_to_mark)
4955         (make_cleanup_value_free_to_mark): Remove.
4956         * utils.h (make_cleanup_value_free_to_mark): Remove.
4957
4958 2018-07-19  Pedro Alves  <palves@redhat.com>
4959
4960         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4961         forwarding reference.
4962
4963 2018-07-18  Pedro Alves  <palves@redhat.com>
4964
4965         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4966         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4967         cleanup.
4968
4969 2018-07-18  Pedro Alves  <palves@redhat.com>
4970
4971         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4972         exceptions.
4973         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4974         (gdbscm_wrap): New.
4975         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4976         directly instead of a cleanup.
4977         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4978         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4979         (vlscm_binop_gdbthrow): New, factored out from ...
4980         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4981         (vlscm_rich_compare): Use gdbscm_wrap.
4982         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4983         instead of a cleanup.
4984         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4985         cleanup.
4986         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4987         Use xfree directly instead of a cleanup.
4988         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4989         Adjust to use gdbscm_wrap and scoped_value_mark.
4990         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4991         (gdbscm_value_address, gdbscm_value_dereference)
4992         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4993         scoped_value_mark.
4994         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4995         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4996         scoped_value_mark.
4997         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4998         gdbscm_wrap and scoped_value_mark.
4999         (gdbscm_value_to_string): Use xfree directly instead of a
5000         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5001         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5002         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5003         scoped_value_mark.
5004         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5005         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5006         scoped_value_mark.
5007         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5008         gdbscm_wrap.
5009
5010 2018-07-18  Tom de Vries  <tdevries@suse.de>
5011
5012         * findvar.c (default_read_var_value): Also resolve dynamic type for
5013         LOC_OPTIMIZED_OUT vars.
5014
5015 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5016
5017         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5018         decoding.
5019
5020 2018-07-17  Tom Tromey  <tom@tromey.com>
5021
5022         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5023         (compute_enum_list, pascm_set_param_value_x)
5024         (gdbscm_parameter_value): Update.
5025         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5026         (gdbscm_scm_to_host_string): Update.
5027         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5028         Update.
5029         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5030         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5031         * guile/scm-string.c (gdbscm_scm_to_string): Return
5032         unique_xmalloc_ptr.
5033         (gdbscm_scm_to_host_string): Likewise.
5034
5035 2018-07-17  Tom Tromey  <tom@tromey.com>
5036
5037         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5038         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5039         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5040         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5041         unique_xmalloc_ptr.
5042
5043 2018-07-17  Tom Tromey  <tom@tromey.com>
5044
5045         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5046         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5047         Update.
5048         * guile/scm-cmd.c (cmdscm_function): Update.
5049         * guile/scm-pretty-print.c
5050         (ppscm_print_exception_unless_memory_error): Update.
5051         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5052         Return unique_xmalloc_ptr.
5053
5054 2018-07-17  Tom Tromey  <tom@tromey.com>
5055
5056         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5057         Use string_printf.
5058
5059 2018-07-17  Jim Wilson  <jimw@sifive.com>
5060
5061         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5062         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5063         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5064         unecessary braces after EF_RISCV_RVC test.  Delete call to
5065         set_gdbarch_decr_pc_after_break.
5066
5067         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5068         RISCV_LAST_FP_REGNUM + 1.
5069         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5070
5071 2018-07-17  Tom Tromey  <tom@tromey.com>
5072
5073         * configure.ac: Remove --disable-gdbcli.
5074         * configure: Rebuild.
5075         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5076         (SUBDIR_CLI_CFLAGS): Remove.
5077         (SFILES): Use SUBDIR_CLI_SRCS.
5078         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5079
5080 2018-07-17  Tom Tromey  <tom@tromey.com>
5081
5082         PR gdb/18624:
5083         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5084
5085 2018-07-16  Jim Wilson  <jimw@sifive.com>
5086
5087         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5088
5089 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5090
5091         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5092         variable.
5093         (libunwind_frame_sniffer): Likewise.
5094         (libunwind_frame_prev_register): Likewise.
5095         (libunwind_sigtramp_frame_sniffer): Likewise.
5096         * ia64-tdep.c (ia64_access_reg): Likewise.
5097         (ia64_access_rse_reg): Likewise.
5098         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5099         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5100
5101 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5102
5103         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5104
5105 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5106
5107         * remote-sim.c (gdbsim_target::close,
5108         gdbsim_target::mourn_inferior): Remove unused variables.
5109
5110 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5111
5112         * ia64-tdep.c (ktab_buf): New global.
5113         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5114         (get_kernel_table): Adjust.
5115
5116 2018-07-16  Tom Tromey  <tom@tromey.com>
5117
5118         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5119         * dwarf2read.c (using_directives, new_symbol): Use
5120         outermost_context_p.
5121         * dbxread.c (process_one_symbol): Use outermost_context_p.
5122         * coffread.c (coff_symtab_read): Use outermost_context_p.
5123
5124 2018-07-16  Tom Tromey  <tom@tromey.com>
5125
5126         * dwarf2read.c (using_directives, read_func_scope)
5127         (read_lexical_block_scope): Update.
5128         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5129         * buildsym.h (local_using_directives, global_using_directives):
5130         Don't declare.
5131         (get_local_using_directives, set_local_using_directives)
5132         (get_global_using_directives): Declare.
5133         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5134         m_global_using_directives>: New members.
5135         (finish_block_internal, prepare_for_building)
5136         (reset_symtab_globals, end_symtab_get_static_block)
5137         (push_context): Update.
5138         (get_local_using_directives, set_local_using_directives)
5139         (get_global_using_directives): New functions.
5140         (buildsym_init): Update.
5141
5142 2018-07-16  Tom Tromey  <tom@tromey.com>
5143
5144         * xcoffread.c (xcoff_initial_scan): Don't call
5145         free_pending_blocks.
5146         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5147         * buildsym.h (class scoped_free_pendings): Add constructor.
5148         (free_pending_blocks): Don't declare.
5149         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5150         (free_pending_blocks): Now static.
5151
5152 2018-07-16  Tom Tromey  <tom@tromey.com>
5153
5154         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5155         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5156         member.
5157         (struct subfile_stack): Remove.
5158         (subfile_stack): Remove.
5159         (push_subfile, pop_subfile, buildsym_init): Update.
5160
5161 2018-07-16  Tom Tromey  <tom@tromey.com>
5162
5163         * buildsym.c (push_subfile): Use gdb_assert.
5164         (pop_subfile): Use gdb_assert.
5165
5166 2018-07-16  Tom Tromey  <tom@tromey.com>
5167
5168         * buildsym.h (merge_symbol_lists): Remove.
5169         * buildsym.c (merge_symbol_lists): Remove.
5170
5171 2018-07-16  Tom Tromey  <tom@tromey.com>
5172
5173         * stabsread.c (scan_file_globals): Update comment.
5174         * stabsread.h (scan_file_globals): Move from buildsym.h.
5175         * buildsym.h (scan_file_globals): Move to stabsread.h.
5176
5177 2018-07-16  Tom Tromey  <tom@tromey.com>
5178
5179         * xcoffread.c (xcoff_new_init): Update.
5180         * mipsread.c (mipscoff_new_init): Update.
5181         * mdebugread.c (mdebug_build_psymtabs): Update.
5182         * elfread.c (elf_new_init): Update.
5183         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5184         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5185         * buildsym.h (buildsym_new_init): Don't declare.
5186         * buildsym.c (buildsym_new_init): Remove.
5187
5188 2018-07-16  Tom Tromey  <tom@tromey.com>
5189
5190         * stabsread.h (within_function): Move from buildsym.h.
5191         * stabsread.c (start_stabs): Clear within_function.
5192         * coffread.c (coff_start_symtab): Clear within_function.
5193         * buildsym.h (within_function): Move to stabsread.h.
5194         * buildsym.c (prepare_for_building): Update.
5195
5196 2018-07-16  Tom Tromey  <tom@tromey.com>
5197
5198         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5199         * dwarf2read.c (dwarf2_start_symtab): Don't set
5200         processing_gcc_compilation.
5201         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5202
5203 2018-07-16  Tom Tromey  <tom@tromey.com>
5204
5205         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5206         (next_symbol_text_func): Move from buildsym.h.
5207         * stabsread.c (hashname): Move from buildsym.c.
5208         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5209         (next_symbol_text_func, hashname): Move to stabsread.h.
5210         * buildsym.c: Don't include bcache.h
5211         (hashname): Move to stasbread.c.
5212
5213 2018-07-16  Tom Tromey  <tom@tromey.com>
5214
5215         * buildsym.h (context_stack_size): Don't declare.
5216         * buildsym.c (context_stack_size): New global.
5217
5218 2018-07-16  Tom Tromey  <tom@tromey.com>
5219
5220         * dbxread.c (processing_acc_compilation): New global.
5221         * buildsym.h (processing_acc_compilation): Don't declare.
5222
5223 2018-07-16  Tom Tromey  <tom@tromey.com>
5224
5225         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5226         * dbxread.c (read_ofile_symtab): Update.
5227         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5228         * buildsym.h (last_source_start_addr): Remove.
5229         (set_last_source_start_addr, get_last_source_start_addr):
5230         Declare.
5231         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5232         parameter.
5233         (struct buildsym_compunit) <m_last_source_start_addr>: New
5234         member.
5235         (prepare_for_building): Remove start_addr parameter.
5236         (start_symtab, restart_symtab, end_symtab_get_static_block)
5237         (end_symtab_with_blockvector): Update.
5238         (set_last_source_start_addr, get_last_source_start_addr): New
5239         functions.
5240
5241 2018-07-16  Tom Tromey  <tom@tromey.com>
5242
5243         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5244         member.
5245         (have_line_numbers): Remove.
5246         (record_line, prepare_for_building, end_symtab_get_static_block)
5247         (augment_type_symtab): Update.
5248
5249 2018-07-16  Tom Tromey  <tom@tromey.com>
5250
5251         * buildsym.c (~buildsym_compunit): Free the macro table.
5252         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5253         methods.
5254         <m_pending_macros>: New member.
5255         (pending_macros): Remove.
5256         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5257         (reset_symtab_globals, end_symtab_get_static_block)
5258         (end_symtab_with_blockvector, augment_type_symtab)
5259         (buildsym_init): Update.
5260
5261 2018-07-16  Tom Tromey  <tom@tromey.com>
5262
5263         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5264         parameter.
5265         (buildsym_compunit::set_last_source_file): New method.
5266         <m_last_source_file>: New member.
5267         (prepare_for_building): Remove "name" parameter.
5268         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5269         (last_source_file): Remove.
5270         (set_last_source_file, get_last_source_file): Update.
5271
5272 2018-07-16  Tom Tromey  <tom@tromey.com>
5273
5274         * buildsym.c (prepare_for_building): Add assert.
5275
5276 2018-07-16  Tom Tromey  <tom@tromey.com>
5277
5278         * buildsym.c (~buildsym_compunit): Update.
5279         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5280         (start_subfile, patch_subfile_names)
5281         (end_symtab_with_blockvector): Update.
5282
5283 2018-07-16  Tom Tromey  <tom@tromey.com>
5284
5285         * buildsym.c (struct buildsym_compunit): Add constructor,
5286         destructor, initializers.
5287         (start_buildsym_compunit): Remove.
5288         (free_buildsym_compunit): Use "delete".
5289         (start_symtab, restart_symtab): Use "new".
5290
5291 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5292
5293         * symfile.c (set_objfile_default_section_offset): Remove struct
5294         keyword.
5295
5296 2018-07-14  Stafford Horne  <shorne@gmail.com>
5297
5298         * (Responsible Maintainers): Add myself as or1k maintainer.
5299
5300 2018-07-13  Tom Tromey  <tom@tromey.com>
5301
5302         * symfile.c (set_objfile_default_section_offset): Use extra braces
5303         around initializer.
5304
5305 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5306
5307         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5308         non-branching basr.
5309
5310 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5311
5312         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5313         unittests/cli-utils-selftests.c
5314         * unittests/cli-utils-selftests.c: New file.
5315
5316 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5317
5318         * NEWS: Mention new commands. Mention change to 'thread apply'.
5319
5320 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5321
5322         * thread.c (thr_try_catch_cmd): New function.
5323         (thread_apply_all_command): Handle qcs flags.
5324         (thread_apply_command): Handle qcs flags.
5325         (taas_command): New function.
5326         (tfaas_command): New function.
5327         (_initialize_thread): Update to setup the new commands 'taas
5328         and 'tfaas'. Change doc string for 'thread apply'.
5329
5330 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5331
5332         * stack.c: (trailing_outermost_frame): New function, mostly
5333         extracted from backtrace_command_1.
5334         (leading_innermost_frame): New function.
5335         (backtrace_command_1): Update to call trailing_outermost_frame.
5336         (frame_apply_command_count): New function.
5337         (frame_apply_level_command): New function.
5338         (frame_apply_all_command): New function.
5339         (frame_apply_command): New function.
5340         (faas_command): New function.
5341         (frame_cmd_list): New variable.
5342         (_initialize_stack): Update to setup the new commands 'frame apply'
5343         and 'faas'.
5344
5345 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5346
5347         * cli-utils.c (number_or_range_parser::get_number): Only handle
5348         numbers or convenience var as numbers.
5349         (parse_flags): New function.
5350         (parse_flags_qcs): New function.
5351         (number_or_range_parser::finished): Ensure parsing end is detected
5352         before end of string.
5353         * cli-utils.h (parse_flags): New function.
5354         (parse_flags_qcs): New function.
5355         (number_or_range_parser): Remove m_finished bool.
5356         (number_or_range_parser::skip_range): Set m_in_range to false.
5357
5358 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5359
5360         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5361         on Windows.
5362
5363 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5364             Jan Kratochvil  <jan.kratochvil@redhat.com>
5365             Paul Fertser  <fercerpav@gmail.com>
5366             Tsutomu Seki  <sekiriki@gmail.com>
5367             Pedro Alves  <palves@redhat.com>
5368
5369         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5370         'unittests/parse-connection-spec-selftests.c'.
5371         (COMMON_SFILES): Add 'common/netstuff.c'.
5372         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5373         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5374         * common/netstuff.c: New file.
5375         * common/netstuff.h: New file.
5376         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5377         (wait_for_connect): Update comment.  New parameter
5378         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5379         Use 'sock' directly instead of 'scb->fd'.
5380         (try_connect): New function, with code from 'net_open'.
5381         (net_open): Rewrite main loop to deal with multiple
5382         sockets/addresses.  Handle IPv6-style hostnames; implement
5383         support for IPv6 connections.
5384         * unittests/parse-connection-spec-selftests.c: New file.
5385
5386 2018-07-11  Pedro Alves  <palves@redhat.com>
5387
5388         PR gdb/23377
5389         * remote.c (remote_target::remote_detach_pid): Call
5390         set_current_process.
5391
5392 2018-07-11  Pedro Alves  <palves@redhat.com>
5393
5394         * h8300-tdep.c (h8300_gdbarch_init): Remove
5395         set_gdbarch_ecoff_reg_to_regnum calls.
5396
5397 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5398
5399         PR c++/23373
5400         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5401         offsets/sizes for static members of a class/struct.
5402
5403 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5404
5405         * target-descriptions.c (tdesc_register_bitsize): Rename.
5406         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5407         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5408         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5409
5410 2018-07-10  Tom Tromey  <tom@tromey.com>
5411
5412         * breakpoint.c (moribund_locations): Now static and a
5413         std::vector.
5414         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5415         (build_bpstat_chain, update_global_location_list)
5416         (breakpoint_retire_moribund): Update.
5417         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5418         VEC.
5419
5420 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5421
5422         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5423         (riscv_register_reggroup_p): Use new function, remove unneeded
5424         parenthesis.
5425         (riscv_push_dummy_call): Extend assert to compare against xlen or
5426         flen based on register type.
5427
5428 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5429
5430         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5431
5432 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5433
5434         * remote.c (show_hardware_watchpoint_limit): New function.
5435         (show_hardware_watchpoint_length_limit): New function.
5436         (show_hardware_breakpoint_limit): New function.
5437         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5438         where appropriate, update help text.
5439
5440 2018-07-09  Tom Tromey  <tom@tromey.com>
5441
5442         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5443         (CLIBS): Don't mention NAT_CLIBS.
5444
5445 2018-07-09  Tom Tromey  <tom@tromey.com>
5446
5447         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5448         (LIBGDB_OBS, clean mostlyclean): Update.
5449         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5450
5451 2018-07-09  Tom Tromey  <tom@tromey.com>
5452
5453         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5454         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5455         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5456
5457 2018-07-09  Tom Tromey  <tom@tromey.com>
5458
5459         * Makefile.in (ALLDEPFILES): Remove exec.c.
5460         (COMMON_OBS): Remove exec.o.
5461         (COMMON_SFILES): Add exec.c.
5462
5463 2018-07-09  Tom Tromey  <tom@tromey.com>
5464
5465         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5466
5467 2018-07-09  Tom Tromey  <tom@tromey.com>
5468
5469         * Makefile.in (clean mostlyclean): Remove stamp-version.
5470         (version.c): Depend on stamp-version.
5471         (stamp-version): New rule, from version.c rule.
5472
5473 2018-07-09  Tom Tromey  <tom@tromey.com>
5474
5475         * Makefile.in (init.c): Depend on stamp-init.
5476         (stamp-init): New rule, from init.c rule.
5477         (clean mostlyclean): Remove stamp-init.
5478
5479 2018-07-09  Tom Tromey  <tom@tromey.com>
5480
5481         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5482         SUBDIR_GCC_COMPILE_SRCS.
5483
5484 2018-07-09  Tom Tromey  <tom@tromey.com>
5485
5486         * Makefile.in (init.c): Remove some unused sed rules.
5487
5488 2018-07-09  Tom Tromey  <tom@tromey.com>
5489
5490         * Makefile.in (TSOBS): Remove.
5491         (INIT_FILES): Update.
5492         (LIBGDB_OBS): Update.
5493         (COMMON_SFILES): Add inflow.c.
5494         (SFILES): Remove inflow.c.
5495
5496 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5497
5498         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5499
5500 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5501
5502         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5503         get_saveloc_name, is_signal_frame_name, step_name,
5504         init_remote_name, create_addr_space_name,
5505         destroy_addr_space_name, search_unwind_table_name,
5506         find_dyn_list_name): Constify.
5507
5508 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5509
5510         * darwin-nat.c (darwin_pthread_kill): New function.
5511         (darwin_resume_thread): Use darwin_pthread_kill.
5512
5513 2018-07-05  Tom de Vries  <tdevries@suse.de>
5514
5515         * macroexp.c (macro_buffer) <operator=>: New member function.
5516
5517 2018-07-04  Tom Tromey  <tom@tromey.com>
5518
5519         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5520
5521 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5522
5523         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5524         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5525         * maint.c: Likewise.
5526         * top.c: Likewise.
5527
5528 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5529
5530         * NEWS: Create a new section for the next release branch.
5531         Rename the section of the current branch, now that it has
5532         been cut.
5533
5534 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5535
5536         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5537         * version.in: Bump version to 8.2.50.DATE-git.
5538
5539 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5540             Pedro Alves  <palves@redhat.com>
5541
5542         * linux-nat.c (linux_init_ptrace): Rename to ...
5543         (linux_init_ptrace_procfs): ... this.  Call
5544         linux_proc_init_warnings.
5545         (linux_nat_target::post_attach)
5546         (linux_nat_target::post_startup_inferior): Adjust.
5547         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5548         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5549
5550 2018-07-04  Tom de Vries  <tdevries@suse.de>
5551
5552         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5553         check ...
5554         (read_comp_unit_head): ... here.
5555
5556 2018-07-03  Tom Tromey  <tom@tromey.com>
5557
5558         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5559         (stop_tracing, tstatus_command)
5560         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5561         (print_one_static_tracepoint_marker): Update.
5562         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5563         std::vector.
5564         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5565         VEC.
5566         (all_tracepoints, static_tracepoints_here): Return std::vector.
5567
5568 2018-07-03  Tom Tromey  <tom@tromey.com>
5569
5570         * common/ptid.c (ptid_equal): Remove.
5571         * common/ptid.h (ptid_equal): Don't declare.
5572         * ada-tasks.c: Update.
5573         * breakpoint.c: Update.
5574         * common/agent.c: Update.
5575         * corelow.c: Update.
5576         * darwin-nat-info.c: Update.
5577         * darwin-nat.c: Update.
5578         * dcache.c: Update.
5579         * dtrace-probe.c: Update.
5580         * dummy-frame.c: Update.
5581         * fbsd-nat.c: Update.
5582         * frame.c: Update.
5583         * gdbthread.h: Update.
5584         * gnu-nat.c: Update.
5585         * go32-nat.c: Update.
5586         * inf-loop.c: Update.
5587         * inf-ptrace.c: Update.
5588         * infcall.c: Update.
5589         * infcmd.c: Update.
5590         * inflow.c: Update.
5591         * infrun.c: Update.
5592         * linux-fork.c: Update.
5593         * linux-nat.c: Update.
5594         * linux-thread-db.c: Update.
5595         * mi/mi-cmd-var.c: Update.
5596         * mi/mi-interp.c: Update.
5597         * mi/mi-main.c: Update.
5598         * nto-procfs.c: Update.
5599         * ppc-linux-tdep.c: Update.
5600         * procfs.c: Update.
5601         * python/py-inferior.c: Update.
5602         * python/py-record-btrace.c: Update.
5603         * python/py-record.c: Update.
5604         * ravenscar-thread.c: Update.
5605         * regcache.c: Update.
5606         * remote-sim.c: Update.
5607         * remote.c: Update.
5608         * sol-thread.c: Update.
5609         * solib.c: Update.
5610         * target.c: Update.
5611         * tui/tui-stack.c: Update.
5612         * varobj.c: Update.
5613         * windows-nat.c: Update.
5614         * windows-tdep.c: Update.
5615
5616 2018-07-03  Tom Tromey  <tom@tromey.com>
5617
5618         * common/ptid.c (ptid_match): Remove.
5619         * common/ptid.h (ptid_match): Don't declare.
5620         * fbsd-nat.c: Update.
5621         * infcmd.c: Update.
5622         * infrun.c: Update.
5623         * linux-nat.c: Update.
5624         * record-btrace.c: Update.
5625         * regcache.c: Update.
5626         * remote.c: Update.
5627
5628 2018-07-03  Tom Tromey  <tom@tromey.com>
5629
5630         * common/ptid.c (ptid_tid_p): Remove.
5631         * common/ptid.h (ptid_tid_p): Don't declare.
5632         * sol-thread.c: Update.
5633
5634 2018-07-03  Tom Tromey  <tom@tromey.com>
5635
5636         * common/ptid.c (ptid_lwp_p): Remove.
5637         * common/ptid.h (ptid_lwp_p): Don't declare.
5638         * fbsd-nat.c: Update.
5639         * linux-nat.c: Update.
5640         * nat/linux-procfs.c: Update.
5641         * nat/x86-linux-dregs.c: Update.
5642         * sol-thread.c: Update.
5643
5644 2018-07-03  Tom Tromey  <tom@tromey.com>
5645
5646         * common/ptid.c (ptid_is_pid): Remove.
5647         * common/ptid.h (ptid_is_pid): Don't declare.
5648         * infrun.c: Update.
5649         * linux-nat.c: Update.
5650         * mi/mi-interp.c: Update.
5651         * remote.c: Update.
5652         * thread.c: Update.
5653
5654 2018-07-03  Tom Tromey  <tom@tromey.com>
5655
5656         * common/ptid.c (ptid_get_tid): Remove.
5657         * common/ptid.h (ptid_get_tid): Don't declare.
5658         * ada-tasks.c: Update.
5659         * aix-thread.c: Update.
5660         * bsd-uthread.c: Update.
5661         * darwin-nat.c: Update.
5662         * fbsd-nat.c: Update.
5663         * i386-darwin-nat.c: Update.
5664         * infrun.c: Update.
5665         * linux-tdep.c: Update.
5666         * nto-procfs.c: Update.
5667         * ppc-ravenscar-thread.c: Update.
5668         * python/py-infthread.c: Update.
5669         * ravenscar-thread.c: Update.
5670         * sol-thread.c: Update.
5671         * sparc-ravenscar-thread.c: Update.
5672         * windows-nat.c: Update.
5673
5674 2018-07-03  Tom Tromey  <tom@tromey.com>
5675
5676         * common/ptid.c (ptid_get_lwp): Remove.
5677         * common/ptid.h (ptid_get_lwp): Don't declare.
5678         * aarch64-linux-nat.c: Update.
5679         * ada-tasks.c: Update.
5680         * aix-thread.c: Update.
5681         * amd64-linux-nat.c: Update.
5682         * arm-linux-nat.c: Update.
5683         * corelow.c: Update.
5684         * fbsd-nat.c: Update.
5685         * fbsd-tdep.c: Update.
5686         * gnu-nat.c: Update.
5687         * i386-cygwin-tdep.c: Update.
5688         * i386-gnu-nat.c: Update.
5689         * i386-linux-nat.c: Update.
5690         * ia64-linux-nat.c: Update.
5691         * inf-ptrace.c: Update.
5692         * infrun.c: Update.
5693         * linux-fork.c: Update.
5694         * linux-nat.c: Update.
5695         * linux-tdep.c: Update.
5696         * linux-thread-db.c: Update.
5697         * mips-linux-nat.c: Update.
5698         * nat/aarch64-linux-hw-point.c: Update.
5699         * nat/aarch64-linux.c: Update.
5700         * nat/linux-btrace.c: Update.
5701         * nat/linux-osdata.c: Update.
5702         * nat/linux-procfs.c: Update.
5703         * nat/x86-linux-dregs.c: Update.
5704         * obsd-nat.c: Update.
5705         * ppc-fbsd-nat.c: Update.
5706         * ppc-linux-nat.c: Update.
5707         * procfs.c: Update.
5708         * python/py-infthread.c: Update.
5709         * ravenscar-thread.c: Update.
5710         * remote.c: Update.
5711         * s390-linux-nat.c: Update.
5712         * sol-thread.c: Update.
5713         * sol2-tdep.c: Update.
5714         * spu-linux-nat.c: Update.
5715         * x86-linux-nat.c: Update.
5716         * xtensa-linux-nat.c: Update.
5717
5718 2018-07-03  Tom Tromey  <tom@tromey.com>
5719
5720         * common/ptid.c (ptid_get_pid): Remove.
5721         * common/ptid.h (ptid_get_pid): Don't declare.
5722         * aarch64-linux-nat.c: Update.
5723         * ada-lang.c: Update.
5724         * aix-thread.c: Update.
5725         * alpha-bsd-nat.c: Update.
5726         * amd64-fbsd-nat.c: Update.
5727         * amd64-linux-nat.c: Update.
5728         * arm-linux-nat.c: Update.
5729         * arm-nbsd-nat.c: Update.
5730         * auxv.c: Update.
5731         * break-catch-syscall.c: Update.
5732         * breakpoint.c: Update.
5733         * bsd-uthread.c: Update.
5734         * corelow.c: Update.
5735         * ctf.c: Update.
5736         * darwin-nat.c: Update.
5737         * fbsd-nat.c: Update.
5738         * fbsd-tdep.c: Update.
5739         * gcore.c: Update.
5740         * gnu-nat.c: Update.
5741         * hppa-nbsd-nat.c: Update.
5742         * hppa-obsd-nat.c: Update.
5743         * i386-fbsd-nat.c: Update.
5744         * ia64-linux-nat.c: Update.
5745         * inf-ptrace.c: Update.
5746         * infcmd.c: Update.
5747         * inferior.c: Update.
5748         * inferior.h: Update.
5749         * inflow.c: Update.
5750         * infrun.c: Update.
5751         * linux-fork.c: Update.
5752         * linux-nat.c: Update.
5753         * linux-tdep.c: Update.
5754         * linux-thread-db.c: Update.
5755         * m68k-bsd-nat.c: Update.
5756         * mi/mi-interp.c: Update.
5757         * mi/mi-main.c: Update.
5758         * mips-linux-nat.c: Update.
5759         * mips-nbsd-nat.c: Update.
5760         * mips64-obsd-nat.c: Update.
5761         * nat/aarch64-linux-hw-point.c: Update.
5762         * nat/aarch64-linux.c: Update.
5763         * nat/linux-btrace.c: Update.
5764         * nat/linux-osdata.c: Update.
5765         * nat/linux-procfs.c: Update.
5766         * nat/x86-linux-dregs.c: Update.
5767         * nto-procfs.c: Update.
5768         * obsd-nat.c: Update.
5769         * ppc-linux-nat.c: Update.
5770         * ppc-nbsd-nat.c: Update.
5771         * ppc-obsd-nat.c: Update.
5772         * proc-service.c: Update.
5773         * procfs.c: Update.
5774         * python/py-inferior.c: Update.
5775         * python/py-infthread.c: Update.
5776         * ravenscar-thread.c: Update.
5777         * record.c: Update.
5778         * remote-sim.c: Update.
5779         * remote.c: Update.
5780         * rs6000-nat.c: Update.
5781         * s390-linux-nat.c: Update.
5782         * sh-nbsd-nat.c: Update.
5783         * sol-thread.c: Update.
5784         * sparc-nat.c: Update.
5785         * sparc64-tdep.c: Update.
5786         * spu-linux-nat.c: Update.
5787         * spu-tdep.c: Update.
5788         * target-debug.h: Update.
5789         * target.c: Update.
5790         * thread.c: Update.
5791         * tid-parse.c: Update.
5792         * tracefile-tfile.c: Update.
5793         * vax-bsd-nat.c: Update.
5794         * windows-nat.c: Update.
5795         * x86-linux-nat.c: Update.
5796         * x86-nat.c: Update.
5797
5798 2018-07-03  Tom Tromey  <tom@tromey.com>
5799
5800         * common/ptid.c (pid_to_ptid): Remove.
5801         * common/ptid.h (pid_to_ptid): Don't declare.
5802         * aix-thread.c: Update.
5803         * arm-linux-nat.c: Update.
5804         * common/ptid.c: Update.
5805         * common/ptid.h: Update.
5806         * corelow.c: Update.
5807         * ctf.c: Update.
5808         * darwin-nat.c: Update.
5809         * fbsd-nat.c: Update.
5810         * fork-child.c: Update.
5811         * gnu-nat.c: Update.
5812         * go32-nat.c: Update.
5813         * inf-ptrace.c: Update.
5814         * infcmd.c: Update.
5815         * inferior.c: Update.
5816         * infrun.c: Update.
5817         * linux-fork.c: Update.
5818         * linux-nat.c: Update.
5819         * nat/aarch64-linux-hw-point.c: Update.
5820         * nat/fork-inferior.c: Update.
5821         * nat/x86-linux-dregs.c: Update.
5822         * nto-procfs.c: Update.
5823         * obsd-nat.c: Update.
5824         * procfs.c: Update.
5825         * progspace.c: Update.
5826         * remote.c: Update.
5827         * rs6000-nat.c: Update.
5828         * s390-linux-nat.c: Update.
5829         * sol-thread.c: Update.
5830         * spu-linux-nat.c: Update.
5831         * target.c: Update.
5832         * top.c: Update.
5833         * tracefile-tfile.c: Update.
5834         * windows-nat.c: Update.
5835
5836 2018-07-03  Tom Tromey  <tom@tromey.com>
5837
5838         * common/ptid.h (ptid_build): Don't declare.
5839         * common/ptid.c (ptid_build): Remove.
5840         * aix-thread.c: Update.
5841         * bsd-kvm.c: Update.
5842         * bsd-uthread.c: Update.
5843         * common/agent.c: Update.
5844         * common/ptid.c: Update.
5845         * common/ptid.h: Update.
5846         * corelow.c: Update.
5847         * darwin-nat.c: Update.
5848         * fbsd-nat.c: Update.
5849         * gnu-nat.c: Update.
5850         * linux-fork.c: Update.
5851         * linux-nat.c: Update.
5852         * linux-thread-db.c: Update.
5853         * nat/linux-osdata.c: Update.
5854         * nat/linux-procfs.c: Update.
5855         * nto-procfs.c: Update.
5856         * obsd-nat.c: Update.
5857         * proc-service.c: Update.
5858         * procfs.c: Update.
5859         * ravenscar-thread.c: Update.
5860         * remote-sim.c: Update.
5861         * remote.c: Update.
5862         * sol-thread.c: Update.
5863         * target.c: Update.
5864         * windows-nat.c: Update.
5865
5866 2018-07-03  Tom Tromey  <tom@tromey.com>
5867
5868         * infrun.c (follow_exec): Use exit_inferior_silent.
5869         * inferior.c (exit_inferior_num_silent): Remove.
5870         * inferior.h (exit_inferior_num_silent): Don't declare.
5871
5872 2018-07-03  Tom Tromey  <tom@tromey.com>
5873
5874         PR cli/23340:
5875         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5876         inferior_ptid on error.
5877
5878 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5879             Simon Marchi  <simon.marchi@polymtl.ca>
5880
5881         PR tdep/8282
5882         * disasm.h (gdb_disassembler): Add
5883         `m_disassembler_options_holder'. member
5884         * disasm.c (get_all_disassembler_options): New function.
5885         (gdb_disassembler::gdb_disassembler): Use it.
5886         (gdb_buffered_insn_length_init_dis): Likewise.
5887         (gdb_buffered_insn_length): Adjust accordingly.
5888         (set_disassembler_options): Handle options with arguments.
5889         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5890         line if showing options with descriptions.
5891         (disassembler_options_completer): Adapt to using the
5892         `disasm_options_and_args_t' structure.
5893         * mips-tdep.c (mips_disassembler_options): New variable.
5894         (mips_disassembler_options_o32): Likewise.
5895         (mips_disassembler_options_n32): Likewise.
5896         (mips_disassembler_options_n64): Likewise.
5897         (gdb_print_insn_mips): Don't set `disassembler_options'.
5898         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5899         functions.
5900         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5901         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5902         `gdbarch_disassembler_options_implicit' and
5903         `gdbarch_valid_disassembler_options'.
5904         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5905         `disasm_options_and_args_t' structure.
5906         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5907         method.
5908         (valid_disassembler_options): Switch from `disasm_options_t' to
5909         the `disasm_options_and_args_t' structure.
5910         * NEWS: Document `set disassembler-options' support for the MIPS
5911         target.
5912         * gdbarch.h: Regenerate.
5913         * gdbarch.c: Regenerate.
5914
5915 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5916
5917         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5918
5919 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5920
5921         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5922         parameter in call to amd64_target_description.
5923         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5924         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5925         (amd64fbsd_init_abi): Likewise.
5926         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5927         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5928         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5929         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5930
5931 2018-06-29  Pedro Alves  <palves@redhat.com>
5932
5933         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5934         "segments" parameter.
5935         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5936         (_initialize_amd64_tdep): Update call to
5937         amd64_create_target_description.
5938         (amd64_target_description): Add "segments" parameter.  Adjust
5939         the implementation to use it.
5940         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5941         call to amd64_create_target_description.
5942         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5943         * gdb/arch/amd64.h (amd64_create_target_description): Add
5944         "segments" register.
5945         * gdb/arch/amd64.c (amd64_create_target_description): Add
5946         "segments" parameter.  Call create_feature_i386_64bit_segments
5947         only if SEGMENTS is true.
5948         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5949         call to amd64_create_target_description.
5950
5951 2018-06-29  Pedro Alves  <palves@redhat.com>
5952
5953         * thread.c (thread_target_id_str): New, factored out from ...
5954         (print_thread_info_1): ... here.  Use it to compute the max
5955         "Target Id" column width.
5956
5957 2018-06-29  Pedro Alves  <palves@redhat.com>
5958
5959         * remote.c (remote_target::extra_thread_info): Delete
5960         'display_buf' and 'n' locals.  from the cache, regardless of
5961         packet mechanims is in use.  Use cache for qThreadExtra and qP
5962         methods too.
5963
5964 2018-06-29  Pedro Alves  <palves@redhat.com>
5965
5966         * blockframe.c (find_pc_sect_containing_function): New function.
5967         * breakpoint.c (print_breakpoint_location): Don't call
5968         find_pc_sect_function.
5969         * linespec.c (create_sals_line_offset): Record the location's
5970         symbol in the sal.
5971         * linespec.c (convert_address_location_to_sals): Fill in sal's
5972         symbol with find_pc_sect_containing_function.
5973         * symtab.c (find_function_start_sal): Rename to ...
5974         (find_function_start_sal_1): ... this.
5975         (find_function_start_sal): Reimplement as wrapper around
5976         find_function_start_sal_1, and use
5977         find_pc_sect_containing_function to fill in the sal's symbol.
5978         (find_function_start_sal(symbol*, bool)): Adjust.
5979         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5980         comments.
5981         (find_pc_sect_containing_function): Declare.
5982
5983 2018-06-29  Pedro Alves  <palves@redhat.com>
5984
5985         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5986         true if the the location has no symbol.
5987
5988 2018-06-28  Tom Tromey  <tom@tromey.com>
5989
5990         * NEWS: Mention --enable-codesign.
5991         * silent-rules.mk (ECHO_SIGN): New variable.
5992         * configure.ac: Add --enable-codesign.
5993         * configure: Rebuild.
5994         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5995         (gdb$(EXEEXT)): Optionally invoke codesign.
5996
5997 2018-06-28  Pedro Alves  <palves@redhat.com>
5998
5999         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6000         comments.
6001         (switch_to_thread_no_regs): Adjust comment.
6002         * infcmd.c (stop_pc): Delete.
6003         (post_create_inferior, info_program_command): Replace references
6004         to stop_pc with references to thread_info->suspend.stop_pc.
6005         * inferior.h (stop_pc): Delete declaration.
6006         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6007         (handle_inferior_event_1, handle_signal_stop)
6008         (process_event_stop_test, keep_going_stepped_thread)
6009         (handle_step_into_function, handle_step_into_function_backward)
6010         (print_stop_location): Replace references to stop_pc with
6011         references to thread_info->suspend.stop_pc.
6012         (struct infcall_suspend_state) <stop_pc>: Delete field.
6013         (save_infcall_suspend_state, restore_infcall_suspend_state):
6014         Remove references to inf_stat->stop_pc.
6015         * linux-fork.c (fork_load_infrun_state): Likewise.
6016         * record-btrace.c (record_btrace_set_replay): Likewise.
6017         * record-full.c (record_full_goto_entry): Likewise.
6018         * remote.c (print_one_stopped_thread): Likewise.
6019         * target.c (target_resume): Extend comment.
6020         * thread.c (set_executing_thread): New.
6021         (set_executing): Use it.
6022         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6023         Remove references to stop_pc.
6024
6025 2018-06-28  Pedro Alves  <palves@redhat.com>
6026
6027         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6028         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6029
6030 2018-06-28  Tom Tromey  <tom@tromey.com>
6031
6032         * coffread.c (coff_symfile_finish): Update.
6033         * xcoffread.c (xcoff_symfile_finish): Update.
6034         * elfread.c (elf_symfile_finish): Update.
6035         * symfile.h (dwarf2_free_objfile): Don't declare.
6036         * dwarf2read.c (_initialize_dwarf2_read): Use
6037         register_objfile_data_with_cleanup.
6038         (dwarf2_free_objfile): Now static.  Change signature.
6039
6040 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6041
6042         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6043         option "-o" to add-symbol-file-load to add an offset to each
6044         section's load address.
6045         * symfile.c (set_objfile_default_section_offset): New function.
6046
6047 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6048
6049         * symfile.c (add_symbol_file_command): Make sure that sections
6050         with the same name are sorted in the same order.
6051
6052 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6053
6054         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6055         require the second argument.  If omitted, load sections at the
6056         addresses specified in the file.
6057
6058 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6059
6060         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6061         (_initialize_symfile): Add option "-o" to symbol-file to add an
6062         offset to each section of the symbol file.
6063
6064 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6065
6066         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6067
6068 2018-06-27  Tom Tromey  <tom@tromey.com>
6069
6070         * stack.c (_initialize_stack): Update "func" help text.
6071
6072 2018-06-27  Tom Tromey  <tom@tromey.com>
6073
6074         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6075         std::vector.
6076         (unwind_infopy_str, pyuw_create_unwind_info)
6077         (unwind_infopy_add_saved_register, pyuw_sniffer)
6078         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6079         Update.
6080         (struct saved_reg): Add constructor.
6081         <value>: Now a gdbpy_ref<>.
6082
6083 2018-06-27  Tom Tromey  <tom@tromey.com>
6084
6085         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6086
6087 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6088
6089         * gdb-gdb.py.in: Format using autopep8.
6090
6091 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6092
6093         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6094         (type_lookup_function): Recognize CORE_ADDR values.
6095
6096 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6097
6098         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6099         print tag_name.
6100
6101 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6102
6103         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6104         <__lt__>: Add.
6105
6106 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6107
6108         * gdb-gdb.py: Move to...
6109         * gdb-gdb.py.in: ... here.
6110         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6111         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6112         dependencies.
6113         (distclean): Remove gdb-gdb.py when cleaning.
6114         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6115         * configure: Re-generate.
6116
6117 2018-06-27  Pedro Alves  <palves@redhat.com>
6118
6119         * proc-service.c (get_ps_regcache): New.
6120         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6121         (ps_lsetfpregs): Use it.
6122
6123 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6124
6125         PR gdb/21695
6126         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6127         (dwarf_decode_lines_1): Adjust.
6128
6129 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6130
6131         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6132         override.
6133         <info_proc>: Likewise.
6134
6135 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6136
6137         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6138         to windows_fetch_one_register, and only handle the case of
6139         fetching one register.  Move the code that reloads the context
6140         and iterates over all registers if R is negative to...
6141         (windows_nat_target::fetch_registers): ... here.
6142         (do_windows_store_inferior_registers): Rename to
6143         windows_store_one_register, and only handle the case of storing
6144         one register.  Move the code that handles the case where r is
6145         negative to...
6146         (windows_nat_target::store_registers) ... here.
6147
6148 2018-06-26  Tom Tromey  <tom@tromey.com>
6149
6150         PR rust/22574:
6151         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6152         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6153         Update.
6154         (rust_internal_print_type): Add podata parameter.
6155         (rust_print_type): Update.
6156
6157 2018-06-26  Tom Tromey  <tom@tromey.com>
6158
6159         * typeprint.h (struct print_offset_data) <update, finish,
6160         maybe_print_hole>: New methods.
6161         <indentation>: New constant.
6162         * typeprint.c (print_offset_data::indentation): Define.
6163         (print_offset_data::maybe_print_hole, print_offset_data::update)
6164         (print_offset_data::finish): Move from c-typeprint.c and rename.
6165         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6166         (print_spaces_filtered_with_print_options): Update.
6167         (c_print_type_union_field_offset, maybe_print_hole)
6168         (c_print_type_struct_field_offset): Move to typeprint.c and
6169         rename.
6170         (c_type_print_base_struct_union): Update.
6171
6172 2018-06-25  Pedro Alves  <palves@redhat.com>
6173
6174         * gdbthread.h (thread_info_ref, delete_thread)
6175         (delete_thread_silent, first_thread_of_inferior)
6176         (any_thread_of_inferior, switch_to_thread)
6177         (enable_thread_stack_temporaries)
6178         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6179         (get_last_thread_stack_temporary)
6180         (value_in_thread_stack_temporaries, can_access_registers_thread):
6181         Spell out "struct thread_info" instead of just "thread_info".
6182         * inferior.h (notice_new_inferior): Likewise.
6183
6184 2018-06-25  Pedro Alves  <palves@redhat.com>
6185
6186         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6187         pass thread_info pointer to delete_thread.
6188         (windows_nat_target::detach): Pass inferior pointer to
6189         detach_inferior.
6190         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6191         delete_thread.
6192         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6193         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6194         and pass a thread_info pointer to delete_thread.
6195         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6196         pass thread_info pointer to delete_thread.
6197         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6198         delete_thread_silent call.
6199         * procfs.c (procfs_target::detach): Pass inferior pointer to
6200         detach_inferior.
6201         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6202         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6203         delete_thread_silent call.
6204         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6205         pass thread_info pointer to delete_thread.
6206         (windows_nat_target::detach): Pass inferior pointer to
6207         delete_inferior.
6208
6209 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6210
6211         * regcache.c (readable_regcache::read_part): Fix asserts.
6212         (reg_buffer::raw_collect_part): New function.
6213         (regcache::write_part): Fix asserts.
6214         (reg_buffer::raw_supply_part): New function.
6215         (regcache::transfer_regset_register): New helper function.
6216         (regcache::transfer_regset): Call new functions.
6217         (regcache_supply_regset): Use gdb_byte*.
6218         (regcache::supply_regset): Likewise.
6219         (regcache_collect_regset): Likewise.
6220         (regcache::collect_regset): Likewise.
6221         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6222         (reg_buffer::raw_supply_part): Likewise.
6223         (regcache::transfer_regset_register): Likewise.
6224         (regcache::transfer_regset): Use gdb_byte*.
6225
6226 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6227
6228         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6229
6230 2018-06-21  Pedro Alves  <palves@redhat.com>
6231
6232         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6233         instead of a ptid_t.  All callers adjusted.
6234         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6235         adjusted.
6236         (print_ada_task_info, display_current_task_id, task_command_1):
6237         Adjust.
6238         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6239         inferior_thread.
6240         (breakpoint_kind): Adjust.
6241         (remove_breakpoints_pid): Rename to ...
6242         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6243         pointer.  All callers adjusted.
6244         (bpstat_clear_actions): Use inferior_thread.
6245         (get_bpstat_thread): New.
6246         (bpstat_do_actions): Use it.
6247         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6248         to take a thread_info pointer.  All callers adjusted.
6249         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6250         (breakpoint_re_set_thread): Use inferior_thread.
6251         * breakpoint.h (struct inferior): Forward declare.
6252         (bpstat_stop_status): Update.
6253         (remove_breakpoints_pid): Delete.
6254         (remove_breakpoints_inf): New.
6255         * bsd-uthread.c (bsd_uthread_target::wait)
6256         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6257         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6258         (maint_btrace_packet_history_cmd)
6259         (maint_btrace_clear_packet_history_cmd): Adjust.
6260         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6261         inferior_thread.
6262         * cli/cli-interp.c: Include "inferior.h".
6263         * common/refcounted-object.h (struct
6264         refcounted_object_ref_policy): New.
6265         * compile/compile-object-load.c: Include gdbthread.h.
6266         (store_regs): Use inferior_thread.
6267         * corelow.c (core_target::close): Use current_inferior.
6268         (core_target_open): Adjust to use first_thread_of_inferior and use
6269         the current inferior.
6270         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6271         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6272         <thread>: ... this new field.  All references adjusted.
6273         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6274         Take a thread_info pointer instead of a ptid_t.
6275         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6276         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6277         thread_info pointer instead of a ptid_t.
6278         * elfread.c: Include "inferior.h".
6279         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6280         Use inferior_thread.
6281         * eval.c (evaluate_subexp): Likewise.
6282         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6283         inferior_thread.
6284         * gdb_proc_service.h (struct thread_info): Forward declare.
6285         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6286         <thread>: ... this new field.  All references adjusted.
6287         * gdbarch.h, gdbarch.c: Regenerate.
6288         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6289         'thread' parameter.  All implementations and callers adjusted.
6290         * gdbthread.h (thread_info) <set_running>: New method.
6291         (delete_thread, delete_thread_silent): Take a thread_info pointer
6292         instead of a ptid.
6293         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6294         (first_thread_of_process): Delete, replaced by ...
6295         (first_thread_of_inferior): ... this new function.  All callers
6296         adjusted.
6297         (any_live_thread_of_process): Delete, replaced by ...
6298         (any_live_thread_of_inferior): ... this new function.  All callers
6299         adjusted.
6300         (switch_to_thread, switch_to_no_thread): Declare.
6301         (is_executing): Delete.
6302         (enable_thread_stack_temporaries): Update comment.
6303         <enable_thread_stack_temporaries>: Take a thread_info pointer
6304         instead of a ptid_t.  Incref the thread.
6305         <~enable_thread_stack_temporaries>: Decref the thread.
6306         <m_ptid>: Delete
6307         <m_thr>: New.
6308         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6309         (get_last_thread_stack_temporary)
6310         (value_in_thread_stack_temporaries, can_access_registers_thread):
6311         Take a thread_info pointer instead of a ptid_t.  All callers
6312         adjusted.
6313         * infcall.c (get_call_return_value): Use inferior_thread.
6314         (run_inferior_call): Work with thread pointers instead of ptid_t.
6315         (call_function_by_hand_dummy): Work with thread pointers instead
6316         of ptid_t.  Use thread_info_ref.
6317         * infcmd.c (proceed_thread_callback): Access thread's state
6318         directly.
6319         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6320         access thread's state directly.
6321         (continue_command): Use inferior_thread.
6322         (info_program_command): Use find_thread_ptid and access thread
6323         state directly.
6324         (proceed_after_attach_callback): Use thread state directly.
6325         (notice_new_inferior): Take a thread_info pointer instead of a
6326         ptid_t.  All callers adjusted.
6327         (exit_inferior): Take an inferior pointer instead of a pid.  All
6328         callers adjusted.
6329         (exit_inferior_silent): New.
6330         (detach_inferior): Delete.
6331         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6332         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6333         (detach_inferior_command, kill_inferior_command): Use
6334         find_inferior_id instead of valid_gdb_inferior_id and
6335         gdb_inferior_id_to_pid.
6336         (inferior_command): Use inferior and thread pointers.
6337         * inferior.h (struct thread_info): Forward declare.
6338         (notice_new_inferior): Take a thread_info pointer instead of a
6339         ptid_t.  All callers adjusted.
6340         (detach_inferior): Delete declaration.
6341         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6342         instead of a pid.  All callers adjusted.
6343         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6344         (valid_gdb_inferior_id): Delete.
6345         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6346         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6347         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6348         ...
6349         <inf>: ... this new field.
6350         <step_ptid>: Delete, replaced by ...
6351         <step_thread>: ... this new field.
6352         (get_displaced_stepping_state): Take an inferior pointer instead
6353         of a pid.  All callers adjusted.
6354         (displaced_step_in_progress_any_inferior): Adjust.
6355         (displaced_step_in_progress_thread): Take a thread pointer instead
6356         of a ptid_t.  All callers adjusted.
6357         (displaced_step_in_progress, add_displaced_stepping_state): Take
6358         an inferior pointer instead of a pid.  All callers adjusted.
6359         (get_displaced_step_closure_by_addr): Adjust.
6360         (remove_displaced_stepping_state): Take an inferior pointer
6361         instead of a pid.  All callers adjusted.
6362         (displaced_step_prepare_throw, displaced_step_prepare)
6363         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6364         All callers adjusted.
6365         (start_step_over): Adjust.
6366         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6367         displaced step queue.
6368         (do_target_resume): Adjust.
6369         (fetch_inferior_event): Use inferior_thread.
6370         (context_switch, get_inferior_stop_soon): Take an
6371         execution_control_state pointer instead of a ptid_t.  All callers
6372         adjusted.
6373         (switch_to_thread_cleanup): Delete.
6374         (stop_all_threads): Use scoped_restore_current_thread.
6375         * inline-frame.c: Include "gdbthread.h".
6376         (inline_state) <inline_state>: Take a thread pointer instead of a
6377         ptid_t.  All callers adjusted.
6378         <ptid>: Delete, replaced by ...
6379         <thread>: ... this new field.
6380         (find_inline_frame_state): Take a thread pointer instead of a
6381         ptid_t.  All callers adjusted.
6382         (skip_inline_frames, step_into_inline_frame)
6383         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6384         pointer instead of a ptid_t.  All callers adjusted.
6385         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6386         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6387         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6388         pointers directly.
6389         * linux-nat.c (get_detach_signal): Likewise.
6390         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6391         (thread_db_notice_clone): Adjust.
6392         (thread_db_find_new_threads_silently)
6393         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6394         a thread pointer instead of a ptid_t.  All callers adjusted.
6395         * mi/mi-cmd-var.c: Include "inferior.h".
6396         (mi_cmd_var_update_iter): Update to use thread pointers.
6397         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6398         inferior directly.
6399         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6400         out to ...
6401         (mi_output_running): ... this new function.
6402         (mi_on_resume_1): Adjust to use it.
6403         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6404         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6405         directly.
6406         (interrupt_thread_callback): : Adjust to use thread and inferior
6407         pointers.
6408         * proc-service.c: Include "gdbthread.h".
6409         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6410         * progspace-and-thread.c: Include "inferior.h".
6411         * progspace.c: Include "inferior.h".
6412         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6413         hold a reference to an inferior_object.
6414         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6415         inferior_thread.
6416         * python/py-inferior.c (struct inferior_object): Give the type a
6417         tag name instead of a typedef.
6418         (python_on_normal_stop): No need to check if the current thread is
6419         listed.
6420         (inferior_to_inferior_object): Change return type to
6421         inferior_object.  All callers adjusted.
6422         (find_thread_object): Delete, bits factored out to ...
6423         (thread_to_thread_object): ... this new function.
6424         * python/py-infthread.c (create_thread_object): Use
6425         inferior_to_inferior_object.
6426         (thpy_is_stopped): Use thread pointer directly.
6427         (gdbpy_selected_thread): Use inferior_thread.
6428         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6429         field, replaced with ...
6430         <thread>: ... this new field.  All users adjusted.
6431         (btpy_insn_or_gap_new): Drop const.
6432         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6433         callers adjusted.
6434         * python/py-record.c: Include "gdbthread.h".
6435         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6436         a ptid_t.  All callers adjusted.
6437         (gdbpy_current_recording): Use inferior_thread.
6438         * python/py-record.h (recpy_record_object) <ptid>: Delete
6439         field, replaced with ...
6440         <thread>: ... this new field.  All users adjusted.
6441         (recpy_element_object) <ptid>: Delete
6442         field, replaced with ...
6443         <thread>: ... this new field.  All users adjusted.
6444         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6445         a ptid_t.  All callers adjusted.
6446         * python/py-threadevent.c: Include "gdbthread.h".
6447         (get_event_thread): Use thread_to_thread_object.
6448         * python/python-internal.h (struct inferior_object): Forward
6449         declare.
6450         (find_thread_object, find_inferior_object): Delete declarations.
6451         (thread_to_thread_object, inferior_to_inferior_object): New
6452         declarations.
6453         * record-btrace.c: Include "inferior.h".
6454         (require_btrace_thread): Use inferior_thread.
6455         (record_btrace_frame_sniffer)
6456         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6457         (get_thread_current_frame): Use scoped_restore_current_thread and
6458         switch_to_thread.
6459         (get_thread_current_frame): Use thread pointer directly.
6460         (record_btrace_replay_at_breakpoint): Use thread's inferior
6461         pointer directly.
6462         * record-full.c: Include "inferior.h".
6463         * regcache.c: Include "gdbthread.h".
6464         (get_thread_arch_regcache): Use the inferior's address space
6465         directly.
6466         (get_thread_regcache, registers_changed_thread): New.
6467         * regcache.h (get_thread_regcache(thread_info *thread)): New
6468         overload.
6469         (registers_changed_thread): New.
6470         (remote_target) <remote_detach_1>: Swap order of parameters.
6471         (remote_add_thread): <remote_add_thread>: Return the new thread.
6472         (get_remote_thread_info(ptid_t)): New overload.
6473         (remote_target::remote_notice_new_inferior): Use thread pointers
6474         directly.
6475         (remote_target::process_initial_stop_replies): Use
6476         thread_info::set_running.
6477         (remote_target::remote_detach_1, remote_target::detach)
6478         (extended_remote_target::detach): Adjust.
6479         * stack.c (frame_show_address): Use inferior_thread.
6480         * target-debug.h (target_debug_print_thread_info_pp): New.
6481         * target-delegates.c: Regenerate.
6482         * target.c (default_thread_address_space): Delete.
6483         (memory_xfer_partial_1): Use current_inferior.
6484         (target_detach): Use current_inferior.
6485         (target_thread_address_space): Delete.
6486         (generic_mourn_inferior): Use current_inferior.
6487         * target.h (struct target_ops) <thread_address_space>: Delete.
6488         (target_thread_address_space): Delete.
6489         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6490         pointers directly.
6491         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6492         thread pointer instead of a ptid_t.  Adjust all callers.
6493         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6494         (first_thread_of_process): Delete, replaced by ...
6495         (first_thread_of_inferior): ... this new function.  All callers
6496         adjusted.
6497         (any_thread_of_process): Rename to ...
6498         (any_thread_of_inferior): ... this, and take an inferior pointer.
6499         (any_live_thread_of_process): Rename to ...
6500         (any_live_thread_of_inferior): ... this, and take an inferior
6501         pointer.
6502         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6503         (value_in_thread_stack_temporaries)
6504         (get_last_thread_stack_temporary): Take a thread pointer instead
6505         of a ptid_t.  Adjust all callers.
6506         (thread_info::set_running): New.
6507         (validate_registers_access): Use inferior_thread.
6508         (can_access_registers_ptid): Rename to ...
6509         (can_access_registers_thread): ... this, and take a thread
6510         pointer.
6511         (print_thread_info_1): Adjust to compare thread pointers instead
6512         of ptids.
6513         (switch_to_no_thread, switch_to_thread): Make extern.
6514         (scoped_restore_current_thread::~scoped_restore_current_thread):
6515         Use m_thread pointer directly.
6516         (scoped_restore_current_thread::scoped_restore_current_thread):
6517         Use inferior_thread.
6518         (thread_command): Use thread pointer directly.
6519         (thread_num_make_value_helper): Use inferior_thread.
6520         * top.c (execute_command): Use inferior_thread.
6521         * tui/tui-interp.c: Include "inferior.h".
6522         * varobj.c (varobj_create): Use inferior_thread.
6523         (value_of_root_1): Use find_thread_global_id instead of
6524         global_thread_id_to_ptid.
6525
6526 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6527
6528         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6529         possible.
6530         (regcache::write_part): Likewise.
6531         (readable_regcache::cooked_read_part): Update comment.
6532         (readable_regcache::cooked_write_part): Likewise.
6533         * regcache.h: (readable_regcache::read_part): Likewise.
6534         (regcache::write_part): Likewise.
6535
6536 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6537             Dirk Schubert  <dirk.schubert@arm.com>
6538
6539         * aarch64-linux-nat.c (post_attach): New.
6540         (aarch64_linux_nat_target::post_attach): Override post_attach to
6541         record the number of hardware debug registers.
6542
6543 2018-06-20  Tom Tromey  <tom@tromey.com>
6544
6545         * python/py-param.c (add_setshow_generic): Make parameters const.
6546         (parmpy_init): Update.
6547
6548 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6549
6550         * regcache.h (regcache_cooked_read_ftype): Rename to...
6551         (register_read_ftype): ...this, change type to function_view.
6552         (class reg_buffer) <save>: Remove src parameter.
6553         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6554         parameter non-const in first overload.  Remove src parameter in
6555         second overload.
6556         * regcache.c (do_cooked_read): Remove.
6557         (readonly_detached_regcache::readonly_detached_regcache): Make
6558         parameter non-const, adjust call to other constructor.
6559         (reg_buffer::save): Remove src parameter.
6560         * frame.c (do_frame_register_read): Remove.
6561         (frame_save_as_regcache): Use lambda function.
6562         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6563         parameter to ppu2spu_data *.
6564         (ppu2spu_sniffer): Use lambda function.
6565
6566 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6567
6568         * record-full.c (record_full_target::insert_breakpoint): Remove
6569         "struct" keyword, add const.
6570
6571 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6572
6573         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6574         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6575         * configure.ac: Remove AC_PREREQ, add missing quoting.
6576         * gnulib/configure.ac: Modernize usage of
6577         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6578         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6579         (AUTOMAKE_VERSION): Bump to 1.15.1.
6580         * configure: Re-generate.
6581         * config.in: Re-generate.
6582         * aclocal.m4: Re-generate.
6583         * gnulib/aclocal.m4: Re-generate.
6584         * gnulib/config.in: Re-generate.
6585         * gnulib/configure: Re-generate.
6586         * gnulib/import/Makefile.in: Re-generate.
6587
6588 2018-06-19  Pedro Alves  <palves@redhat.com>
6589
6590         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6591         (lookup_minimal_symbol_by_pc_section): ... here with
6592         gdb_assert_not_reached added.
6593
6594 2018-06-19  Pedro Alves  <palves@redhat.com>
6595
6596         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6597         parameter with a block parameter.  Compare location's block symbol
6598         with the frame's block instead of addresses.
6599         (skip_inline_frames): Pass the current block instead of the
6600         frame's address.  Break out as soon as we determine the frame
6601         should not be skipped.
6602
6603 2018-06-18  Tom Tromey  <tom@tromey.com>
6604
6605         * solib-aix.c (solib_aix_get_section_offsets): Return
6606         unique_xmalloc_ptr.
6607         (solib_aix_solib_create_inferior_hook): Update.
6608
6609 2018-06-18  Tom Tromey  <tom@tromey.com>
6610
6611         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6612
6613 2018-06-18  Tom Tromey  <tom@tromey.com>
6614
6615         * solib-frv.c (frv_relocate_main_executable): Use
6616         unique_xmalloc_ptr.
6617         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6618         unique_xmalloc_ptr.
6619
6620 2018-06-18  Tom Tromey  <tom@tromey.com>
6621
6622         * objfiles.h (inhibit_section_map_updates): Update.
6623         (resume_section_map_updates, resume_section_map_updates_cleanup):
6624         Remove.
6625         * solib-svr4.c (svr4_handle_solib_event): Update.
6626         * objfiles.c (inhibit_section_map_updates): Return
6627         scoped_restore_tmpl<int>.
6628         (resume_section_map_updates, resume_section_map_updates_cleanup):
6629         Remove.
6630
6631 2018-06-18  Tom Tromey  <tom@tromey.com>
6632
6633         * valprint.h (read_string): Update.
6634         * valprint.c (read_string): Change type of "buffer".
6635         (val_print_string): Update.
6636         * python/py-value.c (valpy_string): Update.
6637         * language.h (struct language_defn) <la_get_string>: Change
6638         type of "buffer".
6639         (default_get_string, c_get_string): Update.
6640         * language.c (default_get_string): Change type of "buffer".
6641         * guile/scm-value.c (gdbscm_value_to_string): Update.
6642         * c-lang.c (c_get_string): Change type of "buffer".
6643
6644 2018-06-18  Tom Tromey  <tom@tromey.com>
6645
6646         * ser-mingw.c (struct pipe_state_destroyer): New.
6647         (pipe_state_up): New typedef.
6648         (cleanup_pipe_state): Remove.
6649         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6650
6651 2018-06-18  Tom Tromey  <tom@tromey.com>
6652
6653         * rust-lang.h (rust_yyerror): Don't declare.
6654         * rust-lang.c (rust_language_defn): Update.
6655         * rust-exp.y (yyerror): Now static.
6656         * parse.c (parse_exp_in_context_1): Update.
6657         * p-lang.h (p_yyerror): Don't declare.
6658         * p-lang.c (p_language_defn): Update.
6659         * p-exp.y (yyerror): Now static.
6660         * opencl-lang.c (opencl_language_defn): Update.
6661         * objc-lang.c (objc_language_defn): Update.
6662         * m2-lang.h (m2_yyerror): Don't declare.
6663         * m2-lang.c (m2_language_defn): Update.
6664         * m2-exp.y (yyerror): Now static.
6665         * language.h (struct language_defn) <la_error>: Remove.
6666         * language.c (unk_lang_error): Remove.
6667         (unknown_language_defn, auto_language_defn): Remove.
6668         * go-lang.h (go_yyerror): Don't declare.
6669         * go-lang.c (go_language_defn): Update.
6670         * go-exp.y (yyerror): Now static.
6671         * f-lang.h (f_yyerror): Don't declare.
6672         * f-lang.c (f_language_defn): Update.
6673         * f-exp.y (yyerror): Now static.
6674         * d-lang.h (d_yyerror): Don't declare.
6675         * d-lang.c (d_language_defn): Update.
6676         * d-exp.y (yyerror): Now static.
6677         * c-lang.h (c_yyerror): Don't declare.
6678         * c-lang.c (c_language_defn, cplus_language_defn)
6679         (asm_language_defn, minimal_language_defn): Update.
6680         * c-exp.y (yyerror): Now static.
6681         * ada-lang.h (ada_yyerror): Don't declare.
6682         * ada-lang.c (ada_language_defn): Update.
6683         * ada-exp.y (yyerror): Now static.
6684
6685 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6686
6687         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6688         (store_sveregs_to_thread): Likewise.
6689         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6690         (aarch64_linux_store_inferior_registers): Likewise.
6691         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6692         function.
6693         (aarch64_sve_regs_copy_to_regcache): Likewise.
6694         (aarch64_sve_regs_copy_from_regcache): Likewise.
6695         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6696         declaration.
6697         (aarch64_sve_regs_copy_to_regcache): Likewise.
6698         (aarch64_sve_regs_copy_from_regcache): Likewise.
6699         (sve_context): Structure from Linux headers.
6700         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6701         (SVE_SIG_ZREG_SIZE): Likewise.
6702         (SVE_SIG_PREG_SIZE): Likewise.
6703         (SVE_SIG_FFR_SIZE): Likewise.
6704         (SVE_SIG_REGS_OFFSET): Likewise.
6705         (SVE_SIG_ZREGS_OFFSET): Likewise.
6706         (SVE_SIG_ZREG_OFFSET): Likewise.
6707         (SVE_SIG_ZREGS_SIZE): Likewise.
6708         (SVE_SIG_PREGS_OFFSET): Likewise.
6709         (SVE_SIG_PREG_OFFSET): Likewise.
6710         (SVE_SIG_PREGS_SIZE): Likewise.
6711         (SVE_SIG_FFR_OFFSET): Likewise.
6712         (SVE_SIG_REGS_SIZE): Likewise.
6713         (SVE_SIG_CONTEXT_SIZE): Likewise.
6714         (SVE_PT_REGS_MASK): Likewise.
6715         (SVE_PT_REGS_FPSIMD): Likewise.
6716         (SVE_PT_REGS_SVE): Likewise.
6717         (SVE_PT_VL_INHERIT): Likewise.
6718         (SVE_PT_VL_ONEXEC): Likewise.
6719         (SVE_PT_REGS_OFFSET): Likewise.
6720         (SVE_PT_FPSIMD_OFFSET): Likewise.
6721         (SVE_PT_FPSIMD_SIZE): Likewise.
6722         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6723         (SVE_PT_SVE_PREG_SIZE): Likewise.
6724         (SVE_PT_SVE_FFR_SIZE): Likewise.
6725         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6726         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6727         (__SVE_SIG_TO_PT): Likewise.
6728         (SVE_PT_SVE_OFFSET): Likewise.
6729         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6730         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6731         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6732         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6733         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6734         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6735         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6736         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6737         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6738         (SVE_PT_SVE_SIZE): Likewise.
6739         (SVE_PT_SIZE): Likewise.
6740         (HAS_SVE_STATE): New define.
6741
6742 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6743
6744         * nat/aarch64-sve-linux-sigcontext.h: New file.
6745         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6746         new files.
6747         (SVE_VQ_MIN): Likewise.
6748         (SVE_VQ_MAX): Likewise.
6749         (SVE_VL_MIN): Likewise.
6750         (SVE_VL_MAX): Likewise.
6751         (SVE_NUM_ZREGS): Likewise.
6752         (SVE_NUM_PREGS): Likewise.
6753         (sve_vl_valid): Likewise.
6754         (struct user_sve_header): Likewise.
6755
6756 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6757             Richard Bunt <Richard.Bunt@arm.com>
6758
6759         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6760         was requested by GDB.
6761
6762 2018-06-15  Tom de Vries  <tdevries@suse.de>
6763
6764         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6765
6766 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6767
6768         * gnulib/update-gnulib.sh: Print expected versions of
6769         autoconf/aclocal.
6770
6771 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6772
6773         * arch-utils.c (default_type_align): Use type_length_units.
6774         * gdbtypes.c (type_align): Use type_length_units.
6775
6776 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6777
6778         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6779         of 'define' command.
6780
6781 2018-06-14  Tom de Vries  <tdevries@suse.de>
6782
6783         PR cli/22573
6784         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6785         get_no_prettyformat_print_options.
6786
6787 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6788
6789         * sparc-nat.h: Include target.h.
6790         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6791         <fetch_registers>: Remove this argument in function call.
6792         <store_registers>: Remove this argument in function call, remove
6793         extra semicolon.
6794         <low_forget_process>: Call sparc64_forget_process instead of
6795         sparc_forget_process.
6796
6797 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6798
6799         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6800         (procfs_target::make_corefile_notes): Adjust to new
6801         target_read_alloc return type.
6802
6803 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6804             Stephen Roberts  <stephen.roberts@arm.com>
6805
6806         PR gdb/22882
6807         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6808         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6809         Move should_notify_stop local into more inner scope.
6810
6811 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6812             Stephen Roberts  <stephen.roberts@arm.com>
6813
6814         PR gdb/22882
6815         * infrun.c (resume_1): Add call to mark_async_event_handler.
6816
6817 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6818
6819         * infrun.c (do_target_wait): Change old version of $pc printed.
6820
6821 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6822
6823         * dwarf2read.c (read_index_from_section): Rename to...
6824         (read_gdb_index_from_section): ... this, update all callers.
6825         (dwarf2_read_index): Rename to...
6826         (dwarf2_read_gdb_index): ... this, update all callers.
6827
6828 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6829
6830         * gdb/hppa-linux-nat.c
6831         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6832         hppa_linux_nat_target::fetch_registers.
6833
6834 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6835
6836         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6837         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6838         (AARCH64_DWARF_SVE_FFR): Likewise.
6839         (AARCH64_DWARF_SVE_P0): Likewise.
6840         (AARCH64_DWARF_SVE_Z0): Likewise.
6841
6842 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6843
6844         * common/common-regcache.h (raw_compare): New function.
6845         * regcache.c (regcache::raw_compare): Likewise.
6846         * regcache.h (regcache::raw_compare): New declaration.
6847
6848 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6849
6850         * common/common-regcache.h (reg_buffer_common): New structure.
6851         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6852         (reg_buffer::raw_supply): Likewise.
6853         (reg_buffer::raw_supply_integer): Likewise.
6854         (reg_buffer::raw_supply_zeroed): Likewise.
6855         (reg_buffer::raw_collect): Likewise.
6856         (reg_buffer::raw_collect_integer): Likewise.
6857         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6858         (reg_buffer::raw_supply): Likewise.
6859         (reg_buffer::raw_supply_integer): Likewise.
6860         (reg_buffer::raw_supply_zeroed): Likewise.
6861         (reg_buffer::raw_collect): Likewise.
6862         (reg_buffer::raw_collect_integer): Likewise.
6863
6864 2018-06-10  Tom Tromey  <tom@tromey.com>
6865
6866         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6867         (class remote_state) <stop_reply_queue>: Now std::vector.
6868         (remote_state::~remote_state)
6869         (remote_target::stop_reply_queue_length): Update.
6870         (struct queue_iter_param, remove_child_of_pending_fork)
6871         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6872         (check_pending_event_prevents_wildcard_vcont_callback)
6873         (remove_stop_reply_for_inferior)
6874         (remove_stop_reply_of_remote_state)
6875         (remote_notif_remove_once_on_match)
6876         (stop_reply_match_ptid_and_ws)
6877         (remote_kill_child_of_pending_fork): Remove.
6878         (remote_target::remove_new_fork_children)
6879         (remote_target::check_pending_events_prevent_wildcard_vcont)
6880         (remote_target::discard_pending_stop_replies)
6881         (remote_target::discard_pending_stop_replies_in_queue)
6882         (remote_target::remote_notif_remove_queued_reply)
6883         (remote_target::queued_stop_reply)
6884         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6885         (remote_target::wait, remote_target::kill_new_fork_children)
6886         (remote_target::async): Update.
6887
6888 2018-06-10  Tom Tromey  <tom@tromey.com>
6889
6890         * record-full.c (record_full_arch_list_cleanups): Remove.
6891         (record_full_message): Use try/catch.
6892         (record_full_wait_cleanups): Remove.
6893         (record_full_wait_1): Use try/catch.
6894         (record_full_restore): Likewise.
6895
6896 2018-06-10  Tom Tromey  <tom@tromey.com>
6897
6898         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6899         declare VEC.  Add constructor.
6900         <in_target_beneath>: Now bool.
6901         (record_full_breakpoints): Now a std::vector, static.
6902         (record_full_sync_record_breakpoints)
6903         (record_full_init_record_breakpoints)
6904         (record_full_target::insert_breakpoint)
6905         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6906
6907 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6908
6909         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6910         * serial.c (serial_interface_lookup): Remove struct keyword.
6911
6912 2018-06-10  Tom Tromey  <tom@tromey.com>
6913
6914         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6915         method.
6916         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6917         a method.
6918         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6919         method.
6920         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6921         "beneath" as a method.
6922         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6923         Use "beneath" as a method.
6924
6925 2018-06-10  Tom Tromey  <tom@tromey.com>
6926
6927         * tracefile.c (struct trace_file_writer_deleter): New.
6928         <operator()>: Rename from trace_file_writer_xfree.
6929         (trace_file_writer_up): New typedef.
6930         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6931
6932 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6933
6934         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6935         <m_registers, m_register_status>: Change type to
6936         std::unique_ptr.
6937         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6938         XCNEWVEC.
6939
6940 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6941
6942         * common/common-regcache.h (enum register_status): Add
6943         underlying type "signed char".
6944         * regcache.h (reg_buffer) <m_register_status>: Change type to
6945         register_status *.
6946         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6947         register_status instead of signed char.
6948         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6949         (reg_buffer::get_register_status): Remove cast.
6950         (readable_regcache::raw_read): Remove cast.
6951         (readable_regcache::cooked_read): Remove cast.
6952
6953 2018-06-09  Tom Tromey  <tom@tromey.com>
6954
6955         * source.c (reverse_search_command, forward_search_command): Use
6956         scoped_fd.
6957
6958 2018-06-09  Tom Tromey  <tom@tromey.com>
6959
6960         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6961         (serial_ops_list): Now static, std::vector.
6962         (serial_interface_lookup, serial_add_interface): Update.
6963
6964 2018-06-09  Tom Tromey  <tom@tromey.com>
6965
6966         * dwarf2read.c (process_cu_includes): Update.
6967         (process_full_comp_unit): Update.
6968         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6969         std::vector.
6970
6971 2018-06-08  Paul Koning  <paul_koning@dell.com>
6972
6973         PR gdb/23252
6974
6975         * python/python.c (do_start_initialization):
6976         Avoid call to internal Python API.
6977         (init__gdb_module): New function.
6978
6979 2018-06-08  Gary Benson <gbenson@redhat.com>
6980
6981         * linux-thread-db.c (valprint.h): New include.
6982         (struct check_thread_db_info): New structure.
6983         (check_thread_db_on_load, tdb_testinfo): New static globals.
6984         (check_thread_db, check_thread_db_callback): New functions.
6985         (try_thread_db_load_1): Run integrity checks if requested.
6986         (maintenance_check_libthread_db): New function.
6987         (_initialize_thread_db): Register "maint check libthread-db"
6988         and "maint set/show check-libthread-db".
6989         * NEWS: Mention the above new commands.
6990
6991 2018-06-08  Tom Tromey  <tom@tromey.com>
6992
6993         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6994         now a method.
6995
6996 2018-06-08  Tom Tromey  <tom@tromey.com>
6997
6998         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6999
7000 2018-06-08  Tom Tromey  <tom@tromey.com>
7001
7002         * common/btrace-common.h (struct btrace_data): Add constructor,
7003         destructor, move assignment operator.
7004         <empty, clear, fini>: New methods.
7005         <format>: Initialize.
7006         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7007         (btrace_data_empty): Don't declare.
7008         * common/btrace-common.c (btrace_data_init): Remove.
7009         (btrace_data::fini): Rename from btrace_data_fini.
7010         (btrace_data::empty): Rename from btrace_data_empty.
7011         (btrace_data::clear): Rename from btrace_data_clear.  Return
7012         bool.
7013         * btrace.h (make_cleanup_btrace_data): Don't declare.
7014         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7015         (parse_xml_btrace): Update.
7016         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7017         (maint_btrace_clear_packet_history_cmd): Update.
7018
7019 2018-06-07  Pedro Alves  <palves@redhat.com>
7020
7021         * target.h (target_ops) <beneath>: Now a method.  All references
7022         updated.
7023         (class target_stack): New.
7024         * target.c (g_target_stack): New.
7025         (g_current_top_target): Delete.
7026         (current_top_target): Get the top target out of g_target_stack.
7027         (target_stack::push, target_stack::unpush): New.
7028         (push_target, unpush_target): Reimplement.
7029         (target_is_pushed): Reimplement in terms of g_target_stack.
7030         (target_ops::beneath, target_stack::find_beneath): New.
7031
7032 2018-06-07  Pedro Alves  <palves@redhat.com>
7033
7034         * target.h (find_target_beneath): Delete declaration.
7035         * target.c (find_target_beneath): Delete definition.
7036         * aix-thread.c: All callers of find_target_beneath adjusted to
7037         call target_ops::beneath instead.
7038         * bsd-uthread.c: Likewise.
7039         * linux-thread-db.c: Likewise.
7040         * ravenscar-thread.c: Likewise.
7041         * sol-thread.c: Likewise.
7042         * spu-multiarch.c: Likewise.
7043
7044 2018-06-07  Pedro Alves  <palves@redhat.com>
7045
7046         * target.h (target_ops) <beneath>: Now a method.  All references
7047         updated.
7048         (target_ops) <m_beneath>: New.
7049         * target.c (target_ops::beneath): New.
7050         * corelow.c: Adjust all references to target_ops::beneath.
7051         * linux-thread-db.c: Likewise.
7052         * make-target-delegates: Likewise.
7053         * record-btrace.c: Likewise.
7054         * record-full.c: Likewise.
7055         * remote.c: Likewise.
7056         * target.c: Likewise.
7057         * target-delegates.c: Regenerate.
7058
7059 2018-06-07  Pedro Alves  <palves@redhat.com>
7060
7061         * target.h (target_stack): Delete.
7062         (current_top_target): Declare function.
7063         * target.c (target_stack): Delete.
7064         (g_current_top_target): New.
7065         (current_top_target): New function.
7066         * auxv.c: Use current_top_target instead of target_stack
7067         throughout.
7068         * avr-tdep.c: Likewise.
7069         * breakpoint.c: Likewise.
7070         * corefile.c: Likewise.
7071         * elfread.c: Likewise.
7072         * eval.c: Likewise.
7073         * exceptions.c: Likewise.
7074         * frame.c: Likewise.
7075         * gdbarch-selftests.c: Likewise.
7076         * gnu-v3-abi.c: Likewise.
7077         * ia64-tdep.c: Likewise.
7078         * ia64-vms-tdep.c: Likewise.
7079         * infcall.c: Likewise.
7080         * infcmd.c: Likewise.
7081         * infrun.c: Likewise.
7082         * linespec.c: Likewise.
7083         * linux-tdep.c: Likewise.
7084         * minsyms.c: Likewise.
7085         * ppc-linux-nat.c: Likewise.
7086         * ppc-linux-tdep.c: Likewise.
7087         * procfs.c: Likewise.
7088         * regcache.c: Likewise.
7089         * remote.c: Likewise.
7090         * rs6000-tdep.c: Likewise.
7091         * s390-linux-nat.c: Likewise.
7092         * s390-tdep.c: Likewise.
7093         * solib-aix.c: Likewise.
7094         * solib-darwin.c: Likewise.
7095         * solib-dsbt.c: Likewise.
7096         * solib-spu.c: Likewise.
7097         * solib-svr4.c: Likewise.
7098         * solib-target.c: Likewise.
7099         * sparc-tdep.c: Likewise.
7100         * sparc64-tdep.c: Likewise.
7101         * spu-tdep.c: Likewise.
7102         * symfile.c: Likewise.
7103         * symtab.c: Likewise.
7104         * target-descriptions.c: Likewise.
7105         * target-memory.c: Likewise.
7106         * target.c: Likewise.
7107         * target.h: Likewise.
7108         * tracefile-tfile.c: Likewise.
7109         * tracepoint.c: Likewise.
7110         * valops.c: Likewise.
7111         * valprint.c: Likewise.
7112         * value.c: Likewise.
7113         * windows-tdep.c: Likewise.
7114         * mi/mi-main.c: Likewise.
7115
7116 2018-06-07  Tom Tromey  <tom@tromey.com>
7117
7118         * valprint.h (build_address_symbolic): Declare.
7119         * printcmd.c (print_address_symbolic): Update.
7120         (build_address_symbolic): Change "name" and "filename" to
7121         std::string.
7122         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7123         Update.
7124         * defs.h (build_address_symbolic): Remove declaration.
7125
7126 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7127
7128         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7129         (aarch64_vnv_type): Add function.
7130         (aarch64_pseudo_register_name): Add V regs for SVE.
7131         (aarch64_pseudo_register_type): Likewise.
7132         (aarch64_pseudo_register_reggroup_p): Likewise.
7133         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7134         (aarch64_pseudo_read_value): Add V regs for SVE.
7135         (aarch64_pseudo_write_2): Use V0 offset for SVE
7136         (aarch64_pseudo_write): Add V regs for SVE.
7137         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7138
7139 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7140
7141         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7142         (sve_vl_from_vq): Likewise.
7143
7144 2018-06-05  Tom Tromey  <tom@tromey.com>
7145
7146         * cli/cli-cmds.c (show_version): Update.
7147         * top.c (print_gdb_version): Add "interactive" parameter.
7148         Update.
7149         * main.c (captured_main_1): Update.
7150         * top.h (print_gdb_version): Add "interactive" parameter and a
7151         comment.
7152
7153 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7154
7155         * common/enum-flags.h: Add trailing semicolon to example in
7156         comment.
7157
7158 2018-06-05  Tom Tromey  <tom@tromey.com>
7159
7160         PR cli/12326:
7161         * NEWS: Add entry about pager.
7162         * utils.c (pagination_disabled_for_command): New global.
7163         (prompt_for_continue): Allow "c" response to prompt.
7164         (reinitialize_more_filter): Clear
7165         pagination_disabled_for_command.
7166         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7167
7168 2018-06-04  Tom Tromey  <tom@tromey.com>
7169
7170         * ada-lang.h (ada_lookup_symbol_list): Update.
7171         * ada-lang.c (resolve_subexp): Update.
7172         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7173         parameter.
7174         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7175         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7176         results parameter to std::vector.
7177         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7178         Update.
7179         * ada-exp.y (block_lookup): Update.
7180         (select_possible_type_sym): Change type of syms.  Remove nsyms
7181         parameter.
7182         (write_var_or_type, write_name_assoc): Update.
7183
7184 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7185
7186         * windows-nat.c (windows_nat_target::xfer_partial): Return
7187         TARGET_XFER_E_IO if we need to delegate to the target beneath
7188         but BENEATH is NULL.
7189
7190 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7191
7192         * Makefile.in (config.status): Add configure.nat as a
7193         dependency.
7194
7195 2018-06-04  Tom Tromey  <tom@tromey.com>
7196
7197         * cp-name-parser.y (cpname_state): Add method declarations.
7198         (HANDLE_QUAL): Update.
7199         (cpname_state::d_grab, cpname_state::fill_comp)
7200         (cpname_state::make_operator, cpname_state::make_dtor)
7201         (cpname_state::make_builtin_type, cpname_state::make_name)
7202         (cpname_state::d_qualify, cpname_state::d_int_type)
7203         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7204         (%union): Move earlier.
7205
7206 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7207
7208         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7209
7210 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7211
7212         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7213         (aarch64_pseudo_write_1): Likewise.
7214         (aarch64_pseudo_read_value): Use helper.
7215         (aarch64_pseudo_write): Likewise.
7216
7217 2018-06-04  Pedro Alves  <palves@redhat.com>
7218
7219         * darwin-nat.c (darwin_ops): Delete.
7220         (darwin_attach_pid): Use get_native_target.
7221
7222 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7223
7224         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7225         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7226
7227 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7228
7229         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7230         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7231         (aarch64_gdbarch_init): Check for SVE.
7232         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7233
7234 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7235
7236         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7237         * aarch64-tdep.h (aarch64_read_description): Likewise.
7238         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7239         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7240         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7241         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7242         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7243
7244 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7245
7246         * value.c (value_fetch_lazy_bitfield): New.
7247         (value_fetch_lazy_memory): New.
7248         (value_fetch_lazy_register): New.
7249         (value_fetch_lazy): Factor out to smaller functions.
7250
7251 2018-06-01  Tom Tromey  <tom@tromey.com>
7252
7253         * cp-name-parser.y (backslashable, represented): Now const.
7254
7255 2018-06-01  Tom Tromey  <tom@tromey.com>
7256
7257         * cp-name-parser.y: Include parser-defs.h.
7258         (parser_fprintf): Remove declaration.
7259
7260 2018-06-01  Tom Tromey  <tom@tromey.com>
7261
7262         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7263         %parse-param.
7264         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7265         (global_result): Remove globals.
7266         (struct cpname_state): New.
7267         (yyparse): Don't declare.
7268         (yylex, yyerror): Move declarations after %union.
7269         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7270         (make_name): Add state parameter.
7271         Update all callers.
7272         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7273         parameter.
7274         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7275         Update.
7276         (yylex): Add lvalp, state parameters.
7277         (yyerror): Add state parameter.
7278         (cp_demangled_name_to_comp): Update.
7279
7280 2018-06-01  Tom Tromey  <tom@tromey.com>
7281
7282         * cp-name-parser.y (parser_fprintf): Declare.
7283         (GDB_YY_REMAP_PREFIX): Define.
7284         Include yy-remap.h.  Don't redefine yy* identifiers.
7285
7286 2018-06-01  Tom Tromey  <tom@tromey.com>
7287
7288         * python/py-type.c (typy_legacy_template_argument): Update.
7289         * cp-support.h (cp_demangled_name_to_comp): Update.
7290         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7291         parameter to be a "std::string *".
7292         (main): Update.
7293
7294 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7295
7296         * ada-lex.l: Include "diagnostics.h" instead of
7297         "common/diagnostics.h".
7298         * unittests/environ-selftests.c: Likewise.
7299         * common/diagnostics.h: Moved to ../include.
7300
7301 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7302
7303         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7304         to language_mode_manual while calling breakpoint_re_set_one.
7305
7306 2018-06-01  Tom Tromey  <tom@tromey.com>
7307
7308         * valops.c (value_cast_structs, destructor_name_p): Update.
7309         * symtab.c (gdb_mangle_name): Update.
7310         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7311         Update.
7312         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7313         (pascal_object_print_value_fields, pascal_object_print_value):
7314         Update.
7315         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7316         * linespec.c (find_methods): Update.
7317         * gdbtypes.h (type_name_no_tag): Remove.
7318         (type_name_or_error): Rename from type_name_no_tag_or_error.
7319         * gdbtypes.c (type_name_no_tag): Remove.
7320         (type_name_or_error): Rename from type_name_no_tag_or_error.
7321         (lookup_struct_elt_type, check_typedef): Update.
7322         * expprint.c (print_subexp_standard): Update.
7323         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7324         * d-namespace.c (d_lookup_nested_symbol): Update.
7325         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7326         (cp_print_class_member): Update.
7327         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7328         * completer.c (add_struct_fields): Update.
7329         * c-typeprint.c (cp_type_print_derivation_info)
7330         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7331         Update.
7332         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7333         (ada_prefer_type, ada_is_exception_sym): Update.
7334
7335 2018-06-01  Tom Tromey  <tom@tromey.com>
7336
7337         * valops.c (enum_constant_from_type, value_namespace_elt)
7338         (value_maybe_namespace_elt): Update.
7339         * valarith.c (find_size_for_pointer_math): Update.
7340         * target-descriptions.c (make_gdb_type): Update.
7341         * symmisc.c (print_symbol): Update.
7342         * stabsread.c (define_symbol, read_type)
7343         (complain_about_struct_wipeout, add_undefined_type)
7344         (cleanup_undefined_types_1): Update.
7345         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7346         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7347         (rust_internal_print_type, rust_composite_type)
7348         (rust_evaluate_funcall, rust_evaluate_subexp)
7349         (rust_inclusive_range_type_p): Update.
7350         * python/py-type.c (typy_get_tag): Update.
7351         * p-typeprint.c (pascal_type_print_base): Update.
7352         * mdebugread.c (parse_symbol, parse_type): Update.
7353         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7354         Update.
7355         * guile/scm-type.c (gdbscm_type_tag): Update.
7356         * go-lang.c (sixg_string_p): Update.
7357         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7358         Update.
7359         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7360         (TYPE_TAG_NAME): Remove.
7361         * gdbtypes.c (type_name_no_tag): Simplify.
7362         (check_typedef, check_types_equal, recursive_dump_type)
7363         (copy_type_recursive, arch_composite_type): Update.
7364         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7365         in summary mode when needed.
7366         * eval.c (evaluate_funcall): Update.
7367         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7368         (process_structure_scope, read_enumeration_type)
7369         (read_namespace_type, read_module_type, determine_prefix): Update.
7370         * cp-support.c (inspect_type): Update.
7371         * coffread.c (process_coff_symbol, decode_base_type): Update.
7372         * c-varobj.c (c_is_path_expr_parent): Update.
7373         * c-typeprint.c (c_type_print_base_struct_union): Update.
7374         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7375         summary when using C language.
7376         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7377         (gen_maybe_namespace_elt): Update.
7378         * ada-lang.c (ada_type_name): Simplify.
7379         (empty_record, ada_template_to_fixed_record_type_1)
7380         (template_to_static_fixed_type)
7381         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7382
7383 2018-06-01  Tom Tromey  <tom@tromey.com>
7384
7385         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7386         c_print_type.
7387         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7388         (c_print_type): Update.
7389         (c_print_type): New overload.
7390         (c_type_print_varspec_prefix, c_type_print_args)
7391         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7392         (c_type_print_base_struct_union, c_type_print_base_1)
7393         (cp_type_print_method_args): Add "language" parameter.
7394         (c_type_print_base): Update.
7395         * c-lang.h (c_print_type): Add new overload.
7396
7397 2018-06-01  Tom Tromey  <tom@tromey.com>
7398
7399         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7400         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7401
7402 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7403
7404         * aarch64-tdep.c (aarch64_sve_register_names): New const
7405         var.
7406         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7407         (AARCH64_SVE_Z_REGS_NUM): New define.
7408         (AARCH64_SVE_P_REGS_NUM): Likewise.
7409         (AARCH64_SVE_NUM_REGS): Likewise.
7410
7411 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7412
7413         * nat/linux-ptrace.h [__alpha__]
7414         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7415         definitions.
7416
7417 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7418
7419         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7420         the endianness selected.
7421         * NEWS: Document `set endian auto' mode operation update.
7422
7423 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7424
7425         * Makefile.in: Add new header.
7426         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7427         (sve_vl_from_vg): Likewise.
7428         (sve_vq_from_vl): Likewise.
7429         (sve_vl_from_vq): Likewise.
7430         (sve_vq_from_vg): Likewise.
7431         (sve_vg_from_vq): Likewise.
7432         * configure.nat: Add new c file.
7433         * nat/aarch64-sve-linux-ptrace.c: New file.
7434         * nat/aarch64-sve-linux-ptrace.h: New file.
7435
7436 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7437
7438         * aarch64-linux-nat.c (aarch64_linux_read_description):
7439         Add parmeter zero.
7440         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7441         Likewise.
7442         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7443         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7444         (aarch64_gdbarch_init): Add parmeter zero.
7445         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7446         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7447         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7448         parmeter.
7449         * doc/gdb.texinfo: Describe SVE feature
7450         * features/aarch64-sve.c: New file.
7451
7452 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7453
7454         PR gdb/23210
7455         * gdbarch.sh (significant_addr_bit): Default to zero when
7456         not set by target architecture.
7457         * gdbarch.c: Re-generated.
7458         * utils.c (address_significant): Update.
7459
7460 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7461
7462         * stack.c (func_command): Remove trailing newline in call to error.
7463
7464 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7465
7466         * regcache.h (regcache_raw_collect): Remove, update callers to
7467         use regcache::raw_collect.
7468         * regcache.c (regcache_raw_collect): Remove.
7469
7470 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7471
7472         * regcache.h (regcache_raw_supply): Remove, update callers to
7473         use detached_regcache::raw_supply.
7474         * regcache.c (regcache_raw_supply): Remove.
7475
7476 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7477
7478         * regcache.h (regcache_cooked_write_part): Remove, update
7479         callers to use regcache::cooked_write_part.
7480         * regcache.c (regcache_cooked_write_part): Remove.
7481
7482 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7483
7484         * regcache.h (regcache_cooked_read_part): Remove, update callers
7485         to use readable_regcache::cooked_read_part.
7486         * regcache.c (regcache_cooked_read_part): Remove.
7487
7488 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7489
7490         * regcache.h (regcache_cooked_read_value): Remove, update
7491         callers to use readable_regcache::cooked_read_value.
7492         * regcache.c (regcache_cooked_read_value): Remove.
7493
7494 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7495
7496         * regcache.h (regcache_cooked_write): Remove, update callers to
7497         use regcache::cooked_write.
7498         * regcache.c (regcache_cooked_write): Remove.
7499
7500 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7501
7502         * regcache.h (regcache_invalidate): Remove, update callers to
7503         use detached_regcache::invalidate instead.
7504         * regcache.c (regcache_invalidate): Remove.
7505
7506 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7507
7508         * regcache.h (regcache_raw_write_part): Remove, update callers
7509         to use regcache::raw_write_part instead.
7510         * regcache.c (regcache_raw_write_part): Remove.
7511
7512 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7513
7514         * regcache.h (regcache_raw_read_part): Remove, update callers to
7515         use readable_regcache::raw_read_part instead.
7516         * regcache.c (regcache_raw_read_part): Remove.
7517
7518 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7519
7520         * regcache.h (regcache_cooked_read): Remove, update callers to
7521         use readable_regcache::cooked_read instead.
7522         * regcache.c (regcache_cooked_read): Remove.
7523
7524 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7525
7526         * regcache.h (regcache_raw_write): Remove, update callers to use
7527         regcache::raw_write instead.
7528         * regcache.c (regcache_raw_write): Remove.
7529
7530 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7531
7532         * regcache.h (regcache_raw_read): Remove, update callers to use
7533         readable_regcache::raw_read instead.
7534         * regcache.c (regcache_raw_read): Remove.
7535
7536 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7537
7538         * regcache.h (regcache_raw_update): Remove, update callers to
7539         use readable_regcache::raw_update instead.
7540         * regcache.c (regcache_raw_update): Remove.
7541
7542 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7543
7544         * regcache.h (regcache_register_status): Remove, update callers
7545         to use reg_buffer::get_register_status directly instead.
7546         * regcache.c (regcache_register_status): Remove.
7547
7548 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7549
7550         * regcache.h (regcache_get_ptid): Remove, update all callers to
7551         call regcache::ptid instead.
7552         * regcache.c (regcache_get_ptid): Remove.
7553
7554 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7555
7556         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7557
7558 2018-05-30  Pedro Alves  <palves@redhat.com>
7559
7560         * common/common-exceptions.h (exception_rethrow): Use
7561         ATTRIBUTE_NORETURN.
7562
7563 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7564
7565         * breakpoint.c (print_solib_event, check_status_catch_solib):
7566         Remove struct keyword in range-based for loops.
7567         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7568         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7569         Likewise.
7570         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7571         Likewise.
7572         * symfile.c (addr_info_make_relative): Likewise.
7573         * thread.c (value_in_thread_stack_temporaries): Likewise.
7574
7575 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7576
7577         PR gdb/16841
7578         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7579         aggregate type to get its real type before accessing it.
7580
7581 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7582
7583         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7584         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7585         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7586         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7587         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7588         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7589         * printcmd.c (info_address_command): Likewise.
7590
7591 2018-05-29  Tom Tromey  <tom@tromey.com>
7592
7593         * windows-nat.c (handle_exception): Update fall-through comment.
7594
7595 2018-05-29  Tom Tromey  <tom@tromey.com>
7596
7597         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7598         (struct program_space) <added_solibs>: Now a std::vector.
7599         * breakpoint.c (print_solib_event): Update.
7600         (check_status_catch_solib): Update.
7601         * progspace.c (clear_program_space_solib_cache): Update.
7602         * solib.c (update_solib_list): Update.
7603
7604 2018-05-29  Tom Tromey  <tom@tromey.com>
7605
7606         * python/py-type.c (typy_richcompare): Update.
7607         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7608         * gdbtypes.h (types_deeply_equal): Return bool.
7609         (types_equal): Likewise.
7610         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7611         declare VEC.
7612         (check_types_equal): Change worklist to std::vector.  Return
7613         bool.
7614         (struct type_equality_entry): Add constructor.
7615         (compare_maybe_null_strings): Return bool.
7616         (check_types_worklist): Return bool.  Change worklist to
7617         std::vector.
7618         (types_deeply_equal): Use std::vector.
7619         (types_equal): Return bool.
7620         (compare_maybe_null_strings): Simplify.
7621
7622 2018-05-29  Tom Tromey  <tom@tromey.com>
7623
7624         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7625
7626 2018-05-29  Tom Tromey  <tom@tromey.com>
7627
7628         * objc-lang.h: Don't include cp-support.h.
7629         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7630         declare VEC.
7631
7632 2018-05-27  Tom Tromey  <tom@tromey.com>
7633
7634         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7635
7636 2018-05-25  Tom Tromey  <tom@tromey.com>
7637
7638         * value.c (value::location): Initialize.
7639
7640 2018-05-25  Tom Tromey  <tom@tromey.com>
7641
7642         * dbxread.c (init_bincl_list): Remove.
7643         (bincl_list): Now a std::vector.
7644         (bincls_allocated, next_bincl): Remove.
7645         (free_bincl_list, do_free_bincl_list_cleanup)
7646         (make_cleanup_free_bincl_list): Remove.
7647         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7648         unique_xmalloc_ptr.
7649         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7650         (struct header_file_location): Add constructor.
7651         (add_bincl_to_list): Remove.
7652
7653 2018-05-25  Tom Tromey  <tom@tromey.com>
7654
7655         * tui/tui.c (tui_enable): Update.
7656         * mi/mi-interp.c (mi_interp::init): Update.
7657         * interps.h (class interp) <name>: New method.
7658         <m_name>: Rename from name.
7659         (~scoped_restore_interp): Update.
7660         * interps.c (interp::interp): Update.
7661         (interp_add, interp_set, interp_lookup_existing)
7662         (current_interp_named_p): Update.
7663
7664 2018-05-25  Tom Tromey  <tom@tromey.com>
7665
7666         * interps.c (interp_name): Remove.
7667         * mi/mi-interp.c (mi_interp::init): Update.
7668         * interps.h (interp_name): Remove.
7669         (~scoped_restore_interp): Update.
7670         * tui/tui.c (tui_enable): Update.
7671
7672 2018-05-25  Tom Tromey  <tom@tromey.com>
7673
7674         * utils.c (fputs_maybe_filtered): Update.
7675         * linespec.c (decode_line_full): Update.
7676         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7677         (mi_print_breakpoint_for_event, mi_solib_loaded)
7678         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7679         (mi_user_selected_context_changed): Update.
7680         * mi/mi-main.c (mi_execute_command): Update.
7681         * cli/cli-script.c (execute_control_command): Update.
7682         * python/python.c (execute_gdb_command): Update.
7683         * solib.c (info_sharedlibrary_command): Update.
7684         * interps.c (interp_ui_out): Remove.
7685         * interps.h (interp_ui_out): Remove.
7686
7687 2018-05-25  Tom Tromey  <tom@tromey.com>
7688
7689         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7690         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7691         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7692
7693 2018-05-25  Tom Tromey  <tom@tromey.com>
7694
7695         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7696         * interps.c (interp_exec): Use scoped_restore.
7697
7698 2018-05-25  Tom Tromey  <tom@tromey.com>
7699
7700         * remote.c (remote_target::remote_file_get): Use
7701         gdb::byte_vector.
7702         (remote_target::remote_file_put): Likewise.
7703
7704 2018-05-25  Tom Tromey  <tom@tromey.com>
7705
7706         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7707         a std::string.
7708         (get_pe_section_index, add_pe_exported_sym): Update.
7709         (read_pe_exported_syms): Use gdb::def_vector.
7710
7711 2018-05-25  Tom Tromey  <tom@tromey.com>
7712
7713         * frame.c (remove_prev_frame): Remove.
7714         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7715
7716 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7717
7718         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7719         Remove prototypes.
7720         * mips-linux-nat.c (supply_fpregset): Always call
7721         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7722         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7723         `mips_fill_fpregset'.
7724         * mips-linux-tdep.c (mips_supply_fpregset)
7725         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7726         (mips_fill_fpregset_wrapper): Remove functions.
7727         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7728         (mips_linux_fpregset): Remove variable.
7729         (mips_linux_iterate_over_regset_sections): Use
7730         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7731         (mips_linux_o32_sigframe_init): Remove comment.
7732
7733 2018-05-25  Pedro Alves  <palves@redhat.com>
7734
7735         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7736         (struct readahead_cache, struct packet_reg, struct
7737         remote_arch_state, class remote_state): Move higher up in the
7738         file.
7739         (remote_target::m_remote_state): Now an object instead of a pointer.
7740         (remote_target::get_remote_state): Adjust.
7741
7742 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7743
7744         * stack.c (select_and_print_frame): Delete.
7745         (struct function_bounds): Move struct within function.
7746         (func_command): Most content moved into new function
7747         find_frame_for_function, use new function, print result, add
7748         function comment.
7749         (find_frame_for_function): New function, now returns a result.
7750
7751 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7752
7753         * stack.c (iterate_over_block_arg_vars): Fix comment.
7754         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7755
7756 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7757
7758         PR gdb/23203
7759         * frame.c
7760         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7761         Define.
7762         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7763         Define.
7764         * frame.h (class scoped_restore_selected_frame): New class.
7765         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7766         of any exception, use scoped_restore_selected_frame to restore the
7767         frame instead.
7768
7769 2018-05-24  Pedro Alves  <palves@redhat.com>
7770
7771         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7772         override.
7773
7774 2018-05-23  Tom Tromey  <tom@tromey.com>
7775
7776         * complaints.c (struct complaints): Remove.
7777         (symfile_complaint_book): Remove.
7778         (series): New global.
7779         (complaint_internal): Update.
7780         (clear_complaints): Update.
7781
7782 2018-05-23  Tom Tromey  <tom@tromey.com>
7783
7784         * complaints.c (counters): New global.
7785         (struct complain): Remove.
7786         (struct complaints) <root>: Remove.
7787         (complaint_sentinel): Remove.
7788         (symfile_complaint_book): Update.
7789         (find_complaint) Remove.
7790         (complaint_internal, clear_complaints): Update.
7791
7792 2018-05-23  Tom Tromey  <tom@tromey.com>
7793
7794         * complaints.c (struct complain) <file, line>: Remove.
7795         (find_complaint): Remove file, line parameters.
7796         (complaint_internal): Update.
7797
7798 2018-05-23  Tom Tromey  <tom@tromey.com>
7799
7800         * complaints.c (vcomplaint): Remove.
7801         (complaint_internal) Merge in contents of vcomplaint.
7802
7803 2018-05-23  Tom Tromey  <tom@tromey.com>
7804
7805         * complaints.c (struct complaints) <explanation>: Remove.
7806         (symfile_explanations): Remove.
7807         (symfile_complaint_book): Update.
7808         (vcomplaint): Update.
7809         (struct explanation): Remove.
7810
7811 2018-05-23  Tom Tromey  <tom@tromey.com>
7812
7813         * complaints.c (symfile_complaints): Remove.
7814         (complaint_internal): Remove "complaints" parameter.
7815         (clear_complaints, vcomplaint): Remove "c" parameter.
7816         (get_complaints): Remove.
7817         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7818         (dwarf2_debug_line_missing_file_complaint)
7819         (dwarf2_debug_line_missing_end_sequence_complaint)
7820         (dwarf2_complex_location_expr_complaint)
7821         (dwarf2_const_value_length_mismatch_complaint)
7822         (dwarf2_section_buffer_overflow_complaint)
7823         (dwarf2_macro_malformed_definition_complaint)
7824         (dwarf2_invalid_attrib_class_complaint)
7825         (create_addrmap_from_index, dw2_symtab_iter_next)
7826         (dw2_expand_marked_cus)
7827         (dw2_debug_names_iterator::find_vec_in_debug_names)
7828         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7829         (create_debug_type_hash_table, init_cutu_and_read_dies)
7830         (partial_die_parent_scope, add_partial_enumeration)
7831         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7832         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7833         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7834         (create_cus_hash_table, create_dwp_hash_table)
7835         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7836         (dwarf2_rnglists_process, dwarf2_ranges_process)
7837         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7838         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7839         (handle_struct_member_die, process_structure_scope)
7840         (read_array_type, read_common_block, read_module_type)
7841         (read_tag_pointer_type, read_typedef, read_base_type)
7842         (read_subrange_type, load_partial_dies, partial_die_info::read)
7843         (partial_die_info::read, partial_die_info::read)
7844         (partial_die_info::read, read_checked_initial_length_and_offset)
7845         (dwarf2_string_attr, read_formatted_entries)
7846         (dwarf_decode_line_header)
7847         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7848         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7849         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7850         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7851         (get_signatured_type, get_DW_AT_signature_type)
7852         (decode_locdesc, file_file_name, consume_improper_spaces)
7853         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7854         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7855         (dwarf2_symbol_mark_computed, set_die_type)
7856         (read_attribute_value): Update.
7857         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7858         Update.
7859         * dbxread.c (unknown_symtype_complaint)
7860         (lbrac_mismatch_complaint, repeated_header_complaint)
7861         (set_namestring, function_outside_compilation_unit_complaint)
7862         (read_dbx_symtab, process_one_symbol): Update.
7863         * gdbtypes.c (stub_noname_complaint): Update.
7864         * windows-nat.c (handle_unload_dll): Update.
7865         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7866         (decode_base_type): Update.
7867         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7868         (eb_complaint, record_include_begin, record_include_end)
7869         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7870         (process_xcoff_symbol, read_symbol)
7871         (function_outside_compilation_unit_complaint)
7872         (scan_xcoff_symtab): Update.
7873         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7874         * buildsym.c (finish_block_internal, make_blockvector)
7875         (end_symtab_get_static_block, augment_type_symtab): Update.
7876         * dtrace-probe.c (dtrace_process_dof)
7877         (dtrace_static_probe_ops::get_probes): Update.
7878         * complaints.h (struct complaint): Don't declare.
7879         (symfile_complaints): Remove.
7880         (complaint_internal): Remove "complaints" parameter.
7881         (complaint): Likewise.
7882         (clear_complaints): Likewise.
7883         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7884         (reread_symbols): Update.
7885         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7886         (dwarf2_frame_cache, decode_frame_entry): Update.
7887         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7888         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7889         (info_selectors_command): Update.
7890         * macrotab.c (macro_include, check_for_redefinition)
7891         (macro_undef): Update.
7892         * objfiles.c (filter_overlapping_sections): Update.
7893         * stabsread.c (invalid_cpp_abbrev_complaint)
7894         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7895         (define_symbol, error_type, read_type, rs6000_builtin_type)
7896         (stabs_method_name_from_physname, read_member_functions)
7897         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7898         (attach_fields_to_type, complain_about_struct_wipeout)
7899         (read_range_type, read_args, common_block_start)
7900         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7901         Update.
7902         * mdebugread.c (index_complaint, unknown_ext_complaint)
7903         (basic_type_complaint, bad_tag_guess_complaint)
7904         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7905         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7906         (parse_procedure, parse_lines)
7907         (function_outside_compilation_unit_complaint)
7908         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7909         (bad_tag_guess_complaint, reg_value_complaint): Update.
7910         * cp-support.c (demangled_name_complaint): Update.
7911         * macroscope.c (sal_macro_scope): Update.
7912         * dwarf-index-write.c (class debug_names): Update.
7913
7914 2018-05-23  Tom Tromey  <tom@tromey.com>
7915
7916         * complaints.c (clear_complaints): Remove "noisy" parameter.
7917         * complaints.h (clear_complaints): Update.
7918         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7919         (reread_symbols): Update.
7920
7921 2018-05-23  Tom Tromey  <tom@tromey.com>
7922
7923         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7924         SUBSEQUENT_MESSAGE.
7925         (vcomplaint, clear_complaints): Update.
7926         (symfile_explanations): Remove some messages.
7927
7928 2018-05-23  Tom Tromey  <tom@tromey.com>
7929
7930         * complaints.c (internal_complaint): Remove.
7931         * complaints.h (internal_complaint): Remove.
7932
7933 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7934
7935         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7936
7937 2018-05-22  Pedro Alves  <palves@redhat.com>
7938
7939         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7940         (remote_fileio_badfd, remote_fileio_return_errno)
7941         (remote_fileio_return_success, remote_fileio_func_open)
7942         (remote_fileio_func_open, remote_fileio_func_close)
7943         (remote_fileio_func_read, remote_fileio_func_write)
7944         (remote_fileio_func_lseek, remote_fileio_func_rename)
7945         (remote_fileio_func_unlink, remote_fileio_func_stat)
7946         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7947         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7948         remote_target parameter.
7949         (remote_fio_func_map) <func>: Add remote_target parameter.
7950         (do_remote_fileio_request, remote_fileio_request):
7951         * remote-fileio.h (remote_fileio_request):
7952         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7953         remote_target parameter.
7954         (remote_notif_process, handle_notification): Adjust to pass down
7955         the remote.
7956         (remote_notif_state_allocate): Add remote_target parameter.  Save
7957         it.
7958         * remote-notif.h (struct remote_target): Forward declare.
7959         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7960         remote_target parameter.
7961         (struct remote_notif_state) <remote>: New field.
7962         (remote_notif_ack, remote_notif_parse): Add remote_target
7963         parameter.
7964         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7965         remote_target parameter.
7966         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7967         (threads_listing_context, rmt_thread_action, protocol_feature)
7968         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7969         (packet_result, struct threads_listing_context, remote_state):
7970         Move definitions and declarations higher up.
7971         (remote_target) <~remote_target>: Declare.
7972         (remote_download_command_source, remote_file_put, remote_file_get)
7973         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7974         (remote_hostio_pread_vFile, remote_hostio_send_command)
7975         (remote_hostio_set_filesystem, remote_hostio_open)
7976         (remote_hostio_close, remote_hostio_unlink, remote_state)
7977         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7978         (get_memory_write_packet_size, get_memory_read_packet_size)
7979         (append_pending_thread_resumptions, remote_detach_1)
7980         (append_resumption, remote_resume_with_vcont)
7981         (add_current_inferior_and_thread, wait_ns, wait_as)
7982         (process_stop_reply, remote_notice_new_inferior)
7983         (process_initial_stop_replies, remote_add_thread)
7984         (btrace_sync_conf, remote_btrace_maybe_reopen)
7985         (remove_new_fork_children, kill_new_fork_children)
7986         (discard_pending_stop_replies, stop_reply_queue_length)
7987         (check_pending_events_prevent_wildcard_vcont)
7988         (discard_pending_stop_replies_in_queue, stop_reply)
7989         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7990         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7991         (remote_interrupt_as, remote_interrupt_ns)
7992         (remote_get_noisy_reply, remote_query_attached)
7993         (remote_add_inferior, remote_current_thread, get_current_thread)
7994         (set_thread, set_general_thread, set_continue_thread)
7995         (set_general_process, write_ptid)
7996         (remote_unpack_thread_info_response, remote_get_threadinfo)
7997         (parse_threadlist_response, remote_get_threadlist)
7998         (remote_threadlist_iterator, remote_get_threads_with_ql)
7999         (remote_get_threads_with_qxfer)
8000         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8001         (get_offsets, remote_check_symbols, remote_supported_packet)
8002         (remote_query_supported, remote_packet_size)
8003         (remote_serial_quit_handler, remote_detach_pid)
8004         (remote_vcont_probe, remote_resume_with_hc)
8005         (send_interrupt_sequence, interrupt_query)
8006         (remote_notif_get_pending_events, fetch_register_using_p)
8007         (send_g_packet, process_g_packet, fetch_registers_using_g)
8008         (store_register_using_P, store_registers_using_G)
8009         (set_remote_traceframe, check_binary_download)
8010         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8011         (remote_xfer_live_readonly_partial, remote_read_bytes)
8012         (remote_send_printf, remote_flash_write, readchar)
8013         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8014         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8015         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8016         (extended_remote_disable_randomization, extended_remote_run)
8017         (send_environment_packet, extended_remote_environment_support)
8018         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8019         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8020         (packet_command): Now methods of ...
8021         (remote_target): ... this class.
8022         (m_remote_state) <remote_target>: New field.
8023         (struct remote_state) <stop_reply_queue,
8024         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8025         fields.
8026         (remote_state::remote_state): Allocate stop_reply_queue.
8027         (remote_state): Delete global.
8028         (get_remote_state_raw): Delete.
8029         (remote_target::get_remote_state): Allocate m_remote_state on
8030         demand.
8031         (get_current_remote_target): New.
8032         (remote_ops, extended_remote_ops): Delete.
8033         (wait_forever_enabled_p, remote_async_inferior_event_token):
8034         Delete, moved to struct remote_state.
8035         (remote_target::close): Delete self.  Destruction bits split to
8036         ...
8037         (remote_target::~remote_target): ... this.
8038         (show_memory_packet_size): Adjust to use
8039         get_current_remote_target.
8040         (struct protocol_feature) <func>: Add remote_target parameter.
8041         All callers adjusted.
8042         (curr_quit_handler_target): New.
8043         (remote_serial_quit_handler): Reimplement.
8044         (remote_target::open_1): Adjust to use get_current_remote_target.
8045         Heap-allocate remote_target/extended_remote_target instances.
8046         (vcont_builder::vcont_builder): Add remote_target parameter, and
8047         save it in m_remote.  All callers adjusted.
8048         (vcont_builder::m_remote): New field.
8049         (vcont_builder::restart, vcont_builder::flush)
8050         (vcont_builder::push_action): Use it.
8051         (remote_target::commit_resume): Use it.
8052         (struct queue_iter_param) <remote>: New field.
8053         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8054         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8055         (check_pending_event_prevents_wildcard_vcont_callback)
8056         (remote_target::check_pending_events_prevent_wildcard_vcont)
8057         (remote_target::discard_pending_stop_replies)
8058         (remote_target::discard_pending_stop_replies_in_queue)
8059         (remote_target::remote_notif_remove_queued_reply): Fill in
8060         'remote' field.
8061         (remote_notif_get_pending_events): New.
8062         (remote_target::readchar, remote_target::remote_serial_write):
8063         Save/restore curr_quit_handler_target.
8064         (putpkt): New.
8065         (kill_new_fork_children): Fill in 'remote' field.
8066         (packet_command): Use get_current_remote_target, defer to
8067         remote_target method of same name.
8068         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8069         parameter, and save it in m_remote.  All callers adjusted.
8070         (scoped_remote_fd::release): Use m_remote.
8071         (scoped_remote_fd::m_remote): New field.
8072         (remote_file_put, remote_file_get, remote_file_delete): Use
8073         get_current_remote_target, defer to remote_target method of same
8074         name.
8075         (remote_btrace_reset): Add remote_state paremeter.  Update all
8076         callers.
8077         (remote_async_inferior_event_handler). Pass down 'data'.
8078         (remote_new_objfile): Use get_current_remote_target.
8079         (remote_target::vcont_r_supported): New.
8080         (set_range_stepping): Use get_current_remote_target and
8081         remote_target::vcont_r_supported.
8082         (_initialize_remote): Don't allocate 'remote_state' and
8083         'stop_reply_queue' globals.
8084         * remote.h (struct remote_target): Forward declare.
8085         (getpkt, putpkt, remote_notif_get_pending_events): Add
8086         'remote_target' parameter.
8087
8088 2018-05-22  Pedro Alves  <palves@redhat.com>
8089
8090         * remote.c (vcont_builder): Now a class.  Make all data members
8091         private.
8092         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8093         Declare methods.
8094         (vcont_builder_restart): Rename to ...
8095         (vcont_builder::restart): ... this.
8096         (vcont_builder_flush): Rename to ...
8097         (vcont_builder::flush): ... this.
8098         (vcont_builder_push_action): Rename to ...
8099         (vcont_builder::push_action): ... this.
8100         (remote_target::commit_resume): Adjust.
8101
8102 2018-05-22  Pedro Alves  <palves@redhat.com>
8103
8104         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8105         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8106         (get_fixed_memory_packet_size): New.
8107         (get_memory_packet_size): Use it.
8108         (set_memory_packet_size): Don't override the config size with
8109         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8110         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8111         Don't refer to get_memory_packet_size if not connected to a remote
8112         target.  Show "(default)" if configured size is 0.
8113
8114 2018-05-22  Pedro Alves  <palves@redhat.com>
8115
8116         * remote.c (remote_target::mourn_inferior): Move
8117         discard_pending_stop_replies call here from ...
8118         (_initialize_remote): ... here.
8119
8120 2018-05-22  Pedro Alves  <palves@redhat.com>
8121
8122         * remote.c (compare_section_command): Remove set_general_process
8123         call.
8124
8125 2018-05-22  Pedro Alves  <palves@redhat.com>
8126
8127         * remote.c (struct packet_reg, struct remote_arch_state):
8128         Move higher up in the file.
8129         (remote_state) <m_arch_states>: Store remote_arch_state values
8130         instead of remote_arch_state pointers.
8131         (remote_state::get_remote_arch_state): Adjust.
8132
8133 2018-05-22  Pedro Alves  <palves@redhat.com>
8134
8135         * remote.c: Include <unordered_map>.
8136         (remote_state): Now a class.
8137         (remote_state) <get_remote_arch_state>: Declare method.
8138         <get_remote_arch_state>: New field.
8139         (remote_arch_state) <remote_arch_state>: Declare ctor.
8140         <regs>: Now a unique_ptr.
8141         (remote_gdbarch_data_handle): Delete.
8142         (get_remote_arch_state): Delete.
8143         (remote_state::get_remote_arch_state): New.
8144         (get_remote_state): Adjust to call remote_state's
8145         get_remote_arch_state method.
8146         (init_remote_state): Delete, bits factored out to ...
8147         (remote_arch_state::remote_arch_state): ... this new method.
8148         (get_remote_packet_size, get_memory_packet_size)
8149         (process_g_packet, remote_target::fetch_registers)
8150         (remote_target::prepare_to_store, store_registers_using_G)
8151         (remote_target::store_registers, remote_target::get_trace_status):
8152         Adjust to call remote_state's method.
8153         (_initialize_remote): Remove reference to
8154         remote_gdbarch_data_handle.
8155
8156 2018-05-22  Pedro Alves  <palves@redhat.com>
8157
8158         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8159         pread>: New method declarations.
8160         (remote_target::open_1): Adjust.
8161         (readahead_cache_invalidate): Rename to ...
8162         (readahead_cache::invalidate): ... this, and adjust to be a class
8163         method.
8164         (readahead_cache_invalidate_fd): Rename to ...
8165         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8166         class method.
8167         (remote_hostio_pwrite): Adjust.
8168         (remote_hostio_pread_from_cache): Rename to ...
8169         (readahead_cache::pread): ... this, and adjust to be a class
8170         method.
8171         (remote_hostio_close): Adjust.
8172
8173 2018-05-22  Pedro Alves  <palves@redhat.com>
8174
8175         * remote.c (remote_hostio_close_cleanup): Delete.
8176         (class scoped_remote_fd): New.
8177         (remote_file_put, remote_file_get): Use it.
8178
8179 2018-05-22  Pedro Alves  <palves@redhat.com>
8180
8181         (struct vCont_action_support): Use bool and initialize all fields.
8182         (struct readahead_cache): Initialize all fields.
8183         (remote_state): Use bool and initialize all fields.
8184         (remote_state::remote_state, remote_state::~remote_state): New.
8185         (new_remote_state): Delete.
8186         (_initialize_remote): Use new to allocate remote_state.
8187
8188 2018-05-22  Pedro Alves  <palves@redhat.com>
8189             張俊芝  <zjz@zjz.name>
8190
8191         PR gdb/22973
8192         * c-exp.y: Include "c-support.h".
8193         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8194         of tolower.  Use c_ident_is_alpha to scan names.
8195         * c-lang.c: Include "c-support.h".
8196         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8197         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8198         * c-support.h: New file, with bits factored out from ...
8199         * cp-name-parser.y: ... this file.
8200         Include "c-support.h".
8201         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8202         c-support.h and renamed.
8203         (symbol_end, yylex): Adjust.
8204
8205 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8206
8207         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8208         parameter type to CORE_ADDR.
8209         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8210         parameter type in declaration to CORE_ADDR.
8211         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8212         target_auxv_search to get AT_HWCAP and use the result to get the
8213         target description.
8214         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8215         to CORE_ADDR. Remove the cast of the return value to unsigned
8216         long. Fix error predicate of target_auxv_search.
8217         (ppc_linux_nat_target::read_description): Change the type of the
8218         hwcap variable to CORE_ADDR.
8219
8220 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8221
8222         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8223         if the size of fpscr is larger than 32 bits.
8224
8225 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8226
8227         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8228         (ppc32_linux_vsxregmap): New global.
8229         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8230         regcache_supply_regset, and regcache_collect_regset.
8231         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8232         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8233         (fetch_vsx_register, store_vsx_register): Remove.
8234         (fetch_vsx_registers): Add regno parameter. Get regset using
8235         ppc_linux_vsxregset. Use regset to supply registers.
8236         (store_vsx_registers): Add regno parameter. Get regset using
8237         ppc_linux_vsxregset. Use regset to collect registers.
8238         (fetch_register): Call fetch_vsx_registers instead of
8239         fetch_vsx_register.
8240         (store_register): Call store_vsx_registers instead of
8241         store_vsx_register.
8242         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8243         new regno parameter.
8244         (store_ppc_registers): Call store_vsx_registers with -1 for the
8245         new regno parameter.
8246         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8247         (ppc_collect_vsxregset): Remove.
8248
8249 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8250
8251         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8252         offset fields.
8253         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8254         for vector register offset fields.
8255         (ppc64_fbsd_reg_offsets): Likewise.
8256         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8257         to vector register offset fields.
8258         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8259         to vector register offset fields.
8260         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8261         vector register offset fields.
8262         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8263         initializers for vector register offset fields.
8264         (rs6000_aix64_reg_offsets): Likewise.
8265         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8266         (ppc_supply_vrregset): Remove.
8267         (ppc_collect_vrregset): Remove.
8268         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8269         (ppc_linux_vrregset) : New function.
8270         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8271         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8272         (ppc32_linux_vrregset): Remove.
8273         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8274         and use result instead of ppc32_linux_vrregset.
8275         (ppc32_linux_reg_offsets): Remove initializers for vector register
8276         offset fields.
8277         (ppc64_linux_reg_offsets): Likewise.
8278         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8279         * ppc-linux-nat.c: Include regset.h.
8280         (gdb_vrregset_t): Adjust comment to account for little-endian
8281         mode.
8282         (supply_vrregset, fill_vrregset): Remove.
8283         (fetch_altivec_register, store_altivec_register): Remove.
8284         (fetch_altivec_registers): Add regno parameter. Get regset using
8285         ppc_linux_vrregset. Use regset to supply registers.
8286         (store_altivec_registers): Add regno parameter. Get regset using
8287         ppc_linux_vrregset. Use regset to collect registers.
8288         (fetch_register): Call fetch_altivec_registers instead of
8289         fetch_altivec_register.
8290         (store_register): Call store_altivec_registers instead of
8291         store_altivec_register.
8292         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8293         the new regno parameter.
8294         (store_ppc_registers): Call store_altivec_registers with -1 for
8295         the new regno parameter.
8296
8297 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8298
8299         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8300         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8301         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8302         (gdb_vrregset_t): Change array type size to
8303         PPC_LINUX_SIZEOF_VRREGSET.
8304         (gdb_vsxregset_t): Change array type size to
8305         PPC_LINUX_SIZEOF_VSXREGSET.
8306         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8307         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8308         PPC_LINUX_SIZEOF_VSXREGSET.
8309
8310 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8311
8312         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8313         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8314         nat/ppc-linux.c.
8315         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8316         ppc_linux_target_wordsize with tid.
8317         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8318         wordsize with tid.
8319         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8320         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8321         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8322         tid parameter. Remove static specifier.
8323         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8324         (ppc_linux_target_wordsize): New declaration.
8325
8326 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8327
8328         * arch/ppc-linux-common.c: New file.
8329         * arch/ppc-linux-common.h: New file.
8330         * arch/ppc-linux-tdesc.h: New file.
8331         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8332         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8333         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8334         arch/ppc-linux-tdesc.h.
8335         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8336         arch/ppc-linux-tdesc.h.
8337         (ppc_linux_nat_target::read_description): Remove target
8338         description matching code. Fill a ppc_linux_features struct and
8339         call ppc_linux_match_description with it. Move comment about ISA
8340         2.05 to ppc-linux-common.c.
8341         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8342         arch/ppc-linux-tdesc.h.
8343         (ppc_linux_core_read_description): Remove target description
8344         matching code. Fill a ppc_linux_features struct and call
8345         ppc_linux_match_description with it.
8346         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8347         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8348         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8349         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8350         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8351         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8352         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8353         (tdesc_powerpc_e500l): Remove.
8354
8355 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8356
8357         * ada-lang.c (catch_assert_command): Pass empty string instead
8358         of NULL for excep_string argument.
8359
8360 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8361
8362         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8363         the width of the requested register exceeds the width of the
8364         `ptrace' data type.
8365
8366 2018-05-21  Tom Tromey  <tom@tromey.com>
8367
8368         * printcmd.c (output_command): Remove.
8369         (output_command_const): Rename to output_command.
8370         * valprint.h (output_command): Rename from output_command_const.
8371         * tracepoint.c (trace_dump_actions): Call output_command.
8372
8373 2018-05-21  Tom Tromey  <tom@tromey.com>
8374
8375         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8376         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8377         * ada-lang.h (create_ada_exception_catchpoint): Update.
8378         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8379         std::string.
8380         (create_excep_cond_exprs, ~ada_catchpoint)
8381         (should_stop_exception, print_one_exception)
8382         (print_mention_exception, print_recreate_exception): Update.
8383         (ada_get_next_arg): Remove.
8384         (catch_ada_exception_command_split): Use std::string.  Change type
8385         of "excep_string", "cond_string".
8386         (catch_ada_exception_command): Update.
8387         (create_ada_exception_catchpoint): Change type of excep_string.
8388         (ada_exception_sal): Remove excep_string parameter.
8389         (~ada_catchpoint): Remove.
8390
8391 2018-05-21  Tom Tromey  <tom@tromey.com>
8392
8393         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8394         cleanup.
8395
8396 2018-05-21  Tom Tromey  <tom@tromey.com>
8397
8398         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8399         Return unique_xmalloc_ptr.
8400         (print_it_exception): Update.
8401
8402 2018-05-21  Tom Tromey  <tom@tromey.com>
8403
8404         * tracepoint.c (trace_dump_actions): Use std::string.
8405
8406 2018-05-21  Tom Tromey  <tom@tromey.com>
8407
8408         * symfile.c (reread_symbols): Use std::string for original_name.
8409
8410 2018-05-21  Tom Tromey  <tom@tromey.com>
8411
8412         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8413         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8414         constructor.
8415
8416 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8417
8418         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8419         instance to...
8420         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8421         * objfiles.c (get_objfile_bfd_data): Allocate
8422         objfile_per_bfd_storage with obstack_new when allocating on
8423         obstack.
8424
8425 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8426
8427         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8428         OBSTACK_ZALLOC.
8429         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8430         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8431         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8432         (add_pending): Likewise.
8433         (parse_symbol): Likewise.
8434         (parse_partial_symbols): Likewise.
8435         (psymtab_to_symtab_1): Likewise.
8436         (new_psymtab): Likewise.
8437         (elfmdebug_build_psymtabs): Likewise.
8438         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8439         * objfiles.c (get_objfile_bfd_data): Likewise.
8440         (objfile_register_static_link): Likewise.
8441         * psymtab.c (allocate_psymtab): Likewise.
8442         * stabsread.c (read_member_functions): Likewise.
8443         * xcoffread.c (xcoff_end_psymtab): Likewise.
8444
8445 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8446
8447         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8448         compiler supports std::is_trivially_constructible.
8449         * common/poison.h: Include obstack.h.
8450         (IsMallocable): Define to is_trivially_constructible if the
8451         compiler supports it, define to true_type otherwise.
8452         (xobnew): New.
8453         (XOBNEW): Redefine.
8454         (xobnewvec): New.
8455         (XOBNEWVEC): Redefine.
8456         * gdb_obstack.h (obstack_zalloc): New.
8457         (OBSTACK_ZALLOC): Redefine.
8458         (obstack_calloc): New.
8459         (OBSTACK_CALLOC): Redefine.
8460         (obstack_new): New.
8461         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8462         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8463         gdbarch.c.
8464         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8465         obstack_calloc/obstack_zalloc.
8466         (gdbarch_obstack_zalloc): Remove.
8467         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8468
8469 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8470
8471         * stack.c (backtrace_command_1): Remove useless variable int i.
8472
8473 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8474
8475         * stack.c (print_frame_info): Fix comment.
8476
8477 2018-05-18  Tom Tromey  <tom@tromey.com>
8478
8479         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8480         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8481         (~dwarf2_per_objfile): Update
8482         (dwarf2_get_dwz_file): Use new.
8483         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8484         unique_ptr.
8485
8486 2018-05-18  Tom Tromey  <tom@tromey.com>
8487
8488         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8489         unique_ptr.
8490         * dwarf2read.c (struct dwp_file): Add constructor and
8491         initializers.
8492         (open_and_init_dwp_file): Return a unique_ptr.
8493         (dwarf2_per_objfile, create_dwp_hash_table)
8494         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8495         (lookup_dwo_unit_in_dwp): Update.
8496         (open_and_init_dwp_file, get_dwp_file): Update.
8497
8498 2018-05-18  Tom Tromey  <tom@tromey.com>
8499
8500         * dwarf2read.c (dwarf2_per_objfile): Update.
8501         (struct mapped_index): Add initializers.
8502         (dwarf2_read_index): Use new.
8503         (dw2_symtab_iter_init): Update.
8504         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8505         unique_ptr.
8506
8507 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8508
8509         * dwarf2read.c (mapped_index) <total_size>: Remove.
8510
8511 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8512
8513         * unittests/format_pieces-selftests.c (test_format_specifier):
8514         Add ARI comments.
8515
8516 2018-05-18  Tom Tromey  <tom@tromey.com>
8517
8518         * c-typeprint.c (maybe_print_hole): New function.
8519         (c_print_type_struct_field_offset): Update.
8520         (c_type_print_base_struct_union): Call maybe_print_hole.
8521
8522 2018-05-17  Keith Seitz  <keiths@redhat.com>
8523
8524         * breakpoint.c (build_bpstat_chain): New function, moved from
8525         bpstat_stop_status.
8526         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8527         If no stop chain is passed, call build_bpstat_chain to build it.
8528         * breakpoint.h (build_bpstat_chain): Declare.
8529         (bpstat_stop_status): Move documentation here from breakpoint.c.
8530         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8531         build the stop chain and pass it to skip_inline_frames.
8532         Pass this stop chain to bpstat_stop_status.
8533         * inline-frame.c: Include breakpoint.h.
8534         (stopped_by_user_bp_inline_frame): New function.
8535         (skip_inline_frames): Add parameter `stop_chain'.
8536         Move documention to inline-frame.h.
8537         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8538         whether the frame should be elided.
8539         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8540         Add moved documentation and update for new parameter.
8541
8542 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8543
8544         PR cli/14975
8545         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8546         unittests/format_pieces-selftests.c.
8547         * common/format.h (format_piece) <operator==>: New.
8548         (format_pieces) <operator[]>: Remove.
8549         * common/format.c (format_pieces::format_pieces): Handle \e.
8550         * unittests/format_pieces-selftests.c: New.
8551
8552 2018-05-17  Tom Tromey  <tom@tromey.com>
8553
8554         PR symtab/23010:
8555         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8556         (dw2_instantiate_symtab): Add skip_partial parameter.
8557         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8558         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8559         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8560         (dw2_expand_symtabs_matching_one)
8561         (dw2_find_pc_sect_compunit_symtab)
8562         (dw2_debug_names_lookup_symbol)
8563         (dw2_debug_names_expand_symtabs_for_function): Update.
8564         (init_cutu_and_read_dies): Add skip_partial parameter.
8565         (process_psymtab_comp_unit, build_type_psymtabs_1)
8566         (process_skeletonless_type_unit, load_partial_comp_unit)
8567         (psymtab_to_symtab_1): Update.
8568         (load_full_comp_unit): Add skip_partial parameter.
8569         (process_imported_unit_die, dwarf2_read_addr_index)
8570         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8571         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8572         (read_signatured_type): Update.
8573
8574 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8575
8576         * value.c (release_value): Remove unused variable.
8577         (record_latest_value): Likewise.
8578         (access_value_history): Likewise.
8579         (preserve_values): Likewise.
8580
8581 2018-05-17  Tom Tromey  <tom@tromey.com>
8582
8583         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8584         Initialize.
8585
8586 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8587
8588         PR gdb/22286
8589         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8590         Also handle registers whose width is not a multiple of
8591         PTRACE_TYPE_RET.
8592         (linux_nat_trad_target::store_register): Likewise.
8593
8594 2018-05-16  Tom Tromey  <tom@tromey.com>
8595
8596         * gdbcore.h (core_bfd): Redefine.
8597         * corelow.c (core_target::close): Update.
8598         (core_target_open): Update.
8599         * progspace.h (struct program_space) <cbfd>: Now a
8600         gdb_bfd_ref_ptr.
8601
8602 2018-05-16  Tom Tromey  <tom@tromey.com>
8603
8604         PR cli/19551:
8605         * symfile-add-flags.h (enum symfile_add_flags)
8606         <SYMFILE_NOT_FILENAME>: New constant.
8607         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8608         objfile name from BFD.
8609         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8610         * minidebug.c (find_separate_debug_file_in_section): Put
8611         ".gnu_debugdata" into BFD's file name.
8612
8613 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8614
8615         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8616         Remove.
8617
8618 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8619
8620         PR binutils/21446
8621         * aarch64-tdep.c (aarch64_analyze_prologue,
8622         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8623         Indicate not interested in errors.
8624
8625 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8626
8627         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8628         Supply the MIPS_ZERO_REGNUM register.
8629
8630 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8631
8632         * mips-tdep.c (mask_address_var): Make variable static.
8633
8634 2018-05-14  Tom Tromey  <tom@tromey.com>
8635
8636         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8637
8638 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8639
8640         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8641         FXSAVE_ADDR for the mxcsr register.
8642
8643 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8644
8645         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8646
8647 2018-05-11  Pedro Alves  <palves@redhat.com>
8648
8649         * corelow.c (core_target) <core_target>: No longer inline.
8650         Initialize m_core_gdbarch, m_core_vec and build the section table
8651         here.
8652         <~core_target>: New.
8653         <core_gdbarch, get_core_register_section>: New methods.
8654         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8655         factored out from ...
8656         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8657         (core_ops): Delete.
8658         (sniff_core_bfd): Add gdbarch parameter.
8659         (core_close): Delete, merged into ...
8660         (core_target::close): ... here.  Delete self.
8661         (core_close_cleanup): Delete.
8662         (core_target_open): Allocate a core_target on the heap.  Use a
8663         unique_ptr instead of a cleanup.  Bits moved into the core_target
8664         ctor.  Adjust to use core_target methods instead of globals.
8665         (get_core_register_section): Rename to ...
8666         (core_target::get_core_register_section): ... this and adjust.
8667         (struct get_core_registers_cb_data): New.
8668         (get_core_registers_cb): Use it.  Use bool.
8669         (core_target::fetch_registers, core_target::files_info)
8670         (core_target::xfer_partial, core_target::read_description)
8671         (core_target::pid_to, core_target::thread_name): Adjust to
8672         reference class fields instead of globals.
8673         * target.h (struct target_ops_deleter, target_ops_up): New.
8674
8675 2018-05-11  Pedro Alves  <palves@redhat.com>
8676
8677         * corefile.c (core_file_command): Move to corelow.c.
8678         * corelow.c (the_core_target): Delete.
8679         (core_file_command): Moved from corefile.c.  Check exec_bfd
8680         instead of the_core_target.  Use target_detach instead of calling
8681         into the_core_target directly.
8682         (maybe_say_no_core_file_now): New.
8683         (core_target::detach): Use it.
8684         (_initialize_corelow): Remove references to the_core_target.
8685         * gdbcore.h (the_core_target): Delete.
8686
8687 2018-05-11  Tom Tromey  <tromey@redhat.com>
8688             Pedro Alves  <palves@redhat.com>
8689
8690         * corefile.c (core_bfd): Remove.
8691         * gdbcore.h (core_bfd): Now a macro.
8692         * progspace.h (struct program_space) <cbfd>: New field.
8693
8694 2018-05-11  Tom Tromey  <tom@tromey.com>
8695
8696         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8697         gdb::def_vector.
8698
8699 2018-05-10  Tom Tromey  <tom@tromey.com>
8700
8701         * configure: Rebuild.
8702         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8703
8704 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8705
8706         PR server/23158:
8707         * regformats/regdat.sh: Adjust script, following the addition
8708         of the new expedite_regs parameter to init_target_desc.
8709
8710 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8711     
8712         PR gdb/23127
8713         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8714         set_gdbarch_significant_addr_bit.
8715         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8716         set_gdbarch_significant_addr_bit.
8717         * utils.c (address_significant): Update to sign extend addr.
8718
8719 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8720
8721         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8722         (xtensa_linux_init_abi): Limit tdep->num_regs by
8723         tdep->num_nopriv_regs.
8724         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8725         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8726         not initialized.
8727
8728 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8729
8730         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8731
8732 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8733
8734         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8735         (I387_MXCSR_INIT_VAL): New constant.
8736         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8737         buffer if it was supplied by the inferior.
8738         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8739         (i387_xsave_get_clear_bv): New function.
8740         (i387_supply_xsave): Only read x87 control registers from the
8741         xsave buffer if the feature is enabled, and the state will have
8742         been written, otherwise, provide a suitable default.
8743         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8744         including x87 control registers.  Update control registers if they
8745         have changed from the default value, and mark features as enabled
8746         as required.
8747         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8748
8749 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8750
8751         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8752
8753 2018-05-07  Tom Tromey  <tom@tromey.com>
8754
8755         * configure: Rebuild.
8756         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8757
8758 2018-05-07  Tom Tromey  <tom@tromey.com>
8759
8760         PR tdep/20362:
8761         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8762         bit.  Use correct value for VDIV.
8763
8764 2018-05-04  Tom Tromey  <tom@tromey.com>
8765
8766         * configure: Rebuild.
8767         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8768
8769 2018-05-04  Tom Tromey  <tom@tromey.com>
8770
8771         * linux-record.c (record_linux_system_call) <case
8772         RECORD_SYS_RECVFROM>: Add "break".
8773
8774 2018-05-04  Tom Tromey  <tom@tromey.com>
8775
8776         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8777         Add missing "break".
8778         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8779         Add missing "break".
8780
8781 2018-05-04  Tom Tromey  <tom@tromey.com>
8782
8783         * rs6000-tdep.c (ppc_process_record_op4)
8784         (ppc_process_record_op63): Add fall-through comment.
8785
8786 2018-05-04  Tom Tromey  <tom@tromey.com>
8787
8788         * i386-tdep.c (i386_process_record): Add fall-through comment.
8789
8790 2018-05-04  Tom Tromey  <tom@tromey.com>
8791
8792         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8793         comment.
8794
8795 2018-05-04  Tom Tromey  <tom@tromey.com>
8796
8797         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8798         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8799         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8800         comment.
8801         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8802         comment.
8803         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8804         comment.
8805
8806 2018-05-04  Tom Tromey  <tom@tromey.com>
8807
8808         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8809
8810 2018-05-04  Tom Tromey  <tom@tromey.com>
8811
8812         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8813         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8814         * symfile.c (section_is_mapped): Fix fall-through comment.
8815         * stabsread.c (define_symbol, read_member_functions): Fix
8816         fall-through comment.
8817         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8818         comment.
8819         * remote.c (remote_wait_as): Fix fall-through comment.
8820         * p-exp.y (yylex): Fix fall-through comment.
8821         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8822         comment.
8823         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8824         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8825         * jv-exp.y (yylex): Fix fall-through comment.
8826         * go-exp.y (lex_one_token): Fix fall-through comment.
8827         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8828         fall-through comment.
8829         * f-exp.y (yylex): Fix fall-through comment.
8830         * dwarf2read.c (process_die): Fix fall-through comments.
8831         * dbxread.c (process_one_symbol): Fix fall-through comment.
8832         * d-exp.y (lex_one_token): Fix fall-through comment.
8833         * cp-name-parser.y (yylex): Fix fall-through comment.
8834         * coffread.c (coff_symtab_read): Fix fall-through comment.
8835         * c-exp.y (lex_one_token): Fix fall-through comment.
8836         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8837         comment.
8838         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8839         comment.
8840
8841 2018-05-04  Tom Tromey  <tom@tromey.com>
8842
8843         PR python/22730:
8844         * NEWS: Mention gdb.execute change.
8845         * gdbcmd.h (execute_control_command): Don't declare.
8846         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8847         execute_control_commands, execute_control_commands_to_string.
8848         * cli/cli-script.h (execute_control_commands)
8849         (execute_control_commands_to_string): Declare.
8850         (execute_control_command): Add from_tty parameter.
8851         * cli/cli-script.c (execute_control_commands)
8852         (execute_control_commands_to_string): New functions.
8853         (execute_user_command): Use execute_control_commands.
8854         (execute_control_command_1): Add "from_tty" parameter.  Update.
8855         (execute_control_command): Likewise.
8856
8857 2018-05-04  Tom Tromey  <tom@tromey.com>
8858
8859         PR python/22731:
8860         * NEWS: Mention that breakpoint commands are writable.
8861         * python/py-breakpoint.c (bppy_set_commands): New function.
8862         (breakpoint_object_getset) <"commands">: Use it.
8863
8864 2018-05-04  Tom Tromey  <tom@tromey.com>
8865
8866         * tracepoint.c (actions_command): Update.
8867         * mi/mi-cmd-break.c (mi_command_line_array)
8868         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8869         (mi_read_next_line): Remove.
8870         (mi_cmd_break_commands): Update.
8871         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8872         function_view.
8873         * cli/cli-script.c (get_command_line): Update.
8874         (process_next_line): Use function_view.  Constify.
8875         (recurse_read_control_structure, read_command_lines)
8876         (read_command_lines_1): Change argument types to function_view.
8877         (do_define_command, document_command): Update.
8878         * breakpoint.h (check_tracepoint_command): Don't declare.
8879         * breakpoint.c (check_tracepoint_command): Remove.
8880         (commands_command_1, create_tracepoint_from_upload): Update.
8881
8882 2018-05-04  Tom Tromey  <tom@tromey.com>
8883
8884         PR gdb/11750:
8885         * cli/cli-script.h (enum command_control_type) <define_control>:
8886         New constant.
8887         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8888         (build_command_line, execute_control_command_1)
8889         (process_next_line): Likewise.
8890         (do_define_command): New function, extracted from define_command.
8891         (define_command): Use it.
8892
8893 2018-05-04  Tom Tromey  <tom@tromey.com>
8894
8895         * tracepoint.c (actions_command): Update.
8896         * cli/cli-script.h (read_command_lines): Update.
8897         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8898         (MAX_TMPBUF): Remove define.
8899         (define_command): Use string_printf.
8900         (document_command): Likewise.
8901         * breakpoint.c (commands_command_1): Update.
8902
8903 2018-05-04  Tom Tromey  <tom@tromey.com>
8904
8905         * top.c (execute_command): Update.
8906         * cli/cli-script.h (print_command_lines): Now varargs.
8907         * cli/cli-script.c (print_command_lines): Now varargs.
8908         (execute_control_command_1) <case while_control, case if_control>:
8909         Update.
8910
8911 2018-05-04  Tom Tromey  <tom@tromey.com>
8912
8913         * tracepoint.c (all_tracepoint_actions): Rename from
8914         all_tracepoint_actions_and_cleanup.  Change return type.
8915         (actions_command, encode_actions_1, encode_actions)
8916         (trace_dump_actions, tdump_command): Update.
8917         * remote.c (remote_download_command_source): Update.
8918         * python/python.c (gdbpy_eval_from_control_command)
8919         (python_command, python_interactive_command): Update.
8920         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8921         * guile/guile.c (guile_command)
8922         (gdbscm_eval_from_control_command, guile_command): Update.
8923         * compile/compile.c (compile_code_command)
8924         (compile_print_command, compile_to_object): Update.
8925         * cli/cli-script.h (struct command_lines_deleter): New.
8926         (counted_command_line): New typedef.
8927         (struct command_line): Add constructor, destructor.
8928         <body_list>: Remove.
8929         <body_list_0, body_list_1>: New members.
8930         (command_line_up): Remove typedef.
8931         (read_command_lines, read_command_lines_1, get_command_line):
8932         Update.
8933         (copy_command_lines): Don't declare.
8934         * cli/cli-script.c (build_command_line): Use "new".
8935         (get_command_line): Return counted_command_line.
8936         (print_command_lines, execute_user_command)
8937         (execute_control_command_1, while_command, if_command): Update.
8938         (realloc_body_list): Remove.
8939         (process_next_line, recurse_read_control_structure): Update.
8940         (read_command_lines, read_command_lines_1): Return counted_command_line.
8941         (free_command_lines): Use "delete".
8942         (copy_command_lines): Remove.
8943         (define_command, document_command, show_user_1): Update.
8944         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8945         a counted_command_line.
8946         * breakpoint.h (counted_command_line): Remove typedef.
8947         (breakpoint_set_commands): Update.
8948         * breakpoint.c (check_no_tracepoint_commands)
8949         (validate_commands_for_breakpoint): Update.
8950         (breakpoint_set_commands): Change commands to be a
8951         counted_command_line.
8952         (commands_command_1, update_dprintf_command_list)
8953         (create_tracepoint_from_upload): Update.
8954
8955 2018-05-04  Tom Tromey  <tom@tromey.com>
8956
8957         * cli/cli-decode.h (cmd_list_element): New constructor.
8958         (~cmd_list_element): New destructor.
8959         (struct cmd_list_element): Add initializers.
8960         * cli/cli-decode.c (do_add_cmd): Use "new".
8961         (delete_cmd): Use "delete".
8962
8963 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8964             Pedro Alves <palves@redhat.com>
8965
8966         PR breakpoints/19806 and support for PR external/20207.
8967         * NEWS: Mention Aarch64 watchpoint improvements.
8968         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8969         watchpoints and PR external/20207 watchpoints.
8970         * nat/aarch64-linux-hw-point.c
8971         (kernel_supports_any_contiguous_range): New.
8972         (aarch64_watchpoint_offset): New.
8973         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8974         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8975         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8976         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8977         next_addr_orig_p.  Support PR external/20207 watchpoints.
8978         (aarch64_downgrade_regs): New.
8979         (aarch64_dr_state_insert_one_point): New parameters offset and
8980         addr_orig.
8981         (aarch64_dr_state_remove_one_point): Likewise.
8982         (aarch64_handle_breakpoint): Update caller.
8983         (aarch64_handle_aligned_watchpoint): Likewise.
8984         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8985         aligned_offset.
8986         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8987         aarch64_downgrade_regs.
8988         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8989         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8990         (DR_CONTROL_MASK): ... this.
8991         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8992         (unsigned int aarch64_watchpoint_offset): New prototype.
8993         (aarch64_linux_set_debug_regs): Remove const from state.
8994         * utils.c (align_up, align_down): Move to ...
8995         * common/common-utils.c (align_up, align_down): ... here.
8996         * utils.h (align_up, align_down): Move to ...
8997         * common/common-utils.h (align_up, align_down): ... here.
8998
8999 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9000
9001         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9002         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9003         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9004         Re-implement to match the ABI as summarized in GCC's
9005         gcc/config/sparc/sparc.c.  All callers updated.
9006         (sparc32_store_arguments): Remove assertion.
9007
9008 2018-05-04  Tom Tromey  <tom@tromey.com>
9009
9010         * printcmd.c: Don't include tui.h.
9011         (decode_format): Use skip_spaces.
9012
9013 2018-05-04  Tom Tromey  <tom@tromey.com>
9014
9015         PR gdb/22619:
9016         * printcmd.c (last_count): New global.
9017         (x_command): Use saved count when repeating.
9018
9019 2018-05-04  Tom Tromey  <tom@tromey.com>
9020
9021         * nto-procfs.c (do_closedir_cleanup): Remove.
9022         (procfs_pidlist): Use gdb_dir_up.
9023         * procfs.c (do_closedir_cleanup): Remove.
9024         (proc_update_threads): Use gdb_dir_up.
9025         * common/filestuff.h (struct gdb_dir_deleter): New.
9026         (gdb_dir_up): New typedef.
9027
9028 2018-05-04  Tom Tromey  <tom@tromey.com>
9029
9030         * ada-lang.c (print_mention_exception): Use std::string.
9031
9032 2018-05-04  Tom Tromey  <tom@tromey.com>
9033
9034         * ada-lang.c (create_excep_cond_exprs): Update.
9035         (ada_exception_catchpoint_cond_string): Use std::string.
9036
9037 2018-05-04  Tom Tromey  <tom@tromey.com>
9038
9039         * ada-lang.c (xget_renaming_scope): Return std::string.
9040         (old_renaming_is_invisible): Update.
9041
9042 2018-05-04  Tom Tromey  <tom@tromey.com>
9043
9044         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9045         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9046
9047 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9048
9049         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9050
9051 2018-05-04  Tom Tromey  <tom@tromey.com>
9052
9053         * remote.c (remote_query_supported_append): Change type.
9054         (remote_check_symbols): Update.
9055
9056 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9057
9058         PR gdb/11420
9059         * configure.ac: Prepend libpython.
9060         * python/python-config.py: Likewise.
9061         * configure: Regenerate.
9062
9063 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9064
9065         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9066
9067 2018-05-03  Pedro Alves  <palves@redhat.com>
9068
9069         * s390-linux-nat.c
9070         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9071         override.  Write 'true' instead of '1'.
9072         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9073         declaration.
9074
9075 2018-05-02  Pedro Alves  <palves@redhat.com>
9076
9077         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9078         add_inf_child_target.
9079         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9080         add_inf_child_target.
9081         * aix-thread.c (aix_thread_target_info): New.
9082         (aix_thread_target) <shortname, longname, doc>: Delete.
9083         <info>: New.
9084         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9085         add_inf_child_target.
9086         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9087         add_inf_child_target.
9088         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9089         add_inf_child_target.
9090         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9091         add_inf_child_target.
9092         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9093         add_inf_child_target.
9094         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9095         add_inf_child_target.
9096         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9097         add_inf_child_target.
9098         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9099         add_inf_child_target.
9100         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9101         add_inf_child_target.
9102         * bfd-target.c (target_bfd_target_info): New.
9103         (target_bfd) <shortname, longname, doc>: Delete.
9104         <info>: New.
9105         * bsd-kvm.c (bsd_kvm_target_info): New.
9106         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9107         <info>: New.
9108         (bsd_kvm_target::open): Rename to ...
9109         (bsd_kvm_target_open): ... this.  Adjust.
9110         * bsd-uthread.c (bsd_uthread_target_info): New.
9111         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9112         <info>: New.
9113         * corefile.c (core_file_command): Adjust.
9114         * corelow.c (core_target_info): New.
9115         (core_target) <shortname, longname, doc>: Delete.
9116         <info>: New.
9117         (core_target::open): Rename to ...
9118         (core_target_open): ... this.  Adjust.
9119         * ctf.c (ctf_target_info): New.
9120         (ctf_target) <shortname, longname, doc>: Delete.
9121         <info>: New.
9122         (ctf_target::open): Rename to ...
9123         (ctf_target_open): ... this.
9124         (_initialize_ctf): Adjust.
9125         * exec.c (exec_target_info): New.
9126         (exec_target) <shortname, longname, doc>: Delete.
9127         <info>: New.
9128         (exec_target::open): Rename to ...
9129         (exec_target_open): ... this.
9130         * gdbcore.h (core_target_open): Declare.
9131         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9132         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9133         add_inf_child_target.
9134         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9135         add_inf_child_target.
9136         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9137         add_inf_child_target.
9138         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9139         add_inf_child_target.
9140         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9141         add_inf_child_target.
9142         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9143         add_inf_child_target.
9144         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9145         add_inf_child_target.
9146         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9147         add_inf_child_target.
9148         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9149         add_inf_child_target.
9150         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9151         add_inf_child_target.
9152         * inf-child.c (inf_child_target_info): New.
9153         (inf_child_target::info): New.
9154         (inf_child_open_target): Remove 'target' parameter.  Use
9155         get_native_target instead.
9156         (inf_child_target::open): Delete.
9157         (add_inf_child_target): New.
9158         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9159         Delete.
9160         <info>: New.
9161         (add_inf_child_target): Declare.
9162         (inf_child_open_target): Declare.
9163         * linux-thread-db.c (thread_db_target_info): New.
9164         (thread_db_target) <shortname, longname, doc>: Delete.
9165         <info>: New.
9166         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9167         add_inf_child_target.
9168         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9169         add_inf_child_target.
9170         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9171         add_inf_child_target.
9172         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9173         add_inf_child_target.
9174         * make-target-delegates (print_class): Adjust.
9175         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9176         add_inf_child_target.
9177         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9178         add_inf_child_target.
9179         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9180         add_inf_child_target.
9181         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9182         add_inf_child_target.
9183         * nto-procfs.c (nto_native_target_info): New.
9184         (nto_procfs_target_native) <shortname, longname, doc>:
9185         Delete.
9186         <info>: New.
9187         (nto_procfs_target_info): New.
9188         (nto_procfs_target_procfs) <shortname, longname, doc>:
9189         Delete.
9190         <info>: New.
9191         (init_procfs_targets): Adjust.
9192         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9193         add_inf_child_target.
9194         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9195         add_inf_child_target.
9196         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9197         add_inf_child_target.
9198         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9199         add_inf_child_target.
9200         * ravenscar-thread.c (ravenscar_target_info): New.
9201         (ravenscar_thread_target) <shortname, longname, doc>:
9202         Delete.
9203         <info>: New.
9204         * record-btrace.c (record_btrace_target_info):
9205         (record_btrace_target) <shortname, longname, doc>: Delete.
9206         <info>: New.
9207         (record_btrace_target::open): Rename to ...
9208         (record_btrace_target_open): ... this.  Adjust.
9209         * record-full.c (record_longname, record_doc): New.
9210         (record_full_base_target) <shortname, longname, doc>: Delete.
9211         <info>: New.
9212         (record_full_target_info): New.
9213         (record_full_target): <shortname>: Delete.
9214         <info>: New.
9215         (record_full_core_open_1, record_full_open_1): Update comments.
9216         (record_full_base_target::open): Rename to ...
9217         (record_full_open): ... this.
9218         (cmd_record_full_restore): Update.
9219         (_initialize_record_full): Update.
9220         * remote-sim.c (remote_sim_target_info): New.
9221         (gdbsim_target) <shortname, longname, doc>: Delete.
9222         <info>: New.
9223         (gdbsim_target::open): Rename to ...
9224         (gdbsim_target_open): ... this.
9225         (_initialize_remote_sim): Adjust.
9226         * remote.c (remote_doc): New.
9227         (remote_target_info): New.
9228         (remote_target) <shortname, longname, doc>: Delete.
9229         <info>: New.
9230         (extended_remote_target_info): New.
9231         (extended_remote_target) <shortname, longname, doc>: Delete.
9232         <info>: New.
9233         (remote_target::open_1): Make static.  Adjust.
9234         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9235         * s390-linux-nat.c (_initialize_s390_nat): Use
9236         add_inf_child_target.
9237         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9238         add_inf_child_target.
9239         * sol-thread.c (thread_db_target_info): New.
9240         (sol_thread_target) <shortname, longname, doc>: Delete.
9241         <info>: New.
9242         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9243         add_inf_child_target.
9244         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9245         add_inf_child_target.
9246         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9247         add_inf_child_target.
9248         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9249         add_inf_child_target.
9250         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9251         add_inf_child_target.
9252         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9253         add_inf_child_target.
9254         * spu-linux-nat.c (_initialize_spu_nat): Use
9255         add_inf_child_target.
9256         * spu-multiarch.c (spu_multiarch_target_info): New.
9257         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9258         <info>: New.
9259         * target-delegates.c: Regenerate.
9260         * target.c: Include <unordered_map>.
9261         (target_ops_p): Delete.
9262         (DEF_VEC_P(target_ops_p)): Delete.
9263         (target_factories): New.
9264         (test_target_info): New.
9265         (test_target_ops::info): New.
9266         (open_target): Adjust to use target_factories.
9267         (add_target_with_completer): Rename to ...
9268         (add_target): ... this.  Change prototype.  Register target_info
9269         and open callback in target_factories.  Register target_info in
9270         command context instead of target_ops.
9271         (add_target): Delete old implementation.
9272         (add_deprecated_target_alias): Change prototype.  Adjust.
9273         (the_native_target): New.
9274         (set_native_target, get_native_target): New.
9275         (find_default_run_target): Use the_native_target.
9276         (find_attach_target, find_run_target): Simplify.
9277         (target_ops::open): Delete.
9278         (dummy_target_info): New.
9279         (dummy_target::shortname, dummy_target::longname)
9280         (dummy_target::doc): Delete.
9281         (dummy_target::info): New.
9282         (debug_target::shortname, debug_target::longname)
9283         (debug_target::doc): Delete.
9284         (debug_target::info): New.
9285         * target.h (struct target_info): New.
9286         (target_ops::~target_ops): Add comment.
9287         (target_ops::info): New.
9288         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9289         longer virtual.  Implement in terms of target_info.
9290         (set_native_target, get_native_target): Declare.
9291         (target_open_ftype): New.
9292         (add_target, add_target_with_completer)
9293         (add_deprecated_target_alias): Change prototype.
9294         (test_target) <shortname, longname, doc>: Delete.
9295         <info>: New.
9296         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9297         add_inf_child_target.
9298         * tracefile-tfile.c (tfile_target_info): New.
9299         (tfile_target) <shortname, longname, doc>: Delete.
9300         <info>: New.
9301         (tfile_target::open): Rename to ...
9302         (tfile_target_open): ... this.
9303         (_initialize_tracefile_tfile): Adjust.
9304         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9305         add_inf_child_target.
9306         * windows-nat.c (_initialize_windows_nat): Use
9307         add_inf_child_target.
9308         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9309         add_inf_child_target.
9310
9311 2018-05-02  Pedro Alves  <palves@redhat.com>
9312
9313         * linux-nat.h (linux_nat_target) <low_new_thread,
9314         low_delete_thread, low_new_fork, low_forget_process,
9315         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9316         New virtual methods.
9317         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9318         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9319         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9320         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9321         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9322         Delete.
9323         * linux-fork.c (delete_fork): Adjust to call low method.
9324         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9325         (linux_nat_new_fork, linux_nat_forget_process_hook)
9326         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9327         (linux_nat_status_is_event):
9328         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9329         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9330         to call low method.
9331         (sigtrap_is_event): Rename to ...
9332         (linux_nat_target::low_status_is_event): ... this.
9333         (linux_nat_set_status_is_event): Delete.
9334         (save_stop_reason, linux_nat_wait_1)
9335         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9336         low methods.
9337         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9338         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9339         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9340         (linux_nat_set_prepare_to_resume): Delete.
9341         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9342         low virtual methods.
9343         * amd64-linux-nat.c: Likewise.
9344         * arm-linux-nat.c: Likewise.
9345         * i386-linux-nat.c: Likewise.
9346         * ia64-linux-nat.c: Likewise.
9347         * mips-linux-nat.c: Likewise.
9348         * ppc-linux-nat.c: Likewise.
9349         * s390-linux-nat.c: Likewise.
9350         * sparc64-linux-nat.c: Likewise.
9351         * x86-linux-nat.c: Likewise.
9352         * x86-linux-nat.h: Include "nat/x86-linux.h".
9353         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9354         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9355         Override methods.
9356
9357 2018-05-02  Pedro Alves  <palves@redhat.com>
9358
9359         * target.h (target_ops)
9360         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9361         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9362         stopped_by_watchpoint, have_continuable_watchpoint,
9363         stopped_data_address, watchpoint_addr_within_range,
9364         can_accel_watchpoint_condition, can_run, thread_alive,
9365         has_all_memory, has_memory, has_stack, has_registers,
9366         has_execution, can_async_p, is_async_p, supports_non_stop,
9367         always_non_stop_p, can_execute_reverse, supports_multi_process,
9368         supports_enable_disable_tracepoint,
9369         supports_disable_randomization, supports_string_tracing,
9370         supports_evaluation_of_breakpoint_conditions,
9371         can_run_breakpoint_commands, filesystem_is_local,
9372         can_download_tracepoint, get_trace_state_variable_value,
9373         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9374         record_is_replaying, record_will_replay,
9375         augmented_libraries_svr4_read>: Adjust to return bool.
9376         * aarch64-linux-nat.c: All implementations adjusted.
9377         * aix-thread.c: All implementations adjusted.
9378         * arm-linux-nat.c: All implementations adjusted.
9379         * breakpoint.c: All implementations adjusted.
9380         * bsd-kvm.c: All implementations adjusted.
9381         * bsd-uthread.c: All implementations adjusted.
9382         * corelow.c: All implementations adjusted.
9383         * ctf.c: All implementations adjusted.
9384         * darwin-nat.c: All implementations adjusted.
9385         * darwin-nat.h: All implementations adjusted.
9386         * exec.c: All implementations adjusted.
9387         * fbsd-nat.c: All implementations adjusted.
9388         * fbsd-nat.h: All implementations adjusted.
9389         * gnu-nat.c: All implementations adjusted.
9390         * gnu-nat.h: All implementations adjusted.
9391         * go32-nat.c: All implementations adjusted.
9392         * ia64-linux-nat.c: All implementations adjusted.
9393         * inf-child.c: All implementations adjusted.
9394         * inf-child.h: All implementations adjusted.
9395         * inf-ptrace.c: All implementations adjusted.
9396         * inf-ptrace.h: All implementations adjusted.
9397         * linux-nat.c: All implementations adjusted.
9398         * linux-nat.h: All implementations adjusted.
9399         * mips-linux-nat.c: All implementations adjusted.
9400         * nto-procfs.c: All implementations adjusted.
9401         * ppc-linux-nat.c: All implementations adjusted.
9402         * procfs.c: All implementations adjusted.
9403         * ravenscar-thread.c: All implementations adjusted.
9404         * record-btrace.c: All implementations adjusted.
9405         * record-full.c: All implementations adjusted.
9406         * remote-sim.c: All implementations adjusted.
9407         * remote.c: All implementations adjusted.
9408         * s390-linux-nat.c: All implementations adjusted.
9409         * sol-thread.c: All implementations adjusted.
9410         * spu-multiarch.c: All implementations adjusted.
9411         * target-delegates.c: All implementations adjusted.
9412         * target.c: All implementations adjusted.
9413         * target.h: All implementations adjusted.
9414         * tracefile-tfile.c: All implementations adjusted.
9415         * tracefile.c: All implementations adjusted.
9416         * tracefile.h: All implementations adjusted.
9417         * windows-nat.c: All implementations adjusted.
9418         * x86-linux-nat.h: All implementations adjusted.
9419         * x86-nat.h: All implementations adjusted.
9420
9421 2018-05-02  Pedro Alves  <palves@redhat.com>
9422
9423         * make-target-delegates (scan_target_h): Don't trim lines here.
9424         Replace sequences of tabs and/or whitespace with a single
9425         whitespace.
9426         (top level, parsing methods): Trim each line before processing it
9427         here.
9428
9429 2018-05-02  Pedro Alves  <palves@redhat.com>
9430             John Baldwin  <jhb@freebsd.org>
9431
9432         * target.h (enum strata) <debug_stratum>: New.
9433         (struct target_ops) <all delegation methods>: Replace by C++
9434         virtual methods, and drop "to_" prefix.  All references updated
9435         throughout.
9436         <to_shortname, to_longname, to_doc, to_data,
9437         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9438         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9439         virtual methods.  All references updated throughout.
9440         <can_attach, supports_terminal_ours, can_create_inferior,
9441         get_thread_control_capabilities, attach_no_wait>: New
9442         virtual methods.
9443         <insert_breakpoint, remove_breakpoint>: Now
9444         TARGET_DEFAULT_NORETURN methods.
9445         <info_proc>: Now returns bool.
9446         <to_magic>: Delete.
9447         (OPS_MAGIC): Delete.
9448         (current_target): Delete.  All references replaced by references
9449         to ...
9450         (target_stack): ... this.  New.
9451         (target_shortname, target_longname): Adjust.
9452         (target_can_run): Now a function declaration.
9453         (default_child_has_all_memory, default_child_has_memory)
9454         (default_child_has_stack, default_child_has_registers)
9455         (default_child_has_execution): Remove target_ops parameter.
9456         (complete_target_initialization): Delete.
9457         (memory_breakpoint_target): New template class.
9458         (test_target_ops): Refactor as a C++ class with virtual methods.
9459         * make-target-delegates (NAME_PART): Tighten.
9460         (POINTER_PART, CP_SYMBOL): New.
9461         (SIMPLE_RETURN_PART): Reimplement.
9462         (VEC_RETURN_PART): Expect less.
9463         (RETURN_PART, VIRTUAL_PART): New.
9464         (METHOD): Adjust to C++ virtual methods.
9465         (scan_target_h): Remove reference to C99.
9466         (dname): Output "target_ops::" prefix.
9467         (write_function_header): Adjust to output a C++ class method.
9468         (write_declaration): New.
9469         (write_delegator): Adjust to output a C++ class method.
9470         (tdname): Output "dummy_target::" prefix.
9471         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9472         method.
9473         (tdefault_names, debug_names): Delete.
9474         (return_types, tdefaults, styles, argtypes_array): New.
9475         (top level): All methods are delegators.
9476         (print_class): New.
9477         (top level): Print dummy_target and debug_target classes.
9478         * target-delegates.c: Regenerate.
9479         * target-debug.h (target_debug_print_enum_info_proc_what)
9480         (target_debug_print_thread_control_capabilities)
9481         (target_debug_print_thread_info_p): New.
9482         * target.c (dummy_target): Delete.
9483         (the_dummy_target, the_debug_target): New.
9484         (target_stack): Now extern.
9485         (set_targetdebug): Push/unpush debug target.
9486         (default_child_has_all_memory, default_child_has_memory)
9487         (default_child_has_stack, default_child_has_registers)
9488         (default_child_has_execution): Remove target_ops parameter.
9489         (complete_target_initialization): Delete.
9490         (add_target_with_completer): No longer call
9491         complete_target_initialization.
9492         (target_supports_terminal_ours): Use regular delegation.
9493         (update_current_target): Delete.
9494         (push_target): No longer check magic number.  Don't call
9495         update_current_target.
9496         (unpush_target): Don't call update_current_target.
9497         (target_is_pushed): No longer check magic number.
9498         (target_require_runnable): Skip for all stratums over
9499         process_stratum.
9500         (target_ops::info_proc): New.
9501         (target_info_proc): Use find_target_at and
9502         find_default_run_target.
9503         (target_supports_disable_randomization): Use regular delegation.
9504         (target_get_osdata): Use find_target_at.
9505         (target_ops::open, target_ops::close, target_ops::can_attach)
9506         (target_ops::attach, target_ops::can_create_inferior)
9507         (target_ops::create_inferior, target_ops::can_run)
9508         (target_can_run): New.
9509         (default_fileio_target): Use regular delegation.
9510         (target_ops::fileio_open, target_ops::fileio_pwrite)
9511         (target_ops::fileio_pread, target_ops::fileio_fstat)
9512         (target_ops::fileio_close, target_ops::fileio_unlink)
9513         (target_ops::fileio_readlink): New.
9514         (target_fileio_open_1, target_fileio_unlink)
9515         (target_fileio_readlink): Always call the target method.  Handle
9516         FILEIO_ENOSYS.
9517         (return_zero, return_zero_has_execution): Delete.
9518         (init_dummy_target): Delete.
9519         (dummy_target::dummy_target, dummy_target::shortname)
9520         (dummy_target::longname, dummy_target::doc)
9521         (debug_target::debug_target, debug_target::shortname)
9522         (debug_target::longname, debug_target::doc): New.
9523         (target_supports_delete_record): Use regular delegation.
9524         (setup_target_debug): Delete.
9525         (maintenance_print_target_stack): Skip debug_stratum.
9526         (initialize_targets): Instantiate the_dummy_target and
9527         the_debug_target.
9528         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9529         use target_stack.
9530         (target_auxv_search, fprint_target_auxv): Adjust.
9531         (info_auxv_command): Adjust to use target_stack.
9532         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9533         * exceptions.c (print_flush): Handle a NULL target_stack.
9534         * regcache.c (target_ops_no_register): Refactor as class with
9535         virtual methods.
9536
9537         * exec.c (exec_target): New class.
9538         (exec_ops): Now an exec_target.
9539         (exec_open, exec_close_1, exec_get_section_table)
9540         (exec_xfer_partial, exec_files_info, exec_has_memory)
9541         (exec_make_note_section): Refactor as exec_target methods.
9542         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9543         Delete.
9544         (exec_target::find_memory_regions): New.
9545         (_initialize_exec): Don't call init_exec_ops.
9546         * gdbcore.h (exec_file_clear): Delete.
9547
9548         * corefile.c (core_target): Delete.
9549         (core_file_command): Adjust.
9550         * corelow.c (core_target): New class.
9551         (the_core_target): New.
9552         (core_close): Remove target_ops parameter.
9553         (core_close_cleanup): Adjust.
9554         (core_target::close): New.
9555         (core_open, core_detach, get_core_registers, core_files_info)
9556         (core_xfer_partial, core_thread_alive, core_read_description)
9557         (core_pid_to_str, core_thread_name, core_has_memory)
9558         (core_has_stack, core_has_registers, core_info_proc): Rework as
9559         core_target methods.
9560         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9561         (_initialize_corelow): Initialize the_core_target.
9562         * gdbcore.h (core_target): Delete.
9563         (the_core_target): New.
9564
9565         * ctf.c: (ctf_target): New class.
9566         (ctf_ops): Now a ctf_target.
9567         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9568         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9569         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9570         methods.
9571         (init_ctf_ops): Delete.
9572         (_initialize_ctf): Don't call it.
9573         * tracefile-tfile.c (tfile_target): New class.
9574         (tfile_ops): Now a tfile_target.
9575         (tfile_open, tfile_close, tfile_files_info)
9576         (tfile_get_tracepoint_status, tfile_trace_find)
9577         (tfile_fetch_registers, tfile_xfer_partial)
9578         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9579         Refactor as tfile_target methods.
9580         (tfile_xfer_partial_features): Remove target_ops parameter.
9581         (init_tfile_ops): Delete.
9582         (_initialize_tracefile_tfile): Don't call it.
9583         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9584         (tracefile_has_stack, tracefile_has_registers)
9585         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9586         tracefile_target methods.
9587         (init_tracefile_ops): Delete.
9588         (tracefile_target::tracefile_target): New.
9589         * tracefile.h: Include "target.h".
9590         (tracefile_target): New class.
9591         (init_tracefile_ops): Delete.
9592
9593         * spu-multiarch.c (spu_multiarch_target): New class.
9594         (spu_ops): Now a spu_multiarch_target.
9595         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9596         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9597         (spu_search_memory, spu_mourn_inferior): Refactor as
9598         spu_multiarch_target methods.
9599         (init_spu_ops): Delete.
9600         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9601         complete_target_initialization.
9602
9603         * ravenscar-thread.c (ravenscar_thread_target): New class.
9604         (ravenscar_ops): Now a ravenscar_thread_target.
9605         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9606         (ravenscar_thread_alive, ravenscar_pid_to_str)
9607         (ravenscar_fetch_registers, ravenscar_store_registers)
9608         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9609         (ravenscar_stopped_by_hw_breakpoint)
9610         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9611         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9612         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9613         methods.
9614         (init_ravenscar_thread_ops): Delete.
9615         (_initialize_ravenscar): Remove references to
9616         init_ravenscar_thread_ops and complete_target_initialization.
9617
9618         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9619         (bsd_uthread_target): New class.
9620         (bsd_uthread_ops): Now a bsd_uthread_target.
9621         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9622         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9623         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9624         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9625         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9626         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9627         (bsd_uthread_target): Delete function.
9628         (_initialize_bsd_uthread): Remove reference to
9629         complete_target_initialization.
9630
9631         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9632         (target_bfd): ... this new class.
9633         (target_bfd_xfer_partial, target_bfd_get_section_table)
9634         (target_bfd_close): Refactor as target_bfd methods.
9635         (target_bfd::~target_bfd): New.
9636         (target_bfd_reopen): Adjust.
9637         (target_bfd::close): New.
9638
9639         * record-btrace.c (record_btrace_target): New class.
9640         (record_btrace_ops): Now a record_btrace_target.
9641         (record_btrace_open, record_btrace_stop_recording)
9642         (record_btrace_disconnect, record_btrace_close)
9643         (record_btrace_async, record_btrace_info)
9644         (record_btrace_insn_history, record_btrace_insn_history_range)
9645         (record_btrace_insn_history_from, record_btrace_call_history)
9646         (record_btrace_call_history_range)
9647         (record_btrace_call_history_from, record_btrace_record_method)
9648         (record_btrace_is_replaying, record_btrace_will_replay)
9649         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9650         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9651         (record_btrace_store_registers, record_btrace_prepare_to_store)
9652         (record_btrace_to_get_unwinder)
9653         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9654         (record_btrace_commit_resume, record_btrace_wait)
9655         (record_btrace_stop, record_btrace_can_execute_reverse)
9656         (record_btrace_stopped_by_sw_breakpoint)
9657         (record_btrace_supports_stopped_by_sw_breakpoint)
9658         (record_btrace_stopped_by_hw_breakpoint)
9659         (record_btrace_supports_stopped_by_hw_breakpoint)
9660         (record_btrace_update_thread_list, record_btrace_thread_alive)
9661         (record_btrace_goto_begin, record_btrace_goto_end)
9662         (record_btrace_goto, record_btrace_stop_replaying_all)
9663         (record_btrace_execution_direction)
9664         (record_btrace_prepare_to_generate_core)
9665         (record_btrace_done_generating_core): Refactor as
9666         record_btrace_target methods.
9667         (init_record_btrace_ops): Delete.
9668         (_initialize_record_btrace): Remove reference to
9669         init_record_btrace_ops.
9670         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9671         the execution_direction global.
9672         (record_full_base_target, record_full_target)
9673         (record_full_core_target): New classes.
9674         (record_full_ops): Now a record_full_target.
9675         (record_full_core_ops): Now a record_full_core_target.
9676         (record_full_target::detach, record_full_target::disconnect)
9677         (record_full_core_target::disconnect)
9678         (record_full_target::mourn_inferior, record_full_target::kill):
9679         New.
9680         (record_full_open, record_full_close, record_full_async): Refactor
9681         as methods of the record_full_base_target class.
9682         (record_full_resume, record_full_commit_resume): Refactor
9683         as methods of the record_full_target class.
9684         (record_full_wait, record_full_stopped_by_watchpoint)
9685         (record_full_stopped_data_address)
9686         (record_full_stopped_by_sw_breakpoint)
9687         (record_full_supports_stopped_by_sw_breakpoint)
9688         (record_full_stopped_by_hw_breakpoint)
9689         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9690         methods of the record_full_base_target class.
9691         (record_full_store_registers, record_full_xfer_partial)
9692         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9693         Refactor as methods of the record_full_target class.
9694         (record_full_can_execute_reverse, record_full_get_bookmark)
9695         (record_full_goto_bookmark, record_full_execution_direction)
9696         (record_full_record_method, record_full_info, record_full_delete)
9697         (record_full_is_replaying, record_full_will_replay)
9698         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9699         (record_full_stop_replaying): Refactor as methods of the
9700         record_full_base_target class.
9701         (record_full_core_resume, record_full_core_kill)
9702         (record_full_core_fetch_registers)
9703         (record_full_core_prepare_to_store)
9704         (record_full_core_store_registers, record_full_core_xfer_partial)
9705         (record_full_core_insert_breakpoint)
9706         (record_full_core_remove_breakpoint)
9707         (record_full_core_has_execution): Refactor
9708         as methods of the record_full_core_target class.
9709         (record_full_base_target::supports_delete_record): New.
9710         (init_record_full_ops): Delete.
9711         (init_record_full_core_ops): Delete.
9712         (record_full_save): Refactor as method of the
9713         record_full_base_target class.
9714         (_initialize_record_full): Remove references to
9715         init_record_full_ops and init_record_full_core_ops.
9716
9717         * remote.c (remote_target, extended_remote_target): New classes.
9718         (remote_ops): Now a remote_target.
9719         (extended_remote_ops): Now an extended_remote_target.
9720         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9721         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9722         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9723         (remote_pass_signals, remote_set_syscall_catchpoint)
9724         (remote_program_signals, )
9725         (remote_thread_always_alive): Remove target_ops parameter.
9726         (remote_thread_alive, remote_thread_name)
9727         (remote_update_thread_list, remote_threads_extra_info)
9728         (remote_static_tracepoint_marker_at)
9729         (remote_static_tracepoint_markers_by_strid)
9730         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9731         (remote_open): Refactor as methods of remote_target.
9732         (extended_remote_open, extended_remote_detach)
9733         (extended_remote_attach, extended_remote_post_attach):
9734         (extended_remote_supports_disable_randomization)
9735         (extended_remote_create_inferior): : Refactor as method of
9736         extended_remote_target.
9737         (remote_set_permissions, remote_open_1, remote_detach)
9738         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9739         (remote_resume, remote_commit_resume, remote_stop)
9740         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9741         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9742         (remote_prepare_to_store, remote_store_registers)
9743         (remote_flash_erase, remote_flash_done, remote_files_info)
9744         (remote_kill, remote_mourn, remote_insert_breakpoint)
9745         (remote_remove_breakpoint, remote_insert_watchpoint)
9746         (remote_watchpoint_addr_within_range)
9747         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9748         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9749         (remote_supports_stopped_by_sw_breakpoint)
9750         (remote_stopped_by_hw_breakpoint)
9751         (remote_supports_stopped_by_hw_breakpoint)
9752         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9753         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9754         (remote_verify_memory): Refactor as methods of remote_target.
9755         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9756         parameter.
9757         (remote_xfer_partial, remote_get_memory_xfer_limit)
9758         (remote_search_memory, remote_rcmd, remote_memory_map)
9759         (remote_pid_to_str, remote_get_thread_local_address)
9760         (remote_get_tib_address, remote_read_description): Refactor as
9761         methods of remote_target.
9762         (remote_target::fileio_open, remote_target::fileio_pwrite)
9763         (remote_target::fileio_pread, remote_target::fileio_close): New.
9764         (remote_hostio_readlink, remote_hostio_fstat)
9765         (remote_filesystem_is_local, remote_can_execute_reverse)
9766         (remote_supports_non_stop, remote_supports_disable_randomization)
9767         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9768         (remote_supports_enable_disable_tracepoint)
9769         (remote_supports_string_tracing)
9770         (remote_can_run_breakpoint_commands, remote_trace_init)
9771         (remote_download_tracepoint, remote_can_download_tracepoint)
9772         (remote_download_trace_state_variable, remote_enable_tracepoint)
9773         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9774         (remote_trace_start, remote_get_trace_status)
9775         (remote_get_tracepoint_status, remote_trace_stop)
9776         (remote_trace_find, remote_get_trace_state_variable_value)
9777         (remote_save_trace_data, remote_get_raw_trace_data)
9778         (remote_set_disconnected_tracing, remote_core_of_thread)
9779         (remote_set_circular_trace_buffer, remote_traceframe_info)
9780         (remote_get_min_fast_tracepoint_insn_len)
9781         (remote_set_trace_buffer_size, remote_set_trace_notes)
9782         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9783         (remote_disable_btrace, remote_teardown_btrace)
9784         (remote_read_btrace, remote_btrace_conf)
9785         (remote_augmented_libraries_svr4_read, remote_load)
9786         (remote_pid_to_exec_file, remote_can_do_single_step)
9787         (remote_execution_direction, remote_thread_handle_to_thread_info):
9788         Refactor as methods of remote_target.
9789         (init_remote_ops, init_extended_remote_ops): Delete.
9790         (remote_can_async_p, remote_is_async_p, remote_async)
9791         (remote_thread_events, remote_upload_tracepoints)
9792         (remote_upload_trace_state_variables): Refactor as methods of
9793         remote_target.
9794         (_initialize_remote): Remove references to init_remote_ops and
9795         init_extended_remote_ops.
9796
9797         * remote-sim.c (gdbsim_target): New class.
9798         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9799         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9800         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9801         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9802         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9803         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9804         Refactor as methods of gdbsim_target.
9805         (gdbsim_ops): Now a gdbsim_target.
9806         (init_gdbsim_ops): Delete.
9807         (gdbsim_cntrl_c): Adjust.
9808         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9809
9810         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9811         (the_amd64_linux_nat_target): New.
9812         (amd64_linux_fetch_inferior_registers)
9813         (amd64_linux_store_inferior_registers): Refactor as methods of
9814         amd64_linux_nat_target.
9815         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9816         * i386-linux-nat.c: Don't include "linux-nat.h".
9817         (i386_linux_nat_target): New class.
9818         (the_i386_linux_nat_target): New.
9819         (i386_linux_fetch_inferior_registers)
9820         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9821         as methods of i386_linux_nat_target.
9822         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9823         * inf-child.c (inf_child_ops): Delete.
9824         (inf_child_fetch_inferior_registers)
9825         (inf_child_store_inferior_registers): Delete.
9826         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9827         methods of inf_child_target.
9828         (inf_child_target::supports_terminal_ours)
9829         (inf_child_target::terminal_init)
9830         (inf_child_target::terminal_inferior)
9831         (inf_child_target::terminal_ours_for_output)
9832         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9833         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9834         New.
9835         (inf_child_open, inf_child_disconnect, inf_child_close)
9836         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9837         (inf_child_post_startup_inferior, inf_child_can_run)
9838         (inf_child_pid_to_exec_file): Refactor as methods of
9839         inf_child_target.
9840         (inf_child_follow_fork): Delete.
9841         (inf_child_target::can_create_inferior)
9842         (inf_child_target::can_attach): New.
9843         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9844         (inf_child_target::has_stack, inf_child_target::has_registers)
9845         (inf_child_target::has_execution): New.
9846         (inf_child_fileio_open, inf_child_fileio_pwrite)
9847         (inf_child_fileio_pread, inf_child_fileio_fstat)
9848         (inf_child_fileio_close, inf_child_fileio_unlink)
9849         (inf_child_fileio_readlink, inf_child_use_agent)
9850         (inf_child_can_use_agent): Refactor as methods of
9851         inf_child_target.
9852         (return_zero, inf_child_target): Delete.
9853         (inf_child_target::inf_child_target): New.
9854         * inf-child.h: Include "target.h".
9855         (inf_child_target): Delete function prototype.
9856         (inf_child_target): New class.
9857         (inf_child_open_target, inf_child_mourn_inferior)
9858         (inf_child_maybe_unpush_target): Delete.
9859         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9860         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9861         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9862         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9863         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9864         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9865         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9866         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9867         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9868         methods of inf_ptrace_target.
9869         (inf_ptrace_target): Delete function.
9870         * inf-ptrace.h: Include "inf-child.h".
9871         (inf_ptrace_target): Delete function declaration.
9872         (inf_ptrace_target): New class.
9873         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9874         * linux-nat.c (linux_target): New.
9875         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9876         (linux_nat_target::~linux_nat_target): New.
9877         (linux_child_post_attach, linux_child_post_startup_inferior)
9878         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9879         (linux_child_remove_fork_catchpoint)
9880         (linux_child_insert_vfork_catchpoint)
9881         (linux_child_remove_vfork_catchpoint)
9882         (linux_child_insert_exec_catchpoint)
9883         (linux_child_remove_exec_catchpoint)
9884         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9885         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9886         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9887         (linux_nat_stopped_data_address)
9888         (linux_nat_stopped_by_sw_breakpoint)
9889         (linux_nat_supports_stopped_by_sw_breakpoint)
9890         (linux_nat_stopped_by_hw_breakpoint)
9891         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9892         (linux_nat_kill, linux_nat_mourn_inferior)
9893         (linux_nat_xfer_partial, linux_nat_thread_alive)
9894         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9895         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9896         (linux_child_static_tracepoint_markers_by_strid)
9897         (linux_nat_is_async_p, linux_nat_can_async_p)
9898         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9899         (linux_nat_supports_multi_process)
9900         (linux_nat_supports_disable_randomization, linux_nat_async)
9901         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9902         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9903         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9904         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9905         methods of linux_nat_target.
9906         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9907         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9908         parameter.
9909         (check_stopped_by_watchpoint): Adjust.
9910         (linux_xfer_partial): Delete.
9911         (linux_target_install_ops, linux_target, linux_nat_add_target):
9912         Delete.
9913         (linux_nat_target::linux_nat_target): New.
9914         * linux-nat.h: Include "inf-ptrace.h".
9915         (linux_nat_target): New.
9916         (linux_target, linux_target_install_ops, linux_nat_add_target):
9917         Delete function declarations.
9918         (linux_target): Declare global.
9919         * linux-thread-db.c (thread_db_target): New.
9920         (thread_db_target::thread_db_target): New.
9921         (thread_db_ops): Delete.
9922         (the_thread_db_target): New.
9923         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9924         (thread_db_update_thread_list, thread_db_pid_to_str)
9925         (thread_db_extra_thread_info)
9926         (thread_db_thread_handle_to_thread_info)
9927         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9928         (thread_db_resume): Refactor as methods of thread_db_target.
9929         (init_thread_db_ops): Delete.
9930         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9931         * x86-linux-nat.c: Don't include "linux-nat.h".
9932         (super_post_startup_inferior): Delete.
9933         (x86_linux_nat_target::~x86_linux_nat_target): New.
9934         (x86_linux_child_post_startup_inferior)
9935         (x86_linux_read_description, x86_linux_enable_btrace)
9936         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9937         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9938         methods of x86_linux_nat_target.
9939         (x86_linux_create_target): Delete.  Bits folded ...
9940         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9941         pointer.
9942         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9943         (x86_linux_nat_target): New class.
9944         (x86_linux_create_target): Delete.
9945         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9946         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9947         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9948         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9949         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9950         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9951         make extern.
9952         (x86_use_watchpoints): Delete.
9953         * x86-nat.h: Include "breakpoint.h" and "target.h".
9954         (x86_use_watchpoints): Delete.
9955         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9956         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9957         (x86_insert_watchpoint, x86_remove_watchpoint)
9958         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9959         (x86_stopped_by_hw_breakpoint): New declarations.
9960         (x86_nat_target): New template class.
9961
9962         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9963         (the_ppc_linux_nat_target): New.
9964         (ppc_linux_fetch_inferior_registers)
9965         (ppc_linux_can_use_hw_breakpoint)
9966         (ppc_linux_region_ok_for_hw_watchpoint)
9967         (ppc_linux_ranged_break_num_registers)
9968         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9969         (ppc_linux_insert_mask_watchpoint)
9970         (ppc_linux_remove_mask_watchpoint)
9971         (ppc_linux_can_accel_watchpoint_condition)
9972         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9973         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9974         (ppc_linux_watchpoint_addr_within_range)
9975         (ppc_linux_masked_watch_num_registers)
9976         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9977         (ppc_linux_read_description): Refactor as methods of
9978         ppc_linux_nat_target.
9979         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9980
9981         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9982         (procfs_target): New class.
9983         (the_procfs_target): New.
9984         (procfs_target): Delete function.
9985         (procfs_auxv_parse, procfs_attach, procfs_detach)
9986         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9987         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9988         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9989         (procfs_create_inferior, procfs_update_thread_list)
9990         (procfs_thread_alive, procfs_pid_to_str)
9991         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9992         (procfs_stopped_data_address, procfs_insert_watchpoint)
9993         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9994         (proc_find_memory_regions, procfs_info_proc)
9995         (procfs_make_note_section): Refactor as methods of procfs_target.
9996         (_initialize_procfs): Adjust.
9997         * sol-thread.c (sol_thread_target): New class.
9998         (sol_thread_ops): Now a sol_thread_target.
9999         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10000         (sol_thread_fetch_registers, sol_thread_store_registers)
10001         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10002         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10003         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10004         (init_sol_thread_ops): Delete.
10005         (_initialize_sol_thread): Adjust.  Remove references to
10006         init_sol_thread_ops and complete_target_initialization.
10007
10008         * windows-nat.c (windows_nat_target): New class.
10009         (windows_fetch_inferior_registers)
10010         (windows_store_inferior_registers, windows_resume, windows_wait)
10011         (windows_attach, windows_detach, windows_pid_to_exec_file)
10012         (windows_files_info, windows_create_inferior)
10013         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10014         (windows_close, windows_pid_to_str, windows_xfer_partial)
10015         (windows_get_tib_address, windows_get_ada_task_ptid)
10016         (windows_thread_name, windows_thread_alive): Refactor as
10017         windows_nat_target methods.
10018         (do_initial_windows_stuff): Adjust.
10019         (windows_target): Delete function.
10020         (_initialize_windows_nat): Adjust.
10021
10022         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10023         (darwin_mourn_inferior, darwin_kill_inferior)
10024         (darwin_create_inferior, darwin_attach, darwin_detach)
10025         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10026         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10027         (darwin_supports_multi_process): Refactor as darwin_nat_target
10028         methods.
10029         (darwin_resume_to, darwin_files_info): Delete.
10030         (_initialize_darwin_inferior): Rename to ...
10031         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10032         * darwin-nat.h: Include "inf-child.h".
10033         (darwin_nat_target): New class.
10034         (darwin_complete_target): Delete.
10035         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10036         (darwin_target): New.
10037         (i386_darwin_fetch_inferior_registers)
10038         (i386_darwin_store_inferior_registers): Refactor as methods of
10039         darwin_nat_target.
10040         (darwin_complete_target): Delete, with ...
10041         (_initialize_i386_darwin_nat): ... bits factored out here.
10042
10043         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10044         (the_alpha_linux_nat_target): New.
10045         (alpha_linux_register_u_offset): Refactor as
10046         alpha_linux_nat_target method.
10047         (_initialize_alpha_linux_nat): Adjust.
10048         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10049         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10050         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10051         methods of linux_nat_trad_target.
10052         (linux_trad_target): Delete.
10053         * linux-nat-trad.h (linux_trad_target): Delete function.
10054         (linux_nat_trad_target): New class.
10055         * mips-linux-nat.c (mips_linux_nat_target): New class.
10056         (super_fetch_registers, super_store_registers, super_close):
10057         Delete.
10058         (the_mips_linux_nat_target): New.
10059         (mips64_linux_regsets_fetch_registers)
10060         (mips64_linux_regsets_store_registers)
10061         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10062         (mips_linux_register_u_offset, mips_linux_read_description)
10063         (mips_linux_can_use_hw_breakpoint)
10064         (mips_linux_stopped_by_watchpoint)
10065         (mips_linux_stopped_data_address)
10066         (mips_linux_region_ok_for_hw_watchpoint)
10067         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10068         (mips_linux_close): Refactor as methods of mips_linux_nat.
10069         (_initialize_mips_linux_nat): Adjust to C++ification.
10070
10071         * aix-thread.c (aix_thread_target): New class.
10072         (aix_thread_ops): Now an aix_thread_target.
10073         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10074         (aix_thread_fetch_registers, aix_thread_store_registers)
10075         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10076         (aix_thread_thread_alive, aix_thread_pid_to_str)
10077         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10078         Refactor as methods of aix_thread_target.
10079         (init_aix_thread_ops): Delete.
10080         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10081         and complete_target_initialization.
10082         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10083         (rs6000_nat_target): New class.
10084         (the_rs6000_nat_target): New.
10085         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10086         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10087         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10088         (super_create_inferior): Delete.
10089         (_initialize_rs6000_nat): Adjust to C++ification.
10090
10091         * arm-linux-nat.c (arm_linux_nat_target): New class.
10092         (the_arm_linux_nat_target): New.
10093         (arm_linux_fetch_inferior_registers)
10094         (arm_linux_store_inferior_registers, arm_linux_read_description)
10095         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10096         (arm_linux_remove_hw_breakpoint)
10097         (arm_linux_region_ok_for_hw_watchpoint)
10098         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10099         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10100         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10101         arm_linux_nat_target.
10102         (_initialize_arm_linux_nat): Adjust to C++ification.
10103
10104         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10105         (the_aarch64_linux_nat_target): New.
10106         (aarch64_linux_fetch_inferior_registers)
10107         (aarch64_linux_store_inferior_registers)
10108         (aarch64_linux_child_post_startup_inferior)
10109         (aarch64_linux_read_description)
10110         (aarch64_linux_can_use_hw_breakpoint)
10111         (aarch64_linux_insert_hw_breakpoint)
10112         (aarch64_linux_remove_hw_breakpoint)
10113         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10114         (aarch64_linux_region_ok_for_hw_watchpoint)
10115         (aarch64_linux_stopped_data_address)
10116         (aarch64_linux_stopped_by_watchpoint)
10117         (aarch64_linux_watchpoint_addr_within_range)
10118         (aarch64_linux_can_do_single_step): Refactor as methods of
10119         aarch64_linux_nat_target.
10120         (super_post_startup_inferior): Delete.
10121         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10122
10123         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10124         (the_hppa_linux_nat_target): New.
10125         (hppa_linux_fetch_inferior_registers)
10126         (hppa_linux_store_inferior_registers): Refactor as methods of
10127         hppa_linux_nat_target.
10128         (_initialize_hppa_linux_nat): Adjust to C++ification.
10129
10130         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10131         (the_ia64_linux_nat_target): New.
10132         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10133         (ia64_linux_stopped_data_address)
10134         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10135         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10136         ia64_linux_nat_target methods.
10137         (super_xfer_partial): Delete.
10138         (_initialize_ia64_linux_nat): Adjust to C++ification.
10139
10140         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10141         (the_m32r_linux_nat_target): New.
10142         (m32r_linux_fetch_inferior_registers)
10143         (m32r_linux_store_inferior_registers): Refactor as
10144         m32r_linux_nat_target methods.
10145         (_initialize_m32r_linux_nat): Adjust to C++ification.
10146
10147         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10148         (the_m68k_linux_nat_target): New.
10149         (m68k_linux_fetch_inferior_registers)
10150         (m68k_linux_store_inferior_registers): Refactor as
10151         m68k_linux_nat_target methods.
10152         (_initialize_m68k_linux_nat): Adjust to C++ification.
10153
10154         * s390-linux-nat.c (s390_linux_nat_target): New class.
10155         (the_s390_linux_nat_target): New.
10156         (s390_linux_fetch_inferior_registers)
10157         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10158         (s390_insert_watchpoint, s390_remove_watchpoint)
10159         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10160         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10161         (s390_auxv_parse, s390_read_description): Refactor as methods of
10162         s390_linux_nat_target.
10163         (_initialize_s390_nat): Adjust to C++ification.
10164
10165         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10166         (the_sparc_linux_nat_target): New.
10167         (_initialize_sparc_linux_nat): Adjust to C++ification.
10168         * sparc-nat.c (sparc_fetch_inferior_registers)
10169         (sparc_store_inferior_registers): Remove target_ops parameter.
10170         * sparc-nat.h (sparc_fetch_inferior_registers)
10171         (sparc_store_inferior_registers): Remove target_ops parameter.
10172         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10173         (the_sparc64_linux_nat_target): New.
10174         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10175
10176         * spu-linux-nat.c (spu_linux_nat_target): New class.
10177         (the_spu_linux_nat_target): New.
10178         (spu_child_post_startup_inferior, spu_child_post_attach)
10179         (spu_child_wait, spu_fetch_inferior_registers)
10180         (spu_store_inferior_registers, spu_xfer_partial)
10181         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10182         methods.
10183         (_initialize_spu_nat): Adjust to C++ification.
10184
10185         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10186         (the_tilegx_linux_nat_target): New.
10187         (fetch_inferior_registers, store_inferior_registers):
10188         Refactor as methods.
10189         (_initialize_tile_linux_nat): Adjust to C++ification.
10190
10191         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10192         (the_xtensa_linux_nat_target): New.
10193         (xtensa_linux_fetch_inferior_registers)
10194         (xtensa_linux_store_inferior_registers): Refactor as
10195         xtensa_linux_nat_target methods.
10196         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10197
10198         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10199         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10200         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10201         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10202         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10203         (fbsd_stopped_by_sw_breakpoint)
10204         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10205         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10206         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10207         (fbsd_post_startup_inferior, fbsd_post_attach)
10208         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10209         (fbsd_set_syscall_catchpoint)
10210         (super_xfer_partial, super_resume, super_wait)
10211         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10212         (fbsd_handle_debug_trap): Remove target_ops parameter.
10213         (fbsd_nat_add_target): Delete.
10214         * fbsd-nat.h: Include "inf-ptrace.h".
10215         (fbsd_nat_add_target): Delete.
10216         (USE_SIGTRAP_SIGINFO): Define.
10217         (fbsd_nat_target): New class.
10218
10219         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10220         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10221         (amd64bsd_target): Delete.
10222         * amd64-bsd-nat.h: New file.
10223         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10224         "x86-bsd-nat.h".
10225         (amd64_fbsd_nat_target): New class.
10226         (the_amd64_fbsd_nat_target): New.
10227         (amd64fbsd_read_description): Refactor as method of
10228         amd64_fbsd_nat_target.
10229         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10230         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10231         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10232         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10233         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10234         (i386bsd_target): Delete.
10235         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10236         (i386bsd_fetch_inferior_registers)
10237         (i386bsd_store_inferior_registers): Declare.
10238         (i386_bsd_nat_target): New class.
10239         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10240         (the_i386_fbsd_nat_target): New.
10241         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10242         i386_fbsd_nat_target methods.
10243         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10244         (_initialize_i386fbsd_nat): Adjust to C++ification.
10245         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10246         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10247         (_initialize_x86_bsd_nat): Adjust to C++ification.
10248         * x86-bsd-nat.h: Include "x86-nat.h".
10249         (x86bsd_target): Delete declaration.
10250         (x86bsd_nat_target): New class.
10251
10252         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10253         (the_aarch64_fbsd_nat_target): New.
10254         (aarch64_fbsd_fetch_inferior_registers)
10255         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10256         aarch64_fbsd_nat_target.
10257         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10258         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10259         (the_alpha_bsd_nat_target): New.
10260         (alphabsd_fetch_inferior_registers)
10261         (alphabsd_store_inferior_registers): Refactor as
10262         alpha_bsd_nat_target methods.
10263         (_initialize_alphabsd_nat): Refactor as methods of
10264         alpha_bsd_nat_target.
10265         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10266         (the_amd64_nbsd_nat_target): New.
10267         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10268         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10269         (the_amd64_obsd_nat_target): New.
10270         (_initialize_amd64obsd_nat): Adjust to C++ification.
10271         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10272         (the_arm_fbsd_nat_target): New.
10273         (arm_fbsd_fetch_inferior_registers)
10274         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10275         (_initialize_arm_fbsd_nat): Refactor as methods of
10276         arm_fbsd_nat_target.
10277         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10278         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10279         (the_arm_netbsd_nat_target): New.
10280         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10281         arm_netbsd_nat_target.
10282         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10283         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10284         (the_hppa_nbsd_nat_target): New.
10285         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10286         hppa_nbsd_nat_target methods.
10287         (_initialize_hppanbsd_nat): Adjust to C++ification.
10288         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10289         (the_hppa_obsd_nat_target): New.
10290         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10291         methods of hppa_obsd_nat_target.
10292         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10293         add_target.
10294         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10295         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10296         add_target.
10297         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10298         (_initialize_i386obsd_nat): Use add_target.
10299         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10300         (the_m68k_bsd_nat_target): New.
10301         (m68kbsd_fetch_inferior_registers)
10302         (m68kbsd_store_inferior_registers): Refactor as methods of
10303         m68k_bsd_nat_target.
10304         (_initialize_m68kbsd_nat): Adjust to C++ification.
10305         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10306         (the_mips_fbsd_nat_target): New.
10307         (mips_fbsd_fetch_inferior_registers)
10308         (mips_fbsd_store_inferior_registers): Refactor as methods of
10309         mips_fbsd_nat_target.
10310         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10311         add_target.
10312         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10313         (the_mips_nbsd_nat_target): New.
10314         (mipsnbsd_fetch_inferior_registers)
10315         (mipsnbsd_store_inferior_registers): Refactor as methods of
10316         mips_nbsd_nat_target.
10317         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10318         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10319         (the_mips64_obsd_nat_target): New.
10320         (mips64obsd_fetch_inferior_registers)
10321         (mips64obsd_store_inferior_registers): Refactor as methods of
10322         mips64_obsd_nat_target.
10323         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10324         add_target.
10325         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10326         nbsd_nat_target.
10327         * nbsd-nat.h: Include "inf-ptrace.h".
10328         (nbsd_nat_target): New class.
10329         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10330         (obsd_wait): Refactor as methods of obsd_nat_target.
10331         (obsd_add_target): Delete.
10332         * obsd-nat.h: Include "inf-ptrace.h".
10333         (obsd_nat_target): New class.
10334         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10335         (the_ppc_fbsd_nat_target): New.
10336         (ppcfbsd_fetch_inferior_registers)
10337         (ppcfbsd_store_inferior_registers): Refactor as methods of
10338         ppc_fbsd_nat_target.
10339         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10340         add_target.
10341         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10342         (the_ppc_nbsd_nat_target): New.
10343         (ppcnbsd_fetch_inferior_registers)
10344         (ppcnbsd_store_inferior_registers): Refactor as methods of
10345         ppc_nbsd_nat_target.
10346         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10347         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10348         (the_ppc_obsd_nat_target): New.
10349         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10350         methods of ppc_obsd_nat_target.
10351         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10352         add_target.
10353         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10354         (the_sh_nbsd_nat_target): New.
10355         (shnbsd_fetch_inferior_registers)
10356         (shnbsd_store_inferior_registers): Refactor as methods of
10357         sh_nbsd_nat_target.
10358         (_initialize_shnbsd_nat): Adjust to C++ification.
10359         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10360         (inf_ptrace_xfer_partial): Delete.
10361         (sparc_xfer_partial, sparc_target): Delete.
10362         * sparc-nat.h (sparc_fetch_inferior_registers)
10363         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10364         (sparc_target): Delete function declaration.
10365         (sparc_target): New template class.
10366         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10367         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10368         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10369         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10370         add_target.
10371         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10372         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10373         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10374         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10375         add_target.
10376         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10377         (the_vax_bsd_nat_target): New.
10378         (vaxbsd_fetch_inferior_registers)
10379         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10380         methods.
10381         (_initialize_vaxbsd_nat): Adjust to C++ification.
10382
10383         * bsd-kvm.c (bsd_kvm_target): New class.
10384         (bsd_kvm_ops): Now a bsd_kvm_target.
10385         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10386         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10387         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10388         bsd_kvm_target.
10389         (bsd_kvm_return_one): Delete.
10390         (bsd_kvm_add_target): Adjust to C++ification.
10391
10392         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10393         (nto_procfs_target_procfs): New classes.
10394         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10395         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10396         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10397         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10398         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10399         (procfs_remove_hw_breakpoint, procfs_resume)
10400         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10401         (procfs_kill_inferior, procfs_store_registers)
10402         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10403         as methods of nto_procfs_target.
10404         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10405         (nto_native_ops): Delete.
10406         (procfs_open, procfs_native_open): Delete.
10407         (nto_native_ops): Now an nto_procfs_target_native.
10408         (init_procfs_targets): Adjust to C++ification.
10409         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10410         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10411         Refactor as methods of nto_procfs_target.
10412
10413         * go32-nat.c (go32_nat_target): New class.
10414         (the_go32_nat_target): New.
10415         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10416         (go32_store_registers, go32_xfer_partial, go32_files_info)
10417         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10418         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10419         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10420         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10421         (go32_target): Delete.
10422         (_initialize_go32_nat): Adjust to C++ification.
10423
10424         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10425         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10426         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10427         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10428         gnu_nat_target.
10429         (gnu_target): Delete.
10430         * gnu-nat.h (gnu_target): Delete.
10431         (gnu_nat_target): New class.
10432         * i386-gnu-nat.c (gnu_base_target): New.
10433         (i386_gnu_nat_target): New class.
10434         (the_i386_gnu_nat_target): New.
10435         (_initialize_i386gnu_nat): Adjust to C++ification.
10436
10437 2018-05-02  Pedro Alves  <palves@redhat.com>
10438
10439         * bfd-target.c (target_bfd_xclose): Rename to ...
10440         (target_bfd_close): ... this.
10441         (target_bfd_reopen): Adjust.
10442         * target.c (target_close): Remove references to to_xclose.
10443         * target.h (target_ops::to_xclose): Delete.
10444         (target_ops::to_close): Update comments.
10445
10446 2018-05-02  Pedro Alves  <palves@redhat.com>
10447
10448         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10449         "linux-nat.h".
10450         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10451         * inf-ptrace.c (inf_ptrace_register_u_offset)
10452         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10453         (inf_ptrace_store_register, inf_ptrace_store_registers)
10454         (inf_ptrace_trad_target): Move to ...
10455         * linux-nat-trad.c: ... this new file.
10456         * linux-nat-trad.h: New file.
10457         * linux-nat.c (linux_target_install_ops): Make extern.
10458         (linux_trad_target): Delete.
10459         * linux-nat.h (linux_trad_target): Delete declaration.
10460         (linux_target_install_ops): Declare.
10461         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10462         "linux-nat.h".
10463
10464 2018-05-02  Pedro Alves  <palves@redhat.com>
10465
10466         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10467         procfs_target/add_target here.
10468         * procfs.c (procfs_target): Make static.
10469         (_initialize_procfs): Call add_target here.
10470         * procfs.h (struct target_ops): Remove forward declaration.
10471         (procfs_target): Remove declaration.
10472         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10473
10474 2018-05-02  Pedro Alves  <palves@redhat.com>
10475
10476         * procfs.c (procfs_stopped_by_watchpoint)
10477         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10478         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10479         Forward declare.
10480         (procfs_use_watchpoints): Delete, move contents...
10481         (procfs_target): ... here.
10482         * procfs.h (procfs_use_watchpoints): Delete declaration.
10483         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10484         procfs_use_watchpoints.
10485         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10486         procfs_use_watchpoints.
10487
10488 2018-05-02  Tom Tromey  <tom@tromey.com>
10489
10490         PR python/20084:
10491         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10492         and var_zuinteger_unlimited.
10493         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10494         and PARAM_ZUINTEGER_UNLIMITED.
10495         (set_parameter_value): Handle var_zuinteger and
10496         var_zuinteger_unlimited.
10497         (add_setshow_generic): Likewise.
10498         (parmpy_init): Likewise.
10499
10500 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10501
10502         PR rust/23124
10503         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10504         pointer is not null before dereferencing it.
10505
10506 2018-04-30  Tom Tromey  <tom@tromey.com>
10507
10508         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10509         is_mi_like_p.
10510
10511 2018-04-30  Tom Tromey  <tom@tromey.com>
10512
10513         * breakpoint.c (mention): Remove use of is_mi_like_p.
10514         (print_mention_ranged_breakpoint): Likewise.
10515         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10516         of is_mi_like_p.
10517
10518 2018-04-30  Tom Tromey  <tom@tromey.com>
10519
10520         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10521
10522 2018-04-30  Tom Tromey  <tom@tromey.com>
10523
10524         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10525         (info_spu_event_command): Remove some uses of is_mi_like_p.
10526
10527 2018-04-30  Tom Tromey  <tom@tromey.com>
10528
10529         * python/py-framefilter.c (py_print_single_arg)
10530         (enumerate_locals, py_print_args, py_print_frame): Remove some
10531         uses of is_mi_like_p.
10532
10533 2018-04-30  Tom Tromey  <tom@tromey.com>
10534
10535         * ui-out.c: Update.
10536         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10537         * ui-out.h (ui_out::is_mi_like_p): Now const.
10538         (ui_out::do_is_mi_like_p): Now const.
10539         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10540
10541 2018-04-30  Tom Tromey  <tom@tromey.com>
10542
10543         * varobj.c (varobj_set_visualizer): Use new_reference.
10544         * python/python.c (gdbpy_decode_line): Use new_reference.
10545         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10546         new_reference.
10547
10548 2018-04-30  Tom Tromey  <tom@tromey.com>
10549
10550         * varobj.c (install_new_value): Use new_reference.
10551         * value.h (value_incref): Return void.  Swap intro comment with
10552         value_decref.
10553         * value.c (set_value_parent): Use new_reference.
10554         (value_incref): Return void.  Update intro comment.
10555         (release_value): Use new_reference.
10556         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10557
10558 2018-04-30  Tom Tromey  <tom@tromey.com>
10559
10560         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10561         * gdb_bfd.h (new_bfd_ref): Remove.
10562         (gdb_bfd_open): Update comment.
10563         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10564         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10565         (gdb_bfd_fdopenr): Use new_reference.
10566         * exec.c (exec_file_attach): Use new_reference.
10567
10568 2018-04-30  Tom Tromey  <tom@tromey.com>
10569
10570         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10571         method.
10572
10573 2018-04-30  Tom Tromey  <tom@tromey.com>
10574
10575         * jit.c (jit_read_code_entry): Use type_align.
10576         * i386-tdep.c (i386_gdbarch_init): Don't call
10577         set_gdbarch_long_long_align_bit.
10578         * gdbarch.sh: Remove long_long_align_bit.
10579         * gdbarch.c, gdbarch.h: Rebuild.
10580         * arc-tdep.c (arc_type_align): New function.
10581         (arc_gdbarch_init): Use arc_type_align.  Don't call
10582         set_gdbarch_long_long_align_bit.
10583
10584 2018-04-30  Tom Tromey  <tom@tromey.com>
10585
10586         * rust-lang.c (rust_type_alignment): Remove.
10587         (rust_composite_type): Use type_align.
10588
10589 2018-04-30  Tom Tromey  <tom@tromey.com>
10590
10591         * NEWS: Mention Type.align.
10592         * python/py-type.c (typy_get_alignof): New function.
10593         (type_object_getset): Add "alignof".
10594
10595 2018-04-30  Tom Tromey  <tom@tromey.com>
10596
10597         PR exp/17095:
10598         * NEWS: Update.
10599         * std-operator.def (UNOP_ALIGNOF): New operator.
10600         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10601         New.
10602         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10603         * c-lang.c (c_op_print_tab): Add alignof.
10604         * c-exp.y (ALIGNOF): New token.
10605         (exp): Add "ALIGNOF" production.
10606         (ident_tokens): Add _Alignof and alignof.
10607
10608 2018-04-30  Tom Tromey  <tom@tromey.com>
10609
10610         * i386-tdep.c (i386_type_align): New function.
10611         (i386_gdbarch_init): Update.
10612         * gdbarch.sh (type_align): New method.
10613         * gdbarch.c, gdbarch.h: Rebuild.
10614         * arch-utils.h (default_type_align): Declare.
10615         * arch-utils.c (default_type_align): New function.
10616         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10617         (struct type) <align_log2>: New field.
10618         <instance_flags>: Now a bitfield.
10619         (TYPE_RAW_ALIGN): New macro.
10620         (type_align, type_raw_align, set_type_align): Declare.
10621         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10622         functions.
10623         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10624         (get_alignment, maybe_set_alignment): New functions.
10625         (read_structure_type, read_enumeration_type, read_array_type)
10626         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10627         (read_subrange_type, read_base_type): Set type alignment.
10628
10629 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10630
10631         * dwarf2read.c (read_index_from_section): Use bool.
10632
10633 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10634
10635         PR gdb/22950
10636         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10637         with #ifdef.
10638
10639 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10640
10641         PR build/22873
10642         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10643         last step, and do it atomically.
10644
10645 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10646
10647         * compile/compile-c-types.c (convert_int, convert_float):
10648         Update for C FE v1.
10649
10650 2018-04-27  Tom Tromey  <tom@tromey.com>
10651
10652         PR rust/22545:
10653         * rust-lang.c (rust_inclusive_range_type_p): New function.
10654         (rust_range): Handle inclusive ranges.
10655         (rust_compute_range): Likewise.
10656         * rust-exp.y (struct rust_op) <inclusive>: New field.
10657         (DOTDOTEQ): New constant.
10658         (range_expr): Add "..=" productions.
10659         (operator_tokens): Add "..=" token.
10660         (ast_range): Add "inclusive" parameter.
10661         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10662         ranges.
10663         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10664         bounds values.
10665         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10666         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10667         Update comments.
10668         * expprint.c (print_subexp_standard): Handle new bounds values.
10669         (dump_subexp_body_standard): Likewise.
10670
10671 2018-04-27  Tom Tromey  <tom@tromey.com>
10672
10673         * configure: Rebuild.
10674         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10675         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10676         "OVERRIDE".
10677         (class symbol_needs_eval_context): Likewise.
10678         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10679         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10680         "virtual".
10681         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10682         "override".
10683         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10684         * aarch64-tdep.c (instruction_reader::read): Use "override".
10685         (instruction_reader_test::read): Likewise.
10686         * arm-tdep.c (instruction_reader::read): Use "override".
10687         (instruction_reader_thumb::read): Likewise.
10688
10689 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10690
10691         PR remote/9665
10692         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10693         instead of remote_send.
10694         (remote_send): Remove.
10695
10696 2018-04-26  Pedro Alves  <palves@redhat.com>
10697
10698         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10699         find_function_start_sal instead of find_pc_line.
10700
10701 2018-04-26  Pedro Alves  <palves@redhat.com>
10702
10703         * breakpoint.c (set_breakpoint_location_function): Handle
10704         mst_data_gnu_ifunc.
10705         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10706         * elfread.c (elf_symtab_read): Give data symbols with
10707         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10708         (elf_rel_plt_read): Update comment.
10709         * linespec.c (convert_linespec_to_sals): Handle
10710         mst_data_gnu_ifunc.
10711         (minsym_found): Handle mst_data_gnu_ifunc.
10712         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10713         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10714         * parse.c (find_minsym_type_and_address): Handle
10715         mst_data_gnu_ifunc.
10716         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10717         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10718         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10719         comment.
10720         <mst_data_gnu_ifunc>: New enumerator.
10721
10722 2018-04-26  Pedro Alves  <palves@redhat.com>
10723
10724         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10725         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10726         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10727         Handle it.
10728         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10729         (lookup_minimal_symbol_by_pc): Adjust.
10730         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10731         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10732         * minsyms.h (lookup_msym_prefer): New enum.
10733         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10734         parameter by a lookup_msym_prefer parameter.
10735
10736 2018-04-26  Pedro Alves  <palves@redhat.com>
10737
10738         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10739         ends in "@plt" instead of looking at the symbol's section.
10740
10741 2018-04-26  Pedro Alves  <palves@redhat.com>
10742
10743         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10744         all references.
10745         (find_pc_partial_function_gnu_ifunc): Rename to ...
10746         (find_pc_partial_function): ... this, and remove references to
10747         'is_gnu_ifunc_p'.
10748         (find_pc_partial_function): Delete old implementation.
10749         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10750
10751 2018-04-26  Pedro Alves  <palves@redhat.com>
10752
10753         * linespec.c (struct bound_minimal_symbol_search_key): New.
10754         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10755         skip first line if we found a GNU ifunc minimal symbol by name.
10756         (compare_msymbols): Change parameters to work with a destructured
10757         lhs minsym.
10758         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10759         functions.
10760
10761 2018-04-26  Pedro Alves  <palves@redhat.com>
10762
10763         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10764         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10765         address/name.
10766         (add_location_to_breakpoint): Store the minsym and the objfile in
10767         the breakpoint location.
10768         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10769         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10770         Record the minsym in the sal.
10771         * symtab.h (symtab_and_line) <msymbol>: New field.
10772
10773 2018-04-26  Pedro Alves  <palves@redhat.com>
10774
10775         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10776         unless we actually resolved the ifunc.
10777
10778 2018-04-26  Pedro Alves  <palves@redhat.com>
10779
10780         * c-exp.y (variable production): Prefer ifunc minsyms over
10781         regular function symbols.
10782         * symtab.c (find_gnu_ifunc): New function.
10783         * minsyms.h (lookup_msym_prefer): New enum.
10784         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10785         parameter by a lookup_msym_prefer parameter.
10786         * symtab.h (find_gnu_ifunc): New declaration.
10787
10788 2018-04-26  Pedro Alves  <palves@redhat.com>
10789
10790         * blockframe.c (find_gnu_ifunc_target_type): New function.
10791         (find_function_type): New.
10792         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10793         return a value with a memory address.
10794         (eval_call): For calls to GNU ifunc functions, try to find the
10795         type of the target function from the type that the resolver
10796         returns.
10797         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10798         symbols.
10799         * infcall.c (find_function_return_type): Delete.
10800         (find_function_addr): Add 'function_type' parameter.  For calls to
10801         GNU ifunc functions, try to find the type of the target function
10802         from the type that the resolver returns, and return it via
10803         FUNCTION_TYPE.
10804         (call_function_by_hand_dummy): Adjust to use the function type
10805         returned by find_function_addr.
10806         (find_function_addr): Add 'function_type' parameter and move
10807         description here.
10808         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10809         declarations.
10810
10811 2018-04-26  Pedro Alves  <palves@redhat.com>
10812
10813         * c-exp.y (variable production): Skip finding an alias for ifunc
10814         symbols.
10815
10816 2018-04-26  Pedro Alves  <palves@redhat.com>
10817
10818         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10819
10820 2018-04-25  Pedro Alves  <palves@redhat.com>
10821
10822         * infcmd.c (kill_command): Print the pid as string, not the whole
10823         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10824         message.
10825         * remote.c (remote_detach_1): Print the pid as string, not the
10826         whole thread's ptid.
10827
10828 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10829             Sergio Durigan Junior  <sergiodj@redhat.com>
10830             Pedro Alves  <palves@redhat.com>
10831
10832         * infcmd.c (kill_command): Print message when inferior has
10833         been killed.
10834         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10835         '1'.
10836         (add_inferior): Improve message printed when
10837         'print_inferior_events' is on.
10838         (exit_inferior): Remove message printed when
10839         'print_inferior_events' is on.
10840         (detach_inferior): Improve message printed when
10841         'print_inferior_events' is on.
10842         (initialize_inferiors): Use 'add_inferior_silent' to set
10843         'current_inferior_'.
10844         * inferior.h (print_inferior_events): Declare here as
10845         'extern'.
10846         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10847         '[Detaching...]' messages when 'print_inferior_events' is on.
10848         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10849         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10850         'Detaching after fork from child...', replace it by '... from
10851         parent...'.
10852         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10853         prefix/suffix when printing 'Detaching...' messages.  Print
10854         them when 'print_inferior_events' is on.
10855         * remote.c (remote_detach_1): Print message when detaching
10856         from inferior and '!is_fork_parent'.
10857
10858 2018-04-24  Tom Tromey  <tom@tromey.com>
10859
10860         * cli-out.h: Reindent.
10861
10862 2018-04-24  Tom Tromey  <tom@tromey.com>
10863
10864         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10865         (cli_ui_out::do_field_string): Use fputs_filtered.
10866         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10867
10868 2018-04-23  Tom Tromey  <tom@tromey.com>
10869
10870         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10871         gdb::unique_xmalloc_ptr.
10872
10873 2018-04-23  Tom Tromey  <tom@tromey.com>
10874
10875         * configure: Rebuild.
10876
10877 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10878
10879         PR gdb/23095
10880         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10881         prepare_for_testing.  Set normal_bp to r_debug_state if target
10882         is bsd.
10883
10884 2018-04-21  Pedro Alves  <palves@redhat.com>
10885             Rajendra SY  <rajendra.sy@gmail.com>
10886
10887         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10888         * remote.c (extended_remote_attach): In all-stop mode, mark the
10889         thread as executing.
10890
10891 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10892
10893         * thread.c (thread_apply_all_command): Fix comment.
10894         (thread_command): Fix comment.
10895
10896 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10897
10898         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10899         parameter.
10900         * features/aarch64-core.c (create_feature_aarch64_core):
10901         Regenerate.
10902         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10903         Likewise.
10904         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10905         Likewise.
10906         * features/i386/32bit-avx512.c
10907         (create_feature_i386_32bit_avx512): Likewise.
10908         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10909         Likewise.
10910         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10911         Likewise.
10912         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10913         Likewise.
10914         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10915         Likewise.
10916         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10917         Likewise.
10918         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10919         Likewise.
10920         * features/i386/64bit-avx512.c
10921         (create_feature_i386_64bit_avx512): Likewise.
10922         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10923         Likewise.
10924         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10925         Likewise.
10926         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10927         Likewise.
10928         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10929         Likewise.
10930         * features/i386/64bit-segments.c
10931         (create_feature_i386_64bit_segments): Likewise.
10932         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10933         Likewise.
10934         * features/i386/x32-core.c
10935         (create_feature_i386_x32_core): Likewise.
10936         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10937         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10938         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10939         * target-descriptions.c: In generated code, don't pass xml
10940         filename.
10941
10942 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10943
10944         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10945         (print_xml_feature::visit_post): Likewise.
10946         (print_xml_feature::visit): Likewise.
10947         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10948         (print_xml_feature): Add new class.
10949         * regformats/regdat.sh: Null xmltarget on feature targets.
10950         * target-descriptions.c (struct target_desc): Add xmltarget.
10951         (maintenance_check_tdesc_xml_convert): Add unittest function.
10952         (tdesc_get_features_xml): Add function to get xml.
10953         (maintenance_check_xml_descriptions): Test xml generation.
10954         * xml-tdesc.c (string_read_description_xml): Add function.
10955         * xml-tdesc.h (string_read_description_xml): Add declaration.
10956
10957 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10958
10959         * features/Makefile: Add feature marker to targets with new style
10960         target descriptions.
10961         * regformats/aarch64.dat: Regenerate.
10962         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10963         * regformats/i386/amd64-avx-linux.dat: Likewise.
10964         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10965         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10966         * regformats/i386/amd64-linux.dat: Likewise.
10967         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10968         * regformats/i386/amd64.dat: Likewise.
10969         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10970         * regformats/i386/i386-avx-linux.dat: Likewise.
10971         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10972         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10973         * regformats/i386/i386-linux.dat: Likewise.
10974         * regformats/i386/i386-mmx-linux.dat: Likewise.
10975         * regformats/i386/i386-mpx-linux.dat: Likewise.
10976         * regformats/i386/i386.dat: Likewise.
10977         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10978         * regformats/i386/x32-avx-linux.dat: Likewise.
10979         * regformats/i386/x32-linux.dat: Likewise.
10980         * regformats/tic6x-c62x-linux.dat: Likewise.
10981         * regformats/tic6x-c64x-linux.dat: Likewise.
10982         * regformats/tic6x-c64xp-linux.dat: Likewise.
10983         * regformats/regdat.sh: Parse feature marker.
10984
10985 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10986
10987         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10988         (tdesc_osabi_name): Likewise.
10989         * target-descriptions.c (tdesc_architecture_name): Add new
10990         function.
10991         (tdesc_osabi_name): Likewise.
10992
10993 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10994
10995         * common/tdesc.c (tdesc_predefined_type): Move to here.
10996         (tdesc_named_type): Likewise.
10997         (tdesc_create_vector): Likewise.
10998         (tdesc_create_struct): Likewise.
10999         (tdesc_set_struct_size): Likewise.
11000         (tdesc_create_union): Likewise.
11001         (tdesc_create_flags): Likewise.
11002         (tdesc_create_enum): Likewise.
11003         (tdesc_add_field): Likewise.
11004         (tdesc_add_typed_bitfield): Likewise.
11005         (tdesc_add_bitfield): Likewise.
11006         (tdesc_add_flag): Likewise.
11007         (tdesc_add_enum_value): Likewise.
11008         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11009         (struct tdesc_type_vector): Likewise.
11010         (struct tdesc_type_field): Likewise.
11011         (struct tdesc_type_with_fields): Likewise.
11012         (tdesc_create_enum): Add declaration.
11013         (tdesc_add_typed_bitfield): Likewise.
11014         (tdesc_add_enum_value): Likewise.
11015         * target-descriptions.c (tdesc_type_field): Move from here.
11016         (tdesc_type_builtin): Likewise.
11017         (tdesc_type_vector): Likewise.
11018         (tdesc_type_with_fields): Likewise.
11019         (tdesc_predefined_types): Likewise.
11020         (tdesc_named_type): Likewise.
11021         (tdesc_create_vector): Likewise.
11022         (tdesc_create_struct): Likewise.
11023         (tdesc_set_struct_size): Likewise.
11024         (tdesc_create_union): Likewise.
11025         (tdesc_create_flags): Likewise.
11026         (tdesc_create_enum): Likewise.
11027         (tdesc_add_field): Likewise.
11028         (tdesc_add_typed_bitfield): Likewise.
11029         (tdesc_add_bitfield): Likewise.
11030         (tdesc_add_flag): Likewise.
11031         (tdesc_add_enum_value): Likewise.
11032         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11033         (tdesc_add_typed_bitfield): Likewise.
11034         (tdesc_add_enum_value): Likewise.
11035
11036 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11037
11038         * common/tdesc.c (tdesc_feature::accept): Move to here.
11039         (tdesc_feature::operator==): Likewise.
11040         (tdesc_create_reg): Likewise.
11041         * common/tdesc.h (tdesc_type_kind): Likewise.
11042         (struct tdesc_type): Likewise.
11043         (struct tdesc_feature): Likewise.
11044         * regformats/regdat.sh: Create a feature.
11045         * target-descriptions.c (tdesc_type_kind): Move from here.
11046         (tdesc_type): Likewise.
11047         (tdesc_type_up): Likewise.
11048         (tdesc_feature): Likewise.
11049         (tdesc_create_reg): Likewise.
11050
11051 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11052
11053         * Makefile.in: Add arch/tdesc.c
11054         * common/tdesc.c: New file.
11055         * common/tdesc.h (tdesc_element_visitor): Move to here.
11056         (tdesc_element): Likewise.
11057         (tdesc_reg): Likewise.
11058         (tdesc_reg_up): Likewise.
11059         * regformats/regdef.h (reg): Add offset to constructors.
11060         * target-descriptions.c (tdesc_element_visitor): Move from here.
11061         (tdesc_element): Likewise.
11062         (tdesc_reg): Likewise.
11063         (tdesc_reg_up): Likewise.
11064
11065 2018-04-17  Tom Tromey  <tom@tromey.com>
11066
11067         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11068         discriminant field.
11069
11070 2018-04-17  Tom Tromey  <tom@tromey.com>
11071
11072         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11073
11074 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11075
11076         * symtab.c (print_symbol_info): Skip printing filename and line
11077         number when `last' is NULL.
11078         (symtab_symbol_info): Use empty string instead of NULL for first
11079         invocation of print_symbol_info.
11080         (rbreak_command): Pass NULL to `last' parameter of
11081         print_symbol_info.
11082
11083 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11084
11085         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11086         instead of nullptr.
11087
11088 2018-04-16  Pedro Alves  <palves@redhat.com>
11089
11090         * MAINTAINERS (sh): Remove.
11091         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11092         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11093         (ALLDEPFILES): Remove sh64-tdep.c.
11094         * NEWS: Mentions that support for SH-5/SH64 is removed.
11095         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11096         (sh*-*-openbsd*): Ditto.
11097         (sh64-*-elf*): Remove.
11098         (sh*): Remove.
11099         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11100         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11101         * sh-tdep.c: No longer include "sh64-tdep.h".
11102         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11103         * sh64-tdep.c, sh64-tdep.h: Remove files.
11104
11105 2018-04-16  Pedro Alves  <palves@redhat.com>
11106
11107         * MAINTAINERS: Remove m88k.
11108         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11109         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11110         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11111         * NEWS: Mention that support for m88k was removed.
11112         * configure.host (m88*-*-*): Remove support.
11113         * configure.nat (m88k-*-*): Remove support.
11114         * configure.tgt (m88*-*-openbsd*): Remove.
11115         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11116
11117 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11118
11119         * configure.tgt (x86_tobjs): New variable.
11120         (amd64_tobjs, i386_tobjs): Use it.
11121
11122 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11123
11124         * symtab.c (print_symbol_info): Precede the symbol definition by
11125         the line number when available.
11126         * NEWS: Advertise this enhancement.
11127
11128 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11129
11130         * NEWS (New options): announce set/show record btrace cpu.
11131         * btrace.c: Include record-btrace.h.
11132         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11133         the vendor is unknown.
11134         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11135         Maybe overwrite the btrace configuration's cpu.
11136         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11137         (btrace_fetch): Add cpu parameter.  Update callers.
11138         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11139         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11140         errata workarounds if the vendor is unknown.
11141         * python/py-record-btrace.c: Include record-btrace.h.
11142         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11143         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11144         * record-btrace.c (record_btrace_cpu_state_kind): New.
11145         (record_btrace_cpu): New.
11146         (set_record_btrace_cpu_cmdlist): New.
11147         (record_btrace_get_cpu): New.
11148         (require_btrace_thread, record_btrace_info)
11149         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11150         (cmd_set_record_btrace_cpu_none): New.
11151         (cmd_set_record_btrace_cpu_auto): New.
11152         (cmd_set_record_btrace_cpu): New.
11153         (cmd_show_record_btrace_cpu): New.
11154         (_initialize_record_btrace): Initialize set/show record btrace cpu
11155         commands.
11156         * record-btrace.h (record_btrace_get_cpu): New.
11157
11158 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11159
11160         * record.c (set_record_command): Fix typo in message.
11161
11162 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11163
11164         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11165
11166 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11167
11168         * infrun.c (process_event_stop_test): Call
11169         gdbarch_in_indirect_branch_thunk.
11170         * gdbarch.sh (in_indirect_branch_thunk): New.
11171         * gdbarch.c: Regenerated.
11172         * gdbarch.h: Regenerated.
11173         * x86-tdep.h: New.
11174         * x86-tdep.c: New.
11175         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11176         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11177         (ALLDEPFILES): Add x86-tdep.c.
11178         * arch-utils.h (default_in_indirect_branch_thunk): New.
11179         * arch-utils.c (default_in_indirect_branch_thunk): New.
11180         * i386-tdep: Include x86-tdep.h.
11181         (i386_in_indirect_branch_thunk): New.
11182         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11183         function.
11184         * amd64-tdep: Include x86-tdep.h.
11185         (amd64_in_indirect_branch_thunk): New.
11186         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11187
11188 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11189
11190         PR gdb/23053
11191         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11192         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11193         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11194         regression.
11195
11196 2018-04-12  Tom Tromey  <tom@tromey.com>
11197
11198         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11199         (rust_evaluate_subexp): Likewise.
11200
11201 2018-04-12  Pedro Alves  <palves@redhat.com>
11202
11203         * procfs.c (procfs_detach): Make forward declaration's prototype
11204         match definition's protototype.
11205         (proc_get_LDT_entry): Remove stale do_cleanups call.
11206
11207 2018-04-12  Pedro Alves  <palves@redhat.com>
11208
11209         * target.h (target_ops::to_has_exited): Delete.
11210         (target_has_exited): Delete.
11211         * target-delegates.c: Regenerate.
11212
11213 2018-04-11  Pedro Alves  <palves@redhat.com>
11214
11215         * target.c (fileio_fh_t::t): Add comment.
11216         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11217         (target_fileio_close): Handle a NULL target.
11218         (invalidate_fileio_fh): New.
11219         (target_close): Call it.
11220         * remote.c (remote_hostio_send_command): No longer check whether
11221         remote_desc is open.
11222
11223 2018-04-11  Pedro Alves  <palves@redhat.com>
11224
11225         * target.c (fileio_fh_t): Make it a named struct instead of a
11226         typedef.
11227         (fileio_fh_t::is_closed): New method.
11228         (DEF_VEC_O (fileio_fh_t)): Remove.
11229         (fileio_fhandles): Now a std::vector.
11230         (is_closed_fileio_fh): Delete.
11231         (acquire_fileio_fd): Adjust.  Rename parameters.
11232         (release_fileio_fd): Adjust.
11233         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11234         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11235         (target_fileio_close): Adjust.
11236
11237 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11238
11239         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11240         index.
11241
11242 2018-04-10  Pedro Alves  <palves@redhat.com>
11243
11244         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11245         (scoped_finish_thread_state): New class.
11246         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11247         cleanup.
11248         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11249         (fetch_inferior_event, normal_stop): Likewise.
11250         * thread.c (finish_thread_state_cleanup): Delete.
11251
11252 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11253             Pedro Alves  <palves@redhat.com>
11254
11255         * value.c: Include "selftest.h" and "common/array-view.h".
11256         (struct range) <operator ==>: New.
11257         (test_ranges_contain): New.
11258         (check_ranges_vector): New.
11259         (test_insert_into_bit_range_vector): New.
11260         (_initialize_values): Register selftests.
11261         * common/array-view.h (operator==, operator!=): New.
11262
11263 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11264
11265         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11266         an iterator.
11267         * inline-frame.c: Include <algorithm>.
11268         (struct inline_state): Add constructor.
11269         (inline_state_s): Remove.
11270         (DEF_VEC_O(inline_state_s)): Remove.
11271         (inline_states): Change type to std::vector.
11272         (find_inline_frame_state): Adjust to std::vector.
11273         (allocate_inline_frame_state): Remove.
11274         (clear_inline_frame_state): Adjust to std::vector.
11275         (skip_inline_frames): Adjust to std::vector.
11276
11277 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11278
11279         * tracepoint.h (struct trace_state_variable): Add constructor.
11280         <name>: Change type to std::string.
11281         * tracepoint.c (tsv_s): Remove.
11282         (DEF_VEC_O(tsv_s)): Remove.
11283         (tvariables): Change to std::vector.
11284         (create_trace_state_variable): Adjust to std::vector.
11285         (find_trace_state_variable): Likewise.
11286         (find_trace_state_variable_by_number): Likewise.
11287         (delete_trace_state_variable): Likewise.
11288         (trace_variable_command): Adjust to std::string.
11289         (delete_trace_variable_command): Likewise.
11290         (tvariables_info_1): Adjust to std::vector.
11291         (save_trace_state_variables): Likewise.
11292         (start_tracing): Likewise.
11293         (merge_uploaded_trace_state_variables): Adjust to std::vector
11294         and std::string.
11295         * target.h (struct target_ops)
11296         <to_download_trace_state_variable>: Pass reference to
11297         trace_state_variable.
11298         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11299         * target-delegates.c: Re-generate.
11300         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11301         (mi_tsv_deleted): Likewise.
11302         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11303         * remote.c (remote_download_trace_state_variable): Change
11304         pointer to reference and adjust.
11305         * make-target-delegates (parse_argtypes): Handle references.
11306         (write_function_header): Likewise.
11307         (munge_type): Likewise.
11308
11309 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11310
11311         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11312         string_view-selftests.c.
11313         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11314         testsuite.
11315         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11316         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11317         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11318         * unittests/basic_string_view/element_access/char/1.cc:
11319         Likewise.
11320         * unittests/basic_string_view/element_access/char/empty.cc:
11321         Likewise.
11322         * unittests/basic_string_view/element_access/char/front_back.cc:
11323         Likewise.
11324         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11325         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11326         Likewise.
11327         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11328         Likewise.
11329         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11330         Likewise.
11331         * unittests/basic_string_view/operations/compare/char/1.cc:
11332         Likewise.
11333         * unittests/basic_string_view/operations/compare/char/13650.cc:
11334         Likewise.
11335         * unittests/basic_string_view/operations/copy/char/1.cc:
11336         Likewise.
11337         * unittests/basic_string_view/operations/data/char/1.cc:
11338         Likewise.
11339         * unittests/basic_string_view/operations/find/char/1.cc:
11340         Likewise.
11341         * unittests/basic_string_view/operations/find/char/2.cc:
11342         Likewise.
11343         * unittests/basic_string_view/operations/find/char/3.cc:
11344         Likewise.
11345         * unittests/basic_string_view/operations/find/char/4.cc:
11346         Likewise.
11347         * unittests/basic_string_view/operations/rfind/char/1.cc:
11348         Likewise.
11349         * unittests/basic_string_view/operations/rfind/char/2.cc:
11350         Likewise.
11351         * unittests/basic_string_view/operations/rfind/char/3.cc:
11352         Likewise.
11353         * unittests/basic_string_view/operations/substr/char/1.cc:
11354         Likewise.
11355         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11356         * unittests/string_view-selftests.c: New file.
11357
11358 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11359
11360         * unittests/basic_string_view/capacity/1.cc: New file.
11361         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11362         * unittests/basic_string_view/cons/char/1.cc: New file.
11363         * unittests/basic_string_view/cons/char/2.cc: New file.
11364         * unittests/basic_string_view/cons/char/3.cc: New file.
11365         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11366         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11367         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11368         * unittests/basic_string_view/element_access/char/1.cc: New file.
11369         * unittests/basic_string_view/element_access/char/2.cc: New file.
11370         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11371         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11372         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11373         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11374         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11375         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11376         * unittests/basic_string_view/include.cc: New file.
11377         * unittests/basic_string_view/inserters/char/1.cc: New file.
11378         * unittests/basic_string_view/inserters/char/2.cc: New file.
11379         * unittests/basic_string_view/inserters/char/3.cc: New file.
11380         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11381         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11382         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11383         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11384         * unittests/basic_string_view/literals/types.cc: New file.
11385         * unittests/basic_string_view/literals/values.cc: New file.
11386         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11387         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11388         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11389         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11390         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11391         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11392         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11393         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11394         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11395         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11396         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11397         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11398         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11399         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11400         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11401         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11402         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11403         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11404         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11405         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11406         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11407         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11408         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11409         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11410         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11411         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11412         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11413         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11414         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11415         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11416         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11417         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11418         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11419         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11420         * unittests/basic_string_view/operators/char/2.cc: New file.
11421         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11422         * unittests/basic_string_view/range_access/char/1.cc: New file.
11423         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11424         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11425         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11426         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11427         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11428         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11429         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11430         * unittests/basic_string_view/typedefs.cc: New file.
11431         * unittests/basic_string_view/types/1.cc: New file.
11432
11433 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11434
11435         * common/gdb_string_view.h: Remove libstdc++ implementation
11436         details, adjust to gdb reality.
11437         * common/gdb_string_view.tcc: Likewise.
11438         * cli/cli-script.c (struct string_view): Remove.
11439         (user_args) <m_args>: Change element type to gdb::string_view.
11440         (user_args::insert_args): Adjust.
11441
11442 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11443
11444         * common/gdb_string_view.h: New file.
11445         * common/gdb_string_view.tcc: New file.
11446
11447 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11448
11449         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11450         * configure: Re-generate.
11451
11452 2018-04-09  Pedro Alves  <palves@redhat.com>
11453
11454         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11455         (set_target_gdbarch): Call
11456         gdb::observers::architecture_changed.notify instead of
11457         observer_notify_architecture_changed.
11458
11459 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11460
11461         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11462         (do_restore_current_traceframe_cleanup): Remove.
11463         (restore_current_traceframe_cleanup_dtor): Remove.
11464         (make_cleanup_restore_current_traceframe): Remove.
11465         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11466         New.
11467         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11468         * infrun.c (fetch_inferior_event): Use
11469         scoped_restore_current_traceframe.
11470
11471 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11472
11473         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11474         Remove.
11475         <n_allocated_type_units>: Remove.
11476         <all_type_units>: Change to std::vector.
11477         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11478         to std::vector change.
11479         (dwarf2_per_objfile::get_cutu): Likewise.
11480         (dwarf2_per_objfile::get_tu): Likewise.
11481         (create_signatured_type_table_from_index): Likewise.
11482         (create_signatured_type_table_from_debug_names): Likewise.
11483         (dw2_symtab_iter_next): Likewise.
11484         (dw2_print_stats): Likewise.
11485         (dw2_expand_all_symtabs): Likewise.
11486         (dw2_expand_marked_cus): Likewise.
11487         (dw2_debug_names_iterator::next): Likewise.
11488         (dwarf2_initialize_objfile): Likewise.
11489         (add_signatured_type_cu_to_table): Likewise.
11490         (create_all_type_units): Likewise.
11491         (add_type_unit): Likewise.
11492         (struct tu_abbrev_offset): Add constructor.
11493         (build_type_psymtabs_1): Adjust to std::vector change.
11494         (print_tu_stats): Likewise.
11495         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11496         (write_debug_names): Likewise.
11497
11498 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11499
11500         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11501         Make an std::vector.
11502         <n_comp_units>: Remove.
11503         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11504         to std::vector change.
11505         (dwarf2_per_objfile::get_cutu): Likewise.
11506         (dwarf2_per_objfile::get_cu): Likewise.
11507         (create_cus_from_index): Likewise.
11508         (create_addrmap_from_index): Likewise.
11509         (create_addrmap_from_aranges): Likewise.
11510         (dwarf2_read_index): Likewise.
11511         (dw2_find_last_source_symtab): Likewise.
11512         (dw2_map_symtabs_matching_filename): Likewise.
11513         (dw2_symtab_iter_next): Likewise.
11514         (dw2_print_stats): Likewise.
11515         (dw2_expand_all_symtabs): Likewise.
11516         (dw2_expand_symtabs_with_fullname): Likewise.
11517         (dw2_expand_marked_cus): Likewise.
11518         (dw2_map_symbol_filenames): Likewise.
11519         (create_cus_from_debug_names): Likewise.
11520         (dwarf2_read_debug_names): Likewise.
11521         (dw2_debug_names_iterator::next): Likewise.
11522         (dwarf2_initialize_objfile): Likewise.
11523         (set_partial_user): Likewise.
11524         (dwarf2_build_psymtabs_hard): Likewise.
11525         (read_comp_units_from_section): Remove arguments, adjust to
11526         std::vector change.
11527         (create_all_comp_units): Adjust to std::vector and
11528         read_comp_units_from_section changes.
11529         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11530         change.
11531         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11532         (psyms_seen_size): Likewise.
11533         (write_gdbindex): Likewise.
11534         (write_debug_names): Likewise.
11535
11536 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11537
11538         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11539         with dwarf2_per_objfile.
11540         (create_cus_from_index): Likewise.
11541         (create_signatured_type_table_from_index): Likewise.
11542         (dwarf2_read_index): Likewise.
11543         (dwarf2_initialize_objfile): Likewise.
11544         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11545         per_cu rather than get_dwarf2_per_objfile.
11546
11547 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11548
11549         * dwarf2read.h (struct signatured_type): Forward declare.
11550         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11551         New methods.
11552         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11553         (dw2_get_cutu): ...this.
11554         (dwarf2_per_objfile::get_cu): Rename from...
11555         (dw2_get_cu): ...this.
11556         (dwarf2_per_objfile::get_tu): New.
11557         (create_addrmap_from_index): Adjust.
11558         (create_addrmap_from_aranges): Adjust.
11559         (dw2_find_last_source_symtab): Adjust.
11560         (dw2_map_symtabs_matching_filename): Adjust.
11561         (dw2_symtab_iter_next): Adjust.
11562         (dw2_print_stats): Adjust.
11563         (dw2_expand_all_symtabs): Adjust.
11564         (dw2_expand_symtabs_with_fullname): Adjust.
11565         (dw2_expand_marked_cus): Adjust.
11566         (dw_expand_symtabs_matching_file_matcher): Adjust.
11567         (dw2_map_symbol_filenames): Adjust.
11568         (dw2_debug_names_iterator::next): Adjust.
11569         (dwarf2_initialize_objfile): Adjust.
11570         (set_partial_user): Adjust.
11571         (dwarf2_build_psymtabs_hard): Adjust.
11572
11573 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11574
11575         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11576         Remove unused variables.
11577         (dw2_map_symtabs_matching_filename): Likewise.
11578         (dwarf2_record_block_ranges): Likewise.
11579         (dwarf2_read_addr_index): Likewise.
11580         (follow_die_offset): Likewise.
11581
11582 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11583
11584         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11585         to symbol_file_add_main.
11586
11587 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11588
11589         PR mi/22299
11590         * mi/mi-console.c (do_fputc_async_safe): New.
11591         (mi_console_file::write_async_safe): New.
11592         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11593         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11594         New.
11595         * ui-file.c (ui_file::putstrn): Adjust call to
11596         fputstrn_unfiltered.
11597         * utils.c (printchar): Replace do_fputs and do_fprintf
11598         parameters by do_fputc.
11599         (fputstr_filtered): Adjust call to printchar.
11600         (fputstr_unfiltered): Likewise.
11601         (fputstrn_filtered): Likewise.
11602         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11603         printchar.
11604         * utils.h (do_fputc_ftype): New typedef.
11605         (fputstrn_unfiltered): Add do_fputc parameter.
11606
11607 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11608
11609         * regformats/i386/i386-avx.dat: Remove.
11610
11611 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11612
11613         PR gdb/22979
11614         * amd64-tdep.c (amd64_none_init_abi): New function.
11615         (amd64_x32_none_init_abi): New function.
11616         (_initialize_amd64_tdep): Register handlers for x86-64 and
11617         x64_32 with GDB_OSABI_NONE.
11618         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11619         GDB_OSABI_NONE osabi.
11620
11621 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11622
11623         PR gdb/22980
11624         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11625         GDB_OSABI_NONE.
11626         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11627         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11628
11629 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11630
11631         * common/byte-vector.h (char_vector): New type.
11632         * target.h (target_read_alloc): Return
11633         gdb::optional<byte_vector>.
11634         (target_read_stralloc): Return gdb::optional<char_vector>.
11635         (target_get_osdata): Return gdb::optional<char_vector>.
11636         * target.c (target_read_alloc_1): Templatize.  Replacement
11637         manual memory management with vector.
11638         (target_read_alloc): Change return type, adjust.
11639         (target_read_stralloc): Change return type, adjust.
11640         (target_get_osdata): Change return type, adjust.
11641         * auxv.c (struct auxv_info) <length>: Remove.
11642         <data>: Change type to gdb::optional<byte_vector>.
11643         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11644         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11645         (target_auxv_search): Adjust.
11646         (fprint_target_auxv): Adjust.
11647         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11648         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11649         (linux_make_corefile_notes): Adjust.
11650         * osdata.c (get_osdata): Adjust.
11651         * remote.c (remote_get_threads_with_qxfer): Adjust.
11652         (remote_memory_map): Adjust.
11653         (remote_traceframe_info): Adjust.
11654         (btrace_read_config): Adjust.
11655         (remote_read_btrace): Adjust.
11656         (remote_pid_to_exec_file): Adjust.
11657         * solib-aix.c (solib_aix_get_library_list): Adjust.
11658         * solib-dsbt.c (decode_loadmap): Don't free buf.
11659         (dsbt_get_initial_loadmaps): Adjust.
11660         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11661         * solib-target.c (solib_target_current_sos): Adjust.
11662         * tracepoint.c (sdata_make_value): Adjust.
11663         * xml-support.c (xinclude_start_include): Adjust.
11664         (xml_fetch_content_from_file): Adjust.
11665         * xml-support.h (xml_fetch_another): Change return type.
11666         (xml_fetch_content_from_file): Change return type.
11667         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11668         * xml-tdesc.c (file_read_description_xml): Adjust.
11669         (fetch_available_features_from_target): Change return type.
11670         (target_fetch_description_xml): Adjust.
11671         (target_read_description_xml): Adjust.
11672
11673 2018-04-06  Tom Tromey  <tom@tromey.com>
11674
11675         * value.c (~value): Update.
11676         (struct value) <contents>: Now unique_xmalloc_ptr.
11677         (value_contents_bits_eq, allocate_value_contents)
11678         (value_contents_raw, value_contents_all_raw)
11679         (value_contents_for_printing, value_contents_for_printing_const)
11680         (set_value_enclosing_type): Update.
11681
11682 2018-04-06  Tom Tromey  <tom@tromey.com>
11683
11684         * value.c (range_s): Remove typedef, VEC.
11685         (struct range): Add operator<.
11686         (range_lessthan): Remove.
11687         (ranges_contain): Change type.
11688         (~value): Update.
11689         (struct value) <unavailable, optimized_out>: Now std::vector.
11690         (value_entirely_available)
11691         (value_entirely_covered_by_range_vector)
11692         (value_entirely_unavailable, value_entirely_optimized_out):
11693         Update.
11694         (insert_into_bit_range_vector): Change argument type.
11695         (find_first_range_overlap): Likewise.
11696         (struct ranges_and_idx, value_contents_bits_eq)
11697         (require_not_optimized_out, require_available): Update.
11698         (ranges_copy_adjusted): Change argument types.
11699         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11700
11701 2018-04-06  Tom Tromey  <tom@tromey.com>
11702
11703         * value.c (~value): Update.
11704         (struct value) <parent>: Now a value_ref_ptr.
11705         (value_parent, set_value_parent, value_address, value_copy):
11706         Update.
11707
11708 2018-04-06  Tom Tromey  <tom@tromey.com>
11709
11710         * value.c (struct value): Add constructor, destructor, and member
11711         initializers.
11712         (allocate_value_lazy, value_decref): Update.
11713
11714 2018-04-06  Tom Tromey  <tom@tromey.com>
11715
11716         * value.c (struct value) <released, next>: Remove.
11717         (all_values): Now a std::vector.
11718         (allocate_value_lazy): Update.
11719         (value_next): Remove.
11720         (value_mark, value_free_to_mark, release_value)
11721         (value_release_to_mark): Update.
11722
11723 2018-04-06  Tom Tromey  <tom@tromey.com>
11724
11725         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11726         (free_value_chain): Remove.
11727         * value.c (free_value_chain): Remove.
11728         (value_release_to_mark): Return a std::vector.
11729         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11730         std::vector.
11731         (check_condition): Update.
11732         * eval.c (fetch_subexp_value): Change "val_chain" to a
11733         std::vector.
11734         * breakpoint.c (update_watchpoint): Update.
11735         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11736
11737 2018-04-06  Tom Tromey  <tom@tromey.com>
11738
11739         * value.h (free_all_values): Remove.
11740         * value.c (free_all_values): Remove.
11741
11742 2018-04-06  Tom Tromey  <tom@tromey.com>
11743
11744         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11745         (value_history_chain, value_history_count): Remove.
11746         (value_history): New global.
11747         (record_latest_value, access_value_history, show_values)
11748         (preserve_values): Update.
11749
11750 2018-04-06  Tom Tromey  <tom@tromey.com>
11751
11752         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11753         * varobj.c (varobj_set_display_format, varobj_set_value)
11754         (install_default_visualizer, construct_visualizer)
11755         (install_new_value, ~varobj, varobj_get_value_type)
11756         (my_value_of_variable, varobj_editable_p): Update.
11757         * c-varobj.c (c_describe_child, c_value_of_variable)
11758         (cplus_number_of_children, cplus_describe_child): Update.
11759         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11760         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11761         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11762
11763 2018-04-06  Tom Tromey  <tom@tromey.com>
11764
11765         * printcmd.c (last_examine_address): Change type to
11766         value_ref_ptr.
11767         (do_examine, x_command): Update.
11768
11769 2018-04-06  Tom Tromey  <tom@tromey.com>
11770
11771         * value.c (release_value): Update.
11772         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11773         (struct bpstats) <val>: Now a value_ref_ptr.
11774         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11775         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11776         (~watchpoint, print_it_watchpoint, watch_command_1)
11777         (invalidate_bp_value_on_memory_change): Update.
11778
11779 2018-04-06  Tom Tromey  <tom@tromey.com>
11780
11781         * varobj.c (varobj_clear_saved_item)
11782         (update_dynamic_varobj_children, install_new_value, ~varobj):
11783         Update.
11784         * value.h (value_incref): Move declaration earlier.
11785         (value_decref): Rename from value_free.
11786         (struct value_ref_policy): New.
11787         (value_ref_ptr): New typedef.
11788         (struct value_deleter): Remove.
11789         (gdb_value_up): Remove typedef.
11790         (release_value): Change return type.
11791         (release_value_or_incref): Remove.
11792         * value.c (set_value_parent): Update.
11793         (value_incref): Change return type.
11794         (value_decref): Rename from value_free.
11795         (value_free_to_mark, free_all_values, free_value_chain): Update.
11796         (release_value): Return value_ref_ptr.
11797         (release_value_or_incref): Remove.
11798         (record_latest_value, set_internalvar, clear_internalvar):
11799         Update.
11800         * stack.c (info_frame_command): Don't call value_free.
11801         * python/py-value.c (valpy_dealloc, valpy_new)
11802         (value_to_value_object): Update.
11803         * printcmd.c (do_examine): Update.
11804         * opencl-lang.c (lval_func_free_closure): Update.
11805         * mi/mi-main.c (register_changed_p): Don't call value_free.
11806         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11807         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11808         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11809         value_free.
11810         * guile/scm-value.c (vlscm_free_value_smob)
11811         (vlscm_scm_from_value): Update.
11812         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11813         (frame_unwind_register_unsigned, get_frame_register_bytes)
11814         (put_frame_register_bytes): Don't call value_free.
11815         * findvar.c (address_from_register): Don't call value_free.
11816         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11817         * dwarf2loc.c (entry_data_value_free_closure)
11818         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11819         (dwarf2_evaluate_loc_desc_full): Update.
11820         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11821         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11822         (~watchpoint, watch_command_1)
11823         (invalidate_bp_value_on_memory_change): Update.
11824         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11825
11826 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11827
11828         PR gdb/23022
11829         * warning.m4: Add -Wno-error=deprecated-register.
11830         * configure: Re-generate.
11831
11832 2018-04-05  Tom Tromey  <tom@tromey.com>
11833
11834         * linespec.h: Remove include of "vec.h".
11835
11836 2018-04-05  Tom Tromey  <tom@tromey.com>
11837
11838         * linespec.c (typep): Remove typedef.
11839         (find_methods, find_superclass_methods): Take a std::vector.
11840         (find_method): Use std::vector.
11841
11842 2018-04-05  Tom Tromey  <tom@tromey.com>
11843
11844         * utils.c (compare_strings): Remove.
11845         * utils.h (compare_strings): Remove.
11846         * objc-lang.h (find_imps): Update.
11847         * objc-lang.c (find_methods): Take a std::vector.
11848         (uniquify_strings, find_imps): Likewise.
11849         * linespec.c (find_methods): Take a std::vector.
11850         (decode_objc): Use std::vector.
11851         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11852         a std::vector.
11853         (find_method, find_function_symbols): Use std::vector.
11854
11855 2018-04-05  Tom Tromey  <tom@tromey.com>
11856
11857         * completer.c (completion_tracker::completion_tracker): Remove
11858         cast.
11859         (completion_tracker::discard_completions): Likewise.
11860         * breakpoint.c (ambiguous_names_p): Remove cast.
11861         * ada-lang.c (_initialize_ada_language): Remove cast.
11862         * utils.h (streq): Update.
11863         (streq_hash): Add new declaration.
11864         * utils.c (streq): Return bool.
11865         (streq_hash): New function.
11866
11867 2018-04-05  Tom Tromey  <tom@tromey.com>
11868
11869         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11870         Remove a string copy.
11871
11872 2018-04-05  Tom Tromey  <tom@tromey.com>
11873
11874         * linespec.c (filter_results): Use std::vector.
11875         (decode_line_2, decode_line_full): Update.
11876
11877 2018-04-05  Tom Tromey  <tom@tromey.com>
11878
11879         * linespec.c (canonical_to_fullform): Return std::string.
11880         (filter_results): Update.
11881         (struct decode_line_2_item): Add constructor.
11882         <fullform, displayform>: Now std::string.
11883         (decode_line_2_compare_items): Now a std::sort comparator.
11884         (decode_line_2): Update.
11885
11886 2018-04-05  Tom Tromey  <tom@tromey.com>
11887
11888         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11889         (unexpected_linespec_error): Update.
11890         (linespec_parse_basic, parse_linespec): Update.
11891
11892 2018-04-05  Tom Tromey  <tom@tromey.com>
11893
11894         * linespec.c (linespec_parse_basic): Reindent.
11895
11896 2018-04-05  Tom Tromey  <tom@tromey.com>
11897
11898         * minsyms.h (iterate_over_minimal_symbols): Update.
11899         * minsyms.c (iterate_over_minimal_symbols): Take a
11900         gdb::function_view.
11901         * linespec.c (struct collect_minsyms): Remove.
11902         (compare_msyms): Now a std::sort comparator.
11903         (add_minsym): Add parameters.
11904         (search_minsyms_for_name): Update.  Use std::vector.
11905
11906 2018-04-03  Tom Tromey  <tom@tromey.com>
11907
11908         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11909         gdb::byte_vector.
11910
11911 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11912
11913         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11914
11915 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11916
11917         PR gdb/16959
11918         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11919         printing static type.
11920
11921 2018-04-01  Tom Tromey  <tom@tromey.com>
11922
11923         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11924         (rs6000_xfer_shared_libraries): Update.
11925
11926 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11927
11928         * common/gdb_vecs.h (char_ptr): Remove.
11929         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11930
11931 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11932
11933         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11934         with std::vector.
11935         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11936
11937 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11938
11939         * tracepoint.h (struct uploaded_tp): Initialize fields.
11940         <actions, step_actions, cmd_strings>: Change type to
11941         std::vector<char *>.
11942         * tracepoint.c (get_uploaded_tp): Allocate with new.
11943         (free_uploaded_tps): Free with delete.
11944         (parse_tracepoint_definition): Adjust to std::vector change.
11945         * breakpoint.c (read_uploaded_action): Likewise.
11946         (create_tracepoint_from_upload): Likewise.
11947         * ctf.c (ctf_write_uploaded_tp): Likewise.
11948         (SET_ARRAY_FIELD): Likewise.
11949         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11950
11951 2018-03-30  Tom Tromey  <tom@tromey.com>
11952
11953         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11954         std::unique_ptr.
11955         (svr4_keep_data_in_core): Update.
11956         (svr4_read_so_list): Update.
11957
11958 2018-03-30  Tom Tromey  <tom@tromey.com>
11959
11960         * windows-nat.c (handle_output_debug_string, handle_exception):
11961         Update.
11962         * target.h (target_read_string): Update.
11963         * target.c (target_read_string): Change "string" to
11964         unique_xmalloc_ptr.
11965         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11966         Update.
11967         * solib-frv.c (frv_current_sos): Update.
11968         * solib-dsbt.c (dsbt_current_sos): Update.
11969         * solib-darwin.c (darwin_current_sos): Update.
11970         * linux-thread-db.c (inferior_has_bug): Update.
11971         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11972         Update.  Remove alloca.
11973         * ada-lang.c (ada_main_name): Update.
11974
11975 2018-03-30  Tom Tromey  <tom@tromey.com>
11976
11977         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11978         (struct dwo_file_deleter): New.
11979         (dwo_file_up): New typedef.
11980         (open_and_init_dwo_file): Use dwo_file_up.
11981         (free_dwo_file_cleanup): Remove.
11982
11983 2018-03-30  Tom Tromey  <tom@tromey.com>
11984
11985         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11986         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11987
11988 2018-03-30  Tom Tromey  <tom@tromey.com>
11989
11990         * dwarf2read.c (class free_cached_comp_units): New class.
11991         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11992         (free_cached_comp_units): Remove function.
11993
11994 2018-03-30  Tom Tromey  <tom@tromey.com>
11995
11996         * utils.h (make_cleanup_unpush_target): Remove.
11997         * inf-ptrace.c (struct target_unpusher): New.
11998         (target_unpush_up) New typedef.
11999         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12000         target_unpush_up.
12001         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12002
12003 2018-03-27  Tom Tromey  <tom@tromey.com>
12004
12005         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12006
12007 2018-03-27  Pedro Alves  <palves@redhat.com>
12008             Tom Tromey  <tom@tromey.com>
12009
12010         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12011         destructor.  Now a class.
12012         (gdb_readline_wrapper_cleanup): Remove function.
12013         (gdb_readline_wrapper): Remove cleanups.
12014
12015 2018-03-27  Tom Tromey  <tom@tromey.com>
12016
12017         * typeprint.h (struct type_print_options) <local_typedefs,
12018         global_typedefs>: Remove "struct" keyword.
12019         (class typedef_hash_table): New class.
12020         (recursively_update_typedef_hash, add_template_parameters)
12021         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12022         (find_typedef_in_hash): Don't declare.
12023         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12024         (typedef_hash_table::recursively_update): Rename from
12025         recursively_update_typedef_hash.  Now a member.
12026         (typedef_hash_table::add_template_parameters): Rename from
12027         add_template_parameters.  Now a member.
12028         (typedef_hash_table::typedef_hash_table): Now a constructor;
12029         rename from create_typedef_hash.
12030         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12031         rename from free_typedef_hash.
12032         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12033         (do_free_global_table): Remove.
12034         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12035         from copy_type_recursive.
12036         (create_global_typedef_table): Remove.
12037         (typedef_hash_table::find_global_typedef): Now a member of
12038         typedef_hash_table.
12039         (typedef_hash_table::find_typedef): Rename from
12040         find_typedef_in_hash; now a member.
12041         (whatis_exp): Update.
12042         * extension.h (struct ext_lang_type_printers): Add constructor and
12043         destructor.
12044         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12045         declare.
12046         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12047         Now a constructor; rename from start_ext_lang_type_printers.
12048         (ext_lang_type_printers): Now a destructor; rename from
12049         free_ext_lang_type_printers.
12050         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12051         Update.
12052         (c_type_print_base_struct_union): Update.  Remove cleanups.
12053
12054 2018-03-27  Tom Tromey  <tom@tromey.com>
12055
12056         * dwarf-index-write.c: Include <cmath>.
12057
12058 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12059
12060         * NEWS: Add entry describing new "set|show varsize-limit" command.
12061         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12062         command.
12063         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12064         "set variable".
12065
12066 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12067
12068         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12069         dwarf-index-write.c
12070         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12071         * dwarf-index-common.c: New file.
12072         * dwarf-index-common.h: New file.
12073         * dwarf-index-write.c: New file.
12074         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12075         (struct dwarf2_section_info): Move from here.
12076         (dwarf2_section_info_def): Likewise.
12077         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12078         (offset_type): Likewise.
12079         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12080         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12081         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12082         (byte_swap): Likewise.
12083         (MAYBE_SWAP): Likewise.
12084         (dwarf2_per_cu_ptr): Likewise.
12085         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12086         (struct tu_stats): Likewise.
12087         (struct dwarf2_per_objfile): Likewise.
12088         (struct dwarf2_per_cu_data): Likewise.
12089         (struct signatured_type): Likewise.
12090         (sig_type_ptr): Likewise.
12091         (DEF_VEC_P (sig_type_ptr)): Likewise.
12092         (INDEX4_SUFFIX): Likewise.
12093         (INDEX5_SUFFIX): Likewise.
12094         (DEBUG_STR_SUFFIX): Likewise.
12095         (dwarf2_read_section): Make non-static.
12096         (mapped_index_string_hash): Move from here.
12097         (dwarf5_djb_hash): Likewise.
12098         (file_write): Likewise.
12099         (class data_buf): Likewise.
12100         (struct symtab_index_entry): Likewise.
12101         (struct mapped_symtab): Likewise.
12102         (find_slot): Likewise.
12103         (hash_expand): Likewise.
12104         (add_index_entry): Likewise.
12105         (uniquify_cu_indices): Likewise.
12106         (class c_str_view): Likewise.
12107         (class c_str_view_hasher): Likewise.
12108         (class vector_hasher): Likewise.
12109         (write_hash_table): Likewise.
12110         (psym_index_map): Likewise.
12111         (struct addrmap_index_data): Likewise.
12112         (add_address_entry): Likewise.
12113         (add_address_entry_worker): Likewise.
12114         (write_address_map): Likewise.
12115         (symbol_kind): Likewise.
12116         (write_psymbols): Likewise.
12117         (struct signatured_type_index_data): Likewise.
12118         (write_one_signatured_type): Likewise.
12119         (recursively_count_psymbols): Likewise.
12120         (recursively_write_psymbols): Likewise.
12121         (class debug_names): Likewise.
12122         (check_dwarf64_offsets): Likewise.
12123         (psyms_seen_size): Likewise.
12124         (write_gdbindex): Likewise.
12125         (write_debug_names): Likewise.
12126         (assert_file_size): Likewise.
12127         (write_psymtabs_to_index): Likewise.
12128         (save_gdb_index_command): Likewise.
12129         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12130         command.
12131         * dwarf2read.h: New file.
12132
12133 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12134
12135         PR gdb/22670
12136         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12137         symbol name if the CU's language stores symbol names in linkage
12138         format.
12139         * language.h (struct language_defn)
12140         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12141         all instances of this struct.
12142
12143 2018-03-26  Tom Tromey  <tom@tromey.com>
12144
12145         * stack.c (backtrace_command_1): Remove verbose code.
12146
12147 2018-03-26  Tom Tromey  <tom@tromey.com>
12148
12149         * python/py-framefilter.c (py_print_type): Don't catch
12150         exceptions.  Return void.
12151         (py_print_value): Likewise.
12152         (py_print_single_arg): Likewise.
12153         (enumerate_args): Don't catch exceptions.
12154         (py_print_args): Likewise.
12155         (py_print_frame): Likewise.
12156         (gdbpy_apply_frame_filter): Catch exceptions here.
12157
12158 2018-03-26  Tom Tromey  <tom@tromey.com>
12159
12160         * stack.c (_initialize_stack): Remove trailing newlines from help
12161         text.  Add "Usage" line to "backtrace" help.
12162
12163 2018-03-26  Tom Tromey  <tom@tromey.com>
12164
12165         PR python/16486:
12166         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12167
12168 2018-03-26  Tom Tromey  <tom@tromey.com>
12169
12170         * python/py-framefilter.c (py_print_single_arg): Return
12171         EXT_LANG_BT_ERROR from catch.
12172
12173 2018-03-26  Tom Tromey  <tom@tromey.com>
12174
12175         PR backtrace/15584:
12176         * stack.c (backtrace_command_1): Move some code into no-filters
12177         "if".
12178
12179 2018-03-26  Tom Tromey  <tom@tromey.com>
12180
12181         * python/py-framefilter.c (throw_quit_or_print_exception): New
12182         function.
12183         (gdbpy_apply_frame_filter): Use it.
12184
12185 2018-03-26  Tom Tromey  <tom@tromey.com>
12186
12187         PR cli/17716:
12188         * python/py-framefilter.c (py_print_type, py_print_value)
12189         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12190         RETURN_MASK_ERROR.
12191
12192 2018-03-26  Tom Tromey  <tom@tromey.com>
12193
12194         * python/py-framefilter.c (enumerate_args): Use
12195         gdb::unique_xmalloc_ptr.
12196
12197 2018-03-26  Tom Tromey  <tom@tromey.com>
12198
12199         * python/py-framefilter.c (py_print_frame): Return
12200         EXT_LANG_BT_OK.
12201         (gdbpy_apply_frame_filter): Update comment.
12202         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12203         Remove.
12204         <EXT_LANG_BT_NO_FILTERS>: Change value.
12205
12206 2018-03-26  Tom Tromey  <tom@tromey.com>
12207
12208         PR backtrace/15582:
12209         * stack.c (backtrace_command): Parse "hide" argument.
12210         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12211         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12212         constant.
12213
12214 2018-03-26  Tom Tromey  <tom@tromey.com>
12215
12216         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12217         add "flags".
12218         (backtrace_command): Remove "fulltrace", add "flags".
12219
12220 2018-03-26  Tom Tromey  <tom@tromey.com>
12221
12222         * stack.c (backtrace_command): Rewrite command line parsing.
12223
12224 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12225
12226         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12227
12228 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12229
12230         * filename-seen-cache.h: Add include guard.
12231
12232 2018-03-26  Keith Seitz  <keiths@redhat.com>
12233
12234         * symfile.c (place_section): Remove "struct" from section_addr_info
12235         in comment.
12236         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12237         "struct" keyword from section_addr_info.
12238
12239 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12240
12241         * regformats/regdef.h (reg): Add constructors.
12242
12243 2018-03-25  Pedro Alves  <palves@redhat.com>
12244
12245         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12246         if then/else bodies in var_func_name extraction.
12247
12248 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12249
12250         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12251         lookup_minimal_symbol() to find symbol entry.
12252         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12253
12254 2018-03-23  Keith Seitz  <keiths@redhat.com>
12255
12256         PR c++/22968
12257         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12258         nested type definitions for C++, too.
12259
12260 2018-03-23  Tom Tromey  <tom@tromey.com>
12261
12262         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12263         a typedef.
12264         (macho_register_oso): Remove.
12265         (macho_symtab_read): Take a std::vector.
12266         (oso_el_compare_name): Now a std::sort comparator.
12267         (macho_symfile_read_all_oso): Take a std::vector.
12268         (macho_symfile_read): Use std::vector.  Remove cleanups.
12269
12270 2018-03-22  Tom Tromey  <tom@tromey.com>
12271
12272         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12273         (record_full_goto_bookmark): Use std::string.
12274
12275 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12276
12277         PR tdep/18295
12278         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12279         a single mask.
12280
12281 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12282
12283         * rs6000-tdep.c (store_insn_p): New function.
12284         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12285         and cr_reg to their unshifted values. Use store_insn_p to
12286         match LR saves using either R1 or fdata->alloca_reg. Use
12287         store_insn_p to match CR saves. Set alloca_reg_offset
12288         when alloca_reg and framep are set. Remove lr_reg shift
12289         when assigning to fdata->lr_register.
12290
12291 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12292
12293         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12294         command line args instead of emitting a warning.
12295
12296 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12297
12298         * tracepoint.h (struct static_tracepoint_marker): Initialize
12299         fields, define default constructor, move constructor and move
12300         assignment, disable the rest.
12301         <str_id, extra>: Make std::string.
12302         (release_static_tracepoint_marker): Remove.
12303         (free_current_marker): Remove.
12304         * tracepoint.c (free_current_marker): Remove.
12305         (parse_static_tracepoint_marker_definition): Adjust to
12306         std::string, use new hex2str overload.
12307         (release_static_tracepoint_marker): Remove.
12308         (print_one_static_tracepoint_marker): Get marker by reference
12309         and adjust to std::string.
12310         (info_static_tracepoint_markers_command): Adjust to std::vector
12311         changes
12312         * target.h (static_tracepoint_marker_p): Remove typedef.
12313         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12314         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12315         bool.
12316         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12317         * target-debug.h
12318         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12319         (target_debug_print_std_vector_static_tracepoint_marker): New.
12320         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12321         to...
12322         (target_debug_print_static_tracepoint_marker_p): ... this.
12323         * target-delegates.c: Re-generate.
12324         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12325         Make std::string.
12326         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12327         (decode_static_tracepoint_spec): Adjust to std::vector.
12328         (tracepoint_print_one_detail): Adjust to std::string.
12329         (strace_marker_decode_location): Adjust to std::string.
12330         (update_static_tracepoint): Adjust to std::string, remove call
12331         to release_static_tracepoint_marker.
12332         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12333         Adjust to std::vector.
12334         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12335         (remote_static_tracepoint_markers_by_strid): Adjust to
12336         std::vector.
12337         * common/rsp-low.h (hex2str): New overload with explicit count
12338         of bytes.
12339         * common/rsp-low.c (hex2str): New overload with explicit count
12340         of bytes.
12341         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12342         (_initialize_rsp_low_selftests): Add test_hex2str test.
12343         * unittests/tracepoint-selftests.c
12344         (test_parse_static_tracepoint_marker_definition): Adjust to
12345         std::string.
12346
12347 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12348
12349         * tracepoint.c (parse_static_tracepoint_marker_definition):
12350         Consider case where the definition is followed by more
12351         definitions.
12352         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12353         tracepoint-selftests.c.
12354         * unittests/tracepoint-selftests.c: New.
12355
12356 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12357
12358         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12359         Carvalho.
12360
12361 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12362
12363         * symtab.c (find_pc_sect_line): fixed indentation.
12364
12365 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12366
12367         * symtab.c (find_pc_sect_line): now uses binary search.
12368
12369 2018-03-19  Tom Tromey  <tom@tromey.com>
12370
12371         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12372         "IDENT" production.
12373
12374 2018-03-19  Pedro Alves  <palves@redhat.com>
12375             Tom Tromey  <tom@tromey.com>
12376
12377         * unittests/observable-selftests.c: New file.
12378         * common/observable.h: New file.
12379         * observable.h: New file.
12380         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12381         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12382         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12383         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12384         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12385         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12386         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12387         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12388         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12389         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12390         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12391         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12392         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12393         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12394         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12395         tui/tui-interp.c, valops.c: Update all users.
12396         * tui/tui-hooks.c (tui_bp_created_observer)
12397         (tui_bp_deleted_observer, tui_bp_modified_observer)
12398         (tui_inferior_exit_observer, tui_before_prompt_observer)
12399         (tui_normal_stop_observer, tui_register_changed_observer):
12400         Remove.
12401         (tui_observers_token): New global.
12402         (attach_or_detach, tui_attach_detach_observers): New functions.
12403         (tui_install_hooks, tui_remove_hooks): Use
12404         tui_attach_detach_observers.
12405         * record-btrace.c (record_btrace_thread_observer): Remove.
12406         (record_btrace_thread_observer_token): New global.
12407         * observer.sh: Remove.
12408         * observer.c: Rename to observable.c.
12409         * observable.c (namespace gdb_observers): Define new objects.
12410         (observer_debug): Move into gdb_observers namespace.
12411         (struct observer, struct observer_list, xalloc_observer_list_node)
12412         (xfree_observer_list_node, generic_observer_attach)
12413         (generic_observer_detach, generic_observer_notify): Remove.
12414         (_initialize_observer): Update.
12415         Don't include observer.inc.
12416         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12417         (clean mostlyclean): Likewise.
12418         (observer.h, observer.inc): Remove targets.
12419         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12420         (COMMON_SFILES): Use observable.c, not observer.c.
12421         * .gitignore: Remove observer.h.
12422
12423 2018-03-18  Tom Tromey  <tom@tromey.com>
12424
12425         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12426         gdb::def_vector.
12427         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12428
12429 2018-03-17  Tom Tromey  <tom@tromey.com>
12430
12431         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12432
12433 2018-03-17  Tom Tromey  <tom@tromey.com>
12434
12435         * target.c (class scoped_target_fd): New.
12436         (target_fileio_close_cleanup): Remove.
12437         (target_fileio_read_alloc_1): Use scoped_target_fd.
12438
12439 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12440
12441         * silent-rules.mk: New.
12442         * Makefile.in: Include silent-rules.mk
12443         (srcdir, VPATH, top_srcdir): Move up.
12444         (COMPILE): Add ECHO_CXX.
12445         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12446         (init.c): Add ECHO_INIT_C.
12447         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12448         (version.c): Add ECHO_GEN.
12449         (printcmd.o): Add ECHO_CXX.
12450         (target-float.o): Add ECHO_CXX.
12451         (ada-exp.o): Add ECHO_CXX.
12452         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12453         (insight$(EXEEXT)): Add ECHO_CXXLD.
12454         * gnulib/configure.ac: Add AM_SILENT_RULES.
12455         * gnulib/aclocal.m4: Re-generate.
12456         * gnulib/configure: Re-generate.
12457         * gnulib/import/Makefile.in: Re-generate.
12458
12459 2018-03-16  Tom Tromey  <tom@tromey.com>
12460
12461         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12462         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12463         * utils.c (do_free_section_addr_info)
12464         (make_cleanup_free_section_addr_info): Remove.
12465         * symfile.h (struct other_sections): Add constructor.
12466         (struct section_addr_info): Remove.
12467         (section_addr_info): New typedef.
12468         (struct sym_fns) <sym_offsets>: Change type of parameter.
12469         (build_section_addr_info_from_objfile)
12470         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12471         (default_symfile_offsets, symbol_file_add)
12472         (symbol_file_add_from_bfd)
12473         (build_section_addr_info_from_section_table): Update.
12474         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12475         * symfile.c (alloc_section_addr_info): Remove.
12476         (build_section_addr_info_from_section_table): Change return type.
12477         Update.
12478         (build_section_addr_info_from_bfd)
12479         (build_section_addr_info_from_objfile): Likewise.
12480         (free_section_addr_info): Remove.
12481         (relative_addr_info_to_section_offsets): Change type of "addrs".
12482         (addrs_section_compar): Now a std::sort comparator.
12483         (addrs_section_sort): Change return type.
12484         (addr_info_make_relative): Change type of "addrs".  Update.
12485         (default_symfile_offsets, syms_from_objfile_1)
12486         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12487         (symbol_file_add_separate): Update.
12488         (symbol_file_add): Change type of "addrs".  Update.
12489         (add_symbol_file_command): Update.  Remove cleanups.
12490         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12491         cleanups.
12492         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12493         * solib.c (solib_read_symbols): Update.
12494         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12495         * machoread.c (macho_symfile_offsets): Update.
12496         * jit.c (jit_bfd_try_read_symtab): Update.
12497
12498 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12499
12500         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12501         unittests/utils-selftests.c.
12502         * unittests/utils-selftests.c: New file.
12503
12504 2018-03-14  Tom Tromey  <tom@tromey.com>
12505
12506         PR cli/14977:
12507         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12508         for NULL.
12509
12510 2018-03-14  Tom Tromey  <tom@tromey.com>
12511
12512         PR cli/19918:
12513         * printcmd.c (printf_pointer): Allow "-" in format.
12514
12515 2018-03-14  Tom Tromey  <tom@tromey.com>
12516
12517         * printcmd.c (_initialize_printcmd): Add usage to printf.
12518
12519 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12520
12521         * MAINTAINERS: Update my email address.
12522
12523 2018-03-13  Tom Tromey  <tom@tromey.com>
12524
12525         * machoread.c (macho_check_dsym): Change filenamep to a
12526         std::string*.
12527         (macho_symfile_read): Update.
12528         * symfile.c (load_command): Use std::string.
12529
12530 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12531
12532         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12533         to error message string.
12534         (riscv_register_name): Use xsnprintf instead of sprintf.
12535         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12536         internal_error.
12537         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12538         error.
12539         (riscv_push_dummy_call): Likewise.
12540
12541 2018-03-12  Tom Tromey  <tom@tromey.com>
12542
12543         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12544         Use gdb::byte_vector.
12545         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12546
12547 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12548
12549         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12550         parameter type to readable_regcache.
12551         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12552         the declaration.
12553
12554 2018-03-11  Tom Tromey  <tom@tromey.com>
12555
12556         * dwarf2read.c (struct nextfield): Add initializers.
12557         (struct nextfnfield): Remove.
12558         (struct fnfieldlist): Add initializers.  Remove "length" and
12559         "head", use std::vector.
12560         (struct decl_field_list): Remove.
12561         (struct field_info): Add initializers.
12562         <fields, baseclasses>: Now std::vector.
12563         <nbaseclasses, nfnfields, typedef_field_list_count,
12564         nested_types_list_count>: Remove.
12565         (dwarf2_add_field, dwarf2_add_type_defn)
12566         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12567         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12568         (process_structure_scope): Update.
12569
12570 2018-03-11  Tom Tromey  <tom@tromey.com>
12571
12572         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12573         for use by std::sort.
12574         (build_type_psymtabs_1): Use std::vector.
12575
12576 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12577
12578         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12579         and LIBMPFR in the printed configuration.
12580
12581 2018-03-08  Tom Tromey  <tom@tromey.com>
12582
12583         * source.c (get_filename_and_charpos): Use scoped_fd.
12584         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12585         (procfs_pidlist): Likewise.
12586         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12587         (iterate_over_mappings): Likewise.
12588
12589 2018-03-08  Tom Tromey  <tom@tromey.com>
12590
12591         * infcall.c (struct call_return_meta_info)
12592         <stack_temporaries_enabled>: Remove.
12593         (get_call_return_value, call_function_by_hand_dummy): Update.
12594         * thread.c (disable_thread_stack_temporaries): Remove.
12595         (enable_thread_stack_temporaries): Remove.
12596         (thread_stack_temporaries_enabled_p): Return bool.
12597         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12598         (get_last_thread_stack_temporary): Update.
12599         * eval.c (evaluate_subexp): Update.
12600         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12601         class, not a function.
12602         (value_ptr, value_vec): Remove typedefs.
12603         (class thread_info) <stack_temporaries_enabled>: Now bool.
12604         <stack_temporaries>: Now a std::vector.
12605         (thread_stack_temporaries_enabled_p)
12606         (value_in_thread_stack_temporaries): Return bool.
12607
12608 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12609
12610         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12611         (getpkt_or_notif_sane_1): Likewise.
12612
12613 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12614
12615         * build-id.c (build_id_to_debug_bfd): Use std::string.
12616
12617 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12618
12619         * build-id.c (find_separate_debug_file_by_buildid): Return
12620         std::string.
12621         * build-id.h (find_separate_debug_file_by_buildid): Return
12622         std::string.
12623         * coffread.c (coff_symfile_read): Adjust to std::string.
12624         * elfread.c (elf_symfile_read): Adjust to std::string.
12625         * symfile.c (separate_debug_file_exists): Change parameter to
12626         std::string.
12627         (find_separate_debug_file): Return std::string.
12628         (find_separate_debug_file_by_debuglink): Return std::string.
12629         * symfile.h (find_separate_debug_file_by_debuglink): Return
12630         std::string.
12631
12632 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12633
12634         * common/xml-utils.c (xml_escape_text): Move code to...
12635         (xml_escape_text_append): ... this new function.
12636         * common/xml-utils.h (xml_escape_text_append): New declaration.
12637         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12638         New function.
12639         (_initialize_xml_utils): register test_xml_escape_text_append as
12640         a selftest.
12641
12642 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12643
12644         * defs.h: Remove MAX_REGISTER_SIZE.
12645         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12646         asserts.
12647         * python/py-unwind.c (pyuw_sniffer): Likewise.
12648
12649 2018-03-07  Tom Tromey  <tom@tromey.com>
12650
12651         * linux-tdep.c (linux_info_proc): Update.
12652         * target.h (struct target_ops) <to_fileio_readlink>: Return
12653         optional<string>.
12654         (target_fileio_readlink): Return optional<string>.
12655         * remote.c (remote_hostio_readlink): Return optional<string>.
12656         * inf-child.c (inf_child_fileio_readlink): Return
12657         optional<string>.
12658         * target.c (target_fileio_readlink): Return optional<string>.
12659
12660 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12661
12662         * regcache.c (cooked_read_test): Add riscv to the list of
12663         architectures that have a save_reggroup.
12664
12665 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12666
12667         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12668         value is not a dynamic class object.
12669
12670 2018-03-06  Tom Tromey  <tom@tromey.com>
12671
12672         * rust-exp.y: Formatting fixes.
12673
12674 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12675
12676         * riscv-tdep.c (riscv_register_name): Remove target description
12677         support.
12678         (riscv_gdbarch_init): Remove target description check.
12679
12680 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12681
12682         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12683         comment.
12684         * riscv-tdep.h: Likewise.
12685
12686 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12687
12688         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12689         (riscv_pseudo_register_write): Delete.
12690         (riscv_gdbarch_init): Remove all use of pseudo registers.
12691
12692 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12693
12694         * record-btrace.c (btrace_print_lines): Replace cleanup
12695         parameter with RAII equivalents.
12696         (btrace_insn_history): Replace cleanup with RAII equivalents.
12697         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12698         make_cleanup_ui_out_tuple_begin_end): Remove.
12699         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12700         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12701         make_cleanup_ui_out_list_begin_end): Remove.
12702
12703 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12704
12705         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12706         parameter types to std::vector.  Use bool.
12707         (record_btrace_wait): Replace VEC(tp_t) with
12708         std::vector<thread_info *>.
12709         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12710
12711 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12712
12713         * record-btrace.c (record_btrace_disable_callback): Remove.
12714         (struct scoped_btrace_disable): New.
12715         (record_btrace_open): Use scoped_btrace_disable.
12716
12717 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12718
12719         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12720         reading values from registers.
12721
12722 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12723
12724         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12725         where appropriate.
12726
12727 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12728
12729         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12730         change parameter type.  Use GDB's print functions, and use
12731         core_addr_to_string where appropriate.
12732         (riscv_push_dummy_call): Use core_addr_to_string where
12733         appropriate, update call to riscv_print_arg_location, and reindent
12734         a few lines.
12735         (riscv_return_value): Update call to riscv_print_arg_location.
12736
12737 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12738             Tim Newsome <tim@sifive.com>
12739             Albert Ou <a0u@eecs.berkeley.edu>
12740             Darius Rad <darius@bluespec.com>
12741
12742         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12743         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12744         (ALLDEPFILES): Add riscv-tdep.c
12745         * configure.tgt: Add riscv support.
12746         * riscv-tdep.c: New file.
12747         * riscv-tdep.h: New file.
12748         * NEWS: Mention new target.
12749         * MAINTAINERS: Add entry for riscv.
12750
12751 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12752
12753         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12754         fields within aggregates.
12755
12756 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12757
12758         * record-btrace.c (btrace_print_lines): Change type of flags to
12759         gdb_disassembly_flags.
12760
12761 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12762
12763         * fbsd-nat.c: Include "inf-ptrace.h".
12764         (USE_SIGTRAP_SIGINFO): Conditionally define.
12765         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12766         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12767         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12768         function.
12769         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12770         Likewise.
12771         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12772         Likewise.
12773         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12774         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12775         "supports_stopped_by_hw_breakpoint" target methods.
12776
12777 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12778
12779         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12780         * fbsd-nat.c (debug_fbsd_nat): New variable.
12781         (show_fbsd_nat_debug): New function.
12782         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12783         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12784
12785 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12786
12787         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12788         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12789         prototype.
12790         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12791         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12792         method.
12793
12794 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12795
12796         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12797         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12798
12799 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12800
12801         * charset.c (struct charset_vector): New.
12802         (charsets): Change type to charset_vector.
12803         (find_charset_names): Adjust.
12804         (add_one): Adjust.
12805         (_initialize_charset): Adjust.
12806
12807 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12808
12809         * progspace.h (struct program_space) <deleted_solibs>: Change
12810         type to std::vector<std::string>.
12811         * progspace.c (clear_program_space_solib_cache): Adjust.
12812         * breakpoint.c (print_solib_event): Adjust.
12813         (check_status_catch_solib): Adjust.
12814         * solib.c (update_solib_list): Adjust.
12815         * ui-out.h (class ui_out) <field_string>: New overload.
12816         * ui-out.c (ui_out::field_string): New overload.
12817
12818 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12819
12820         * progspace.h (struct program_space): Add constructor and
12821         destructor, initialize fields.
12822         (add_program_space): Remove.
12823         * progspace.c (add_program_space): Rename to...
12824         (program_space::program_space): ... this.
12825         (release_program_space): Rename to...
12826         (program_space::~program_space): ... this.
12827         (delete_program_space): Use delete to delete program_space.
12828         (initialize_progspace): Use new to allocate program_space.
12829         * inferior.c (add_inferior_with_spaces): Likewise.
12830         (clone_inferior_command): Likewise.
12831         * infrun.c (follow_fork_inferior): Likewise.
12832         (handle_vfork_child_exec_or_exit): Likewise.
12833
12834 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12835
12836         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12837         (delim_string_to_char_ptr_vec): Return std::vector of
12838         gdb::unique_xmalloc_ptr.
12839         (dirnames_to_char_ptr_vec_append): Take std::vector of
12840         gdb::unique_xmalloc_ptr.
12841         (dirnames_to_char_ptr_vec): Return std::vector of
12842         gdb::unique_xmalloc_ptr.
12843         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12844         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12845         (delim_string_to_char_ptr_vec): Return an std::vector of
12846         gdb::unique_xmalloc_ptr, adjust the code.
12847         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12848         gdb::unique_xmalloc_ptr, adjust the code.
12849         (dirnames_to_char_ptr_vec): Return an std::vector of
12850         gdb::unique_xmalloc_ptr, adjust the code.
12851         * auto-load.c (auto_load_safe_path_vec): Change type to
12852         std::vector of gdb::unique_xmalloc_ptr.
12853         (auto_load_expand_dir_vars): Return an std::vector of
12854         gdb::unique_xmalloc_ptr, adjust the code.
12855         (auto_load_safe_path_vec_update): Adjust.
12856         (filename_is_in_auto_load_safe_path_vec): Adjust.
12857         (auto_load_objfile_script_1): Adjust.
12858         * build-id.c (build_id_to_debug_bfd): Adjust.
12859         * linux-thread-db.c (thread_db_load_search): Adjust.
12860         * source.c (add_path): Adjust.
12861         (openp): Adjust.
12862         * symfile.c (find_separate_debug_file): Adjust.
12863         * utils.c (do_free_char_ptr_vec): Remove.
12864         (make_cleanup_free_char_ptr_vec): Remove.
12865
12866 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12867
12868         PR gdb/22907
12869         * common/pathstuff.c: Conditionally include "<windows.h>".
12870
12871 2018-03-01  Georg Sauthoff  <mail@georg.so>
12872
12873         PR gdb/22888
12874         * gcore.in: Quote variables and switch interpreter to bash.
12875
12876 2018-03-01  Tom Tromey  <tom@tromey.com>
12877
12878         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12879         assertion.  Add assertion for discriminant_index.
12880         (quirk_rust_enum): Use correct base type name in univariant case.
12881
12882 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12883
12884         * record.c (get_call_history_modifiers): Return a
12885         record_print_flags.
12886         (cmd_record_call_history): Adjust.
12887         * record-btrace.c (record_btrace_call_history): Adjust.
12888         (record_btrace_call_history_range): Adjust.
12889         (record_btrace_call_history_from): Adjust.
12890         * target-debug.h (target_debug_print_record_print_flags): New.
12891         * target-delegates.c: Re-generate.
12892         * target.c (target_call_history): Change flags type.
12893         (target_call_history_from): Likewise.
12894         (target_call_history_range): Likewise.
12895         * target.h (struct target_ops) <target_call_history>: Likewise.
12896         (target_call_history_from): Likewise.
12897         (target_call_history_range): Likewise.
12898
12899 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12900             Simon Marchi  <simon.marchi@polymtl.ca>
12901
12902         * common/common-utils.c: Include "sys/stat.h".
12903         (is_regular_file): Move here from "source.c"; change return
12904         type to "bool".
12905         * common/common-utils.h (is_regular_file): New prototype.
12906         * common/pathstuff.c (contains_dir_separator): New function.
12907         * common/pathstuff.h (contains_dir_separator): New prototype.
12908         * source.c: Don't include "sys/stat.h".
12909         (is_regular_file): Move to "common/common-utils.c".
12910
12911 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12912
12913         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12914         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12915         * auto-load.c: Include "common/pathstuff.h".
12916         * common/common-def.h (current_directory): Move here.
12917         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12918         function.
12919         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12920         prototype.
12921         * common/pathstuff.c: New file.
12922         * common/pathstuff.h: New file.
12923         * compile/compile.c: Include "common/pathstuff.h".
12924         * defs.h (current_directory): Move to "common/common-defs.h".
12925         * dwarf2read.c: Include "common/pathstuff.h".
12926         * exec.c: Likewise.
12927         * guile/scm-safe-call.c: Likewise.
12928         * linux-thread-db.c: Likewise.
12929         * main.c: Likewise.
12930         * nto-tdep.c: Likewise.
12931         * objfiles.c: Likewise.
12932         * source.c: Likewise.
12933         * symtab.c: Likewise.
12934         * utils.c: Include "common/pathstuff.h".
12935         (gdb_realpath): Move to "common/pathstuff.c".
12936         (gdb_realpath_keepfile): Likewise.
12937         (gdb_abspath): Likewise.
12938         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12939         (gdb_realpath_keepfile): Likewise.
12940         (gdb_abspath): Likewise.
12941
12942 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12943
12944         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12945         wildcard process pid for super_resume for kernels with a
12946         specific bug.
12947
12948 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12949
12950         * compile/compile.c (get_args): Add additional comments
12951         explaining function.
12952
12953 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12954             Tom Tromey  <tom@tromey.com>
12955
12956         * target.h (memory_write_request_s): Remove typedef.  Don't define
12957         VEC.
12958         (target_write_memory_blocks): Change argument to std::vector.
12959         (struct memory_write_request): Add constructor.
12960         * target-memory.c (compare_block_starting_address): Return bool.
12961         Change argument types.
12962         (claim_memory): Change arguments to use std::vector.
12963         (split_regular_and_flash_blocks, blocks_to_erase)
12964         (compute_garbled_blocks): Likewise.
12965         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12966         (target_write_memory_blocks): Change argument to std::vector.
12967         * symfile.c (struct load_section_data): Add constructor and
12968         destructor.  Use std::vector for "requests".
12969         (struct load_progress_data): Add initializers.
12970         (load_section_callback): Update.  Use "new".
12971         (clear_memory_write_data): Remove.
12972         (generic_load): Update.
12973
12974 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12975
12976         * arch/aarch64.h: Use common/tdesc.h.
12977
12978 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12979
12980         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12981         architecture with a 64-bit ABI.
12982
12983 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12984
12985         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12986         ahead of target description loading.
12987
12988 2018-02-26  Tom Tromey  <tom@tromey.com>
12989
12990         * stack.c (backtrace_command_1): Update.
12991         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12992         of "flags".
12993         * python/py-framefilter.c (py_print_frame)
12994         (gdbpy_apply_frame_filter): Change type of "flags".
12995         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12996         of "flags".
12997         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12998         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12999         * extension.h (enum frame_filter_flag): Rename from
13000         frame_filter_flags.
13001         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13002         (apply_ext_lang_frame_filter): Change type of "flags".
13003         * extension.c (apply_ext_lang_frame_filter): Change type of
13004         "flags".
13005         * extension-priv.h (struct extension_language_ops)
13006         <apply_frame_filter>: Change type of "flags".
13007
13008 2018-02-26  Tom Tromey  <tom@tromey.com>
13009
13010         PR python/16497:
13011         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13012         off-by-one in py_end computation.
13013         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13014         PRINT_MORE_FRAMES.
13015         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13016         constant.
13017
13018 2018-02-26  Tom Tromey  <tom@tromey.com>
13019
13020         * dwarf2read.c (struct variant_field): New.
13021         (struct nextfield) <variant>: New field.
13022         (dwarf2_add_field): Handle DW_TAG_variant_part.
13023         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13024         discriminated union.
13025         (read_structure_type): Handle DW_TAG_variant_part.
13026         (handle_struct_member_die): New function, extracted from
13027         process_structure_scope.  Handle DW_TAG_variant.
13028         (process_structure_scope): Handle discriminated unions.  Call
13029         handle_struct_member_die.
13030
13031 2018-02-26  Tom Tromey  <tom@tromey.com>
13032
13033         * rust-lang.h (rust_last_path_segment): Declare.
13034         * rust-lang.c (rust_last_path_segment): Now public.  Change
13035         contract.
13036         (struct disr_info): Remove.
13037         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13038         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13039         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13040         (rust_enum_p, rust_enum_variant): New function.
13041         (rust_underscore_fields): Remove "offset" parameter.
13042         (rust_print_enum): New function.
13043         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13044         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13045         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13046         enums.
13047         (rust_internal_print_type): New function, from rust_print_type.
13048         Remove enum code.
13049         (rust_print_type): Call rust_internal_print_type.
13050         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13051         Update enum handling.
13052         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13053         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13054         (rust_union_quirks): New functions.
13055         (process_full_comp_unit, process_full_type_unit): Call
13056         rust_union_quirks.
13057         (process_structure_scope): Update rust_unions if necessary.
13058
13059 2018-02-26  Tom Tromey  <tom@tromey.com>
13060
13061         * value.h (value_union_variant): Declare.
13062         * valops.c (value_union_variant): New function.
13063         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13064         (struct discriminant_info): New.
13065         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13066         enumerator.
13067         (struct main_type) <flag_discriminated_union>: New field.
13068
13069 2018-02-26  Tom Tromey  <tom@tromey.com>
13070
13071         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13072         unittests/unpack-selftests.c.
13073         * unittests/unpack-selftests.c: New file.
13074         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13075
13076 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13077
13078         * dwarf2read.c (struct partial_die_info) <read>: New method.
13079         (read_partial_die): Remove the declaration.
13080         (load_partial_dies): Update.
13081         (partial_die_info::partial_die_info):
13082         (read_partial_die): Change it to partial_die_info::read.
13083
13084 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13085
13086         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13087         (fixup_partial_die): Remove declaration.
13088         (scan_partial_symbols): Update.
13089         (partial_die_parent_scope): Likewise.
13090         (partial_die_full_name): Likewise.
13091         (fixup_partial_die): Change it to partial_die_info::fixup.
13092
13093 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13094
13095         * dwarf2read.c (read_partial_die): Update the declaration.
13096         (load_partial_dies): Caller update.
13097         (read_partial_die): Remove one argument abbrev_len.
13098
13099 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13100
13101         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13102         assignment operator.
13103         (load_partial_dies): Use ctor and copy ctor.
13104         (read_partial_die): Update.
13105         (dwarf2_cu::find_partial_die): Use ctor.
13106
13107 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13108
13109         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13110         (find_partial_die_in_comp_unit): Change it to
13111         dwarf2_cu::find_partial_die.
13112         (find_partial_die): Update.
13113
13114 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13115
13116         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13117         is NULL.
13118
13119 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13120
13121         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13122
13123 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13124
13125         * arch/amd64.h: Use common/tdesc.h.
13126         * arch/i386.c: Likewise.
13127         * arch/i386.h: Likewise.
13128         * arch/tic6x.c: Likewise.
13129         * arch/tdesc.h: Move file from here...
13130         * common/tdesc.h: ...to here.
13131         * features/aarch64-core.c: Regenerate.
13132         * features/aarch64-fpu.c: Regenerate.
13133         * features/i386/32bit-avx.c: Regenerate.
13134         * features/i386/32bit-avx512.c: Regenerate.
13135         * features/i386/32bit-core.c: Regenerate.
13136         * features/i386/32bit-linux.c: Regenerate.
13137         * features/i386/32bit-mpx.c: Regenerate.
13138         * features/i386/32bit-pkeys.c: Regenerate.
13139         * features/i386/32bit-sse.c: Regenerate.
13140         * features/i386/64bit-avx.c: Regenerate.
13141         * features/i386/64bit-avx512.c: Regenerate.
13142         * features/i386/64bit-core.c: Regenerate.
13143         * features/i386/64bit-linux.c: Regenerate.
13144         * features/i386/64bit-mpx.c: Regenerate.
13145         * features/i386/64bit-pkeys.c: Regenerate.
13146         * features/i386/64bit-segments.c: Regenerate.
13147         * features/i386/64bit-sse.c: Regenerate.
13148         * features/i386/x32-core.c: Regenerate.
13149         * features/tic6x-c6xp.c: Regenerate.
13150         * features/tic6x-core.c: Regenerate.
13151         * features/tic6x-gp.c: Regenerate.
13152         * target-descriptions.c: Use common/tdesc.h.
13153         * target-descriptions.h: Likewise.
13154
13155 2018-02-24  Tom Tromey  <tom@tromey.com>
13156
13157         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13158         (try_thread_db_load_from_dir, thread_db_load_search): Use
13159         std::string.
13160         (info_auto_load_libthread_db_compare): Return bool.  Change
13161         argument types.
13162         (info_auto_load_libthread_db): Use std::vector, std::string.
13163         Remove cleanups.
13164
13165 2018-02-24  Tom Tromey  <tom@tromey.com>
13166
13167         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13168         std::string.
13169         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13170         std::string*.
13171         * gdbarch.c: Rebuild.
13172         * gdbarch.h: Rebuild.
13173         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13174         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13175         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13176         std::string*.
13177
13178 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13179
13180         * gdbtypes.h (sect_offset): Change type to uint64_t.
13181         (sect_offset_str): New function.
13182         * dwarf2read.c (create_addrmap_from_aranges): Use
13183         sect_offset_str.
13184         (error_check_comp_unit_head): Likewise.
13185         (create_debug_type_hash_table): Likewise.
13186         (read_cutu_die_from_dwo): Likewise.
13187         (init_cutu_and_read_dies): Likewise.
13188         (init_cutu_and_read_dies_no_follow): Likewise.
13189         (process_psymtab_comp_unit_reader): Likewise.
13190         (partial_die_parent_scope): Likewise.
13191         (peek_die_abbrev): Likewise.
13192         (process_queue): Likewise.
13193         (dwarf2_physname): Likewise.
13194         (read_namespace_alias): Likewise.
13195         (read_import_statement): Likewise.
13196         (create_dwo_cu_reader): Likewise.
13197         (create_cus_hash_table): Likewise.
13198         (lookup_dwo_cutu): Likewise.
13199         (inherit_abstract_dies): Likewise.
13200         (read_func_scope): Likewise.
13201         (read_call_site_scope): Likewise.
13202         (dwarf2_add_member_fn): Likewise.
13203         (read_common_block): Likewise.
13204         (read_module_type): Likewise.
13205         (read_typedef): Likewise.
13206         (read_subrange_type): Likewise.
13207         (load_partial_dies): Likewise.
13208         (read_partial_die): Likewise.
13209         (find_partial_die): Likewise.
13210         (read_str_index): Likewise.
13211         (dwarf2_string_attr): Likewise.
13212         (build_error_marker_type): Likewise.
13213         (lookup_die_type): Likewise.
13214         (dump_die_shallow): Likewise.
13215         (follow_die_ref): Likewise.
13216         (dwarf2_fetch_die_loc_sect_off): Likewise.
13217         (dwarf2_fetch_constant_bytes): Likewise.
13218         (follow_die_sig): Likewise.
13219         (get_signatured_type): Likewise.
13220         (get_DW_AT_signature_type): Likewise.
13221         (dwarf2_find_containing_comp_unit): Likewise.
13222         (set_die_type): Likewise.
13223
13224 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13225
13226         * arch/aarch64.c: Include "common-defs.h".
13227         * arch/amd64.c: Likewise.
13228         * arch/i386.c: Likewise.
13229
13230 2018-02-21  Tom Tromey  <tom@tromey.com>
13231
13232         * value.h: (extract_field_op): Update.
13233         * eval.c (extract_field_op): Return a const char *.
13234         * expression.h (parse_expression_for_completion): Update.
13235         * completer.c (complete_expression): Update.
13236         (add_struct_fields): Make fieldname const.
13237         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13238         (mark_completion_tag, parse_exp_in_context_1): Update.
13239         (parse_expression_for_completion): Change "name" to
13240         unique_xmalloc_ptr*.
13241
13242 2018-02-21  Tom Tromey  <tom@tromey.com>
13243
13244         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13245
13246 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13247
13248         * avr-tdep.c (avr_read_pc): Change parameter type to
13249         readable_regcache.
13250         * gdbarch.sh (read_pc): Likewise.
13251         * gdbarch.c: Re-generated.
13252         * gdbarch.h: Re-generated.
13253         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13254         readable_regcache.
13255         * ia64-tdep.c (ia64_read_pc): Likewise.
13256         * mips-tdep.c (mips_read_pc): Likewise.
13257         * spu-tdep.c (spu_read_pc): Likewise.
13258
13259 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13260
13261         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13262         * regcache-dump.c: New file.
13263         * regcache.c: Move register_dump to regcache-dump.c.
13264         (maintenance_print_registers): Likewise.
13265         (maintenance_print_raw_registers): Likewise.
13266         (maintenance_print_cooked_registers): Likewise.
13267         (maintenance_print_register_groups): Likewise.
13268         (maintenance_print_remote_registers): Likewise.
13269         (_initialize_regcache): Likewise.
13270         * regcache.h (register_dump): Moved from regcache.c.
13271
13272 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13273
13274         * regcache.c (regcache::regcache): Update.
13275         (regcache::invalidate): Move it to detached_regcache::invalidate.
13276         (get_thread_arch_aspace_regcache): Update.
13277         (regcache::raw_update): Update.
13278         (regcache::cooked_read): Remove some code.
13279         (regcache::cooked_read_value): Likewise.
13280         (regcache::raw_write): Remove assert on m_readonly_p.
13281         (regcache::raw_supply_integer): Move it to
13282         detached_regcache::raw_supply_integer.
13283         (regcache::raw_supply_zeroed): Likewise.
13284         * regcache.h (detached_regcache) <raw_supply_integer>: New
13285         declaration.
13286         <raw_supply_zeroed, invalidate>: Likewise.
13287         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13288         <invalidate>: Likewise.
13289         <m_readonly_p>: Removed.
13290
13291 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13292
13293         * infcmd.c (get_return_value): Let stop_regs point to
13294         get_current_regcache.
13295         * regcache.c (regcache::regcache): Remove.
13296         (register_dump_reg_buffer): New class.
13297         (regcache_print): Adjust.
13298         * regcache.h (regcache): Remove constructors.
13299
13300 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13301
13302         * regcache.c (class register_dump): New class.
13303         (register_dump_regcache, register_dump_none): New class.
13304         (register_dump_remote, register_dump_groups): New class.
13305         (regcache_print): Update.
13306         * regcache.h (regcache_dump_what): Move it to regcache.c.
13307         (regcache) <dump>: Remove.
13308
13309 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13310
13311         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13312          reg_buffer_rw *.
13313         (jit_unwind_reg_set_impl): Call raw_supply.
13314         (jit_frame_sniffer): Use reg_buffer_rw.
13315         * record-full.c (record_full_core_regbuf): Change its type.
13316         (record_full_core_open_1): Use reg_buffer_rw.
13317         (record_full_close): Likewise.
13318         (record_full_core_fetch_registers): Use regcache->raw_supply.
13319         (record_full_core_store_registers): Likewise.
13320         * regcache.c (regcache::get_register_status): Move it to
13321         reg_buffer.
13322         (regcache_raw_set_cached_value): Remove.
13323         (regcache::raw_set_cached_value): Remove.
13324         (regcache::raw_write): Call raw_supply.
13325         (regcache::raw_supply): Move it to reg_buffer_rw.
13326         * regcache.h (regcache_raw_set_cached_value): Remove.
13327         (reg_buffer_rw): New class.
13328
13329 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13330
13331         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13332         readonly_detached_regcache.
13333         (dummy_frame_prev_register): Use regcache->cooked_read.
13334         * frame.c (frame_save_as_regcache): Change return type.
13335         (frame_pop): Update.
13336         * frame.h (frame_save_as_regcache): Update declaration.
13337         * inferior.h (get_infcall_suspend_state_regcache): Update
13338         declaration.
13339         * infrun.c (infcall_suspend_state) <registers>: use
13340         readonly_detached_regcache.
13341         (save_infcall_suspend_state): Don't use regcache_dup.
13342         (get_infcall_suspend_state_regcache): Change return type.
13343         * linux-fork.c (struct fork_info) <savedregs>: Change to
13344         readonly_detached_regcache.
13345         <pc>: New field.
13346         (fork_save_infrun_state): Don't use regcache_dup.
13347         (info_checkpoints_command): Adjust.
13348         * mi/mi-main.c (register_changed_p): Update declaration.
13349         (mi_cmd_data_list_changed_registers): Use
13350         readonly_detached_regcache.
13351         (register_changed_p): Change parameter type to
13352         readonly_detached_regcache.
13353         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13354         readonly_detached_regcache.
13355         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13356         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13357         New.
13358         (regcache::save): Move it to reg_buffer.
13359         (regcache::restore): Change parameter type.
13360         (regcache_dup): Remove.
13361         * regcache.h (reg_buffer) <save>: New method.
13362         (readonly_detached_regcache): New class.
13363         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13364         readonly_detached_regcache.
13365         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13366
13367 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13368
13369         * frame.c (frame_save_as_regcache): Use regcache method save.
13370         (frame_pop): Use regcache method restore.
13371         * infrun.c (restore_infcall_suspend_state): Likewise.
13372         * linux-fork.c (fork_load_infrun_state): Likewise.
13373         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13374         save.
13375         * regcache.c (regcache_save): Remove.
13376         (regcache::restore): More asserts.
13377         (regcache_cpy): Remove.
13378         * regcache.h (regcache_save): Remove the declaration.
13379         (regcache::restore): Move from private to public.
13380         Remove the friend declaration of regcache_cpy.
13381         (regcache_cpy): Remove declaration.
13382
13383 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13384
13385         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13386         parameter type to 'readable_regcache *'.
13387         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13388         * arm-tdep.c (arm_neon_quad_read): Likewise.
13389         (arm_pseudo_read): Likewise.
13390         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13391         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13392         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13393         * gdbarch.c: Re-generated.
13394         * gdbarch.h: Re-generated.
13395         * gdbarch.sh (pseudo_register_read): Change parameter type to
13396         'readable_regcache *'.
13397         (pseudo_register_read_value): Likewise.
13398         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13399         (h8300_pseudo_register_read): Likewise.
13400         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13401         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13402         (i386_pseudo_register_read_into_value): Likewise.
13403         (i386_pseudo_register_read_value): Likewise.
13404         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13405         declaration.
13406         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13407         * m32c-tdep.c (m32c_raw_read): Likewise.
13408         (m32c_read_flg): Likewise.
13409         (m32c_banked_register): Likewise.
13410         (m32c_banked_read): Likewise.
13411         (m32c_sb_read): Likewise.
13412         (m32c_part_read): Likewise.
13413         (m32c_cat_read): Likewise.
13414         (m32c_r3r2r1r0_read): Likewise.
13415         (m32c_pseudo_register_read): Likewise.
13416         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13417         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13418         (mep_pseudo_cr64_read): Likewise.
13419         (mep_pseudo_register_read): Likewise.
13420         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13421         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13422         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13423         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13424         (regcache::cooked_read): Likewise.
13425         (regcache::cooked_read_value): Likewise.
13426         (regcache_cooked_read_signed):
13427         (regcache::cooked_read): Likewise.
13428         * regcache.h (readable_regcache): New class.
13429         (regcache): Inherit readable_regcache.  Move some methods to
13430         readable_regcache.
13431         * rl78-tdep.c (rl78_pseudo_register_read): Change
13432         parameter type to 'readable_regcache *'.
13433         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13434         (e500_pseudo_register_read): Change parameter type to
13435         'readable_regcache *'.
13436         (dfp_pseudo_register_read): Likewise.
13437         (vsx_pseudo_register_read): Likewise.
13438         (efpr_pseudo_register_read): Likewise.
13439         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13440         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13441         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13442         (sh64_pseudo_register_read): Likewise.
13443         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13444         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13445         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13446         (spu_pseudo_register_read): Likewise.
13447         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13448         (xtensa_pseudo_register_read): Likewise.
13449
13450 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13451
13452         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13453         (regcache::arch): Move it to reg_buffer::arch.
13454         (regcache::register_buffer): Likewise.
13455         (regcache::assert_regnum): Likewise.
13456         (regcache::num_raw_registers): Likewise.
13457         * regcache.h (reg_buffer): New class.
13458         (regcache): Inherit reg_buffer.
13459
13460 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13461
13462         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13463         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13464
13465 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13466
13467         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13468
13469 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13470
13471         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13472         (SFILES): Remove common/*.c files.
13473         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13474         * common/common.host: Add common reference.
13475         * configure.ac: Likewise.
13476         * configure: Regenerate.
13477
13478 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13479
13480         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13481         (block_initialize_namespace): Use new.
13482         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13483         (dwarf2_free_objfile): Use delete.
13484         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13485         (copy_type_recursive): Use new.
13486         * gdb_obstack.h (allocate_on_obstack): New.
13487
13488 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13489
13490         PR gdb/22849
13491         * inferior.c (exit_inferior_1): Reset inf->control.
13492
13493 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13494
13495         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13496         declaration.
13497
13498 2018-02-14  Pedro Alves  <palves@redhat.com>
13499
13500         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13501         frame_cleanup_after_sniffer on exception.
13502
13503 2018-02-14  Tom Tromey  <tom@tromey.com>
13504
13505         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13506         const.
13507         (solib_bfd_open): Make pathname const.
13508         * solib.c (solib_bfd_open): Make pathname const.
13509         * solib-spu.c (spu_bfd_fopen): Make name const.
13510         (spu_bfd_open): Make pathname const.
13511         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13512         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13513
13514 2018-02-14  Tom Tromey  <tom@tromey.com>
13515
13516         * symfile.c (symfile_bfd_open): Update.
13517         * source.h (openp, source_full_path_of, find_and_open_source):
13518         Change argument type to unique_xmalloc_ptr.
13519         * source.c (openp): Take a unique_xmalloc_ptr.
13520         (source_full_path_of, find_and_open_source): Likewise.
13521         (open_source_file, symtab_to_fullname): Update.
13522         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13523         unique_xmalloc_ptr.
13524         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13525         (exec_file_find): Update.
13526         * psymtab.c (psymtab_to_fullname): Update.
13527         * nto-tdep.h (nto_find_and_open_solib): Update.
13528         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13529         unique_xmalloc_ptr.
13530         * exec.c (exec_file_attach): Update.
13531         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13532         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13533
13534 2018-02-14  Tom Tromey  <tom@tromey.com>
13535
13536         * solib.c: Include source.h.
13537         * nto-tdep.c: Include source.h.
13538         * mi/mi-cmd-env.c: Include source.h.
13539         * infcmd.c: Include source.h.
13540         * exec.c: Include source.h.
13541         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13542         (add_path, directory_switch, source_path, init_source_path): Move
13543         declarations...
13544         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13545         (add_path, directory_switch, source_path, init_source_path):
13546         ...here.
13547
13548 2018-02-14  Tom Tromey  <tom@tromey.com>
13549
13550         * solist.h (exec_file_find, solib_find): Return
13551         unique_xmalloc_ptr.
13552         (solib_bfd_fopen): Take a const char *.
13553         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13554         (exec_file_find, solib_find): Likewise.
13555         (solib_bfd_fopen): Do not take ownership of "pathname".
13556         (solib_bfd_open): Use unique_xmalloc_ptr.
13557         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13558         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13559         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13560         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13561
13562 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13563
13564         * ada-lang.c (name_match_type_from_name): Remove reference to
13565         ada_name_for_lookup in function's documentation.
13566         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13567
13568 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13569
13570         * defs.h (enum openp_flags): New enum.
13571         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13572         Move to enum openp_flags.
13573         (openp_flags): New enum flags.
13574         (openp): Change parameter type to openp_flags.
13575         * source.c (openp): Change parameter type to openp_flags.
13576         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13577         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13578
13579 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13580
13581         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13582         per-command.
13583
13584 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13585
13586         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13587         into...
13588         (class dwarf2_queue_guard): ...the destructor of this new class.
13589         (dw2_do_instantiate_symtab): Create instance of the new class
13590         dwarf2_queue_guard, remove cleanup.
13591
13592 2018-02-09  Tom Tromey  <tom@tromey.com>
13593
13594         * source.c (find_source_lines): Don't reference past the end of
13595         the vector.
13596
13597 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13598
13599         * remote.c (remote_btrace_maybe_reopen): Change error message.
13600         * btrace.c (btrace_enable): Likewise.
13601         (parse_xml_btrace): Likewise.
13602         (parse_xml_btrace_conf): Likewise.
13603
13604 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13605
13606         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13607         (linux_enable_pt, linux_enable_bts): Call
13608         diagnose_perf_event_open_fail.
13609
13610 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13611
13612         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13613         Remove parameter and change return type.  Update callers.  Move it.
13614         (linux_enable_bts, linux_enable_pt): Improve error message.
13615         (linux_enable_pt): Remove zero buffer size check.
13616         (linux_enable_btrace): Improve error messages.  Remove NULL return
13617         check.
13618
13619 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13620
13621         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13622         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13623         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13624         (linux_supports_pt, linux_supports_btrace): Remove.
13625         (linux_enable_bts): Call cpu_supports_bts.
13626         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13627         * remote.c (remote_supports_btrace): Remove.
13628         (init_remote_ops): Remove remote_supports_btrace.
13629         * target-delegates.c: Regenerated.
13630         * target.c (target_supports_btrace): Remove.
13631         * target.h (target_ops) <to_supports_btrace>: Remove
13632         (target_supports_btrace): Remove.
13633         * x86-linux-nat.c (x86_linux_create_target): Remove
13634         linux_supports_btrace.
13635
13636 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13637
13638         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13639         btrace failed.
13640         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13641         exception and use message in own exception.
13642
13643 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13644
13645         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13646         (perf_event_pt_event_type): Use gdb_file_up.
13647         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13648         scoped_fd, and scoped_mmap.
13649
13650 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13651
13652         * common/scoped_mmap.h: New.
13653         * unittests/scoped_mmap-selftest.c: New.
13654         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13655         unittests/scoped_mmap-selftest.c.
13656
13657 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13658
13659         * common/scoped_fd.h: New.
13660         * unittests/scoped_fd-selftest.c: New.
13661         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13662         unittests/scoped_fd-selftest.c.
13663
13664 2018-02-09  Tom Tromey  <tom@tromey.com>
13665
13666         * auto-load.c (auto_load_section_scripts): Use
13667         gdb::unique_xmalloc_ptr.
13668
13669 2018-02-09  Tom Tromey  <tom@tromey.com>
13670
13671         * auto-load.c (execute_script_contents): Use std::string.
13672
13673 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13674
13675         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13676         Python function, rather than a new command.
13677
13678 2018-02-08  Tom Tromey  <tom@tromey.com>
13679
13680         * solib.c (solib_find_1): Use std::string.
13681         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13682
13683 2018-02-08  Tom Tromey  <tom@tromey.com>
13684
13685         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13686
13687 2018-02-08  Tom Tromey  <tom@tromey.com>
13688
13689         * source.c (find_source_lines): Use gdb::def_vector.
13690
13691 2018-02-08  Tom Tromey  <tom@tromey.com>
13692
13693         * macrocmd.c (struct temporary_macro_definition): New.
13694         (macro_define_command): Use temporary_macro_definition.  Remove
13695         cleanups.
13696         (free_macro_definition_ptr): Remove.
13697
13698 2018-02-08  Tom Tromey  <tom@tromey.com>
13699
13700         * macroexp.c (maybe_expand): Use std::string.
13701
13702 2018-02-08  Tom Tromey  <tom@tromey.com>
13703
13704         * macroexp.c (struct macro_buffer): Add initializers for some
13705         members.
13706         (init_buffer, init_shared_buffer, free_buffer)
13707         (free_buffer_return_text): Remove.
13708         (macro_buffer): New constructors.
13709         (~macro_buffer): New destructor.
13710         (macro_buffer::set_shared): New method.
13711         (macro_buffer::resize_buffer, macro_buffer::appendc)
13712         (macro_buffer::appendmem): Now methods, not free functions.
13713         (set_token, append_tokens_without_splicing, stringify)
13714         (macro_stringify): Update.
13715         (gather_arguments): Change return type.  Remove argc_p argument,
13716         add args_ptr argument.  Use std::vector.
13717         (substitute_args): Remove argc argument.  Accept std::vector.
13718         (expand): Update.  Use std::vector.
13719         (scan, macro_expand, macro_expand_next): Update.
13720
13721 2018-02-08  Tom Tromey  <tom@tromey.com>
13722
13723         * symtab.c (default_collect_symbol_completion_matches_break_on):
13724         Use unique_xmalloc_ptr.
13725         * macroscope.h: (sal_macro_scope, user_macro_scope)
13726         (default_macro_scope): Return unique_xmalloc_ptr.
13727         * macroscope.c (sal_macro_scope, user_macro_scope)
13728         (default_macro_scope): Return unique_xmalloc_ptr.
13729         * macroexp.h (macro_expand, macro_expand_once): Return
13730         unique_xmalloc_ptr.
13731         * macroexp.c (macro_expand, macro_expand_once): Return
13732         unique_xmalloc_ptr.
13733         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13734         (info_macro_command, info_macros_command): Use
13735         unique_xmalloc_ptr.
13736         * compile/compile-c-support.c (write_macro_definitions): Use
13737         unique_xmalloc_ptr.
13738         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13739
13740 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13741
13742         * value.c (value_static_field): Assign field type instead of
13743         containing type when returning an optimized out value.
13744
13745 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13746
13747         * ft32-tdep.c (ft32_read_pc): Remove.
13748         (ft32_write_pc): Remove.
13749         (ft32_gdbarch_init): Update.
13750         * m32r-tdep.c (m32r_read_pc): Remove.
13751         (m32r_gdbarch_init): Update.
13752         * mep-tdep.c (mep_read_pc): Remove.
13753         (mep_gdbarch_init): Update.
13754         * microblaze-tdep.c (microblaze_write_pc): Remove.
13755         (microblaze_gdbarch_init): Update.
13756         * mn10300-tdep.c (mn10300_read_pc): Remove.
13757         (mn10300_write_pc): Remove.
13758         (mn10300_gdbarch_init): Update.
13759         * moxie-tdep.c (moxie_read_pc): Remove.
13760         (moxie_write_pc): Remove.
13761         (moxie_gdbarch_init): Update.
13762
13763 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13764
13765         * expprint.c (print_subexp_standard): Handle
13766         OP_F77_UNDETERMINED_ARGLIST.
13767         (dump_subexp_body_standard): Likewise.
13768
13769 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13770
13771         * target-descriptions.c (tdesc_element_visitor) Add empty
13772         implementations.
13773         (tdesc_type): Move make_gdb_type from here.
13774         (tdesc_type_builtin): Likewise.
13775         (tdesc_type_vector): Likewise.
13776         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13777         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13778         (make_gdb_type_union): Likewise.
13779         (make_gdb_type_flags): Likewise.
13780         (make_gdb_type_enum): Likewise.
13781         (make_gdb_type): New function.
13782         (tdesc_register_type): Use static make_gdb_type.
13783
13784 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13785
13786         * infcmd.c (default_print_one_register_info): Align natural-format
13787         column values consistently one under another.
13788         (pad_to_column): New function.
13789
13790 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13791
13792         * dwarf2read.c (dwarf2_physname): Move commment.
13793
13794 2018-02-01  Leszek Swirski  <leszeks@google.com>
13795
13796         * varobj.c (varobj_formatted_print_options): Allow recursive
13797         pretty printing if pretty printing is enabled.
13798
13799 2018-02-01  Leszek Swirski  <leszeks@google.com>
13800
13801         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13802         names after a structop as a filename.
13803
13804 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13805
13806         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13807         (arm_record_coproc_data_proc): Likewise.
13808
13809 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13810
13811         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13812
13813 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13814
13815         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13816         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13817
13818 2018-01-31  Pedro Alves  <palves@redhat.com>
13819
13820         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13821         * inflow.c (child_terminal_save_inferior): Wrap reference to
13822         tcgetpgrp in HAVE_TERMIOS_H.
13823         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13824         _WIN32.
13825         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13826         always iterate over all inferiors.
13827         (gdbsim_cntrl_c): Adjust.
13828         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13829
13830 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13831
13832         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13833         index type is objfile-owned if the element type is as well.
13834
13835 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13836
13837         GDB 8.1 released.
13838
13839 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13840
13841         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13842         "features/s390x-linux64.c".
13843         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13844         s390_linux32 and s390x_linux64.
13845         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13846         default tdesc.
13847         * s390-tdep.c: Include "features/s390-linux32.c" and
13848         "features/s390x-linux64.c".
13849         (s390_tdesc_valid): Add check for tdesc_has_registers.
13850         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13851         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13852         tdesc_s390x_linux64.
13853         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13854         tdesc_s390x_linux64 to...
13855         * s390-tdep.h: ...here.
13856
13857 2018-01-30  Pedro Alves  <palves@redhat.com>
13858
13859         PR gdb/13211
13860         * config.in, configure: Regenerate.
13861         * configure.ac: Check for getpgid.
13862         * go32-nat.c (go32_pass_ctrlc): New.
13863         (go32_target): Install it.
13864         * inf-child.c (inf_child_target): Install
13865         child_terminal_save_inferior, child_pass_ctrlc and
13866         child_interrupt.
13867         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13868         (inf_ptrace_target): No longer install it.
13869         * infcmd.c (interrupt_target_1): Adjust.
13870         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13871         (child_interrupt): Declare.
13872         (inferior::terminal_state): New.
13873         * inflow.c (struct terminal_info): Update comments.
13874         (inferior_process_group): Delete.
13875         (terminal_is_ours): Delete.
13876         (gdb_tty_state): New.
13877         (child_terminal_init): Adjust.
13878         (is_gdb_terminal, sharing_input_terminal_1)
13879         (sharing_input_terminal): New functions.
13880         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13881         Set the process's actual process group in the foreground if
13882         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13883         mark terminal as the inferior's if not sharing GDB's terminal.
13884         Don't check attach_flag.
13885         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13886         pass down a target_terminal_state.
13887         (child_terminal_save_inferior): New, factored out from ...
13888         (child_terminal_ours_1): ... this.  Handle
13889         target_terminal_state::is_ours_for_output.
13890         (child_interrupt, child_pass_ctrlc): New.
13891         (inflow_inferior_exit): Clear the inferior's terminal_state.
13892         (copy_terminal_info): Copy the inferior's terminal state.
13893         (_initialize_inflow): Remove reference to terminal_is_ours.
13894         * inflow.h (inferior_process_group): Delete.
13895         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13896         * procfs.c (procfs_target): Don't install procfs_interrupt.
13897         (procfs_interrupt): Delete.
13898         * remote.c (remote_serial_quit_handler): Adjust.
13899         (remote_interrupt): Remove ptid parameter.  Adjust.
13900         * target-delegates.c: Regenerate.
13901         * target.c: Include "terminal.h".
13902         (target_terminal::terminal_state): Rename to ...
13903         (target_terminal::m_terminal_state): ... this.
13904         (target_terminal::init): Adjust.
13905         (target_terminal::inferior): Adjust to per-inferior
13906         terminal_state.
13907         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13908         (target_terminal::ours, target_terminal::ours_for_output): Use
13909         target_terminal_is_ours_kind.
13910         (target_interrupt): Remove ptid parameter.  Adjust.
13911         (default_target_pass_ctrlc): Adjust.
13912         * target.h (target_ops::to_terminal_save_inferior): New field.
13913         (target_ops::to_interrupt): Remove ptid_t parameter.
13914         (target_interrupt): Remove ptid_t parameter.  Update comment.
13915         (target_pass_ctrlc): Update comment.
13916         * target/target.h (target_terminal_state): New scoped enum,
13917         factored out of ...
13918         (target_terminal::terminal_state): ... here.
13919         (target_terminal::inferior): Update comments.
13920         (target_terminal::restore_inferior): New.
13921         (target_terminal::is_inferior, target_terminal::is_ours)
13922         (target_terminal::is_ours_for_output): Adjust.
13923         (target_terminal::scoped_restore_terminal_state): Adjust to
13924         rename, and call restore_inferior() instead of inferior().
13925         (target_terminal::scoped_restore_terminal_state::m_state): Change
13926         type.
13927         (target_terminal::terminal_state): Rename to ...
13928         (target_terminal::m_terminal_state): ... this and change type.
13929
13930 2018-01-30  Pedro Alves  <palves@redhat.com>
13931
13932         * linux-nat.c (wait_for_signal): New function.
13933         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13934         directly.
13935         (async_terminal_is_ours)
13936         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13937         (linux_nat_add_target): Don't override
13938         to_terminal_inferior/to_terminal_ours.
13939
13940 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13941
13942         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13943
13944 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13945
13946         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13947         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13948         dwarf2_per_objfile_free here.
13949         (dwarf2_per_objfile_free): Remove.
13950         (_initialize_dwarf2_read): Don't register
13951         dwarf2_per_objfile_free as a registry cleanup.
13952
13953 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13954
13955         Avoid compilation errors in MinGW native builds
13956
13957         The error is triggered by including python-internal.h, and the
13958         error message is:
13959
13960              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13961                       from build-gnulib/import/math.h:27,
13962                       from d:/usr/Python26/include/pyport.h:235,
13963                       from d:/usr/Python26/include/Python.h:58,
13964                       from python/python-internal.h:94,
13965                       from python/py-arch.c:24:
13966              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13967         using ::hypot;
13968                 ^~~~~
13969
13970         This happens because Python headers define 'hypot' to expand t
13971         '_hypot' in the Windows builds.
13972         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13973         'hypoth'.  This avoids a compilation error.
13974
13975 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13976
13977         * MAINTAINERS (Write After Approval): Fix ordering.
13978
13979 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13980
13981         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13982
13983 2018-01-26  Alan Modra  <amodra@gmail.com>
13984
13985         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13986         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13987         Remove nop.  Make const.  Comment.
13988         (powerpc32_plt_stub_so_2): New.
13989         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13990         Correct count.  Update uses.
13991         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13992         Move common code reading PLT entry word.  Correct
13993         powerpc32_plt_stub PLT address calculation.
13994         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13995         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13996         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13997         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13998         (ppc64_standard_linkage8): Likewise.
13999         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14000         Correct insns description.
14001         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14002
14003 2018-01-24  Pedro Alves  <palves@redhat.com>
14004
14005         GCC PR libstdc++/83906
14006         * gdbtypes.c (operator==(const dynamic_prop &,
14007         const dynamic_prop &)): New.
14008         (operator==(const range_bounds &, const range_bounds &)): New.
14009         (check_types_equal): Use them instead of memcmp.
14010         * gdbtypes.h (operator==(const dynamic_prop &,
14011         const dynamic_prop &)): Declare.
14012         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14013         (operator==(const range_bounds &, const range_bounds &)): Declare.
14014         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14015
14016 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14017
14018         * s390-linux-tdep.c (s390_record_address_mask)
14019         (s390_record_calc_disp_common, s390_record_calc_disp)
14020         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14021         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14022         (s390_process_record): Move to s390-tdep.c.
14023         (s390_linux_init_abi_any): Adjust.
14024         * s390-tdep.c (s390_record_address_mask)
14025         (s390_record_calc_disp_common, s390_record_calc_disp)
14026         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14027         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14028         (s390_process_record): Moved from s390-linux-tdep.c
14029         (s390_gdbarch_init): Adjust.
14030
14031 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14032
14033         * s390-linux-nat.c (s390-tdep.h): New include.
14034         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14035         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14036         (ALLDEPFILES): Add s390-tdep.c.
14037         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14038         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14039         * s390-tdep.h: ...this.  New file.
14040         * s390-linux-tdep.c (s390-tdep.h): New include.
14041         (_initialize_s390_tdep): Rename to...
14042         (_initialize_s390_linux_tdep): ...this and adjust.
14043         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14044         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14045         s390-tdep.h.
14046         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14047         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14048         (s390_is_partial_instruction, s390_software_single_step)
14049         (is_non_branch_ril, s390_displaced_step_copy_insn)
14050         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14051         (s390_prologue_data, s390_addr, s390_store, s390_load)
14052         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14053         (s390_register_call_saved, s390_guess_tracepoint_registers)
14054         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14055         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14056         (s390_pseudo_register_name, s390_pseudo_register_type)
14057         (s390_pseudo_register_read, s390_pseudo_register_write)
14058         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14059         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14060         (s390_addr_bits_remove, s390_address_class_type_flags)
14061         (s390_address_class_type_flags_to_name)
14062         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14063         (s390_function_arg_float, s390_function_arg_vector)
14064         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14065         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14066         (s390_frame_align, s390_register_return_value, s390_return_value)
14067         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14068         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14069         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14070         (s390_trad_frame_prev_register, s390_unwind_cache)
14071         (s390_prologue_frame_unwind_cache)
14072         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14073         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14074         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14075         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14076         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14077         (s390_frame_base_address, s390_local_base_address)
14078         (s390_frame_base, s390_gcc_target_options)
14079         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14080         (s390_validate_reg_range, s390_tdesc_valid)
14081         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14082         * s390-tdep.c: ...this.  New file.
14083
14084 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14085
14086         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14087         (s390_process_record, s390_gdbarch_tdep_alloc)
14088         (s390_linux_init_abi_any): Use/set new hook.
14089
14090 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14091
14092         * s390-linux-tdep.c (osabi.h): New include.
14093         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14094         (s390_linux_init_abi_any): New functions.
14095         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14096
14097 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14098
14099         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14100         tdesc_has_registers check
14101
14102 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14103
14104         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14105         (s390_validate_reg_range): New macro.
14106         (s390_gdbarch_init): Adjust.
14107
14108 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14109
14110         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14111         (s390_gdbarch_tdep_alloc): Adjust.
14112         (s390_gdbarch_init): Adjust.
14113
14114 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14115
14116         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14117         <have_tdb>: Change type to bool.
14118         (s390_gdbarch_tdep_alloc): Adjust.
14119         (s390_gdbarch_init): Adjust.
14120
14121 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14122
14123         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14124         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14125         (s390_gdbarch_tdep_alloc): New function.
14126         (s390_gdbarch_init): Allocate tdep at start and use its fields
14127         instead of separate variables.
14128
14129 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14130
14131         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14132         when looking for cached gdbarch and add comment for remaining.
14133
14134 2018-01-22  Pedro Alves  <palves@redhat.com>
14135             Sergio Durigan Junior  <sergiodj@redhat.com>
14136
14137         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14138         case.
14139
14140 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14141
14142         * MAINTAINERS: Update my company e-mail address.
14143
14144 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14145
14146         * regcache.c (cooked_write_test): New function.
14147         (_initialize_regcache): Register the test.
14148
14149 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14150
14151         * ia64-tdep.c (ia64_pseudo_register_read): Call
14152         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14153         * m32c-tdep.c (m32c_cat_read): Likewise.
14154         (m32c_r3r2r1r0_read): Likewise.
14155         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14156         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14157
14158 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14159
14160         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14161         method raw_read instead of regcache_raw_read.
14162         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14163         * arm-tdep.c (arm_neon_quad_read): Likewise.
14164         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14165         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14166         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14167         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14168         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14169         (i386_pseudo_register_read_into_value): Likewise.
14170         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14171         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14172         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14173         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14174         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14175         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14176         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14177         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14178         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14179
14180 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14181
14182         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14183         * configure.tgt: Remove target mt.
14184         * mt-tdep.c: Remove.
14185         * regcache.c (cooked_read_test): Remove the check for mt.
14186
14187 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14188
14189         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14190         instead of gdbarch_pseudo_register_read_value.
14191
14192 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14193
14194         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14195         language is Ada.
14196
14197 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14198
14199         * linespec.c (create_sals_line_offset): Remove code that preserved
14200         the symtab_and_line's line number.
14201
14202 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14203
14204         * varobj.c (varobj_create): Don't set valid_block when creating a
14205         floating varobj.
14206
14207 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14208
14209         * varobj.c (varobj_create): Remove out of date comment.
14210
14211 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14212
14213         PR mi/20395
14214         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14215         updating innermost block.
14216         * parse.c (innermost_block_tracker::update): Take extra type
14217         parameter, and check types match before updating innermost block.
14218         (write_dollar_variable): Update innermost block for registers.
14219         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14220         (innermost_block_tracker::innermost_block_tracker): Initialise
14221         m_types member.
14222         (innermost_block_tracker::reset): Take type parameter.
14223         (innermost_block_tracker::update): Take type parameter, and pass
14224         type through as needed.
14225         (innermost_block_tracker::m_types): New member.
14226         * varobj.c (varobj_create): Pass type when reseting innermost
14227         block.
14228
14229 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14230
14231         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14232         * ada-lang.c (resolve_subexp): Likewise.
14233         * breakpoint.c (set_breakpoint_condition) Likewise.
14234         (watch_command_1) Likewise.
14235         * c-exp.y (variable): Likewise.
14236         * d-exp.y (PrimaryExpression): Likewise.
14237         * f-exp.y (variable): Likewise.
14238         * go-exp.y (variable): Likewise.
14239         * m2-exp.y (variable): Likewise.
14240         * objfiles.c (objfile::~objfile): Likewise.
14241         * p-exp.y (variable): Likewise.
14242         * parse.c (innermost_block): Change type.
14243         * parser-defs.h (class innermost_block_tracker): New.
14244         (innermost_block): Change to innermost_block_tracker.
14245         * printcmd.c (display_command): Switch to innermost_block API.
14246         (do_one_display): Likewise.
14247         * rust-exp.y (do_one_display): Likewise.
14248         * symfile.c (clear_symtab_users): Likewise.
14249         * varobj.c (varobj_create): Switch to innermost_block API, replace
14250         use of innermost_block with block stored on varobj object.
14251
14252 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14253
14254         * expression.h (innermost_block): Remove declaration.
14255         * varobj.c: Add 'parser-defs.h' include.
14256
14257 2018-01-19  Tom Tromey  <tom@tromey.com>
14258
14259         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14260         symbols in the static and global blocks.
14261
14262 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14263
14264         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14265         gdb_ptrace.h, and move including gdb_wait.h ...
14266         * nat/linux-ptrace.h: ... to here.
14267
14268 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14269
14270         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14271         inf_ptrace_detach_success.
14272         (inf_ptrace_detach_success): Add inferior parameter, use it
14273         instead of inferior_ptid, pass it to detach_inferior.
14274         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14275         parameter.
14276         * inferior.c (detach_inferior): Add overload that takes an
14277         inferior object.
14278         * inferior.h (detach_inferior): Likewise.
14279         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14280         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14281         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14282
14283 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14284
14285         * target.h (struct target_ops) <to_detach>: Add inferior
14286         parameter.
14287         (target_detach): Likewise.
14288         * target.c (dispose_inferior): Pass inferior down.
14289         (target_detach): Pass inferior down.  Assert that it is equal to
14290         the current inferior.
14291         * aix-thread.c (aix_thread_detach): Pass inferior down.
14292         * corefile.c (core_file_command): Pass current_inferior() down.
14293         * corelow.c (core_detach): Add inferior parameter.
14294         * darwin-nat.c (darwin_detach): Likewise.
14295         * gnu-nat.c (gnu_detach): Likewise.
14296         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14297         * infcmd.c (detach_command): Pass current_inferior() down to
14298         target_detach.
14299         * infrun.c (follow_fork_inferior): Pass parent_inf to
14300         target_detach.
14301         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14302         target_detach.
14303         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14304         * linux-thread-db.c (thread_db_detach): Likewise.
14305         * nto-procfs.c (procfs_detach): Likewise.
14306         * procfs.c (procfs_detach): Likewise.
14307         * record.c (record_detach): Likewise.
14308         * record.h (struct inferior): Forward-declare.
14309         (record_detach): Add inferior parameter.
14310         * remote-sim.c (gdbsim_detach): Likewise.
14311         * remote.c (remote_detach_1): Likewise.
14312         (remote_detach): Likewise.
14313         (extended_remote_detach): Likewise.
14314         * sol-thread.c (sol_thread_detach): Likewise.
14315         * target-debug.h (target_debug_print_inferior_p): New macro.
14316         * target-delegates.c: Re-generate.
14317         * top.c (kill_or_detach): Pass inferior down to target_detach.
14318         * windows-nat.c (windows_detach): Add inferior parameter.
14319
14320 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14321
14322         * target.h (struct target_ops) <to_detach>: Remove args
14323         parameter.
14324         (target_detach): Likewise.
14325         * target.c (dispose_inferior): Adjust.
14326         (target_detach): Remove args parameter, adjust.
14327         * aix-thread.c (aix_thread_detach): Adjust.
14328         * corefile.c (core_file_command): Adjust.
14329         * corelow.c (core_detach): Adjust.
14330         * darwin-nat.c (darwin_detach): Adjust.
14331         * gnu-nat.c (gnu_detach): Adjust.
14332         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14333         * infcmd.c (detach_command): Adjust
14334         * infrun.c (follow_fork_inferior): Adjust.
14335         (handle_vfork_child_exec_or_exit): Adjust.
14336         * linux-fork.c (linux_fork_detach): Remove args parameter.
14337         * linux-fork.h (linux_fork_detach): Likewise.
14338         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14339         * linux-thread-db.c (thread_db_detach): Likewise.
14340         * nto-procfs.c (procfs_detach): Likewise.
14341         * procfs.c (procfs_detach): Likewise.
14342         (do_detach): Remove signo parameter.
14343         * record.c (record_detach): Remove args parameter.
14344         * record.h (record_detach): Likewise.
14345         * remote-sim.c (gdbsim_detach): Likewise.
14346         * remote.c (remote_detach_1): Likewise.
14347         (remote_detach): Likewise.
14348         (extended_remote_detach): Likewise.
14349         * sol-thread.c (sol_thread_detach): Likewise.
14350         * target-delegates.c: Re-generate.
14351         * top.c (struct qt_args) <args>: Remove field.
14352         (kill_or_detach): Don't pass args.
14353         (quit_force): Don't set args.
14354         * windows-nat.c (windows_detach): Remove args parameter.
14355
14356 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14357
14358         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14359         (arm_linux_init_abi): Install it.
14360
14361 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14362
14363         * osabi.c (gdb_osabi_names): Extend the regexp for
14364         arm-linux-gnueabihf.
14365
14366 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14367
14368         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14369         m_abbrevs.
14370         (abbrev_table::add_abbrev): Update.
14371         (abbrev_table::lookup_abbrev): Update.
14372
14373 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14374
14375         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14376
14377 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14378
14379         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14380         to "std::string".
14381
14382 2018-01-17  Tom Tromey  <tom@tromey.com>
14383
14384         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14385
14386 2018-01-17  Tom Tromey  <tom@tromey.com>
14387
14388         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14389         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14390         (create_array_type_with_stride): Update.
14391         * dwarf2read.c (set_die_type): Update.
14392
14393 2018-01-17  Tom Tromey  <tom@tromey.com>
14394
14395         * dwarf2read.c (delayed_method_info): Remove typedef.
14396         (dwarf2_cu::method_info): Now a std::vector.
14397         (add_to_method_list): Update.
14398         (free_delayed_list): Remove.
14399         (compute_delayed_physnames): Update.
14400         (process_full_comp_unit, process_full_type_unit): Clear the method
14401         list.  Remove cleanups.
14402         (psymtab_include_file_name): Add name_holder parameter.  Use
14403         unique_xmalloc_ptr.
14404         (dwarf_decode_lines): Update.
14405
14406 2018-01-17  Tom Tromey  <tom@tromey.com>
14407             Simon Marchi  <simon.marchi@ericsson.com>
14408
14409         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14410         (dwarf2_per_objfile::free_cached_comp_units)
14411         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14412         (init_cutu_and_read_dies_no_follow): Update.
14413         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14414         (dwarf2_cu::~dwarf2_cu): New.
14415         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14416         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14417
14418 2018-01-17  Tom Tromey  <tom@tromey.com>
14419             Simon Marchi  <simon.marchi@ericsson.com>
14420
14421         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14422         (struct die_reader_specs) <abbrev_table>: New member.
14423         (struct abbrev_table): Add constructor.
14424         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14425         <abbrev_obstack>: Now an auto_obstack.
14426         (abbrev_table_up): New typedef.
14427         (init_cu_die_reader): Add abbrev_table parameter.
14428         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14429         Add result_dwo_abbrev_table.
14430         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14431         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14432         Update.
14433         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14434         parameter.
14435         (skip_children): Update.
14436         (abbrev_table::alloc_abbrev): Rename from
14437         abbrev_table_alloc_abbrev.
14438         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14439         (abbrev_table::lookup_abbrev): Rename from
14440         abbrev_table_lookup_abbrev.
14441         (abbrev_table_read_table): Return abbrev_table_up.
14442         (abbrev_table_free, abbrev_table_free_cleanup)
14443         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14444         (load_partial_dies): Update.
14445
14446 2018-01-17  Tom Tromey  <tom@tromey.com>
14447
14448         * dwarf2read.c (dwarf2_compute_name): Update comment.
14449         (read_func_scope, read_variable): Update.
14450         (new_symbol): Remove.
14451         (new_symbol_full): Rename to new_symbol.
14452
14453 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14454
14455         PR gdb/16577
14456         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14457         a warning instead of throwing an error, set section size to 0 and return
14458         NULL.
14459         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14460
14461 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14462
14463         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14464         std::string.
14465         (linux_ptrace_attach_fail_reason_string): Likewise.
14466         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14467         Likewise.
14468         (linux_ptrace_attach_fail_reason_string): Likewise.
14469         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14470
14471 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14472
14473         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14474
14475 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14476
14477         PR gdb/21559
14478         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14479         checking for fs_base/gs_base fields in struct user_regs_struct.
14480         * configure: Regenerate.
14481
14482 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14483
14484         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14485         function.
14486         (aarch64_linux_init_abi): Install it to gdbarch hook
14487         gcc_target_options.
14488
14489 2018-01-15  Pedro Alves  <palves@redhat.com>
14490
14491         * common/signals-state-save-restore.c
14492         (save_original_signals_state): Fix typos.
14493
14494 2017-01-12  Tom Tromey  <tom@tromey.com>
14495             Sergio Durigan Junior  <sergiodj@redhat.com>
14496
14497         * Makefile.in (install-only): Install gdb-add-index.
14498
14499 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14500
14501         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14502
14503 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14504
14505         * infrun.c (keep_going_pass_signal): Clear step-over info when
14506         insert_breakpoints fails.
14507
14508 2018-01-11  Pedro Alves  <palves@redhat.com>
14509
14510         PR gdb/22583
14511         * infrun.c (resume): Rename to ...
14512         (resume_1): ... this.
14513         (resume): Reimplement as wrapper around resume_1.
14514
14515 2018-01-11  Pedro Alves  <palves@redhat.com>
14516
14517         PR remote/22597
14518         * remote.c (remote_parse_stop_reply): Default to the last-set
14519         general thread instead of to 'magic_null_ptid'.
14520
14521 2018-01-10  Pedro Alves  <palves@redhat.com>
14522
14523         * language.h (language_get_symbol_name_matcher): Rename ...
14524         (get_symbol_name_matcher): ... this.
14525         * language.c (language_get_symbol_name_matcher): Ditto.
14526         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14527         callers adjusted.
14528
14529 2018-01-10  Pedro Alves  <palves@redhat.com>
14530
14531         PR gdb/22670
14532         * dwarf2read.c
14533         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14534         Adjust to use language_get_symbol_name_matcher instead of
14535         language_defn::la_get_symbol_name_matcher.
14536         * language.c (language_get_symbol_name_matcher): If in Ada mode
14537         and the lookup name is a verbatim match, return Ada's matcher.
14538         * language.h (language_get_symbol_name_matcher): Adjust comment.
14539         (ada_lookup_name_info::verbatim_p):: New method.
14540
14541 2018-01-10  Pedro Alves  <palves@redhat.com>
14542
14543         PR gdb/22670
14544         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14545         minsym's language is language_auto or language_cplus, pass down
14546         language_ada instead.
14547         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14548
14549 2018-01-10  Pedro Alves  <palves@redhat.com>
14550
14551         PR gdb/22670
14552         * minsyms.c (linkage_name_str): New function.
14553         (iterate_over_minimal_symbols): Use it.
14554
14555 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14556
14557         * NEWS: Document that 'info proc' now works on FreeBSD.
14558
14559 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14560
14561         * configure.ac: Check for kinfo_getfile in libutil.
14562         * configure: Regenerate.
14563         * config.in: Regenerate.
14564         * fbsd-nat.c: Include "fbsd-tdep.h".
14565         (fbsd_fetch_cmdline): New.
14566         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14567         rather than calling error.
14568         (fbsd_info_proc): New.
14569         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14570         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14571         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14572
14573 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14574
14575         * fbsd-nat.c (struct free_deleter): Remove.
14576         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14577
14578 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14579
14580         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14581         NULL for an empty pathname.
14582
14583 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14584
14585         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14586         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14587         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14588         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14589         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14590         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14591         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14592         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14593         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14594         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14595         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14596         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14597         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14598         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14599         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14600
14601 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14602
14603         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14604         (gnu_xfer_auxv): New function.
14605         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14606         TARGET_OBJECT_AUXV.
14607
14608 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14609             Simon Marchi  <simon.marchi@ericsson.com>
14610
14611         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14612         common/selftest.c.
14613         (COMMON_OBS): Remove selftest.o.
14614         * configure.ac: Append selftest-arch.c and common/selftest.c to
14615         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14616         * configure: Re-generated.
14617         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14618         GDB_SELF_TEST.
14619         (maintenance_info_selftests): Likewise.
14620
14621 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14622
14623         * ada-valprint.c (val_print_packed_array_elements): Use
14624         proper number of elements when printing an array indexed
14625         by an enumeration type.
14626
14627 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14628
14629         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14630         (dw2_get_file_names_reader): Adjust.
14631         (lookup_dwo_signatured_type): Adjust.
14632         (lookup_dwp_signatured_type): Adjust.
14633         (lookup_signatured_type): Adjust.
14634         (create_type_unit_group): Adjust.
14635         (get_type_unit_group): Adjust.
14636         (process_psymtab_comp_unit_reader): Adjust.
14637         (build_type_psymtabs_reader): Adjust.
14638         (scan_partial_symbols): Adjust.
14639         (add_partial_symbol): Adjust.
14640         (add_partial_subprogram): Adjust.
14641         (peek_die_abbrev): Adjust.
14642         (fixup_go_packaging): Adjust.
14643         (process_imported_unit_die): Adjust.
14644         (dwarf2_compute_name): Adjust.
14645         (dwarf2_physname): Adjust.
14646         (read_import_statement): Adjust.
14647         (handle_DW_AT_stmt_list): Adjust.
14648         (read_file_scope): Adjust.
14649         (read_func_scope): Adjust.
14650         (read_lexical_block_scope): Adjust.
14651         (read_call_site_scope): Adjust.
14652         (read_variable): Adjust.
14653         (dwarf2_rnglists_process): Adjust.
14654         (dwarf2_ranges_process): Adjust.
14655         (dwarf2_ranges_read): Adjust.
14656         (dwarf2_get_pc_bounds): Adjust.
14657         (dwarf2_record_block_ranges): Adjust.
14658         (dwarf2_add_field): Adjust.
14659         (dwarf2_add_member_fn): Adjust.
14660         (read_structure_type): Adjust.
14661         (process_structure_scope): Adjust.
14662         (read_enumeration_type): Adjust.
14663         (read_array_type): Adjust.
14664         (mark_common_block_symbol_computed): Adjust.
14665         (read_common_block): Adjust.
14666         (read_namespace_type): Adjust.
14667         (read_namespace): Adjust.
14668         (read_module_type): Adjust.
14669         (read_tag_pointer_type): Adjust.
14670         (read_tag_ptr_to_member_type): Adjust.
14671         (read_tag_string_type): Adjust.
14672         (read_subroutine_type): Adjust.
14673         (read_typedef): Adjust.
14674         (read_base_type): Adjust.
14675         (attr_to_dynamic_prop): Adjust.
14676         (read_subrange_type): Adjust.
14677         (read_unspecified_type): Adjust.
14678         (dwarf2_read_abbrevs): Adjust.
14679         (load_partial_dies): Adjust.
14680         (read_partial_die): Adjust.
14681         (find_partial_die): Adjust.
14682         (guess_partial_die_structure_name): Adjust.
14683         (fixup_partial_die): Adjust.
14684         (read_attribute_value): Adjust.
14685         (read_addr_index): Adjust.
14686         (read_addr_index_from_leb128): Adjust.
14687         (read_str_index): Adjust.
14688         (dwarf2_string_attr): Adjust.
14689         (get_debug_line_section): Adjust.
14690         (dwarf_decode_line_header): Adjust.
14691         (lnp_state_machine::check_line_address): Adjust.
14692         (dwarf_decode_lines_1): Adjust.
14693         (dwarf_decode_lines): Adjust.
14694         (dwarf2_start_symtab): Adjust.
14695         (var_decode_location): Adjust.
14696         (new_symbol_full): Adjust.
14697         (dwarf2_const_value_data): Adjust.
14698         (dwarf2_const_value_attr): Adjust.
14699         (dwarf2_const_value): Adjust.
14700         (die_type): Adjust.
14701         (die_containing_type): Adjust.
14702         (build_error_marker_type): Adjust.
14703         (lookup_die_type): Adjust.
14704         (guess_full_die_structure_name): Adjust.
14705         (anonymous_struct_prefix): Adjust.
14706         (determine_prefix): Adjust.
14707         (dwarf2_name): Adjust.
14708         (follow_die_ref_or_sig): Adjust.
14709         (follow_die_offset): Adjust.
14710         (follow_die_ref): Adjust.
14711         (follow_die_sig_1): Adjust.
14712         (follow_die_sig): Adjust.
14713         (get_signatured_type): Adjust.
14714         (get_DW_AT_signature_type): Adjust.
14715         (decode_locdesc): Adjust.
14716         (dwarf_decode_macros): Adjust.
14717         (cu_debug_loc_section): Adjust.
14718         (fill_in_loclist_baton): Adjust.
14719         (dwarf2_symbol_mark_computed): Adjust.
14720         (init_one_comp_unit): Don't assign
14721         dwarf2_cu::dwarf2_per_objfile.
14722         (set_die_type): Adjust.
14723
14724 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14725
14726         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14727         <dwarf2_per_objfile>: New field.
14728         (dwarf2_per_objfile): Remove global.
14729         (get_dwarf2_per_objfile): New function.
14730         (set_dwarf2_per_objfile): New function.
14731         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14732         dwarf2_per_objfile.
14733         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14734         (read_abbrev_offset): Likewise.
14735         (read_indirect_string): Likewise.
14736         (read_indirect_line_string): Likewise.
14737         (read_indirect_string_at_offset): Likewise.
14738         (read_indirect_string_from_dwz): Likewise.
14739         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14740         dwarf2_per_objfile.
14741         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14742         (create_all_comp_units): Change objfile parameter to
14743         dwarf2_per_objfile.
14744         (create_all_type_units): Likewise.
14745         (process_queue): Add dwarf2_per_objfile parameter.
14746         (read_and_check_comp_unit_head): Likewise.
14747         (lookup_dwo_unit_in_dwp): Likewise.
14748         (get_dwp_file): Likewise.
14749         (process_cu_includes): Likewise.
14750         (struct free_dwo_file_cleanup_data): New struct.
14751         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14752         set_dwarf2_per_objfile.
14753         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14754         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14755         context, adjust calls.
14756         (dw2_instantiate_symtab): Likewise.
14757         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14758         (dw2_get_cu): Likewise.
14759         (create_cu_from_index_list): Change objfile parameter to
14760         dwarf2_per_objfile.
14761         (create_cus_from_index_list): Get dwarf2_per_objfile from
14762         context, adjust calls.
14763         (create_cus_from_index): Likewise.
14764         (create_signatured_type_table_from_index): Change objfile
14765         parameter to dwarf2_per_objfile.
14766         (create_signatured_type_table_from_debug_names): Change objfile
14767         parameter to dwarf2_per_objfile.
14768         (create_addrmap_from_index): Likewise.
14769         (create_addrmap_from_aranges): Likewise.
14770         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14771         (dw2_setup): Remove.
14772         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14773         context.
14774         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14775         get_dwarf2_per_objfile.
14776         (dw2_forget_cached_source_info): Likewise.
14777         (dw2_map_symtabs_matching_filename): Likewise.
14778         (struct dw2_symtab_iterator) <index>: Remove.
14779         <dwarf2_per_objfile>: New field.
14780         (dw2_symtab_iter_init): Replace index parameter with
14781         dwarf2_per_objfile.
14782         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14783         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14784         (dw2_print_stats): Likewise.
14785         (dw2_dump): Likewise.
14786         (dw2_expand_symtabs_for_function): Likewise.
14787         (dw2_expand_all_symtabs): Likewise.
14788         (dw2_expand_symtabs_with_fullname): Likewise.
14789         (dw2_expand_marked_cus): Replace index and objfile parameters
14790         with dwarf2_per_objfile.
14791         (dw_expand_symtabs_matching_file_matcher): Add
14792         dwarf2_per_objfile parameter and adjust calls.
14793         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14794         adjust calls.
14795         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14796         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14797         adjust calls.
14798         (create_cus_from_debug_names_list): Replace objfile parameter
14799         with dwarf2_per_objfile and adjust calls.
14800         (create_cus_from_debug_names): Likewise.
14801         (dwarf2_read_debug_names): Likewise.
14802         (mapped_debug_names::namei_to_name): Adjust call.
14803         (dw2_debug_names_iterator::next): Likewise.
14804         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14805         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14806         (dw2_debug_names_dump): Likewise.
14807         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14808         (dw2_debug_names_expand_symtabs_matching): Likewise.
14809         (dwarf2_initialize_objfile): Likewise.
14810         (dwarf2_build_psymtabs): Likewise.
14811         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14812         this_cu.
14813         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14814         (read_and_check_comp_unit_head): Likewise.
14815         (read_abbrev_offset): Likewise.
14816         (create_debug_type_hash_table): Likewise.
14817         (create_debug_types_hash_table): Likewise.
14818         (create_all_type_units): Replace objfile parameter with
14819         dwarf2_per_objfile.
14820         (add_type_unit): Add dwarf2_per_objfile parameter.
14821         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14822         with dwarf2_per_objfile.
14823         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14824         (lookup_dwp_signatured_type): Likewise.
14825         (lookup_signatured_type): Likewise.
14826         (read_cutu_die_from_dwo): Likewise.
14827         (init_tu_and_read_dwo_dies): Likewise.
14828         (init_cutu_and_read_dies): Likewise.
14829         (init_cutu_and_read_dies_no_follow): Likewise.
14830         (allocate_type_unit_groups_table): Add objfile parameter.
14831         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14832         (get_type_unit_group): Likewise.
14833         (process_psymtab_comp_unit): Update call.
14834         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14835         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14836         (print_tu_stats): Likewise.
14837         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14838         in void* parameter.
14839         (build_type_psymtabs): Change objfile parameter to
14840         dwarf2_per_objfile.
14841         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14842         passed in void* parameter.
14843         (process_skeletonless_type_units): Change objfile parameter to
14844         dwarf2_per_objfile.
14845         (set_partial_user): Likewise.
14846         (dwarf2_build_psymtabs_hard): Likewise.
14847         (read_comp_units_from_section): Likewise.
14848         (create_all_comp_units): Likewise.
14849         (scan_partial_symbols): Update calls.
14850         (add_partial_symbol): Likewise.
14851         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14852         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14853         (process_queue): Add dwarf2_per_objfile parameter.
14854         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14855         (compute_compunit_symtab_includes): Likewise.
14856         (process_cu_includes): Add dwarf2_per_objfile parameter.
14857         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14858         (process_full_type_unit): Likewise.
14859         (process_imported_unit_die): Update call.
14860         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14861         (read_file_scope): Likewise.
14862         (allocate_dwo_file_hash_table): Add objfile parameter.
14863         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14864         (create_cus_hash_table): Likewise.
14865         (create_dwp_hash_table): Likewise.
14866         (create_dwo_unit_in_dwp_v1): Likewise.
14867         (create_dwp_v2_section): Likewise.
14868         (create_dwo_unit_in_dwp_v2): Likewise.
14869         (lookup_dwo_unit_in_dwp): Likewise.
14870         (try_open_dwop_file): Likewise.
14871         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14872         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14873         cleanup to include a reference to dwarf2_per_objfile.
14874         (open_dwp_file): Add dwarf2_per_objfile parameter.
14875         (open_and_init_dwp_file): Likewise.
14876         (get_dwp_file): Likewise.
14877         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14878         (queue_and_load_all_dwo_tus): Update call.
14879         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14880         data.
14881         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14882         (dwarf2_ranges_process): Likewise.
14883         (dwarf2_get_pc_bounds): Likewise.
14884         (mark_common_block_symbol_computed): Likewise.
14885         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14886         (dwarf2_read_abbrevs): Update call.
14887         (read_partial_die): Use dwarf2_per_objfile from cu.
14888         (find_partial_die): Likewise.
14889         (fixup_partial_die): Likewise.
14890         (read_attribute_value): Likewise.
14891         (read_indirect_string_at_offset_from): Add objfile parameter.
14892         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14893         parameter.
14894         (read_indirect_string_from_dwz): Add objfile parameter.
14895         (read_indirect_string): Add objfile parameter.
14896         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14897         (read_addr_index): Use dwarf2_per_objfile from cu.
14898         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14899         call dw2_setup.
14900         (read_str_index): Use dwarf2_per_objfile from cu.
14901         (get_debug_line_section): Likewise.
14902         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14903         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14904         (new_symbol_full): Use dwarf2_per_objfile from cu.
14905         (build_error_marker_type): Likewise.
14906         (lookup_die_type): Likewise.
14907         (determine_prefix): Likewise.
14908         (follow_die_offset): Likewise.
14909         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14910         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14911         (dwarf2_fetch_die_type_sect_off): Likewise.
14912         (dwarf2_get_die_type): Likewise.
14913         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14914         (get_signatured_type): Likewise.
14915         (get_DW_AT_signature_type): Likewise.
14916         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14917         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14918         (cu_debug_loc_section): Likewise.
14919         (fill_in_loclist_baton): Likewise.
14920         (dwarf2_symbol_mark_computed): Likewise.
14921         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14922         dwarf2_per_objfile.
14923         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14924         parameter.
14925         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14926         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14927         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14928         (set_die_type): Use dwarf2_free_objfile from cu.
14929         (get_die_type_at_offset): Likewise.
14930         (dwarf2_per_objfile_free): Don't assign global variable.
14931         (debug_names) <constructor>: Add dwarf2_per_objfile
14932         parameter, update m_debugstrlookup construction.
14933         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14934         parameter.
14935         <m_dwarf2_per_objfile>: New field.
14936         <lookup>: Use m_dwarf2_per_objfile.
14937         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14938         (psyms_seen_size): Likewise.
14939         (write_gdbindex): Replace objfile parameter with
14940         dwarf2_per_objfile.
14941         (write_debug_names): Likewise.
14942         (write_psymtabs_to_index): Likewise.
14943         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14944         calls.
14945
14946 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14947
14948         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14949         <dwarf2_per_objfile>: New field.
14950         (struct dwarf2_per_cu_data) <objfile>: Remove.
14951         <dwarf2_per_objfile>: New field.
14952         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14953         of objfile.
14954         (create_signatured_type_table_from_index): Likewise.
14955         (create_debug_type_hash_table): Likewise.
14956         (fill_in_sig_entry_from_dwo_entry): Likewise.
14957         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14958         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14959         objfile.
14960         (create_partial_symtab): Access objfile through
14961         dwarf2_per_objfile.
14962         (process_psymtab_comp_unit_reader): Likewise.
14963         (read_comp_units_from_section): Likewise.
14964         (scan_partial_symbols): Likewise.
14965         (add_partial_symbol): Likewise.
14966         (add_partial_subprogram): Likewise.
14967         (peek_die_abbrev): Likewise.
14968         (fixup_go_packaging): Likewise.
14969         (process_full_comp_unit): Likewise.
14970         (process_full_type_unit): Likewise.
14971         (process_imported_unit_die): Likewise.
14972         (dwarf2_compute_name): Likewise.
14973         (dwarf2_physname): Likewise.
14974         (read_import_statement): Likewise.
14975         (create_cus_hash_table): Assign dwarf2_physname instead of
14976         objfile.
14977         (read_func_scope): Access objfile through dwarf2_per_objfile.
14978         (read_lexical_block_scope): Likewise.
14979         (read_call_site_scope): Likewise.
14980         (read_variable): Likewise.
14981         (dwarf2_rnglists_process): Likewise.
14982         (dwarf2_ranges_process): Likewise.
14983         (dwarf2_ranges_read): Likewise.
14984         (dwarf2_record_block_ranges): Likewise.
14985         (dwarf2_add_field): Likewise.
14986         (dwarf2_add_member_fn): Likewise.
14987         (read_structure_type): Likewise.
14988         (process_structure_scope): Likewise.
14989         (read_enumeration_type): Likewise.
14990         (read_array_type): Likewise.
14991         (read_common_block): Likewise.
14992         (read_namespace_type): Likewise.
14993         (read_namespace): Likewise.
14994         (read_module_type): Likewise.
14995         (read_tag_pointer_type): Likewise.
14996         (read_tag_ptr_to_member_type): Likewise.
14997         (read_tag_string_type): Likewise.
14998         (read_subroutine_type): Likewise.
14999         (read_typedef): Likewise.
15000         (read_base_type): Likewise.
15001         (attr_to_dynamic_prop): Likewise.
15002         (read_subrange_type): Likewise.
15003         (read_unspecified_type): Likewise.
15004         (load_partial_dies): Likewise.
15005         (read_partial_die): Likewise.
15006         (find_partial_die): Likewise.
15007         (guess_partial_die_structure_name): Likewise.
15008         (fixup_partial_die): Likewise.
15009         (read_attribute_value): Likewise.
15010         (read_addr_index_from_leb128): Likewise.
15011         (dwarf2_read_addr_index): Likewise.
15012         (dwarf2_string_attr): Likewise.
15013         (lnp_state_machine::check_line_address): Likewise.
15014         (dwarf_decode_lines_1): Likewise.
15015         (dwarf_decode_lines): Likewise.
15016         (dwarf2_start_symtab): Likewise.
15017         (var_decode_location): Likewise.
15018         (new_symbol_full): Likewise.
15019         (dwarf2_const_value_data): Likewise.
15020         (dwarf2_const_value_attr): Likewise.
15021         (dwarf2_const_value): Likewise.
15022         (die_type): Likewise.
15023         (die_containing_type): Likewise.
15024         (lookup_die_type): Likewise.
15025         (guess_full_die_structure_name): Likewise.
15026         (anonymous_struct_prefix): Likewise.
15027         (dwarf2_name): Likewise.
15028         (follow_die_ref_or_sig): Likewise.
15029         (follow_die_offset): Likewise.
15030         (follow_die_ref): Likewise.
15031         (dwarf2_fetch_die_loc_sect_off): Likewise.
15032         (dwarf2_fetch_constant_bytes): Likewise.
15033         (dwarf2_fetch_die_type_sect_off): Likewise.
15034         (dwarf2_get_die_type): Likewise.
15035         (follow_die_sig): Likewise.
15036         (decode_locdesc): Likewise.
15037         (dwarf2_per_cu_objfile): Likewise.
15038         (dwarf2_per_cu_text_offset): Likewise.
15039         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15040         objfile.
15041         (set_die_type): Access objfile through
15042         dwarf2_per_objfile.
15043
15044 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15045
15046         * valprint.c (converted_character_d): Remove typedef.
15047         (DEF_VEC_O (converted_character_d)): Remove.
15048         (count_next_character): Use std::vector.
15049         (print_converted_chars_to_obstack): Likewise.
15050         (generic_printstr): Likewise.
15051
15052 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15053
15054         * xml-support.h (struct gdb_xml_value): Add constructor.
15055         <value>: Change type to unique_xmalloc_ptr.
15056         (gdb_xml_value_s): Remove typedef.
15057         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15058         (gdb_xml_element_start_handler): Change parameter type to
15059         std::vector.
15060         (xml_find_attribute): Likewise.
15061         * xml-support.c (xml_find_attribute): Change parameter type to
15062         std::vector and adjust.
15063         (gdb_xml_values_cleanup): Remove.
15064         (gdb_xml_parser::start_element): Adjust to std::vector.
15065         (xinclude_start_include): Change paraeter type to std::vector
15066         and adjust.
15067         * btrace.c (check_xml_btrace_version): Likewise.
15068         (parse_xml_btrace_block): Likewise.
15069         (parse_xml_btrace_pt_config_cpu): Likewise.
15070         (parse_xml_btrace_pt): Likewise.
15071         (parse_xml_btrace_conf_bts): Likewise.
15072         (parse_xml_btrace_conf_pt): Likewise.
15073         * memory-map.c (memory_map_start_memory): Likewise.
15074         (memory_map_start_property): Likewise.
15075         * osdata.c (osdata_start_osdata): Likewise.
15076         (osdata_start_item): Likewise.
15077         (osdata_start_column): Likewise.
15078         * remote.c (start_thread): Likewise.
15079         * solib-aix.c (library_list_start_library): Likewise.
15080         (library_list_start_list): Likewise.
15081         * solib-svr4.c (library_list_start_library): Likewise.
15082         (svr4_library_list_start_list): Likewise.
15083         * solib-target.c (library_list_start_segment): Likewise.
15084         (library_list_start_section): Likewise.
15085         (library_list_start_library): Likewise.
15086         (library_list_start_list): Likewise.
15087         * tracepoint.c (traceframe_info_start_memory): Likewise.
15088         (traceframe_info_start_tvar): Likewise.
15089         * xml-syscall.c (syscall_start_syscall): Likewise.
15090         * xml-tdesc.c (tdesc_start_target): Likewise.
15091         (tdesc_start_feature): Likewise.
15092         (tdesc_start_reg): Likewise.
15093         (tdesc_start_union): Likewise.
15094         (tdesc_start_struct): Likewise.
15095         (tdesc_start_flags): Likewise.
15096         (tdesc_start_enum): Likewise.
15097         (tdesc_start_field): Likewise.
15098         (tdesc_start_enum_value): Likewise.
15099         (tdesc_start_vector): Likewise.
15100
15101 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15102
15103         * extension.h (struct xmethod_worker) <clone>: Remove.
15104         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15105         Remove.
15106         (python_xmethod_worker::clone): Remove.
15107         * valops.c (find_overload_match): Use std::move instead of
15108         clone.
15109
15110 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15111
15112         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15113         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15114         <free_xmethod_worker_data>: Remove.
15115         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15116         <get_xmethod_arg_types>: Remove.
15117         <get_xmethod_result_type>: Remove.
15118         <invoke_xmethod>: Remove.
15119         * extension.c (new_xmethod_worker): Remove.
15120         (clone_xmethod_worker): Remove.
15121         (get_matching_xmethod_workers): Return void, pass std::vector by
15122         pointer.
15123         (get_xmethod_arg_types): Rename to...
15124         (xmethod_worker::get_arg_types): ... this, and adjust.
15125         (get_xmethod_result_type): Rename to...
15126         (xmethod_worker::get_result_type): ... this, and adjust.
15127         (invoke_xmethod): Remove.
15128         (free_xmethod_worker): Remove.
15129         (free_xmethod_worker_vec): Remove.
15130         * extension.h (enum ext_lang_rc): Move here from
15131         extension-priv.h.
15132         (struct xmethod_worker): Add constructor and destructor.
15133         <data>: Remove.
15134         <value>: Remove.
15135         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15136         virtual pure methods.
15137         <get_arg_types, get_result_type>: New methods.
15138         (xmethod_worker_ptr): Remove typedef.
15139         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15140         (xmethod_worker_vec): Remove typedef.
15141         (xmethod_worker_up): New typedef.
15142         (invoke_xmethod): Remove.
15143         (clone_xmethod_worker): Remove.
15144         (free_xmethod_worker): Remove.
15145         (free_xmethod_worker_vec): Remove.
15146         (get_xmethod_arg_types): Remove.
15147         (get_xmethod_result_type): Remove.
15148         * valops.c (find_method_list): Use std::vector, don't use
15149         intermediate vector.
15150         (value_find_oload_method_list): Use std::vector.
15151         (find_overload_match): Use std::vector.
15152         (find_oload_champ): Use std::vector.
15153         * value.c (value_free): Use operator delete.
15154         (value_of_xmethod): Rename to...
15155         (value_from_xmethod): ... this.  Don't assign
15156         xmethod_worker::value, take rvalue-reference.
15157         (result_type_of_xmethod): Adjust.
15158         (call_xmethod): Adjust.
15159         * value.h: Include extension.h.
15160         (struct xmethod_worker): Don't forward-declare.
15161         (value_of_xmethod): Rename to...
15162         (value_from_xmethod): ... this, take rvalue-reference.
15163         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15164         (struct python_xmethod_worker): ... this, add constructor and
15165         destructor.
15166         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15167         (gdbpy_free_xmethod_worker_data): Rename to...
15168         (python_xmethod_worker::~python_xmethod_worker): ... this and
15169         adjust.
15170         (gdbpy_clone_xmethod_worker_data): Rename to...
15171         (python_xmethod_worker::clone): ... this and adjust.
15172         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15173         temporary vector.
15174         (gdbpy_get_xmethod_arg_types): Rename to...
15175         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15176         (gdbpy_get_xmethod_result_type): Rename to...
15177         (python_xmethod_worker::do_get_result_type): ... this and
15178         adjust.
15179         (gdbpy_invoke_xmethod): Rename to...
15180         (python_xmethod_worker::invoke): ... this and adjust.
15181         (new_python_xmethod_worker): Rename to...
15182         (python_xmethod_worker::python_xmethod_worker): ... this and
15183         adjust.
15184         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15185         Remove.
15186         (gdbpy_free_xmethod_worker_data): Remove.
15187         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15188         (gdbpy_get_xmethod_arg_types): Remove.
15189         (gdbpy_get_xmethod_result_type): Remove.
15190         (gdbpy_invoke_xmethod): Remove.
15191         * python/python.c (python_extension_ops): Remove obsolete
15192         callbacks.
15193
15194 2018-01-05  Pedro Alves  <palves@redhat.com>
15195
15196         PR gdb/18653
15197         * common/signals-state-save-restore.c
15198         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15199         find a custom handler preinstalled, instead of internal erroring.
15200         But only warn if !quiet.
15201         * common/signals-state-save-restore.h
15202         (save_original_signals_state): New parameter 'quiet'.
15203         * main.c (captured_main_1): Move save_original_signals_state call
15204         after option handling, and pass QUIET.
15205
15206 2018-01-05  Pedro Alves  <palves@redhat.com>
15207
15208         * spu-tdep.c (spu_catch_start): Pass
15209         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15210
15211 2018-01-05  Pedro Alves  <palves@redhat.com>
15212
15213         PR gdb/22670
15214         * ada-lang.c (literal_symbol_name_matcher): New function.
15215         (ada_get_symbol_name_matcher): Use it for
15216         symbol_name_match_type::SEARCH_NAME.
15217         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15218         it down instead of assuming symbol_name_match_type::FULL.
15219         * block.h (block_lookup_symbol): New parameter 'match_type'.
15220         * c-valprint.c (print_unpacked_pointer): Use
15221         lookup_symbol_search_name instead of lookup_symbol.
15222         * compile/compile-object-load.c (get_out_value_type): Pass down
15223         symbol_name_match_type::SEARCH_NAME.
15224         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15225         symbol_name_match_type::FULL.
15226         * cp-support.c (cp_get_symbol_name_matcher): Handle
15227         symbol_name_match_type::SEARCH_NAME.
15228         * infrun.c (insert_exception_resume_breakpoint): Use
15229         lookup_symbol_search_name.
15230         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15231         * psymtab.c (maintenance_check_psymtabs): Use
15232         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15233         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15234         SYMBOL_SEARCH_NAME.
15235         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15236         if symbol_name_match_type::SEARCH_NAME.
15237         (lookup_symbol_in_language): Pass down
15238         symbol_name_match_type::FULL.
15239         (lookup_symbol_search_name): New.
15240         (lookup_language_this): Pass down
15241         symbol_name_match_type::SEARCH_NAME.
15242         (lookup_symbol_aux, lookup_local_symbol): New parameter
15243         'match_type'.  Pass it down.
15244         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15245         (lookup_symbol_search_name): New declaration.
15246         (lookup_symbol_in_block): New 'match_type' parameter.
15247
15248 2018-01-05  Pedro Alves  <palves@redhat.com>
15249
15250         PR gdb/22670
15251         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15252         ada_lookup_symbol.
15253         (ada_lookup_symbol): Reimplement in terms of
15254         ada_lookup_symbol_list, bits factored out from
15255         ada_lookup_encoded_symbol.
15256
15257 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15258
15259         * ada-exp.y (write_object_renaming): When subscripting an array
15260         using a symbol as the index, pass the block in call to
15261         ada_lookup_encoded_symbol when looking that symbol up.
15262
15263 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15264
15265         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15266         TYPE_INDEX_TYPE.
15267
15268 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15269
15270         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15271         the case where VALUE_LVAL (val0) is not lval_memory.
15272
15273 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15274
15275         * ada-valprint.c (print_optional_low_bound): Handle
15276         character-indexed array printing like boolean-indexed array
15277         printing.
15278
15279 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15280
15281         * NEWS: Create a new section for the next release branch.
15282         Rename the section of the current branch, now that it has
15283         been cut.
15284
15285 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15286
15287         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15288         * version.in: Bump version to 8.1.50.DATE-git.
15289
15290 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15291
15292         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15293         Add field.
15294         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15295         Add field.
15296         (default_exception_support_info) <catch_handlers_sym>: Add field.
15297         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15298         (ada_exception_name_addr_1): Add "catch handlers" handling.
15299         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15300         Update all callers.
15301         (create_excep_cond_exprs) <ex>: Add parameter.
15302         (re_set_exception): Update create_excep_cond_exprs call.
15303         (print_it_exception, print_one_exception, print_mention_exception)
15304         (print_recreate_exception): Add "catch handler" handling.
15305         (allocate_location_catch_handlers, re_set_catch_handlers)
15306         (check_status_catch_handlers, print_it_catch_handlers)
15307         (print_one_catch_handlers, print_mention_catch_handlers)
15308         (print_recreate_catch_handlers): New function.
15309         (catch_handlers_breakpoint_ops): New variable.
15310         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15311         Add parameter.  Add "catch handler" handling.
15312         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15313         Add "catch handler" handling.
15314         (ada_exception_catchpoint_cond_string): Add "catch handler"
15315         handling.
15316         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15317         call.
15318         (catch_ada_handlers_command): New function.
15319         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15320         operations structure.
15321         (_initialize_ada_language): Add "catch handlers" command entry.
15322         * NEWS: Document "catch handlers" feature.
15323
15324 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15325
15326         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15327         account when creating the array type of the slice.
15328         (ada_value_slice): Likewise.
15329
15330 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15331
15332         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15333         New enum value.
15334         (create_array_type_with_stride): Add byte_stride_prop parameter.
15335         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15336         New parameter.  Update all callers in this file.
15337         (array_type_has_dynamic_stride): New function.
15338         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15339         of arrays with dynamic byte strides.
15340         * dwarf2read.c (read_array_type): Add support for dynamic
15341         DW_AT_byte_stride attributes.
15342
15343 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15344
15345         * dwarf2read.c (read_unspecified_type): Treat
15346         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15347
15348 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15349
15350         Update copyright year range in all GDB files.
15351
15352 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15353
15354         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15355         and gdb/testsuite/gdb.base/step-line.c.
15356
15357 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15358
15359         * copyright.py (main): Dump the contents of
15360         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15361         even if BY_HAND is empty.
15362
15363 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15364
15365         * top.c (print_gdb_version): Update Copyright year in version
15366         message.
15367
15368 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15369
15370         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15371
15372 For older changes see ChangeLog-2017.
15373 \f
15374 Local Variables:
15375 mode: change-log
15376 left-margin: 8
15377 fill-column: 74
15378 version-control: never
15379 coding: utf-8
15380 End: