[PowerPC] Include nat/linux-ptrace.h in native targets
[external/binutils.git] / gdb / ChangeLog
1 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2
3         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
4
5 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
6
7         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
8         (producer_is_icc): New function.
9         (check_producer): Set producer_is_icc field on dwarf2_cu.
10         (dwarf2_init_integer_type): New function.
11         (read_base_type): Call dwarf2_init_integer_type instead of
12         init_integer_type in all cases.
13         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
14         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
15         LEN is greater than 0.
16
17 2018-10-30  Tom Tromey  <tom@tromey.com>
18
19         * main.c (captured_main_1): Check return value of bfd_init.
20
21 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
22
23         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
24         Adjust comments.
25
26 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27
28         * procfs.c: Include common/pathstuff.h.
29
30 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
31
32         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
33         Add missing braces.  No functional change.
34
35 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
36
37         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
38         to report a bad option and fix indentation.
39         * demangle.c (demangle_command): Use report_unrecognized_option_error
40         to report a bad option and correctly report the bad option.
41
42 2018-10-27  Tom Tromey  <tom@tromey.com>
43
44         PR cli/23364:
45         * darwin-nat.c (copied_shell): New global.
46         (may_have_sip): Rename from should_disable_startup_with_shell.
47         (copy_shell_to_cache, maybe_cache_shell): New functions.
48         (darwin_nat_target::create_inferior): Update.  Use
49         copied_shell.
50
51 2018-10-27  Tom Tromey  <tom@tromey.com>
52
53         * unittests/scoped_fd-selftests.c (test_to_file): New function.
54         (run_tests): Call test_to_file.
55         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
56         temporary files.
57         * common/scoped_fd.h (scoped_fd::to_file): New method.
58
59 2018-10-27  Tom Tromey  <tom@tromey.com>
60
61         * unittests/scoped_mmap-selftests.c (test_normal): Use
62         gdb_mkostemp_cloexec.
63         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
64         Use gdb_mkostemp_cloexec.
65         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
66         gnulib/config.in, gnulib/configure,
67         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
68         gnulib/import/m4/gnulib-cache.m4,
69         gnulib/import/m4/gnulib-comp.m4: Update.
70         * gnulib/import/m4/mkostemp.m4: New file.
71         * gnulib/import/m4/mkstemp.m4: Remove.
72         * gnulib/import/mkostemp.c: New file.
73         * gnulib/import/mkstemp.m4: Remove.
74         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
75         mkstemp, add mkostemp.  Apply new patch.
76         * gnulib/import/stdlib.in.h: Apply patch.
77         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
78         New file.
79         * dwarf-index-write.c (write_psymtabs_to_index): Use
80         gdb_mkostemp_cloexec.
81         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
82
83 2018-10-27  Tom Tromey  <tom@tromey.com>
84
85         * unittests/mkdir-recursive-selftests.c: New file.
86         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
87         unittests/mkdir-recursive-selftests.c.
88         * dwarf-index-cache.c (mkdir_recursive): Move to
89         common/filestuff.c.
90         (index_cache::store): Check return value of mkdir_recursive.
91         (create_dir_and_check, test_mkdir_recursive): Move to new file.
92         (_initialize_index_cache): Don't register test.
93         * common/filestuff.h (mkdir_recursive): Declare.
94         * common/filestuff.c (mkdir_recursive): Move from
95         dwarf-index-cache.c.  Return bool.
96
97 2018-10-27  Tom Tromey  <tom@tromey.com>
98
99         * dwarf-index-write.c (write_psymtabs_to_index): Move
100         make_temp_filename to common/pathstuff.c.
101         * common/pathstuff.h (make_temp_filename): Declare.
102         * common/pathstuff.c (make_temp_filename): New function, moved
103         from dwarf-index-write.c.
104
105 2018-10-27  Tom Tromey  <tom@tromey.com>
106
107         * procfs.c (procfs_target::create_inferior): Use get_shell.
108         * cli/cli-cmds.c (shell_escape): Use get_shell.
109         * windows-nat.c (windows_nat_target::create_inferior): Use
110         get_shell.
111         * common/pathstuff.c (get_shell): New function.
112         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
113         (fork_inferior): Use get_shell.
114         * common/pathstuff.h (get_shell): Declare.
115
116 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
117
118         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
119
120 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
121
122         * stack.c (print_variable_and_value_data): Add preg and treg.
123         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
124         and update callers.
125         (print_frame_arg_vars): Likewise.
126         (prepare_reg): New function.
127         (info_locals_command): Extract info print args and use them.
128         (info_args_command): Likewise.
129         (_initialize_stack): Modify on-line help.
130         * symtab.c (treg_matches_sym_type_name): New function.
131         (search_symbols): New arg t_regexp.
132         (symtab_symbol_info): New args quiet, regexp, t_regexp.
133         (info_variables_command): Extract info print args and use them.
134         (info_functions_command): Likewise.
135         (info_types_command): Update call to symtab_symbol_info.
136         (_initialize_symtab): Modify on-line help.
137         * symtab.h (treg_matches_sym_type_name): New function.
138         (search_symbols): New t_regexp arg.
139
140 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
141
142         * cli-utils.c (extract_arg_maybe_quoted): New function.
143         (extract_info_print_args): New function.
144         (info_print_args_help): New function.
145         (report_unrecognized_option_error): New function.
146         * cli-utils.h (extract_arg_maybe_quoted): New function.
147         (extract_info_print_args): New function.
148         (info_print_args_help): New function.
149         (report_unrecognized_option_error): New function.
150
151 2018-10-26  Tom Tromey  <tom@tromey.com>
152
153         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
154         (compute_compunit_symtab_includes): Update.
155         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
156         (compunit_symtab_ptr): Likewise.
157
158 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
159
160         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
161         default_print_auxv_entry for specific tag values.
162
163 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
164
165         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
166
167 2018-10-26  Jim Wilson  <jimw@sifive.com>
168
169         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
170         (riscv_linux_sigframe_init): Declare.
171         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
172         (riscv_linux_sigframe): New.
173         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
174         (riscv_linux_sigframe_init): Define.
175         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
176
177         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
178         (riscv_isa_flen): Likewise.  Drop static.
179         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
180         (riscv_isa_flen): Likewise.  Declare.
181
182 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
183             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
184
185         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
186         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
187         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
188         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
189         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
190         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
191         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
192         Define.
193         (struct ppc_linux_features) <htm>: New field.
194         (ppc_linux_no_features): Add initializer for htm field.
195         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
196         new tdescs.
197         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
198         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
199         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
200         Define if not already defined.
201         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
202         and rs6000/powerpc-isa207-htm-vsx64l.
203         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
204         rs6000/powerpc-isa207-htm-vsx64l.xml.
205         * features/rs6000/power-htm-spr.xml: New file.
206         * features/rs6000/power-htm-core.xml: New file.
207         * features/rs6000/power64-htm-core.xml: New file.
208         * features/rs6000/power-htm-fpu.xml: New file.
209         * features/rs6000/power-htm-altivec.xml: New file.
210         * features/rs6000/power-htm-vsx.xml: New file.
211         * features/rs6000/power-htm-ppr.xml: New file.
212         * features/rs6000/power-htm-dscr.xml: New file.
213         * features/rs6000/power-htm-tar.xml: New file.
214         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
215         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
216         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
217         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
218         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
219         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
220         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
221         fetch_regset with HTM regsets.
222         (store_register, store_ppc_registers): Call store_regset with HTM
223         regsets.
224         (ppc_linux_nat_target::read_description): Set htm field in the
225         features struct if needed.
226         * ppc-linux-tdep.c: Include
227         features/rs6000/powerpc-isa207-htm-vsx32l.c and
228         features/rs6000/powerpc-isa207-htm-vsx64l.c.
229         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
230         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
231         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
232         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
233         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
234         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
235         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
236         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
237         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
238         (ppc32_linux_ctarregset): New globals.
239         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
240         (ppc_linux_collect_core_cpgrregset): New function.
241         (ppc_linux_iterate_over_regset_sections): Call back with the htm
242         regsets.
243         (ppc_linux_core_read_description): Check if the tm spr section is
244         present and set htm in the features struct.
245         (_initialize_ppc_linux_tdep): Call
246         initialize_tdesc_powerpc_isa207_htm_vsx32l and
247         initialize_tdesc_powerpc_isa207_htm_vsx64l.
248         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
249         Declare.
250         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
251         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
252         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
253         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
254         New fields.
255         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
256         Likewise.
257         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
258         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
259         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
260         New enum fields.
261         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
262         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
263         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
264         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
265         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
266         <PPC_CTAR_REGNUM>: Likewise.
267         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
268         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
269         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
270         (IS_CEFP_PSEUDOREG): Define.
271         (rs6000_register_name): Hide the upper halves of checkpointed VSX
272         registers.  Return names for the checkpointed DFP, VSX, and EFP
273         pseudo registers.
274         (rs6000_pseudo_register_type): Remove initial assert and raise an
275         internal error in the else clause instead.  Return types for the
276         checkpointed DFP, VSX, and EFP pseudo registers.
277         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
278         checkpointed DFP pseudo registers.
279         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
280         checkpointed VSX pseudo registers.
281         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
282         from efpr_pseudo_register_read and
283         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
284         registers.
285         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
286         Handle checkpointed DFP, VSX, and EFP registers.
287         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
288         (efp_ax_pseudo_register_collect): New functions.
289         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
290         register logic to new functions.  Handle checkpointed DFP, VSX,
291         and EFP pseudo registers.
292         (rs6000_gdbarch_init): Look for and validate the htm features.
293         Include checkpointed DFP, VSX and EFP pseudo-registers.
294         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
295         HTM registers.
296
297 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
298
299         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
300         without altivec or fpu.
301
302 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
303             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
304
305         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
306         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
307         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
308         Define if not already defined.
309         * features/rs6000/power-ebb.xml: New file.
310         * features/rs6000/power-linux-pmu.xml: New file.
311         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
312         features.
313         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
314         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
315         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
316         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
317         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
318         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
319         fetch_regset with ebb and pmu regsets.
320         (store_register, store_ppc_registers): Call store_regset with ebb
321         and pmu regsets.
322         (ppc_linux_nat_target::read_description): Set isa207 field in the
323         features struct if ebb and pmu are avaiable.
324         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
325         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
326         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
327         and pmu regsets.
328         (ppc_linux_core_read_description): Check if the pmu section is
329         present and set isa207 in the features struct.
330         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
331         (ppc32_linux_pmuregset): Declare.
332         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
333         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
334         <ppc_sier_regnum>: New field.
335         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
336         New enum values.
337         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
338         values.
339         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
340         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
341         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
342         ebb and pmu features.
343
344 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
345             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
346
347         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
348         (tdesc_powerpc_isa207_vsx64l): Declare.
349         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
350         (struct ppc_linux_features) <isa207>: New field.
351         (ppc_linux_no_features): Add initializer for isa207 field.
352         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
353         new tdescs.
354         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
355         (NT_PPC_TAR): Define if not already defined.
356         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
357         rs6000/powerpc-isa207-vsx64l.
358         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
359         rs6000/powerpc-isa207-vsx64l.xml.
360         * features/rs6000/power-tar.xml: New file.
361         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
362         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
363         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
364         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
365         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
366         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
367         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
368         fetch_regset with the TAR regset.
369         (store_register, store_ppc_registers): Call store_regset with the
370         TAR regset.
371         (ppc_linux_nat_target::read_description): Set isa207 field in the
372         features struct if needed.
373         * ppc-linux-tdep.c: Include
374         features/rs6000/powerpc-isa207-vsx32l.c and
375         features/rs6000/powerpc-isa207-vsx64l.c.
376         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
377         (ppc_linux_iterate_over_regset_sections): Call back with the tar
378         regset.
379         (ppc_linux_core_read_description): Check if the tar section is
380         present and set isa207 in the features struct.
381         (_initialize_ppc_linux_tdep): Call
382         initialize_tdesc_powerpc_isa207_vsx32l and
383         initialize_tdesc_powerpc_isa207_vsx64l.
384         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
385         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
386         (enum) <PPC_TAR_REGNUM>: New enum value.
387         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
388         feature.
389         (ppc_process_record_op31): Record changes to TAR.
390
391 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
392             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
393
394         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
395         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
396         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
397         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
398         (struct ppc_linux_features) <ppr_dscr>: New field.
399         (ppc_linux_no_features): Add initializer for ppr_dscr field.
400         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
401         new tdescs.
402         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
403         Define if not already defined.
404         * features/Makefile (WHICH): Add
405         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
406         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
407         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
408         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
409         * features/rs6000/power-dscr.xml: New file.
410         * features/rs6000/power-ppr.xml: New file.
411         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
412         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
413         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
414         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
415         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
416         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
417         * ppc-linux-nat.c: Include <sys/uio.h>.
418         (fetch_regset, store_regset, check_regset): New functions.
419         (fetch_register, fetch_ppc_registers): Call fetch_regset with
420         DSCR and PPR regsets.
421         (store_register, store_ppc_registers): Call store_regset with
422         DSCR and PPR regsets.
423         (ppc_linux_get_hwcap2): New function.
424         (ppc_linux_nat_target::read_description): Call
425         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
426         features struct if needed.
427         * ppc-linux-tdep.c: Include
428         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
429         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
430         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
431         (ppc32_linux_dscrregset): New globals.
432         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
433         and dscr regsets.
434         (ppc_linux_core_read_description): Check if the ppr and dscr
435         sections are present and set ppr_dscr in the features struct.
436         (_initialize_ppc_linux_tdep): Call
437         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
438         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
439         * ppc-linux-tdep.h (ppc32_linux_pprregset)
440         (ppc32_linux_dscrregset): Declare.
441         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
442         <ppc_dscr_regnum>: New field.
443         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
444         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
445         and dscr features.
446         (ppc_process_record_op31): Record changes to PPR and DSCR.
447
448 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
449
450         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
451         second initializer line for the have_* variables.  Initialize
452         have_fpu to 0 instead of 1.
453
454 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
455
456         * arch/ppc-linux-common.c (ppc_linux_match_description):
457         Parenthesize tdesc assignements and indent them properly.
458
459 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
460
461         * ppc-linux-nat.c (fetch_register): Change if statement to else
462         if.
463         (store_register): Likewise.
464
465 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
466
467         * rs6000-tdep.c: Remove reggroups.h include.
468         (rs6000_pseudo_register_reggroup_p): Remove.
469         (rs6000_gdbarch_init): Remove call to
470         set_tdesc_pseudo_register_reggroup_p.
471
472 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
473
474         * reggroups.c (default_register_reggroup_p): Return true for
475         decfloat registers and float_reggroup.
476
477 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
478
479         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
480         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
481         ppc_linux_collect_vrregset by regcache_collect_regset.
482
483 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
484
485         * linux-tdep.c (linux_collect_regset_section_cb): Use
486         std::vector<gdb_byte> instead of char * and malloc for buf.
487         Remove xfree.
488
489 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
490
491         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
492         symtab_start instead of always using language_unknown.
493
494 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
495
496         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
497         READ_P parameter, catch and ignore register access errors from
498         either the old or new MISA location.
499         (riscv_has_feature): Update call to riscv_read_misa_reg.
500
501 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
502
503         * python/py-function.c (convert_values_to_python): Return
504         gdbpy_ref<>.  Add header comment.
505         (fnpy_call): Adjust.
506
507 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
508
509         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
510         (cmdpy_completer_handle_brkchars): Adjust.
511         (cmdpy_completer): Adjust.
512
513 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
514
515         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
516         Pass correct regnum to raw_supply_zeroed.
517
518 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
519
520         * regcache.c (cooked_read_test): Add CSKY to the list of
521         architectures with a save_reggroup
522
523 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
524
525         PR gdb/23368
526         * infrun.c (follow_exec): In the follow_exec_mode_new case,
527         transfer terminal state from old new new inferior.
528         * terminal.h (swap_terminal_info): New function.
529         * inflow.c (swap_terminal_info): New function.
530
531 2018-10-23  Tom Tromey  <tom@tromey.com>
532
533         * record-btrace.c (get_thread_current_frame_id): Rename from
534         get_thread_current_frame.  Return a frame_id.
535         (record_btrace_start_replaying): Update.
536
537 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
538
539         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
540         for CSRs.
541
542 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
543
544         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
545         have_nonsteppable_watchpoint attribute to 1.
546
547 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
548
549         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
550         register names.
551         (struct register_alias): Rename to...
552         (struct riscv_register_alias): ...this, and update comment.
553         (riscv_register_aliases): Update type, and alias names.  Remove
554         CSR names from this list.
555         (riscv_register_name): Use riscv_gdb_reg_names for int and float
556         register names.  Add an extra assertion.
557         (riscv_is_regnum_a_named_csr): New function.
558         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
559
560 2018-10-22  Jim Wilson  <jimw@sifive.com>
561
562         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
563         FP reg smaller than FP reg size, and fill with -1 instead of 0.
564
565         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
566         (riscv_register_type): Use them.
567         (riscv_print_one_register_info): Handle union of floats same as float.
568         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
569         riscv_fpreg_q_type fields.
570
571 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
572
573         * gdbarch.sh (gdbarch_num_cooked_regs): New.
574         * gdbarch.h: Re-generate.
575         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
576         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
577         * eval.c (evaluate_subexp_standard): Likewise.
578         * findvar.c (value_of_register): Likewise.
579         (value_of_register_lazy): Likewise.
580         (address_from_register): Likewise.
581         * frame.c (get_frame_register_bytes): Likewise.
582         * gdbarch-selftests.c (register_to_value_test): Likewise.
583         * h8300-tdep.c (h8300_register_type): Likewise.
584         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
585         (i386_svr4_reg_to_regnum): Likewise.
586         * infcmd.c (default_print_registers_info): Likewise.
587         (registers_info): Likewise.
588         (print_vector_info): Likewise.
589         (default_print_float_info): Likewise.
590         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
591         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
592         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
593         (mi_cmd_data_list_changed_registers): Likewise.
594         (mi_cmd_data_list_register_values): Likewise.
595         (mi_cmd_data_write_register_values): Likewise.
596         (mi_cmd_trace_frame_collected): Likewise.
597         * mips-tdep.c (print_gp_register_row): Likewise.
598         (mips_print_registers_info): Likewise.
599         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
600         * regcache.c (init_regcache_descr): Likewise.
601         (register_size): Likewise.
602         (register_dump::dump): Likewise.
603         (cooked_read_test): Likewise.
604         (cooked_write_test): Likewise.
605         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
606         (rs6000_gdbarch_init): Likewise.
607         * stabsread.c (stab_reg_to_regnum): Likewise.
608         * stack.c (info_frame_command): Likewise.
609         * target-descriptions.c (tdesc_register_name): Likewise.
610         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
611         * tui/tui-regs.c (tui_show_register_group): Likewise.
612         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
613         (user_reg_map_regnum_to_name): Likewise.
614         (value_of_user_reg): Likewise.
615         (maintenance_print_user_registers): Likewise.
616         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
617         (xtensa_register_name): Likewise.
618         (xtensa_register_type): Likewise.
619         (xtensa_reg_to_regnum): Likewise.
620         (xtensa_pseudo_register_read): Likewise.
621         (xtensa_pseudo_register_write): Likewise.
622
623 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
624
625         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
626         correctly-sized buffer with raw_read.
627         (amd64_pseudo_register_write): Use correctly-sized buffer for
628         raw_read/raw_write.
629
630 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
631
632         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
633         in add_prefix_cmd of set print type.
634
635 2018-10-19  Tom Tromey  <tom@tromey.com>
636
637         PR tui/18388:
638         * NEWS: Mention tabset deprecation.
639         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
640         (update_tab_width): New function.
641         (tui_set_tab_width, tui_show_tab_width): New functions.
642         (tui_set_tab_width_command): Use update_tab_width.
643         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
644         Add new "set tui tab-width" command.
645         * tui/tui-source.c (tui_set_source_content): Update.
646         * tui/tui-disasm.c (tui_set_disassem_content): Update.
647         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
648         Don't declare.
649         (tui_tab_width): Declare.
650         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
651         (tui_set_default_tab_len): Remove.
652
653 2018-10-19  Tom Tromey  <tom@tromey.com>
654
655         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
656         (key_is_backspace, tui_getc): Don't declare.
657         * tui/tui-io.c (key_is_start_sequence): Now static.
658         (key_is_end_sequence, key_is_backspace): Remove.
659         (tui_getc): Now static.
660
661 2018-10-19  Tom Tromey  <tom@tromey.com>
662
663         * symfile.c (reread_symbols): Clear "static_links".
664
665 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
666
667         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
668         define.
669         (aarch64_linux_sigframe_init): Extra boundary checks.
670
671 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
672
673         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
674         the possibly non-existent tdesc type 'vec128', but the type of raw
675         register v16 instead.
676
677 2018-10-19  Gary Benson <gbenson@redhat.com>
678
679         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
680
681 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
682
683         PR cli/23785
684         * cli/cli-dump.c (restore_binary_file): Check if "file" is
685         NULL.
686
687 2018-10-17  Paul Koning  <paul_koning@dell.com>
688
689         * charset.c (convert_between_encodings): Fix unsigned overflow.
690
691 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
692
693         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
694         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
695         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
696         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
697         New functions.
698         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
699         and fbsd_info_proc_mappings_header.
700         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
701         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
702         New.
703
704 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
705
706         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
707         Solaris Maintainer.
708
709 2018-10-15  Tom Tromey  <tom@tromey.com>
710
711         * tui/tui.c (strcat_to_buf): Remove casts.
712         * tui/tui-winsource.c (tui_show_source_line)
713         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
714         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
715         * tui/tui-windata.c (tui_first_data_item_displayed)
716         (tui_delete_data_content_windows, tui_erase_data_content)
717         (tui_display_all_data, tui_display_data_from)
718         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
719         * tui/tui-win.c (tui_set_win_height)
720         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
721         casts.
722         * tui/tui-win.c (tui_resize_all): Remove casts.
723         (tui_scroll_backward_command, tui_set_focus)
724         (tui_set_tab_width_command): Likewise.
725         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
726         * tui/tui-regs.c (tui_show_register_group): Remove cast.
727         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
728         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
729         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
730         Remove casts.
731
732 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
733
734         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
735         AArch64/ARM maintainer.
736
737 2018-10-11  Gary Benson <gbenson@redhat.com>
738
739         * interps.h (interp::m_name): Make private and mutable.
740         * interps.c (interp::~interp): Free m_name.
741
742 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
743             Simon Marchi <simark@simark.ca>
744
745         * README (`configure' options): Add documentation for new
746         "--enable-unit-tests" option.
747         * acinclude.m4: Include "selftest.m4".
748         * configure: Regenerate.
749         * configure.ac: Use "GDB_AC_SELFTEST".
750         * maint.c (maintenance_selftest): Update message informing
751         that selftests have been disabled.
752         (maintenance_info_selftests): Likewise.
753         * selftest.m4: New file.
754
755 2018-10-10  Gary Benson <gbenson@redhat.com>
756
757         * remote.c (remote_target::remote_send_printf): Add
758         missing va_end found by Coverity.
759
760 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
761
762         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
763
764 2018-10-09  Tom Tromey  <tom@tromey.com>
765
766         * configure: Rebuild.
767         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
768         * NEWS: Update --enable-ubsan documentation.
769
770 2018-10-09  Gary Benson <gbenson@redhat.com>
771
772         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
773         found by Coverity.
774
775 2018-10-08  Tom Tromey  <tom@tromey.com>
776
777         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
778         variable.
779         (riscv_fbsd_init_abi): Likewise.
780
781 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
782         * valops.c (value_struct_elt_for_reference): Rename local variable
783         to work around the shadowing a previous local warning.
784
785 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
786
787         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
788         * NEWS: Mention new FreeBSD/riscv native configuration.
789         * configure.host: Add riscv*-*-freebsd*.
790         * configure.nat: Likewise.
791         * riscv-fbsd-nat.c: New file.
792
793 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
794
795         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
796         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
797         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
798         * NEWS: Mention new FreeBSD/riscv target.
799         * configure.tgt: Add riscv*-*-freebsd*.
800         * riscv-fbsd-tdep.c: New file.
801         * riscv-fbsd-tdep.h: New file.
802
803 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
804
805         * regcache.h (struct regcache_map_entry): Note that this type can
806         be used with traditional frame caches.
807         * trad-frame.c (trad_frame_set_reg_regmap): New.
808         * trad-frame.h (trad_frame_set_reg_regmap): New.
809
810 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
811
812         PR c++/16841
813         * valops.c (get_virtual_base_offset): New function.
814         (value_struct_elt_for_reference): Use it to get virtual base offset
815         and add it in calculating class member address.
816
817 2018-10-08   John Darrington <john@darrington.wattle.id.au>
818
819     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
820       (check_producer): Check if the producer is codewarrior.
821       (producer_is_codewarrior): New function.
822       (lnp_state_machine::record_line): Ignore is_stmt flag for records
823        produced by codewarrior.
824       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
825
826 2018-10-06  Tom Tromey  <tom@tromey.com>
827
828         PR python/19399:
829         * python/py-inferior.c: Add "architecture" entry.
830         (infpy_architecture): New function.
831
832 2018-10-06  Tom Tromey  <tom@tromey.com>
833
834         PR python/21765:
835         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
836         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
837         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
838         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
839
840 2018-10-06  Tom Tromey  <tom@tromey.com>
841
842         PR build/17077:
843         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
844         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
845         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
846         #include.
847
848 2018-10-06  Tom Tromey  <tom@tromey.com>
849
850         * python/py-breakpoint.c (bppy_get_location): Handle a
851         bp_breakpoint without a location.
852
853 2018-10-06  Tom Tromey  <tom@tromey.com>
854
855         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
856         (_RegEx): Reformat help text.
857         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
858         (AnyCallerIs, AnyCallerMatches): Reformat help text.
859         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
860         text.
861         * python/lib/gdb/command/xmethods.py (InfoXMethod)
862         (EnableXMethod, DisableXMethod): Remove help indentation.
863         Capitalize meta-syntactic variables.
864         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
865         (EnableUnwinder, DisableUnwinder): Remove help indentation.
866         Capitalize meta-syntactic variables.
867         * python/lib/gdb/command/explore.py (ExploreCommand)
868         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
869         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
870         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
871         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
872         Remove help indentation.
873         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
874         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
875         (DisableFrameFilter, SetFrameFilterPriority)
876         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
877
878 2018-10-06  Tom Tromey  <tom@tromey.com>
879
880         PR tui/28819:
881         * tui/tui-io.c (gdb_wgetch): New function.
882         (tui_mld_getc, tui_getc): Use it.
883
884 2018-10-05  Tom Tromey  <tom@tromey.com>
885
886         * sol-thread.c (sol_thread_target::wait): Rename inner
887         "save_ptid".
888
889 2018-10-04  Tom Tromey  <tom@tromey.com>
890
891         * configure: Rebuild.
892         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
893
894 2018-10-04  Tom Tromey  <tom@tromey.com>
895
896         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
897         declaration of "block".
898
899 2018-10-04  Tom Tromey  <tom@tromey.com>
900
901         * common/filestuff.c (fdwalk): Remove inner declaration of
902         "result".
903
904 2018-10-04  Tom Tromey  <tom@tromey.com>
905
906         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
907         "structs_addr" and hoist declaration.
908
909 2018-10-04  Tom Tromey  <tom@tromey.com>
910
911         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
912         variable "size".
913
914 2018-10-04  Tom Tromey  <tom@tromey.com>
915
916         * mdebugread.c (parse_partial_symbols): Use std::string.
917
918 2018-10-04  Tom Tromey  <tom@tromey.com>
919
920         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
921         * p-valprint.c (pascal_val_print): Split inner "i" variable.
922         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
923         header.
924         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
925         more inner scope.
926         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
927         * varobj.c (varobj_update): Rename inner "newobj",
928         "type_changed".
929         * valprint.c (generic_emit_char): Rename inner "buf".
930         * valops.c (find_overload_match): Rename inner "temp".
931         (value_struct_elt_for_reference): Declare "v" in more inner
932         scope.
933         * v850-tdep.c (v850_push_dummy_call): Rename "len".
934         * unittests/array-view-selftests.c (run_tests): Rename inner
935         "vec".
936         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
937         header.
938         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
939         "tsv" in more inner scope.
940         (print_one_static_tracepoint_marker): Rename inner
941         "tuple_emitter".
942         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
943         (tic6x_push_dummy_call): Don't redeclare "addr".
944         * target-float.c: Declare "dto" lower.
945         * symtab.c (lookup_local_symbol): Rename inner "sym".
946         (find_pc_sect_line): Rename inner "pc".
947         * stack.c (print_frame): Don't redeclare "gdbarch".
948         (return_command): Rename inner "gdbarch".
949         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
950         "sp".
951         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
952         header.
953         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
954         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
955         scope.
956         * remote.c (remote_target::update_thread_list): Don't redeclare
957         "tp".
958         (remote_target::process_initial_stop_replies): Rename inner
959         "thread".
960         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
961         (remote_target::wait_as): Don't redeclare "stop_reply".
962         (remote_target::get_thread_local_address): Rename inner
963         "result".
964         (remote_target::get_tib_address): Likewise.
965
966         * regcache.c (cooked_read_test): Rename "regnum".
967         * record-btrace.c (cmd_record_btrace_start): Rename inner
968         "exception".
969         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
970         loop header.
971         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
972         header.
973         (ppu2spu_sniffer): Rename inner "buf".
974         * parse.c (operator_check_standard): Rename inner "type",
975         "objfile".
976         * p-valprint.c (pascal_val_print): Introduce new scope for
977         "low_bound", "high_bound".
978         * p-exp.y (yylex): Declare "i" in loop header.
979         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
980         Lower declaration of "s".
981         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
982         header.
983         (nios2_push_dummy_call): Rename "len".
984         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
985         "buf".
986         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
987         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
988         (linux_xfer_osdata_modules): Likewise.
989         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
990         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
991         (mips_o64_push_dummy_call): Likewise.
992         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
993         "op".
994         * mi/mi-main.c (list_available_thread_groups): Rename inner
995         "tuple_emitter".
996         (mi_cmd_data_read_memory): Rename inner "opts".
997         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
998         "tuple_emitter".
999         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1000         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1001         more inner scope.
1002         (parse_partial_symbols): Rename inner "pst", "p", "name"
1003         * main.c (captured_main_1): Rename inner "i"s.
1004         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1005         "oso2".
1006         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1007         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1008         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1009         (handle_signal_stop): Rename inner "gdbarch".
1010         (handle_command): Declare "signum" in loop header.
1011         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1012         "status".
1013         (examine_prologue): Rename inner "sol" and "sof".
1014         (ia64_extract_return_value): Rename inner "val".  Declare another
1015         "val" in a more inner scope.
1016         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1017         inner scope.
1018         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1019         "except".
1020         * findvar.c (default_read_var_value): Don't redeclare "addr".
1021         * f-exp.y (yylex): Declare "i" in loop header.
1022         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1023         Rename inner "type", "expect_type".
1024         (evaluate_subexp_for_sizeof): Rename inner "pc".
1025         * elfread.c (elf_symfile_read): Rename inner "abfd".
1026         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1027         "bytes_read".
1028         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1029         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1030         (dwarf_decode_line_header): Rename inner "lh".
1031         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1032         "offset".  Declare "i" in loop header.
1033         (disassemble_dwarf_expression): Rename inner "addr_size".
1034         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1035         inner "result".
1036         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1037         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1038         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1039         "inner_list_emitter".
1040         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1041         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1042         declaration in a block.
1043         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1044         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1045         "obstack_final_size".
1046         * cp-support.c (inspect_type): Declare "i" in loop header.
1047         * compile/compile.c (compile_instance::insert_symbol_error):
1048         Rename inner "e".
1049         * common/agent.c (agent_run_command): Remove inner "ret"
1050         declaration.
1051         * coffread.c (coff_symfile_read): Rename inner "name".
1052         (coff_symfile_read): Rename inner "abfd".
1053         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1054         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1055         "high".
1056         * c-exp.y (lex_one_token): Move "len" declaration lower.
1057         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1058         "gdbarch".
1059         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1060         "b".
1061         (watch_command_1): Declare "mark" later.
1062         (clear_command): Don't shadow "a" or "b".
1063         (delete_command): Rename inner "b".
1064         (delete_trace_command): Likewise.
1065         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1066         "op".
1067         (arm_gdbarch_init): Remove inner "e_flags".
1068         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1069         "offset" in inner blocks.
1070
1071 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1072
1073         * dwarf-index-write.c (file_write): Don't write if the vector is
1074         empty.
1075
1076 2018-10-05  Tom de Vries  <tdevries@suse.de>
1077
1078         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1079         PyArg_ParseTuple call.
1080
1081 2018-10-05  Tom de Vries  <tdevries@suse.de>
1082
1083         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1084         PyArg_ParseTuple call.
1085
1086 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1087
1088         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1089         to avoid exceeding 80 characters per line limit.
1090
1091 2018-10-04  Tom Tromey  <tom@tromey.com>
1092
1093         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1094         (reread_symbols): Update.
1095         * complaints.h (clear_complaints): Remove argument.
1096         * complaints.c (enum complaint_series): Remove.
1097         (series): Remove global.
1098         (complaint_internal): Update.
1099         (clear_complaints): Remove argument.
1100
1101 2018-10-04  Tom Tromey  <tom@tromey.com>
1102
1103         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1104         debugging symbols" message if there is a separate debug objfile.
1105
1106 2018-10-04  Tom Tromey  <tom@tromey.com>
1107
1108         PR cli/19551:
1109         * symfile.c (symbol_file_add_with_addrs): Update output.
1110         * psymtab.c (require_partial_symbols): Update output.
1111
1112 2018-10-04  Tom Tromey  <tom@tromey.com>
1113
1114         PR cli/22234:
1115         * complaints.c: Emit \n.
1116
1117 2018-10-04  Tom Tromey  <tom@tromey.com>
1118
1119         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1120         (separate_debug_file_exists, find_separate_debug_file)
1121         (add_symbol_file_command, reread_symbols, allocate_symtab)
1122         (allocate_compunit_symtab): Use filtered printing, not
1123         unfiltered.
1124         * psymtab.c (require_partial_symbols, dump_psymtab)
1125         (allocate_psymtab): Use filtered printing, not unfiltered.
1126
1127 2018-10-04  Tom Tromey  <tom@tromey.com>
1128
1129         * complaints.c (complaint_internal): Correctly check complaint
1130         count.
1131
1132 2018-10-04  Tom Tromey  <tom@tromey.com>
1133
1134         * complaints.h (struct complaints): Remove declaration.
1135         * complaints.c (clear_complaints): Remove an unused variable.
1136
1137 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1138
1139         * MAINTAINERS (Write After Approval): Add self.
1140
1141 2018-10-03  Tom Tromey  <tom@tromey.com>
1142
1143         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1144         "buffer_contents".
1145         * coffread.c (coff_symtab_read): Initialize "newobj".
1146
1147 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1148
1149         * dwarf2read.c (read_func_scope): Remove struct keyword in
1150         range-based for.
1151
1152 2018-10-03  Tom Tromey  <tom@tromey.com>
1153
1154         * README: Mention --enable-ubsan.
1155         * NEWS: Mention --enable-ubsan.
1156         * acinclude.m4: Include sanitize.m4.
1157         * configure: Rebuild.
1158         * configure.ac: Call AM_GDB_UBSAN.
1159         * sanitize.m4: New file.
1160
1161 2018-10-03  Tom Tromey  <tom@tromey.com>
1162
1163         * expression.h (enum exp_opcode): Use uint8_t as base type.
1164         * expprint.c (op_name): Handle invalid opcodes.
1165
1166 2018-10-03  Tom Tromey  <tom@tromey.com>
1167
1168         * parse.c (prefixify_expression): Add assert.
1169         (parse_exp_in_context_1): Throw exception if the expression is
1170         empty.
1171
1172 2018-10-03  Tom Tromey  <tom@tromey.com>
1173
1174         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1175
1176 2018-10-03  Tom Tromey  <tom@tromey.com>
1177
1178         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1179
1180 2018-10-03  Tom Tromey  <tom@tromey.com>
1181
1182         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1183         unsigned.
1184
1185 2018-10-03  Tom Tromey  <tom@tromey.com>
1186
1187         * findvar.c (extract_integer): Do work in an unsigned type.
1188
1189 2018-10-03  Tom Tromey  <tom@tromey.com>
1190
1191         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1192         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1193         base type.
1194         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1195         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1196         type.
1197         * c-lang.h (enum c_string_type_values): Use unsigned as base
1198         type.
1199         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1200
1201 2018-10-03  Tom Tromey  <tom@tromey.com>
1202
1203         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1204         <~dwarf2_frame_state_reg_info>: Update.
1205         <dwarf2_frame_state_reg_info>: Update.
1206         <alloc_regs>: Add assertion.  Update.
1207         <reg>: Now a std::vector.
1208         <num_regs>: Remove.
1209         <swap>: Update.
1210         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1211         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1212
1213 2018-10-03  Tom Tromey  <tom@tromey.com>
1214
1215         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1216
1217 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1218
1219         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1220
1221 2018-10-02  Tom Tromey  <tom@tromey.com>
1222
1223         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1224
1225 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1226
1227         * NEWS: Mention changed commands.
1228         * ser-uds.c: New file.
1229         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1230         * configure: Regenerate.
1231         * Makefile.in: Add new file.
1232         * serial.c (serial_open): Check if filename is a socket
1233           and lookup the appropriate interface accordingly.
1234
1235 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1236
1237         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1238         define.
1239         (AARCH64_EXTRA_MAGIC): Likewise.
1240         (AARCH64_FPSIMD_MAGIC): Likewise.
1241         (AARCH64_SVE_MAGIC): Likewise.
1242         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1243         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1244         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1245         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1246         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1247         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1248         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1249         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1250         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1251         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1252         (read_aarch64_ctx): Add function.
1253         (aarch64_linux_sigframe_init): Detect FP registers.
1254
1255 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1256
1257         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1258         (AARCH64_D0_REGNUM): Likewise.
1259         (AARCH64_S0_REGNUM): Likewise.
1260         (AARCH64_H0_REGNUM): Likewise.
1261         (AARCH64_B0_REGNUM): Likewise.
1262         (AARCH64_SVE_V0_REGNUM): Likewise.
1263         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1264         (AARCH64_D0_REGNUM): Likewise.
1265         (AARCH64_S0_REGNUM): Likewise.
1266         (AARCH64_H0_REGNUM): Likewise.
1267         (AARCH64_B0_REGNUM): Likewise.
1268         (AARCH64_SVE_V0_REGNUM): Likewise.
1269
1270 2018-10-01  Gary Benson <gbenson@redhat.com>
1271
1272         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1273         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1274         prfpregset_t instead of gdb_prfpregset_t.
1275         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1276         * configure, config.in: Rebuild.
1277
1278 2018-10-01  Gary Benson <gbenson@redhat.com>
1279
1280         * common/gdb_proc_service.h: New file, factored out from...
1281         * gdb_proc_service.h: Moved common code to the above file.
1282         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1283
1284 2018-10-01  Gary Benson <gbenson@redhat.com>
1285
1286         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1287         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1288
1289 2018-10-01  Gary Benson <gbenson@redhat.com>
1290
1291         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1292         (AC_CHECK_HEADERS): Check for linux/elf.h.
1293         * configure, config.in: Rebuild.
1294         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1295         doesn't define elf_fpregset_t.
1296
1297 2018-10-01  Gary Benson <gbenson@redhat.com>
1298
1299         * gdb_proc_service.h: Whitespace change.
1300
1301 2018-10-01  Tom Tromey  <tom@tromey.com>
1302
1303         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1304         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1305         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1306
1307 2018-10-01  Tom Tromey  <tom@tromey.com>
1308
1309         * README: Minor change.
1310
1311 2018-09-30  Pedro Alves  <palves@redhat.com>
1312
1313         * darwin-nat-info.c (darwin_debug_regions_recurse)
1314         (info_mach_exceptions_command): Remove unused local variables.
1315         * darwin-nat.c (darwin_decode_notify_message)
1316         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1317         (darwin_stop_inferior, darwin_setup_exceptions)
1318         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1319         (darwin_nat_target::attach, darwin_nat_target::detach)
1320         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1321         local variables.
1322         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1323         variables.
1324
1325 2018-09-29  Tom Tromey  <tom@tromey.com>
1326
1327         * README: Remove some leftover text.
1328
1329 2018-09-29  Tom Tromey  <tom@tromey.com>
1330
1331         * PROBLEMS: Rewrite.
1332         * README: Update.
1333
1334 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1335
1336         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1337         case with explicit breakpoint kind.
1338         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1339         'additional_info' and related logic.
1340         (riscv_debug_breakpoints): New variable.
1341         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1342         instruction to determine the breakpoint kind.
1343         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1344         flag.  Update description of 'set/show riscv
1345         use-compressed-breakpoints' flag.
1346
1347 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1348
1349         (NEWS): Mention changes to frame related commands.
1350         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1351         (add_prefix_cmd_suppress_notification): New function.
1352         (add_com_suppress_notification): Call
1353         add_cmd_suppress_notification.
1354         * command.h (add_cmd_suppress_notification): Declare.
1355         (add_prefix_cmd_suppress_notification): Declare.
1356         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1357         (parse_frame_specification): Moved from stack.c, with
1358         simplification to handle a single argument.
1359         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1360         switch to the selected frame.  Add a header comment.
1361         * stack.c: Remove 'safe-ctype.h' include.
1362         (find_frame_for_function): Add declaration.
1363         (find_frame_for_address): New function.
1364         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1365         (frame_selection_by_function_completer): New function.
1366         (info_frame_command): Rename to...
1367         (info_frame_command_core): ...this, and update parameter types.
1368         (select_frame_command): Rename to...
1369         (select_frame_command_core): ...this, and update parameter types.
1370         (frame_command): Rename to...
1371         (frame_command_core): ...this, and update parameter types.
1372         (class frame_command_helper): New class to wrap implementations of
1373         frame related sub-commands.
1374         (frame_apply_cmd_list): New static global.
1375         (frame_cmd_list): Make static.
1376         (select_frame_cmd_list): New global for sub-commands.
1377         (info_frame_cmd_list): New global for sub-commands.
1378         (_initialize_stack): Register sub-commands for 'frame',
1379         'select-frame', and 'info frame'.  Update 'frame apply' commands
1380         to use frame_apply_cmd_list.  Move function local static
1381         frame_apply_list to file static frame_apply_cmd_list for
1382         consistency.
1383         * stack.h (select_frame_command): Delete declarationn.
1384         (select_frame_for_mi): Declare new function.
1385
1386 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1387
1388         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1389         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1390         and NOP.
1391
1392 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1393
1394         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1395
1396 2018-09-26  Tom Tromey  <tom@tromey.com>
1397
1398         * valops.c (auto_abandon): Remove dead code.
1399
1400 2018-09-26  Tom Tromey  <tom@tromey.com>
1401
1402         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1403
1404 2018-09-24  Tom Tromey  <tom@tromey.com>
1405
1406         * common/pathstuff.c (get_standard_cache_dir): Make
1407         "xdg_cache_home" and "home" const.
1408         * top.c (init_history): Make "tmpenv" const.
1409         * main.c (get_init_files): Make "homedir" const.
1410
1411 2018-09-23  Tom Tromey  <tom@tromey.com>
1412
1413         PR python/18852:
1414         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1415
1416 2018-09-23  Tom Tromey  <tom@tromey.com>
1417
1418         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1419         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1420         * python/python-internal.h (gdbpy_handle_exception): Declare.
1421         * python/py-utils.c (gdbpy_handle_exception): New function.
1422
1423 2018-09-23  Tom Tromey  <tom@tromey.com>
1424
1425         PR python/17284:
1426         * python/py-type.c (typy_template_argument): Check for negative
1427         argument number.
1428
1429 2018-09-23  Tom Tromey  <tom@tromey.com>
1430
1431         PR python/14062:
1432         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1433
1434 2018-09-23  Tom Tromey  <tom@tromey.com>
1435
1436         PR python/18170:
1437         * python/py-value.c (valpy_int): Allow conversion from pointer
1438         type.
1439
1440 2018-09-23  Tom Tromey  <tom@tromey.com>
1441
1442         PR python/20126:
1443         * python/py-value.c (valpy_int): Respect type sign.
1444
1445 2018-09-23  Tom Tromey  <tom@tromey.com>
1446
1447         PR python/18352;
1448         * python/py-value.c (valpy_float): Allow conversions from int or
1449         char.
1450         (valpy_int, valpy_long): Allow conversions from float.
1451
1452 2018-09-23  Tom Tromey  <tom@tromey.com>
1453
1454         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1455         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1456
1457 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1458
1459         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1460         __sighndlr.
1461         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1462
1463 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1464
1465         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1466         target_terminal::ours().
1467
1468 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1469
1470         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1471         of vl to ULONGEST.
1472
1473 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1474
1475         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1476         redundant condition.
1477
1478 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1479
1480         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1481
1482         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1483         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1484         * sol-thread.c (ps_pdmodel): Don't guard definition.
1485
1486         * procfs.c: Fix formatting.
1487
1488         * procfs.c (sysset_t_alloc): Remove.
1489         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1490         (procfs_debug_inferior): Likewise.
1491         (procfs_set_exec_trap): Likewise.
1492         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1493         (proc_set_traced_sysexit): Likewise.
1494
1495         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1496         (dead_procinfo): Likewise.
1497         (proc_warn): Likewise.
1498         (proc_error): Likewise.
1499         (proc_get_LDT_entry): Likewise.
1500         (do_attach): Likewise.
1501         (procfs_target::pid_to_str): Likewise.
1502         (iterate_over_mappings): Likewise.
1503
1504         * procfs.c (create_procinfo): Fix ARI warning.
1505         (proc_get_status): Likewise.
1506         (proc_stop_process): Likewise.
1507         (proc_run_process): Likewise.
1508         (proc_kill): Likewise.
1509         (proc_get_LDT_entry): Likewise.
1510         (procfs_find_LDT_entry): Likewise.
1511         (proc_update_threads): Likewise.
1512         (proc_iterate_over_threads): Likewise.
1513         (do_attach): Likewise.
1514         (procfs_xfer_memory): Likewise.
1515         (invalidate_cache): Likewise.
1516         (procfs_target::resume): Likewise.
1517         (procfs_init_inferior): Likewise.
1518         (procfs_set_exec_trap): Likewise.
1519         (procfs_target::thread_alive): Likewise.
1520         (procfs_target::pid_to_exec_file): Likewise.
1521         (iterate_over_mappings): Likewise.
1522         (procfs_target::make_corefile_notes): Likewise.
1523         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1524
1525         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1526         (procfs_find_LDT_entry): Likewise.
1527         * sol-thread.c (ps_lgetLDT): Likewise.
1528
1529 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1530
1531         PR tdep/17903
1532         * procfs.c (procfs_target): Declare pid_to_exec_file.
1533         (procfs_target::pid_to_exec_file): New.
1534
1535 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1536
1537         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1538         renaming.
1539         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1540         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1541
1542 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1543
1544         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1545         (supply_fpregset, fill_fpregset): Move ...
1546         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1547         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1548         Remove references to ioctl-based procfs.
1549         Include <sys/reg.h>.
1550         Remove PR_MODEL_NATIVE guards.
1551         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1552         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1553
1554 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1555
1556         PR gdb/20981:
1557         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1558         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1559         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1560
1561 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1562
1563         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1564         (fbsd_print_sockaddr_in6): Likewise.
1565
1566 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1567             Chris January  <chris.january@arm.com>
1568
1569         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1570         (evaluate_subexp_standard): Return a dummy type when
1571         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1572         OP_F77_UNDETERMINED_ARGLIST case.
1573         * expression.h (enum noside): Update comment.
1574
1575 2018-09-19  George Vasick <george.vasick@oracle.com>
1576
1577         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1578
1579 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1580             April Chin <april.chin@oracle.com>
1581             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1582
1583         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1584         uint_t lwpid_t.
1585         (create_procinfo): Print pids in /proc without leading zeros.
1586
1587 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1588
1589         * nios2-tdep.c (nios2_gcc_target_options): New.
1590         (nios2_gdb_arch_init): Install new hook.
1591
1592 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1593
1594         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1595         New file.
1596         * update-gnulib.sh: Apply patch.
1597         * configure: Re-generate.
1598
1599 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1600
1601         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1602         description.  Make "info proc" command descriptions more
1603         consistent.
1604
1605 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1606
1607         * NEWS: Mention 'info proc files' command.
1608
1609 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1610
1611         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1612         descriptors for IP_FILES and IP_ALL.
1613
1614 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1615
1616         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1617         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1618         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1619         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1620         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1621         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1622         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1623         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1624         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1625         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1626         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1627         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1628         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1629         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1630         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1631         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1632         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1633         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1634         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1635         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1636         (struct fbsd_sockaddr_un): New types.
1637         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1638         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1639         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1640         (fbsd_core_info_proc_files): New functions.
1641         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1642         IP_ALL.
1643         * fbsd-tdep.h (fbsd_info_proc_files_header)
1644         (fbsd_info_proc_files_entry): New.
1645
1646 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1647
1648         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1649         * infcmd.c (info_proc_cmd_files): New function.
1650         (_initialize_infcmd): Register 'info proc files' command.
1651
1652 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1653
1654         * gnulib/aclocal-m4-deps.mk: Re-generate.
1655         * gnulib/aclocal.m4: Re-generate.
1656         * gnulib/config.in: Re-generate.
1657         * gnulib/configure: Re-generate.
1658         * gnulib/import/Makefile.am: Re-generate.
1659         * gnulib/import/Makefile.in: Re-generate.
1660         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1661         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1662         * gnulib/import/arpa_inet.in.h: New file.
1663         * gnulib/import/inet_ntop.c: New file.
1664         * gnulib/import/m4/arpa_inet_h.m4: New file.
1665         * gnulib/import/m4/inet_ntop.m4: New file.
1666         * gnulib/import/m4/netinet_in_h.m4: New file.
1667         * gnulib/import/m4/socklen.m4: New file.
1668         * gnulib/import/m4/sockpfaf.m4: New file.
1669         * gnulib/import/m4/stdalign.m4: New file.
1670         * gnulib/import/m4/sys_uio_h.m4: New file.
1671         * gnulib/import/netinet_in.in.h: New file.
1672         * gnulib/import/stdalign.in.h: New file.
1673         * gnulib/import/sys_socket.c: New file.
1674         * gnulib/import/sys_socket.in.h: New file.
1675         * gnulib/import/sys_uio.in.h: New file.
1676         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1677         module.
1678
1679 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1680
1681         * gnulib/aclocal-m4-deps.mk: New file.
1682         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1683         deterministically.
1684
1685 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1686
1687         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1688         KVE_PATH.
1689
1690 2018-09-18  Tom Tromey  <tom@tromey.com>
1691
1692         * compile/compile-object-load.c (struct
1693         link_hash_table_cleanup_data): Add constructor and destructor.
1694         Use DISABLE_COPY_AND_ASSIGN.
1695         (~link_hash_table_cleanup_data): Rename from
1696         link_hash_table_free.  Now a destructor.
1697         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1698
1699 2018-09-18  Tom Tromey  <tom@tromey.com>
1700
1701         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1702         * compile/compile-object-load.c (struct munmap_list): Move to
1703         header file.
1704         (munmap_list::add): Rename from munmap_list_add; rewrite.
1705         (munmap_list::~munmap_list): Rename from munmap_list_free.
1706         (munmap_listp_free_cleanup): Remove.
1707         (compile_object_load): Update.
1708         * compile/compile-object-load.h (struct munmap_list): Move from
1709         compile-object-load.c.  Rewrite.
1710
1711 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1712
1713         * aarch64-tdep.c (pass_in_v): Use register size.
1714         (aarch64_extract_return_value): Likewise.
1715         (aarch64_store_return_value): Likewise.
1716
1717 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1718
1719         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1720         rlim_t.
1721
1722 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1723
1724         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1725         Fix short help line.
1726
1727 2018-09-17  Tom Tromey  <tom@tromey.com>
1728
1729         PR python/20445:
1730         * configure: Rebuild.
1731         * configure.ac: Conditionally use -DNDEBUG for Python.
1732
1733 2018-09-17  Tom Tromey  <tom@tromey.com>
1734
1735         * configure: Rebuild.
1736         * configure.ac: Use gmp as a library dependency when checking for
1737         mpfr.
1738
1739 2018-09-17  Pedro Alves  <palves@redhat.com>
1740
1741         * python/py-inferior.c (find_inferior_object): Delete.
1742
1743 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1744
1745         * compile/compile-cplus-types.c
1746         (compile_cplus_instance::enter_scope): Don't use new_scope after
1747         std::move.
1748
1749 2018-09-17  Tom Tromey  <tom@tromey.com>
1750
1751         * common/pathstuff.c (get_standard_cache_dir): Use
1752         ~/Library/Caches on macOS.
1753         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1754
1755 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1756
1757         PR python/23669
1758         * breakpoint.c (commands_cmd_element): New.
1759         (_initialize_breakpoint): Assign commands_cmd_element.
1760         * breakpoint.h (commands_cmd_element): New.
1761         * cli/cli-script.c (while_cmd_element, if_command,
1762         define_cmd_element): New.
1763         (command_name_equals): Remove.
1764         (process_next_line): Compare commands by pointer, not by name.
1765         (_initialize_cli_script): Assign the various cmd_list_element
1766         variables.
1767         * compile/compile.c (compile_cmd_element): New.
1768         (_initialize_compile): Assign compile_cmd_element.
1769         * compile/compile.h (compile_cmd_element): New.
1770         * guile/guile.c (guile_cmd_element): New.
1771         (install_gdb_commands): Assign guile_cmd_element.
1772         * guile/guile.h (guile_cmd_element): New.
1773         * python/python.c (python_cmd_element): New.
1774         (_initialize_python): Assign python_cmd_element.
1775         * python/python.h (python_cmd_element): New.
1776         * tracepoint.c (while_stepping_cmd_element): New.
1777         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1778         * tracepoint.h (while_stepping_cmd_element): New.
1779
1780 2018-09-17  Tom Tromey  <tom@tromey.com>
1781
1782         * infrun.c (save_infcall_suspend_state): Return
1783         infcall_suspend_state_up.
1784         (save_infcall_control_state): Return infcall_control_state_up.
1785         * inferior.h (save_infcall_suspend_state)
1786         (save_infcall_control_state): Declare later.  Return unique
1787         pointers.
1788
1789 2018-09-17  Tom Tromey  <tom@tromey.com>
1790
1791         * infrun.c (struct stop_context): Declare constructor,
1792         destructor, "changed" method.
1793         (stop_context::stop_context): Rename from save_stop_context.
1794         (stop_context::~stop_context): Rename from
1795         release_stop_context_cleanup.
1796         (normal_stop): Update.
1797         (stop_context::changed): Rename from stop_context_changed.  Return
1798         bool.
1799
1800 2018-09-17  Tom Tromey  <tom@tromey.com>
1801
1802         * inferior.h (struct infcall_suspend_state_deleter): New.
1803         (infcall_suspend_state_up): New typedef.
1804         (struct infcall_control_state_deleter): New.
1805         (infcall_control_state_up): New typedef.
1806         (make_cleanup_restore_infcall_suspend_state)
1807         (make_cleanup_restore_infcall_control_state): Don't declare.
1808         * infcall.c (call_function_by_hand_dummy): Update.
1809         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1810         (make_cleanup_restore_infcall_suspend_state): Remove.
1811         (do_restore_infcall_control_state_cleanup)
1812         (make_cleanup_restore_infcall_control_state): Remove.
1813
1814 2018-09-17  Tom Tromey  <tom@tromey.com>
1815
1816         * gdbthread.h (struct thread_control_state): Add initializer.
1817         (class thread_info) <control>: Remove initializer.
1818         * inferior.h (struct inferior_control_state): Add initializer.
1819         (class inferior) <control>: Remove initializer.
1820         (exit_inferior_1): Update.
1821         * infrun.c (struct infcall_control_state): Add constructors.
1822         (save_infcall_control_state): Use new.
1823         (restore_infcall_control_state, discard_infcall_control_state):
1824         Use delete.
1825
1826 2018-09-17  Tom Tromey  <tom@tromey.com>
1827
1828         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1829         unique_ptr.
1830         <siginfo_data>: Now a unique_xmalloc_ptr.
1831         (save_infcall_suspend_state, restore_infcall_suspend_state)
1832         (discard_infcall_suspend_state)
1833         (get_infcall_suspend_state_regcache): Update.
1834
1835 2018-09-17  Tom Tromey  <tom@tromey.com>
1836
1837         * gdbthread.h (struct thread_suspend_state): Add initializers.
1838         (class thread_info) <suspend>: Remove initializer.
1839         * infrun.c (struct infcall_suspend_state): Add initializers.
1840         (save_infcall_suspend_state): Use new.
1841         (discard_infcall_suspend_state): Use delete.
1842
1843 2018-09-16  Tom Tromey  <tom@tromey.com>
1844
1845         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1846         Remove.
1847         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1848         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1849         (py_varobj_iter_new): Likewise.
1850         (py_varobj_get_iterator): Use gdbpy_ref.
1851
1852 2018-09-16  Tom Tromey  <tom@tromey.com>
1853
1854         * python/py-threadevent.c (py_get_event_thread): Simplify.
1855         * python/py-inferior.c (infpy_thread_from_thread_handle):
1856         Return immediately after calling thread_to_thread_object.  Use
1857         Py_RETURN_NONE.
1858         (thread_to_thread_object): Set the exception on a NULL return.
1859
1860 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1861
1862         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1863
1864 2018-09-16  Tom Tromey  <tom@tromey.com>
1865
1866         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1867         Remove.
1868
1869 2018-09-16  Tom Tromey  <tom@tromey.com>
1870
1871         * python/python-internal.h (thread_to_thread_object): Change
1872         return type.
1873         * python/py-inferior.c (thread_to_thread_object): Return a new
1874         reference.
1875         (infpy_thread_from_thread_handle): Update.
1876         * python/py-infthread.c (gdbpy_selected_thread): Update.
1877         * python/py-stopevent.c (create_stop_event_object): Update.
1878         * python/py-threadevent.c (py_get_event_thread): Return a new
1879         reference.
1880         (py_get_event_thread): Update.
1881         * python/py-event.h (py_get_event_thread): Change return type.
1882         * python/py-continueevent.c (create_continue_event_object):
1883         Update.
1884
1885 2018-09-16  Tom Tromey  <tom@tromey.com>
1886
1887         * python/py-progspace.c (pspy_get_objfiles): Update.
1888         * python/python-internal.h (objfile_to_objfile_object): Change
1889         return type.
1890         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1891         Update.
1892         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1893         Update.
1894         * python/python.c (gdbpy_get_current_objfile): Update.
1895         (gdbpy_objfiles): Update.
1896         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1897         Update.
1898         (objfile_to_objfile_object): Return a new reference.
1899         * python/py-symtab.c (stpy_get_objfile): Update.
1900         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1901         Update.
1902
1903 2018-09-16  Tom Tromey  <tom@tromey.com>
1904
1905         * python/py-inferior.c (infpy_get_progspace): Update.
1906         * python/python-internal.h (pspace_to_pspace_object): Change
1907         return type.
1908         * python/py-newobjfileevent.c
1909         (create_clear_objfiles_event_object): Update.
1910         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1911         Update.
1912         * python/python.c (gdbpy_get_current_progspace): Update.
1913         (gdbpy_progspaces): Update.
1914         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1915         reference.
1916         * python/py-objfile.c (objfpy_get_progspace): Update.
1917         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1918         Update.
1919
1920 2018-09-16  Tom Tromey  <tom@tromey.com>
1921
1922         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1923         (solib_name, block_for_pc, find_pc_line): New functions.
1924         (execute_unwinders): Update.
1925         * python/py-block.c (gdbpy_block_for_pc): Remove.
1926         * python/py-inferior.c (infpy_get_progspace): New function.
1927         (inferior_object_getset) <progspace>: Add.
1928         * python/py-progspace.c (pspy_objfiles): Rewrite.
1929         (pspy_solib_name, pspy_block_for_pc)
1930         (pspy_find_pc_line, pspy_is_valid): New functions.
1931         (progspace_object_methods): Add entries for solib_name,
1932         block_for_pc, find_pc_line, is_valid.
1933         * python/python-internal.h (gdbpy_block_for_pc)
1934         (build_objfiles_list): Don't declare.
1935         * python/python.c: Don't include solib.h.
1936         (gdbpy_solib_name, gdbpy_find_pc_line)
1937         (gdbpy_get_current_progspace, build_objfiles_list)
1938         (gdbpy_objfiles): Remove.
1939         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1940         solib_name, find_pc_line>: Remove entries.
1941
1942 2018-09-16  Tom Tromey  <tom@tromey.com>
1943
1944         * top.c (new_ui_command): Use GNU style for metasyntactic
1945         variables.
1946         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1947         variables.
1948         * maint.c (maintenance_translate_address): Remove "<>" around
1949         text.
1950         * interps.c (interpreter_exec_cmd): Use GNU style for
1951         metasyntactic variables.
1952         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1953         metasyntactic variables.
1954         * tracepoint.c (tfind_range_command): Use GNU style for
1955         metasyntactic variables.
1956         (tfind_outside_command): Likewise.
1957         (_initialize_tracepoint): Likewise.
1958         * remote.c (extended_remote_target::create_inferior): Use GNU
1959         style for metasyntactic variables.
1960         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1961         metasyntactic variables.
1962         (adi_assign_command): Likewise.
1963
1964 2018-09-16  Tom Tromey  <tom@tromey.com>
1965
1966         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1967         metasyntactic variables.  Print message if no disassembler options
1968         are available.
1969
1970 2018-09-15  Tom Tromey  <tom@tromey.com>
1971
1972         * infcmd.c (get_inferior_args): Return const char *.
1973         * inferior.h (get_inferior_args): Return type now const.
1974         * linux-tdep.c (linux_fill_prpsinfo): Update.
1975         * procfs.c (procfs_target::make_corefile_notes): Update.
1976
1977 2018-09-07  Tom Tromey  <tom@tromey.com>
1978
1979         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1980         inside the TRY.
1981
1982 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1983
1984         * nios2-tdep.c (nios2_type_align): New.
1985         (nios2_gdb_arch_init): Install type_align hook.
1986
1987 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1988
1989         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1990         type that is neither object file owned, nor gdbarch owned.
1991         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1992         gdbarch is non-NULL.
1993         (alloc_type_instance): Allocate non-objfile owned types on the
1994         gdbarch obstack.
1995         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1996         using TYPE_ALLOC to ensure memory is allocated on the correct
1997         obstack.
1998         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1999         obstack, or the gdbarch obstack.
2000         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2001
2002 2018-09-14  Tom Tromey  <tom@tromey.com>
2003
2004         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2005         block.
2006
2007 2018-09-14  Tom Tromey  <tom@tromey.com>
2008
2009         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2010
2011 2018-09-13  Tom Tromey  <tom@tromey.com>
2012
2013         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2014         static.
2015
2016 2018-09-13  Tom Tromey  <tom@tromey.com>
2017
2018         * exec.c (try_open_exec_file): Use std::string.
2019
2020 2018-09-13  Tom Tromey  <tom@tromey.com>
2021
2022         * utils.h (gdb_bfd_errmsg): Return std::string.
2023         * exec.c (exec_file_attach): Update.
2024         * compile/compile-object-load.c (compile_object_load): Update.
2025         * utils.c (gdb_bfd_errmsg): Return std::string.
2026
2027 2018-09-13  Tom Tromey  <tom@tromey.com>
2028
2029         * procfs.c (struct procinfo_deleter): New.
2030         (procinfo_up): New typedef.
2031         (do_destroy_procinfo_cleanup): Remove.
2032         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2033
2034 2018-09-13  Tom Tromey  <tom@tromey.com>
2035
2036         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2037
2038 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2039 2018-09-13  Tom Tromey  <tom@tromey.com>
2040
2041         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2042         (pspy_get_objfiles): New function.
2043         (progspace_object_methods): New.
2044         (pspace_object_type): Add tp_methods callback.
2045         * python/python-internal.h (build_objfiles_list): New
2046         declaration.
2047         * python/python.c (build_objfiles_list): New function.
2048         (gdbpy_objfiles): Implement using build_objfiles_list.
2049         * NEWS: Mention the Progspace.objfiles method.
2050
2051 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2052
2053         * python/py-inferior.c (infpy_get_progspace): New function.
2054         (inferior_object_getset): Add progspace property.
2055         * NEWS: Mention the new property.
2056
2057 2018-09-13  Tom Tromey  <tom@tromey.com>
2058
2059         PR rust/23650:
2060         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2061
2062 2018-09-13  Tom Tromey  <tom@tromey.com>
2063
2064         PR rust/23626:
2065         * rust-lang.c (rust_enum_variant): Now static.
2066         (rust_empty_enum_p): New function.
2067         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2068         Handle empty enum.
2069
2070 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2071
2072         * python/py-inferior.c (infpy_repr): New.
2073         (inferior_object_type): Register infpy_repr.
2074         * python/py-objfile.c (objfpy_repr): New.
2075         (objfile_object_type): Register objfpy_repr.
2076
2077 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2078
2079         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2080
2081 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2082
2083         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2084         typo.
2085
2086 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2087
2088         * common/common-utils.c: Don't include '<sys/stat.h>'.
2089         (is_regular_file): Move to...
2090         * common/filestuff.c (is_regular_file): ... here.
2091         * common/common-utils.h (is_regular_file): Move to...
2092         * common/filestuff.h (is_regular_file): ... here.
2093
2094 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2095
2096         * skip.c (debug_skip): New variable.
2097         (skiplist_entry::do_skip_file_p): Add debug output.
2098         (skiplist_entry::do_skip_gfile_p): Likewise.
2099         (skiplist_entry::skip_function_p): Likewise.
2100         (_initialize_step_skip): Create debug command.
2101         * NEWS: Mention set/show debug skip.
2102
2103 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2104
2105         * darwin-nat.c (should_disable_startup_with_shell):
2106         New function.
2107         (darwin_nat_target::create_inferior): Add call.
2108
2109 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2110
2111         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2112         inf_port, msg_state>: Initialize.
2113         (struct darwin_thread_info) <signaled, single_step>: Change
2114         type and initialize.
2115         (struct darwin_thread_info) <event>: Initialize.
2116
2117 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2118
2119         PR gdb/23555
2120         PR gdb/23558
2121         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2122         guesses.
2123
2124 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2125
2126         Revert:
2127         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2128
2129         PR gdb/23555
2130         PR gdb/23558
2131         * gnulib/aclocal.m4: Regenerate.
2132         * gnulib/config.in: Regenerate.
2133         * gnulib/configure: Regenerate.
2134         * gnulib/import/Makefile.am: Update.
2135         * gnulib/import/Makefile.in: Update.
2136         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2137         * gnulib/import/_Noreturn.h: ... this.
2138         * gnulib/import/alloca.in.h: Update.
2139         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2140         * gnulib/import/arg-nonnull.h: ... this.
2141         * gnulib/import/assure.h: Update.
2142         * gnulib/import/at-func.c: Update.
2143         * gnulib/import/basename-lgpl.c: Update.
2144         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2145         * gnulib/import/c++defs.h: ... this.
2146         * gnulib/import/canonicalize-lgpl.c: Update.
2147         * gnulib/import/cdefs.h: Update.
2148         * gnulib/import/chdir-long.c: Update.
2149         * gnulib/import/chdir-long.h: Update.
2150         * gnulib/import/cloexec.c: Update.
2151         * gnulib/import/cloexec.h: Update.
2152         * gnulib/import/close.c: Update.
2153         * gnulib/import/closedir.c: Update.
2154         * gnulib/import/config.charset: Update.
2155         * gnulib/import/dirent-private.h: Update.
2156         * gnulib/import/dirent.in.h: Update.
2157         * gnulib/import/dirfd.c: Update.
2158         * gnulib/import/dirname-lgpl.c: Update.
2159         * gnulib/import/dirname.h: Update.
2160         * gnulib/import/dosname.h: Update.
2161         * gnulib/import/dup-safer-flag.c: Update.
2162         * gnulib/import/dup-safer.c: Update.
2163         * gnulib/import/dup.c: Update.
2164         * gnulib/import/dup2.c: Update.
2165         * gnulib/import/errno.in.h: Update.
2166         * gnulib/import/error.c: Update.
2167         * gnulib/import/error.h: Update.
2168         * gnulib/import/exitfail.c: Update.
2169         * gnulib/import/exitfail.h: Update.
2170         * gnulib/import/extra/update-copyright: Update.
2171         * gnulib/import/fchdir.c: Update.
2172         * gnulib/import/fcntl.c: Update.
2173         * gnulib/import/fcntl.in.h: Update.
2174         * gnulib/import/fd-hook.c: Update.
2175         * gnulib/import/fd-hook.h: Update.
2176         * gnulib/import/fd-safer-flag.c: Update.
2177         * gnulib/import/fd-safer.c: Update.
2178         * gnulib/import/fdopendir.c: Update.
2179         * gnulib/import/filename.h: Update.
2180         * gnulib/import/filenamecat-lgpl.c: Update.
2181         * gnulib/import/filenamecat.h: Update.
2182         * gnulib/import/flexmember.h: Update.
2183         * gnulib/import/float+.h: Update.
2184         * gnulib/import/float.c: Update.
2185         * gnulib/import/float.in.h: Update.
2186         * gnulib/import/fnmatch.c: Update.
2187         * gnulib/import/fnmatch.in.h: Update.
2188         * gnulib/import/fnmatch_loop.c: Update.
2189         * gnulib/import/fpucw.h: Update.
2190         * gnulib/import/frexp.c: Update.
2191         * gnulib/import/frexpl.c: Update.
2192         * gnulib/import/fstat.c: Update.
2193         * gnulib/import/fstatat.c: Update.
2194         * gnulib/import/getcwd-lgpl.c: Update.
2195         * gnulib/import/getcwd.c: Update.
2196         * gnulib/import/getdtablesize.c: Update.
2197         * gnulib/import/getlogin_r.c: Update.
2198         * gnulib/import/getprogname.c: Update.
2199         * gnulib/import/getprogname.h: Update.
2200         * gnulib/import/gettext.h: Update.
2201         * gnulib/import/gettimeofday.c: Update.
2202         * gnulib/import/glob-libc.h: Update.
2203         * gnulib/import/glob.c: Update.
2204         * gnulib/import/glob.in.h: Update.
2205         * gnulib/import/glob_internal.h: Update.
2206         * gnulib/import/glob_pattern_p.c: Update.
2207         * gnulib/import/globfree.c: Update.
2208         * gnulib/import/hard-locale.c: Update.
2209         * gnulib/import/hard-locale.h: Update.
2210         * gnulib/import/intprops.h: Update.
2211         * gnulib/import/inttypes.in.h: Update.
2212         * gnulib/import/isnan.c: Update.
2213         * gnulib/import/isnand-nolibm.h: Update.
2214         * gnulib/import/isnand.c: Update.
2215         * gnulib/import/isnanl-nolibm.h: Update.
2216         * gnulib/import/isnanl.c: Update.
2217         * gnulib/import/itold.c: Update.
2218         * gnulib/import/libc-config.h: Update.
2219         * gnulib/import/limits.in.h: Update.
2220         * gnulib/import/localcharset.c: Update.
2221         * gnulib/import/localcharset.h: Update.
2222         * gnulib/import/localtime-buffer.c: Update.
2223         * gnulib/import/localtime-buffer.h: Update.
2224         * gnulib/import/lstat.c: Update.
2225         * gnulib/import/m4/00gnulib.m4: Update.
2226         * gnulib/import/m4/__inline.m4: Update.
2227         * gnulib/import/m4/absolute-header.m4: Update.
2228         * gnulib/import/m4/alloca.m4: Update.
2229         * gnulib/import/m4/builtin-expect.m4: Update.
2230         * gnulib/import/m4/canonicalize.m4: Update.
2231         * gnulib/import/m4/chdir-long.m4: Update.
2232         * gnulib/import/m4/close.m4: Update.
2233         * gnulib/import/m4/closedir.m4: Update.
2234         * gnulib/import/m4/configmake.m4: Update.
2235         * gnulib/import/m4/d-ino.m4: Update.
2236         * gnulib/import/m4/d-type.m4: Update.
2237         * gnulib/import/m4/dirent_h.m4: Update.
2238         * gnulib/import/m4/dirfd.m4: Update.
2239         * gnulib/import/m4/dirname.m4: Update.
2240         * gnulib/import/m4/double-slash-root.m4: Update.
2241         * gnulib/import/m4/dup.m4: Update.
2242         * gnulib/import/m4/dup2.m4: Update.
2243         * gnulib/import/m4/eealloc.m4: Update.
2244         * gnulib/import/m4/environ.m4: Update.
2245         * gnulib/import/m4/errno_h.m4: Update.
2246         * gnulib/import/m4/error.m4: Update.
2247         * gnulib/import/m4/exponentd.m4: Update.
2248         * gnulib/import/m4/exponentl.m4: Update.
2249         * gnulib/import/m4/extensions.m4: Update.
2250         * gnulib/import/m4/extern-inline.m4: Update.
2251         * gnulib/import/m4/fchdir.m4: Update.
2252         * gnulib/import/m4/fcntl-o.m4: Update.
2253         * gnulib/import/m4/fcntl.m4: Update.
2254         * gnulib/import/m4/fcntl_h.m4: Update.
2255         * gnulib/import/m4/fdopendir.m4: Update.
2256         * gnulib/import/m4/filenamecat.m4: Update.
2257         * gnulib/import/m4/flexmember.m4: Update.
2258         * gnulib/import/m4/float_h.m4: Update.
2259         * gnulib/import/m4/fnmatch.m4: Update.
2260         * gnulib/import/m4/fnmatch_h.m4: Update.
2261         * gnulib/import/m4/fpieee.m4: Update.
2262         * gnulib/import/m4/frexp.m4: Update.
2263         * gnulib/import/m4/frexpl.m4: Update.
2264         * gnulib/import/m4/fstat.m4: Update.
2265         * gnulib/import/m4/fstatat.m4: Update.
2266         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2267         * gnulib/import/m4/getcwd-path-max.m4: Update.
2268         * gnulib/import/m4/getcwd.m4: Update.
2269         * gnulib/import/m4/getdtablesize.m4: Update.
2270         * gnulib/import/m4/getlogin.m4: Update.
2271         * gnulib/import/m4/getlogin_r.m4: Update.
2272         * gnulib/import/m4/getpagesize.m4: Update.
2273         * gnulib/import/m4/getprogname.m4: Update.
2274         * gnulib/import/m4/gettimeofday.m4: Update.
2275         * gnulib/import/m4/glibc21.m4: Update.
2276         * gnulib/import/m4/glob.m4: Update.
2277         * gnulib/import/m4/glob_h.m4: Update.
2278         * gnulib/import/m4/gnulib-cache.m4: Update.
2279         * gnulib/import/m4/gnulib-common.m4: Update.
2280         * gnulib/import/m4/gnulib-comp.m4: Update.
2281         * gnulib/import/m4/gnulib-tool.m4: Update.
2282         * gnulib/import/m4/hard-locale.m4: Update.
2283         * gnulib/import/m4/include_next.m4: Update.
2284         * gnulib/import/m4/inttypes-pri.m4: Update.
2285         * gnulib/import/m4/inttypes.m4: Update.
2286         * gnulib/import/m4/isnand.m4: Update.
2287         * gnulib/import/m4/isnanl.m4: Update.
2288         * gnulib/import/m4/largefile.m4: Update.
2289         * gnulib/import/m4/limits-h.m4: Update.
2290         * gnulib/import/m4/localcharset.m4: Update.
2291         * gnulib/import/m4/locale-fr.m4: Update.
2292         * gnulib/import/m4/locale-ja.m4: Update.
2293         * gnulib/import/m4/locale-zh.m4: Update.
2294         * gnulib/import/m4/localtime-buffer.m4: Update.
2295         * gnulib/import/m4/longlong.m4: Update.
2296         * gnulib/import/m4/lstat.m4: Update.
2297         * gnulib/import/m4/malloc.m4: Update.
2298         * gnulib/import/m4/malloca.m4: Update.
2299         * gnulib/import/m4/math_h.m4: Update.
2300         * gnulib/import/m4/mbrtowc.m4: Update.
2301         * gnulib/import/m4/mbsinit.m4: Update.
2302         * gnulib/import/m4/mbsrtowcs.m4: Update.
2303         * gnulib/import/m4/mbstate_t.m4: Update.
2304         * gnulib/import/m4/memchr.m4: Update.
2305         * gnulib/import/m4/memmem.m4: Update.
2306         * gnulib/import/m4/mempcpy.m4: Update.
2307         * gnulib/import/m4/memrchr.m4: Update.
2308         * gnulib/import/m4/mkdir.m4: Update.
2309         * gnulib/import/m4/mkstemp.m4: Update.
2310         * gnulib/import/m4/mmap-anon.m4: Update.
2311         * gnulib/import/m4/mode_t.m4: Update.
2312         * gnulib/import/m4/msvc-inval.m4: Update.
2313         * gnulib/import/m4/msvc-nothrow.m4: Update.
2314         * gnulib/import/m4/multiarch.m4: Update.
2315         * gnulib/import/m4/nocrash.m4: Update.
2316         * gnulib/import/m4/off_t.m4: Update.
2317         * gnulib/import/m4/onceonly.m4: Update.
2318         * gnulib/import/m4/open-cloexec.m4: Update.
2319         * gnulib/import/m4/open.m4: Update.
2320         * gnulib/import/m4/openat.m4: Update.
2321         * gnulib/import/m4/opendir.m4: Update.
2322         * gnulib/import/m4/pathmax.m4: Update.
2323         * gnulib/import/m4/rawmemchr.m4: Update.
2324         * gnulib/import/m4/readdir.m4: Update.
2325         * gnulib/import/m4/readlink.m4: Update.
2326         * gnulib/import/m4/realloc.m4: Update.
2327         * gnulib/import/m4/rename.m4: Update.
2328         * gnulib/import/m4/rewinddir.m4: Update.
2329         * gnulib/import/m4/rmdir.m4: Update.
2330         * gnulib/import/m4/save-cwd.m4: Update.
2331         * gnulib/import/m4/secure_getenv.m4: Update.
2332         * gnulib/import/m4/setenv.m4: Update.
2333         * gnulib/import/m4/signal_h.m4: Update.
2334         * gnulib/import/m4/ssize_t.m4: Update.
2335         * gnulib/import/m4/stat-time.m4: Update.
2336         * gnulib/import/m4/stat.m4: Update.
2337         * gnulib/import/m4/std-gnu11.m4: Update.
2338         * gnulib/import/m4/stdbool.m4: Update.
2339         * gnulib/import/m4/stddef_h.m4: Update.
2340         * gnulib/import/m4/stdint.m4: Update.
2341         * gnulib/import/m4/stdio_h.m4: Update.
2342         * gnulib/import/m4/stdlib_h.m4: Update.
2343         * gnulib/import/m4/strchrnul.m4: Update.
2344         * gnulib/import/m4/strdup.m4: Update.
2345         * gnulib/import/m4/strerror.m4: Update.
2346         * gnulib/import/m4/string_h.m4: Update.
2347         * gnulib/import/m4/strstr.m4: Update.
2348         * gnulib/import/m4/strtok_r.m4: Update.
2349         * gnulib/import/m4/sys_socket_h.m4: Update.
2350         * gnulib/import/m4/sys_stat_h.m4: Update.
2351         * gnulib/import/m4/sys_time_h.m4: Update.
2352         * gnulib/import/m4/sys_types_h.m4: Update.
2353         * gnulib/import/m4/tempname.m4: Update.
2354         * gnulib/import/m4/time_h.m4: Update.
2355         * gnulib/import/m4/unistd-safer.m4: Update.
2356         * gnulib/import/m4/unistd_h.m4: Update.
2357         * gnulib/import/m4/warn-on-use.m4: Update.
2358         * gnulib/import/m4/wchar_h.m4: Update.
2359         * gnulib/import/m4/wchar_t.m4: Update.
2360         * gnulib/import/m4/wctype_h.m4: Update.
2361         * gnulib/import/m4/wint_t.m4: Update.
2362         * gnulib/import/malloc.c: Update.
2363         * gnulib/import/malloc/scratch_buffer.h: Update.
2364         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2365         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2366         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2367         * gnulib/import/malloca.c: Update.
2368         * gnulib/import/malloca.h: Update.
2369         * gnulib/import/malloca.valgrind: Update.
2370         * gnulib/import/math.in.h: Update.
2371         * gnulib/import/mbrtowc.c: Update.
2372         * gnulib/import/mbsinit.c: Update.
2373         * gnulib/import/mbsrtowcs-impl.h: Update.
2374         * gnulib/import/mbsrtowcs-state.c: Update.
2375         * gnulib/import/mbsrtowcs.c: Update.
2376         * gnulib/import/memchr.c: Update.
2377         * gnulib/import/memmem.c: Update.
2378         * gnulib/import/mempcpy.c: Update.
2379         * gnulib/import/memrchr.c: Update.
2380         * gnulib/import/mkdir.c: Update.
2381         * gnulib/import/mkstemp.c: Update.
2382         * gnulib/import/msvc-inval.c: Update.
2383         * gnulib/import/msvc-inval.h: Update.
2384         * gnulib/import/msvc-nothrow.c: Update.
2385         * gnulib/import/msvc-nothrow.h: Update.
2386         * gnulib/import/open.c: Update.
2387         * gnulib/import/openat-die.c: Update.
2388         * gnulib/import/openat-priv.h: Update.
2389         * gnulib/import/openat-proc.c: Update.
2390         * gnulib/import/openat.c: Update.
2391         * gnulib/import/openat.h: Update.
2392         * gnulib/import/opendir.c: Update.
2393         * gnulib/import/pathmax.h: Update.
2394         * gnulib/import/pipe-safer.c: Update.
2395         * gnulib/import/rawmemchr.c: Update.
2396         * gnulib/import/readdir.c: Update.
2397         * gnulib/import/readlink.c: Update.
2398         * gnulib/import/realloc.c: Update.
2399         * gnulib/import/ref-add.sin: Update.
2400         * gnulib/import/ref-del.sin: Update.
2401         * gnulib/import/rename.c: Update.
2402         * gnulib/import/rewinddir.c: Update.
2403         * gnulib/import/rmdir.c: Update.
2404         * gnulib/import/same-inode.h: Update.
2405         * gnulib/import/save-cwd.c: Update.
2406         * gnulib/import/save-cwd.h: Update.
2407         * gnulib/import/scratch_buffer.h: Update.
2408         * gnulib/import/secure_getenv.c: Update.
2409         * gnulib/import/setenv.c: Update.
2410         * gnulib/import/signal.in.h: Update.
2411         * gnulib/import/stat-time.c: Update.
2412         * gnulib/import/stat-time.h: Update.
2413         * gnulib/import/stat-w32.c: Update.
2414         * gnulib/import/stat-w32.h: Update.
2415         * gnulib/import/stat.c: Update.
2416         * gnulib/import/stdbool.in.h: Update.
2417         * gnulib/import/stddef.in.h: Update.
2418         * gnulib/import/stdint.in.h: Update.
2419         * gnulib/import/stdio.in.h: Update.
2420         * gnulib/import/stdlib.in.h: Update.
2421         * gnulib/import/str-two-way.h: Update.
2422         * gnulib/import/strchrnul.c: Update.
2423         * gnulib/import/strdup.c: Update.
2424         * gnulib/import/streq.h: Update.
2425         * gnulib/import/strerror-override.c: Update.
2426         * gnulib/import/strerror-override.h: Update.
2427         * gnulib/import/strerror.c: Update.
2428         * gnulib/import/string.in.h: Update.
2429         * gnulib/import/stripslash.c: Update.
2430         * gnulib/import/strnlen1.c: Update.
2431         * gnulib/import/strnlen1.h: Update.
2432         * gnulib/import/strstr.c: Update.
2433         * gnulib/import/strtok_r.c: Update.
2434         * gnulib/import/sys_stat.in.h: Update.
2435         * gnulib/import/sys_time.in.h: Update.
2436         * gnulib/import/sys_types.in.h: Update.
2437         * gnulib/import/tempname.c: Update.
2438         * gnulib/import/tempname.h: Update.
2439         * gnulib/import/time.in.h: Update.
2440         * gnulib/import/unistd--.h: Update.
2441         * gnulib/import/unistd-safer.h: Update.
2442         * gnulib/import/unistd.in.h: Update.
2443         * gnulib/import/unsetenv.c: Update.
2444         * gnulib/import/verify.h: Update.
2445         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2446         * gnulib/import/wchar.in.h: Update.
2447         * gnulib/import/wctype.in.h: Update.
2448         * gnulib/import/xalloc-oversized.h: Update.
2449         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2450         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2451
2452 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2453
2454         * record-btrace.c (get_thread_current_frame): Remove
2455         old_inferior_ptid.
2456
2457 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2458
2459         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2460         with check_tag to 1 if and only if the type is tagged and the
2461         component being searched cannot been found in the current
2462         view. Otherwise, always call ada_to_fixed_type with
2463         check_tag to 0.
2464
2465 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2466
2467         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2468         declaration.
2469         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2470         * ada-varobj.c (ada_varobj_get_number_of_children,
2471         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2472
2473 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2474
2475         * ada-valprint.c (ada_value_print): Use type instead of
2476         enclosing type.
2477
2478 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2479
2480         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2481         an array of access to unconstrained array.
2482
2483 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2484
2485         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2486         (ada_check_typedef): Use it.
2487
2488 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2489
2490         * ada-varobj.c (ada_varobj_describe_struct_child)
2491         (ada_varobj_describe_child): Handle union case like struct one.
2492
2493 2018-09-10  Tom Tromey  <tom@tromey.com>
2494
2495         PR python/18380:
2496         * python/python.c (_initialize_python): Make example in "python"
2497         help work in Python 3.
2498
2499 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2500
2501         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2502         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2503         $(EXEEXT) to the script, as it is not a program.
2504
2505 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2506
2507         * python/py-prettyprint.c (pretty_print_one_value): Return
2508         gdbpy_ref<>.
2509         (print_string_repr): Adjust.
2510         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2511         * python/python-internal.h (apply_varobj_pretty_printer): Return
2512         gdbpy_ref<>.
2513         * varobj.c (varobj_value_get_print_value): Adjust.
2514
2515 2018-09-08  Tom Tromey  <tom@tromey.com>
2516
2517         PR python/16047:
2518         * python/py-prettyprint.c (pretty_print_one_value): Check for
2519         to_string method.
2520
2521 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2522
2523         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2524         replace_operator_with_call.
2525
2526 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2527
2528         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2529
2530 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2531
2532         * ada-typeprint.c (print_range): Print the bounds using TYPE
2533         rather than its TYPE_TARGET_TYPE.
2534
2535 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2536
2537         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2538         call to ada_to_fixed_value_create.
2539
2540 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2541
2542         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2543
2544 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2545
2546         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2547         by calls to error.
2548
2549 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2550
2551         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2552         Move update of loop variable "fi".
2553
2554 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2555
2556         * ada-lang.c (value_assign_to_component): In the case of
2557         big-endian targets, extract the bits of the given VAL
2558         using an src_offset of zero if container is not a scalar.
2559
2560 2018-09-06  Simon Ser  <contact@emersion.fr>
2561
2562         PR gdb/23105
2563         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2564         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2565         * fbsd-tdep.c (fbsd_make_note_desc): New.
2566         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2567         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2568         * target.h (enum target_object) Add FreeBSD-specific
2569         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2570
2571 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2572
2573         * compile/compile-c.h (generate_c_for_variable_locations):
2574         Change reference to pointer.
2575         * compile/compile-c-support.c (compile_program) <compute>:
2576         Likewise.
2577         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2578         (generate_c_for_for_one_variable): Likewise
2579         (generate_c_for_variable_locations): Likewise
2580         * compile/compile-c-types.c (compile_c_instance::convert_type):
2581         Likewise
2582         * compile/compile-cplus-symbols.c (convert_one_symbol):
2583         std::move the scope passed to enter_scope.
2584         * compile/compile-cplus-types.c
2585         (compile_cplus_instance::enter_scope): Make parameter
2586         rvalue-reference.
2587         (compile_cplus_instance::new_scope): Change reference to
2588         pointer.
2589         (compile_cplus_instance::convert_type): Likewise
2590         (compile_cplus_convert_typedef): std::move the scope passed to
2591         enter_scope.
2592         (compile_cplus_convert_struct_or_union): Likewise.
2593         (compile_cplus_convert_enum): Likewise.
2594         (compile_cplus_convert_namespace): Likewise.
2595         * compile/compile-cplus.h (compile_cplus_instance)
2596         <enter_scope>: Make parameter rvalue-reference.
2597         * compile/compile-internal.h (compile_instance)
2598         <get_cached_type>: Likewise
2599         * compile/compile-loc2c.c (push): Likewise
2600         (pushf): Likewise
2601         (unary): Likewise
2602         (binary): Likewise
2603         (print_label): Likewise
2604         (pushf_register_address): Likewise
2605         (pushf_register): Likewise
2606         (do_compile_dwarf_expr_to_c): Likewise
2607         (compile_dwarf_expr_to_c): Likewise
2608         (compile_dwarf_bounds_to_c): Likewise
2609         * compile/compile.c (compile_instance::get_cached_type):
2610         Likewise
2611         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2612         (compile_dwarf_bounds_to_c): Likewise
2613         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2614         (dwarf2_compile_property_to_c): Likewise
2615         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2616         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2617         Likewise
2618
2619 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2620
2621         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2622         * tui/tui-data.c (init_content_element): Don't initialize it.
2623
2624 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2625
2626         * tui/tui-data.h (struct tui_win_info)
2627         <detail::opaque>: Remove.
2628         * tui/tui-data.c (init_win_info): Remove assignment.
2629
2630 2018-09-05  Tom Tromey  <tom@tromey.com>
2631
2632         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2633         -Wformat-nonliteral.
2634         * target-float.c (host_float_ops<T>::to_string)
2635         (host_float_ops<T>::from_string): Use
2636         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2637         * configure: Rebuild.
2638
2639 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2640
2641         * printcmd.c (printf_c_string): Use
2642         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2643         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2644
2645 2018-09-05  Tom Tromey  <tom@tromey.com>
2646
2647         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2648
2649 2018-09-05  Tom de Vries  <tdevries@suse.de>
2650
2651         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2652         with resolve_abstract_p == true.
2653         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2654         defaulting to false. Propagate resolve_abstract_p to
2655         dwarf2_fetch_die_loc_sect_off.
2656         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2657         parameter, defaulting to false.
2658         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2659         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2660         parameter.
2661         * dwarf2read.h (struct die_info): Forward-declare.
2662         (die_info_ptr): New typedef.
2663         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2664
2665 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2666
2667         GDB 8.2 released.
2668
2669 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2670             Pedro Alves  <palves@redhat.com>
2671
2672         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2673         "aclocal-m4-deps.mk".  Include file here.
2674         $(srcdir)/aclocal.m4: Add "configure.ac".
2675         * gnulib/aclocal-m4-deps.mk: New file.
2676         * gnulib/update-gnulib.sh: Automatically update
2677         "aclocal-m4-deps.mk".
2678
2679 2018-09-04  Tom Tromey  <tom@tromey.com>
2680
2681         * configure: Rebuild.
2682         * configure.ac: Remove multi-ice code.
2683
2684 2018-09-04  Tom Tromey  <tom@tromey.com>
2685
2686         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2687         (ada-exp.o): Update.
2688
2689 2018-09-04  Tom Tromey  <tom@tromey.com>
2690
2691         * Makefile.in (printcmd.o, target-float.o): Remove.
2692         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2693
2694 2018-09-04  Tom Tromey  <tom@tromey.com>
2695
2696         * gnulib/Makefile.in: Remove obsolete comment.
2697         * Makefile.in: Remove obsolete comment.
2698
2699 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2700
2701         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2702         line with '+'.
2703
2704 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2705
2706         * riscv-tdep.c: Add 'prologue-value.h' include.
2707         (struct riscv_unwind_cache): New struct.
2708         (riscv_debug_unwinder): New global.
2709         (riscv_scan_prologue): Update arguments, capture register details
2710         from prologue scan.
2711         (riscv_skip_prologue): Reformat arguments line, move end of
2712         prologue calculation into riscv_scan_prologue.
2713         (riscv_frame_cache): Update return type, create
2714         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2715         details.
2716         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2717         (riscv_frame_prev_register): Use the trad_frame within the
2718         riscv_unwind_cache.
2719         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2720         flag.
2721
2722 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2723
2724         * trad-frame.h (trad_frame_set_realreg): Declare.
2725         (trad_frame_set_addr): Declare.
2726         * trad-frame.c (trad_frame_set_realreg): Define new function.
2727         (trad_frame_set_addr): Define new function.
2728         (trad_frame_set_reg_realreg): Use new function.
2729         (trad_frame_set_reg_addr): Use new function.
2730
2731 2018-09-01  Keith Seitz  <keiths@redhat.com>
2732
2733         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2734         pulongest instead of "%lld".
2735         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2736         ATTRIBUTE_UNUSED.
2737
2738 2018-08-31  Tom Tromey  <tom@tromey.com>
2739
2740         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2741         variant part type.
2742
2743 2018-08-31  Pedro Alves  <palves@redhat.com>
2744
2745         * gdbarch.h: Regenerate.
2746
2747 2018-08-31  Pedro Alves  <palves@redhat.com>
2748
2749         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2750         * target.h (Hardware watchpoint interfaces): Describe
2751         continuable/steppable/non-steppable watchpoints.
2752         * gdbarch.h, gdbarch.c: Regenerate.
2753
2754 2018-08-31  Pedro Alves  <palves@redhat.com>
2755
2756         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2757         Delete.
2758         * s390-linux-nat.c
2759         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2760         * target.h (target_ops::have_continuable_watchpoint): Delete.
2761         (target_have_continuable_watchpoint): Delete.
2762         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2763         * target-delegates.c: Regenerate.
2764
2765 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2766
2767         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2768         the files present in "gnulib/import/m4/".
2769
2770 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2771
2772         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2773         c.sw, c.swsp, and c.sdsp.
2774
2775 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2776
2777         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2778         (riscv_read_misa_reg): Don't cache value read into inferior data.
2779         (riscv_new_inferior_data): Delete.
2780         (riscv_inferior_data_cleanup): Delete.
2781         (riscv_inferior_data): Delete.
2782         (riscv_invalidate_inferior_data): Delete.
2783         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2784
2785 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2786
2787         * compile/compile-cplus-types.c
2788         (compile_cplus_instance::leave_scope): Take the address of scope
2789         object.
2790         (compile_cplus_instance::convert_qualified_base): Compare quals
2791         to 0.
2792
2793 2018-08-30  Keith Seitz  <keiths@redhat.com>
2794
2795         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2796         Use "%s" and host_address_to_string instead of "%p" in printf.
2797
2798 2018-08-29  Keith Seitz  <keiths@redhat.com>
2799
2800         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2801         and compile-cplus-types.c.
2802         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2803         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2804         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2805         Declare.
2806         * compile/compile-c-support.c: Include compile-cplus.h.
2807         (load_libcompile): Templatize.
2808         (get_compile_context): "New" function.
2809         (c_get_compile_context): Use get_compile_context.
2810         (cplus_get_compile_context): New function.
2811         (cplus_push_user_expression, cplus_pop_user_expression)
2812         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2813         (cplus_compute_program): Define new structs/functions.
2814         * compile/compile-cplus-symmbols.c: New file.
2815         * compile/compile-cplus-types.c: New file.
2816         * compile/compile-cplus.h: New file.
2817         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2818         Declare.
2819         * compile/compile-object-load.c (get_out_value_type): Use
2820         strncmp_iw when comparing symbol names.
2821         (compile_object_load): Add mst_bss and mst_data.
2822         * compile/compile.c (_initialize_compile): Remove
2823         -Wno-implicit-function-declaration from `compile_args'.
2824         * compile/gcc-cp-plugin.h: New file.
2825         * NEWS: Mention C++ compile support and new debug options.
2826
2827 2018-08-29  Keith Seitz  <keiths@redhat.com>
2828
2829         * linespec.c (collect_info::add_symbol): Make virtual.
2830         (struct symbol_searcher_collect_info): New struct.
2831         (symbol_searcher::find_all_symbols): New method.
2832         * symtab.h (class symbol_searcher): New class.
2833
2834 2018-08-29  Keith Seitz  <keiths@redhat.com>
2835
2836         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2837         Change to vector of block_symbol.  Update all users.
2838         (struct collect_info) <symbols>: Likewise.
2839         (collect_info::add_symbol): Take block_symbol as argument.
2840         Update all callers.
2841         (decode_compound_collector) <m_symbols>: Change type to vector
2842         of block_symbol.  Update all users.
2843         (decode_compound_collector::operator ()): Change parameter type
2844         to block_symbol.
2845         (find_method, find_function_symbols, find_linespec_symbols)
2846         (find_label_symbols_in_block, find_label_symbols): Change symbol
2847         vectors to block_symbol vectors.
2848         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2849         block_symbol.
2850
2851 2018-08-29  Keith Seitz  <keiths@redhat.com>
2852
2853         * linespec.c (symbolp): Remove typedef and VEC definitions.
2854         (bound_minimal_symbol_d): Likewise.
2855
2856 2018-08-29  Keith Seitz  <keiths@redhat.com>
2857
2858         * linespec.c (decode_compound_collector::decode_compound_collector):
2859         Remove initialization for `m_symtabs'.
2860         (decode_compound_collector::release_symbols): Change return type
2861         to std::vector.  Update all callers.
2862         (class decode_compound_collector) <m_symbols>: Change type to
2863         std::vector.
2864         (lookup_prefix_sym): Change return type to std::vector.  Update all
2865         callers.
2866         (compare_symbols): Remove.
2867         (std_compare_symbols): Rename to `compare_symbols'.
2868         (find_method): Change `sym_classes' parameter to std::vector.
2869         Update all callers.  Use std::sort to sort sym_classes.
2870         (find_linespec_symbols): Remove cleanup.
2871
2872 2018-08-29  Keith Seitz  <keiths@redhat.com>
2873
2874         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2875         std::vector.  Update all users.
2876         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2877         (struct collect_info) <minimal_symbols>: Likewise.
2878         (compare_msymbols): Return bool.  Change parameters to const
2879         bound_minimal_symbol references.
2880         (find_method, find_function_symbols, find_linespec_symbols): Change
2881         `minsyms' parameter to std::vector.  Update all callers.
2882
2883 2018-08-29  Keith Seitz  <keiths@redhat.com>
2884
2885         * linespec.c (struct linespec) <label_symbols>: Change type to
2886         std::vector.  Update all users.
2887         (find_label_symbols_in_block): Change `result' parameter to
2888         std::vector.  Update all callers.
2889         (find_label_symbols): Return std::vector.  Update all callers.
2890
2891 2018-08-29  Keith Seitz  <keiths@redhat.com>
2892
2893         * linespec.c (struct linespec) <function_symbols>: Change type to
2894         std::vector.  Update all users.
2895         (struct collect_info) <function_symbols>: Likewise.
2896         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2897         (std_compare_symbols): New function.
2898         (find_method, find_function_symbols, find_linespec_symbols)
2899         (find_label_symbols_in_block): Change `symbols' parameter to
2900         std::vector.  Update all callers.
2901         (find_label_symbols): Likewise for `function_symbols' and
2902         `label_funcs_ret'.
2903
2904 2018-08-29  Keith Seitz  <keiths@redhat.com>
2905
2906         * linespec.c (symtab_vector_up): Define.
2907         (struct linespec) <file_symtabs>: Change type to std::vector *.
2908         Update all uses.
2909         (struct collect_info) <file_symtabs>: Likewise.
2910         (collect_symtabs_from_filename): Return symtab_vector_up.
2911         Update all callers.
2912         (decode_objc): Remove cleanup.
2913         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2914         (symtab_collector::release_symtabs): Return symtab_vector_up.
2915         Update all callers.
2916         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2917         Update all users.
2918         (collect_symtabs_from_filename, symtabs_from_filename): Return
2919         symtab_vector_up.  Update all callers.
2920
2921 2018-08-29  Tom Tromey  <tom@tromey.com>
2922
2923         * csky-tdep.c (csky_analyze_prologue): Use
2924         core_addr_to_string_nz.
2925
2926 2018-08-29  Tom Tromey  <tom@tromey.com>
2927
2928         * windows-nat.c (struct xlate_exception) <them>: Change type to
2929         DWORD.
2930         (xlate): Fix formatting.  Remove last entry.
2931         (struct xlate_exception, xlate): Comment out.
2932         (windows_nat_target::resume): Use ranged for.
2933
2934 2018-08-29  Jim Wilson  <jimw@sifive.com>
2935
2936         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2937         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2938         of NT_PRFPREG.
2939         (riscv_linux_nat_target::store_registers): Likewise.
2940
2941 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2942
2943         PR gdb/23555
2944         PR gdb/23558
2945         * gnulib/aclocal.m4: Regenerate.
2946         * gnulib/config.in: Regenerate.
2947         * gnulib/configure: Regenerate.
2948         * gnulib/import/Makefile.am: Update.
2949         * gnulib/import/Makefile.in: Update.
2950         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2951         * gnulib/import/_Noreturn.h: ... this.
2952         * gnulib/import/alloca.in.h: Update.
2953         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2954         * gnulib/import/arg-nonnull.h: ... this.
2955         * gnulib/import/assure.h: Update.
2956         * gnulib/import/at-func.c: Update.
2957         * gnulib/import/basename-lgpl.c: Update.
2958         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2959         * gnulib/import/c++defs.h: ... this.
2960         * gnulib/import/canonicalize-lgpl.c: Update.
2961         * gnulib/import/cdefs.h: Update.
2962         * gnulib/import/chdir-long.c: Update.
2963         * gnulib/import/chdir-long.h: Update.
2964         * gnulib/import/cloexec.c: Update.
2965         * gnulib/import/cloexec.h: Update.
2966         * gnulib/import/close.c: Update.
2967         * gnulib/import/closedir.c: Update.
2968         * gnulib/import/config.charset: Update.
2969         * gnulib/import/dirent-private.h: Update.
2970         * gnulib/import/dirent.in.h: Update.
2971         * gnulib/import/dirfd.c: Update.
2972         * gnulib/import/dirname-lgpl.c: Update.
2973         * gnulib/import/dirname.h: Update.
2974         * gnulib/import/dosname.h: Update.
2975         * gnulib/import/dup-safer-flag.c: Update.
2976         * gnulib/import/dup-safer.c: Update.
2977         * gnulib/import/dup.c: Update.
2978         * gnulib/import/dup2.c: Update.
2979         * gnulib/import/errno.in.h: Update.
2980         * gnulib/import/error.c: Update.
2981         * gnulib/import/error.h: Update.
2982         * gnulib/import/exitfail.c: Update.
2983         * gnulib/import/exitfail.h: Update.
2984         * gnulib/import/extra/update-copyright: Update.
2985         * gnulib/import/fchdir.c: Update.
2986         * gnulib/import/fcntl.c: Update.
2987         * gnulib/import/fcntl.in.h: Update.
2988         * gnulib/import/fd-hook.c: Update.
2989         * gnulib/import/fd-hook.h: Update.
2990         * gnulib/import/fd-safer-flag.c: Update.
2991         * gnulib/import/fd-safer.c: Update.
2992         * gnulib/import/fdopendir.c: Update.
2993         * gnulib/import/filename.h: Update.
2994         * gnulib/import/filenamecat-lgpl.c: Update.
2995         * gnulib/import/filenamecat.h: Update.
2996         * gnulib/import/flexmember.h: Update.
2997         * gnulib/import/float+.h: Update.
2998         * gnulib/import/float.c: Update.
2999         * gnulib/import/float.in.h: Update.
3000         * gnulib/import/fnmatch.c: Update.
3001         * gnulib/import/fnmatch.in.h: Update.
3002         * gnulib/import/fnmatch_loop.c: Update.
3003         * gnulib/import/fpucw.h: Update.
3004         * gnulib/import/frexp.c: Update.
3005         * gnulib/import/frexpl.c: Update.
3006         * gnulib/import/fstat.c: Update.
3007         * gnulib/import/fstatat.c: Update.
3008         * gnulib/import/getcwd-lgpl.c: Update.
3009         * gnulib/import/getcwd.c: Update.
3010         * gnulib/import/getdtablesize.c: Update.
3011         * gnulib/import/getlogin_r.c: Update.
3012         * gnulib/import/getprogname.c: Update.
3013         * gnulib/import/getprogname.h: Update.
3014         * gnulib/import/gettext.h: Update.
3015         * gnulib/import/gettimeofday.c: Update.
3016         * gnulib/import/glob-libc.h: Update.
3017         * gnulib/import/glob.c: Update.
3018         * gnulib/import/glob.in.h: Update.
3019         * gnulib/import/glob_internal.h: Update.
3020         * gnulib/import/glob_pattern_p.c: Update.
3021         * gnulib/import/globfree.c: Update.
3022         * gnulib/import/hard-locale.c: Update.
3023         * gnulib/import/hard-locale.h: Update.
3024         * gnulib/import/intprops.h: Update.
3025         * gnulib/import/inttypes.in.h: Update.
3026         * gnulib/import/isnan.c: Update.
3027         * gnulib/import/isnand-nolibm.h: Update.
3028         * gnulib/import/isnand.c: Update.
3029         * gnulib/import/isnanl-nolibm.h: Update.
3030         * gnulib/import/isnanl.c: Update.
3031         * gnulib/import/itold.c: Update.
3032         * gnulib/import/libc-config.h: Update.
3033         * gnulib/import/limits.in.h: Update.
3034         * gnulib/import/localcharset.c: Update.
3035         * gnulib/import/localcharset.h: Update.
3036         * gnulib/import/localtime-buffer.c: Update.
3037         * gnulib/import/localtime-buffer.h: Update.
3038         * gnulib/import/lstat.c: Update.
3039         * gnulib/import/m4/00gnulib.m4: Update.
3040         * gnulib/import/m4/__inline.m4: Update.
3041         * gnulib/import/m4/absolute-header.m4: Update.
3042         * gnulib/import/m4/alloca.m4: Update.
3043         * gnulib/import/m4/builtin-expect.m4: Update.
3044         * gnulib/import/m4/canonicalize.m4: Update.
3045         * gnulib/import/m4/chdir-long.m4: Update.
3046         * gnulib/import/m4/close.m4: Update.
3047         * gnulib/import/m4/closedir.m4: Update.
3048         * gnulib/import/m4/configmake.m4: Update.
3049         * gnulib/import/m4/d-ino.m4: Update.
3050         * gnulib/import/m4/d-type.m4: Update.
3051         * gnulib/import/m4/dirent_h.m4: Update.
3052         * gnulib/import/m4/dirfd.m4: Update.
3053         * gnulib/import/m4/dirname.m4: Update.
3054         * gnulib/import/m4/double-slash-root.m4: Update.
3055         * gnulib/import/m4/dup.m4: Update.
3056         * gnulib/import/m4/dup2.m4: Update.
3057         * gnulib/import/m4/eealloc.m4: Update.
3058         * gnulib/import/m4/environ.m4: Update.
3059         * gnulib/import/m4/errno_h.m4: Update.
3060         * gnulib/import/m4/error.m4: Update.
3061         * gnulib/import/m4/exponentd.m4: Update.
3062         * gnulib/import/m4/exponentl.m4: Update.
3063         * gnulib/import/m4/extensions.m4: Update.
3064         * gnulib/import/m4/extern-inline.m4: Update.
3065         * gnulib/import/m4/fchdir.m4: Update.
3066         * gnulib/import/m4/fcntl-o.m4: Update.
3067         * gnulib/import/m4/fcntl.m4: Update.
3068         * gnulib/import/m4/fcntl_h.m4: Update.
3069         * gnulib/import/m4/fdopendir.m4: Update.
3070         * gnulib/import/m4/filenamecat.m4: Update.
3071         * gnulib/import/m4/flexmember.m4: Update.
3072         * gnulib/import/m4/float_h.m4: Update.
3073         * gnulib/import/m4/fnmatch.m4: Update.
3074         * gnulib/import/m4/fnmatch_h.m4: Update.
3075         * gnulib/import/m4/fpieee.m4: Update.
3076         * gnulib/import/m4/frexp.m4: Update.
3077         * gnulib/import/m4/frexpl.m4: Update.
3078         * gnulib/import/m4/fstat.m4: Update.
3079         * gnulib/import/m4/fstatat.m4: Update.
3080         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3081         * gnulib/import/m4/getcwd-path-max.m4: Update.
3082         * gnulib/import/m4/getcwd.m4: Update.
3083         * gnulib/import/m4/getdtablesize.m4: Update.
3084         * gnulib/import/m4/getlogin.m4: Update.
3085         * gnulib/import/m4/getlogin_r.m4: Update.
3086         * gnulib/import/m4/getpagesize.m4: Update.
3087         * gnulib/import/m4/getprogname.m4: Update.
3088         * gnulib/import/m4/gettimeofday.m4: Update.
3089         * gnulib/import/m4/glibc21.m4: Update.
3090         * gnulib/import/m4/glob.m4: Update.
3091         * gnulib/import/m4/glob_h.m4: Update.
3092         * gnulib/import/m4/gnulib-cache.m4: Update.
3093         * gnulib/import/m4/gnulib-common.m4: Update.
3094         * gnulib/import/m4/gnulib-comp.m4: Update.
3095         * gnulib/import/m4/gnulib-tool.m4: Update.
3096         * gnulib/import/m4/hard-locale.m4: Update.
3097         * gnulib/import/m4/include_next.m4: Update.
3098         * gnulib/import/m4/inttypes-pri.m4: Update.
3099         * gnulib/import/m4/inttypes.m4: Update.
3100         * gnulib/import/m4/isnand.m4: Update.
3101         * gnulib/import/m4/isnanl.m4: Update.
3102         * gnulib/import/m4/largefile.m4: Update.
3103         * gnulib/import/m4/limits-h.m4: Update.
3104         * gnulib/import/m4/localcharset.m4: Update.
3105         * gnulib/import/m4/locale-fr.m4: Update.
3106         * gnulib/import/m4/locale-ja.m4: Update.
3107         * gnulib/import/m4/locale-zh.m4: Update.
3108         * gnulib/import/m4/localtime-buffer.m4: Update.
3109         * gnulib/import/m4/longlong.m4: Update.
3110         * gnulib/import/m4/lstat.m4: Update.
3111         * gnulib/import/m4/malloc.m4: Update.
3112         * gnulib/import/m4/malloca.m4: Update.
3113         * gnulib/import/m4/math_h.m4: Update.
3114         * gnulib/import/m4/mbrtowc.m4: Update.
3115         * gnulib/import/m4/mbsinit.m4: Update.
3116         * gnulib/import/m4/mbsrtowcs.m4: Update.
3117         * gnulib/import/m4/mbstate_t.m4: Update.
3118         * gnulib/import/m4/memchr.m4: Update.
3119         * gnulib/import/m4/memmem.m4: Update.
3120         * gnulib/import/m4/mempcpy.m4: Update.
3121         * gnulib/import/m4/memrchr.m4: Update.
3122         * gnulib/import/m4/mkdir.m4: Update.
3123         * gnulib/import/m4/mkstemp.m4: Update.
3124         * gnulib/import/m4/mmap-anon.m4: Update.
3125         * gnulib/import/m4/mode_t.m4: Update.
3126         * gnulib/import/m4/msvc-inval.m4: Update.
3127         * gnulib/import/m4/msvc-nothrow.m4: Update.
3128         * gnulib/import/m4/multiarch.m4: Update.
3129         * gnulib/import/m4/nocrash.m4: Update.
3130         * gnulib/import/m4/off_t.m4: Update.
3131         * gnulib/import/m4/onceonly.m4: Update.
3132         * gnulib/import/m4/open-cloexec.m4: Update.
3133         * gnulib/import/m4/open.m4: Update.
3134         * gnulib/import/m4/openat.m4: Update.
3135         * gnulib/import/m4/opendir.m4: Update.
3136         * gnulib/import/m4/pathmax.m4: Update.
3137         * gnulib/import/m4/rawmemchr.m4: Update.
3138         * gnulib/import/m4/readdir.m4: Update.
3139         * gnulib/import/m4/readlink.m4: Update.
3140         * gnulib/import/m4/realloc.m4: Update.
3141         * gnulib/import/m4/rename.m4: Update.
3142         * gnulib/import/m4/rewinddir.m4: Update.
3143         * gnulib/import/m4/rmdir.m4: Update.
3144         * gnulib/import/m4/save-cwd.m4: Update.
3145         * gnulib/import/m4/secure_getenv.m4: Update.
3146         * gnulib/import/m4/setenv.m4: Update.
3147         * gnulib/import/m4/signal_h.m4: Update.
3148         * gnulib/import/m4/ssize_t.m4: Update.
3149         * gnulib/import/m4/stat-time.m4: Update.
3150         * gnulib/import/m4/stat.m4: Update.
3151         * gnulib/import/m4/std-gnu11.m4: Update.
3152         * gnulib/import/m4/stdbool.m4: Update.
3153         * gnulib/import/m4/stddef_h.m4: Update.
3154         * gnulib/import/m4/stdint.m4: Update.
3155         * gnulib/import/m4/stdio_h.m4: Update.
3156         * gnulib/import/m4/stdlib_h.m4: Update.
3157         * gnulib/import/m4/strchrnul.m4: Update.
3158         * gnulib/import/m4/strdup.m4: Update.
3159         * gnulib/import/m4/strerror.m4: Update.
3160         * gnulib/import/m4/string_h.m4: Update.
3161         * gnulib/import/m4/strstr.m4: Update.
3162         * gnulib/import/m4/strtok_r.m4: Update.
3163         * gnulib/import/m4/sys_socket_h.m4: Update.
3164         * gnulib/import/m4/sys_stat_h.m4: Update.
3165         * gnulib/import/m4/sys_time_h.m4: Update.
3166         * gnulib/import/m4/sys_types_h.m4: Update.
3167         * gnulib/import/m4/tempname.m4: Update.
3168         * gnulib/import/m4/time_h.m4: Update.
3169         * gnulib/import/m4/unistd-safer.m4: Update.
3170         * gnulib/import/m4/unistd_h.m4: Update.
3171         * gnulib/import/m4/warn-on-use.m4: Update.
3172         * gnulib/import/m4/wchar_h.m4: Update.
3173         * gnulib/import/m4/wchar_t.m4: Update.
3174         * gnulib/import/m4/wctype_h.m4: Update.
3175         * gnulib/import/m4/wint_t.m4: Update.
3176         * gnulib/import/malloc.c: Update.
3177         * gnulib/import/malloc/scratch_buffer.h: Update.
3178         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3179         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3180         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3181         * gnulib/import/malloca.c: Update.
3182         * gnulib/import/malloca.h: Update.
3183         * gnulib/import/malloca.valgrind: Update.
3184         * gnulib/import/math.in.h: Update.
3185         * gnulib/import/mbrtowc.c: Update.
3186         * gnulib/import/mbsinit.c: Update.
3187         * gnulib/import/mbsrtowcs-impl.h: Update.
3188         * gnulib/import/mbsrtowcs-state.c: Update.
3189         * gnulib/import/mbsrtowcs.c: Update.
3190         * gnulib/import/memchr.c: Update.
3191         * gnulib/import/memmem.c: Update.
3192         * gnulib/import/mempcpy.c: Update.
3193         * gnulib/import/memrchr.c: Update.
3194         * gnulib/import/mkdir.c: Update.
3195         * gnulib/import/mkstemp.c: Update.
3196         * gnulib/import/msvc-inval.c: Update.
3197         * gnulib/import/msvc-inval.h: Update.
3198         * gnulib/import/msvc-nothrow.c: Update.
3199         * gnulib/import/msvc-nothrow.h: Update.
3200         * gnulib/import/open.c: Update.
3201         * gnulib/import/openat-die.c: Update.
3202         * gnulib/import/openat-priv.h: Update.
3203         * gnulib/import/openat-proc.c: Update.
3204         * gnulib/import/openat.c: Update.
3205         * gnulib/import/openat.h: Update.
3206         * gnulib/import/opendir.c: Update.
3207         * gnulib/import/pathmax.h: Update.
3208         * gnulib/import/pipe-safer.c: Update.
3209         * gnulib/import/rawmemchr.c: Update.
3210         * gnulib/import/readdir.c: Update.
3211         * gnulib/import/readlink.c: Update.
3212         * gnulib/import/realloc.c: Update.
3213         * gnulib/import/ref-add.sin: Update.
3214         * gnulib/import/ref-del.sin: Update.
3215         * gnulib/import/rename.c: Update.
3216         * gnulib/import/rewinddir.c: Update.
3217         * gnulib/import/rmdir.c: Update.
3218         * gnulib/import/same-inode.h: Update.
3219         * gnulib/import/save-cwd.c: Update.
3220         * gnulib/import/save-cwd.h: Update.
3221         * gnulib/import/scratch_buffer.h: Update.
3222         * gnulib/import/secure_getenv.c: Update.
3223         * gnulib/import/setenv.c: Update.
3224         * gnulib/import/signal.in.h: Update.
3225         * gnulib/import/stat-time.c: Update.
3226         * gnulib/import/stat-time.h: Update.
3227         * gnulib/import/stat-w32.c: Update.
3228         * gnulib/import/stat-w32.h: Update.
3229         * gnulib/import/stat.c: Update.
3230         * gnulib/import/stdbool.in.h: Update.
3231         * gnulib/import/stddef.in.h: Update.
3232         * gnulib/import/stdint.in.h: Update.
3233         * gnulib/import/stdio.in.h: Update.
3234         * gnulib/import/stdlib.in.h: Update.
3235         * gnulib/import/str-two-way.h: Update.
3236         * gnulib/import/strchrnul.c: Update.
3237         * gnulib/import/strdup.c: Update.
3238         * gnulib/import/streq.h: Update.
3239         * gnulib/import/strerror-override.c: Update.
3240         * gnulib/import/strerror-override.h: Update.
3241         * gnulib/import/strerror.c: Update.
3242         * gnulib/import/string.in.h: Update.
3243         * gnulib/import/stripslash.c: Update.
3244         * gnulib/import/strnlen1.c: Update.
3245         * gnulib/import/strnlen1.h: Update.
3246         * gnulib/import/strstr.c: Update.
3247         * gnulib/import/strtok_r.c: Update.
3248         * gnulib/import/sys_stat.in.h: Update.
3249         * gnulib/import/sys_time.in.h: Update.
3250         * gnulib/import/sys_types.in.h: Update.
3251         * gnulib/import/tempname.c: Update.
3252         * gnulib/import/tempname.h: Update.
3253         * gnulib/import/time.in.h: Update.
3254         * gnulib/import/unistd--.h: Update.
3255         * gnulib/import/unistd-safer.h: Update.
3256         * gnulib/import/unistd.in.h: Update.
3257         * gnulib/import/unsetenv.c: Update.
3258         * gnulib/import/verify.h: Update.
3259         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3260         * gnulib/import/wchar.in.h: Update.
3261         * gnulib/import/wctype.in.h: Update.
3262         * gnulib/import/xalloc-oversized.h: Update.
3263         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3264         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3265
3266 2018-08-16  Gary Benson <gbenson@redhat.com>
3267
3268         PR gdb/13000:
3269         * gdb/main.c (captured_main_1): Exit with nonzero status
3270         in batch mode if the last command to be executed failed.
3271         * NEWS: Mention the above.
3272
3273 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3274
3275         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3276         end of warning message.
3277
3278 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3279
3280         PR gdb/22943:
3281         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3282         (aarch64_extract_return_value): Use
3283         aapcs_is_vfp_call_or_return_candidate.
3284         (aarch64_return_in_memory): Likewise.
3285         (aarch64_store_return_value): Likewise.
3286
3287 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3288
3289         * aarch64-tdep.c
3290         (aapcs_is_vfp_call_or_return_candidate): Make static
3291         (pass_in_v_or_stack): Remove function.
3292         (pass_in_v_vfp_candidate): New function.
3293         (aarch64_push_dummy_call): Check for float register candidates.
3294
3295 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3296
3297         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3298         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3299         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3300
3301 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3302
3303         PR build/23399
3304         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3305         (struct ipa_sym_addresses): Rename to...
3306         (struct ipa_sym_addresses_common): ... this.
3307         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3308
3309 2018-08-28  Tom Tromey  <tom@tromey.com>
3310
3311         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3312         (token_fifo): Now a std::vector.
3313         (yylex, c_parse): Update.
3314         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3315         (token_fifo): Now a std::vector.
3316         (yylex, d_parse): Update.
3317         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3318         (token_fifo): Now a std::vector.
3319         (yylex, go_parse): Update.
3320
3321 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3322
3323         * parser-defs.h (struct type_stack) <elements>: Change type to
3324         std::vector<union type_stack_elt>.
3325         <depth, size>: Remove.
3326         * parse.c (parse_exp_in_context_1): Adjust.
3327         (type_stack_reserve): Remove.
3328         (check_type_stack_depth): Remove.
3329         (insert_into_type_stack): Adjust to std::vector.
3330         (insert_type): Likewise.
3331         (push_type): Likewise.
3332         (push_type_int): Likewise.
3333         (insert_type_address_space): Likewise.
3334         (pop_type): Likewise.
3335         (pop_type_int): Likewise.
3336         (pop_typelist): Likewise.
3337         (pop_type_stack): Likewise.
3338         (append_type_stack): Likewise.
3339         (push_type_stack): Likewise.
3340         (get_type_stack): Likewise.
3341         (type_stack_cleanup): Likewise.
3342         (push_typelist): Likewise.
3343         (follow_types): Likewise.
3344         (_initialize_parse): Likewise.
3345
3346 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3347
3348         * NEWS: Mention csky target.
3349
3350 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3351             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3352             Don Breazeal  <donb@codesourcery.com>
3353
3354         * csky-linux-tdep.c: New file.
3355         * csky-tdep.c: Likewise.
3356         * csky-tdep.h: Likewise.
3357         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3358         csky-tdep.o.
3359         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3360         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3361         * configure.tgt: Add csky support.
3362
3363 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3364
3365         * python/py-framefilter.c (py_print_frame): Print frame architecture
3366         when printing on an MI output.
3367
3368 2018-08-27  Tom Tromey  <tom@tromey.com>
3369
3370         PR build/23087:
3371         * configure: Rebuild.
3372         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3373
3374 2018-08-27  Tom Tromey  <tom@tromey.com>
3375
3376         * aarch64-linux-tdep.c
3377         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3378         casts to int.
3379
3380 2018-08-27  Tom Tromey  <tom@tromey.com>
3381
3382         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3383         unsigned.
3384         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3385         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3386         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3387         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3388         unsigned.
3389
3390 2018-08-27  Tom Tromey  <tom@tromey.com>
3391
3392         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3393         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3394
3395 2018-08-27  Tom Tromey  <tom@tromey.com>
3396
3397         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3398         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3399         ULONGEST_MAX.
3400         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3401         ULONGEST_MAX.
3402         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3403         ULONGEST_MAX.
3404         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3405         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3406         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3407         ULONGEST_MAX.
3408         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3409         (ppc64_linux_sigaction_tramp_frame)
3410         (ppc32_linux_sighandler_tramp_frame)
3411         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3412         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3413         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3414         * mn10300-linux-tdep.c (am33_linux_sigframe)
3415         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3416         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3417         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3418         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3419         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3420         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3421         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3422         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3423         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3424         * microblaze-linux-tdep.c
3425         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3426         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3427         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3428         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3429         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3430         * common/common-types.h (ULONGEST_MAX): New define.
3431         (CORE_ADDR_MAX): Fix formatting.
3432         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3433         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3434         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3435         (arm_linux_rt_sigreturn_tramp_frame)
3436         (arm_eabi_linux_sigreturn_tramp_frame)
3437         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3438         (thumb2_eabi_linux_sigreturn_tramp_frame)
3439         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3440         (arm_linux_restart_syscall_tramp_frame)
3441         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3442         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3443         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3444         ULONGEST_MAX.
3445         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3446
3447 2018-08-27  Tom Tromey  <tom@tromey.com>
3448
3449         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3450         CORE_ADDR_MAX.
3451         * mips-tdep.c (mips_deal_with_atomic_sequence)
3452         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3453         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3454         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3455         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3456         CORE_ADDR_MAX.
3457         * aarch64-tdep.c (aarch64_software_single_step): Use
3458         CORE_ADDR_MAX.
3459
3460 2018-08-27  Tom Tromey  <tom@tromey.com>
3461
3462         * linespec.c (complete_linespec_component): Add cast to "char".
3463         * completer.c (completion_tracker::build_completion_result): Add
3464         cast to "char".
3465
3466 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3467
3468         * solist.h (struct solist, struct target_so_ops): Fix
3469         indentation.
3470
3471 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3472
3473         * ada-tasks.c (ada_task_info_s): Remove typedef.
3474         (DEF_VEC_O(ada_task_info_s)): Remove.
3475         (struct ada_tasks_inferior_data): Initialize fields.
3476         <task_list>: Make an std::vector.
3477         (get_ada_tasks_inferior_data): Allocate with new.
3478         (ada_get_task_number): Adjust.
3479         (get_task_number_from_id): Likewise.
3480         (valid_task_id): Likewise.
3481         (ada_get_task_info_from_ptid): Likewise.
3482         (iterate_over_live_ada_tasks): Likewise.
3483         (add_ada_task): Likewise.
3484         (read_known_tasks): Likewise.
3485         (ada_build_task_list): Likewise.
3486         (print_ada_task_info): Likewise.
3487         (info_task): Likewise.
3488         (task_command_1): Likewise.
3489
3490 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3491
3492         * ada-lang.c (add_angle_brackets): Return std::string.
3493
3494 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3495
3496         * python/py-threadevent.c (py_get_event_thread): Initialize
3497         pythread.
3498
3499 2018-08-24  Pedro Alves  <palves@redhat.com>
3500
3501         * python/py-bpevent.c (create_breakpoint_event_object): Use
3502         copy-initialization.
3503         * python/py-continueevent.c (emit_continue_event): Use
3504         copy-initialization.
3505         * python/py-exitedevent.c (create_exited_event_object): Return a
3506         gdbpy_ref<>.
3507         (emit_exited_event): Use copy-initialization.
3508         * python/py-inferior.c (python_new_inferior)
3509         (python_inferior_deleted, add_thread_object): Use
3510         copy-initialization.
3511         * python/py-infevents.c (create_inferior_call_event_object)
3512         (create_register_changed_event_object)
3513         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3514         (emit_inferior_call_event, emit_memory_changed_event)
3515         (emit_register_changed_event): Use copy-initialization.
3516         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3517         Return a gdbpy_ref<>.
3518         (emit_new_objfile_event): Use copy-initialization.
3519         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3520         (emit_clear_objfiles_event): Use copy-initialization.
3521         * python/py-signalevent.c (create_signal_event_object): Use
3522         copy-initialization.
3523         * python/py-threadevent.c (create_thread_event_object): Use
3524         copy-initialization.
3525
3526 2018-08-24  Pedro Alves  <palves@redhat.com>
3527             Simon Marchi  <simon.marchi@ericsson.com>
3528
3529         PR gdb/23379
3530         * python/py-continueevent.c: Include "gdbthread.h".
3531         (create_continue_event_object): Add intro comment.  Add 'ptid'
3532         parameter.  Use it to find thread to pass to
3533         create_thread_event_object.
3534         (emit_continue_event): Pass PTID down to
3535         create_continue_event_object.
3536         * python/py-event.h (py_get_event_thread): Declare.
3537         (create_thread_event_object): Remove default from 'thread'
3538         parameter.
3539         * python/py-stopevent.c (create_stop_event_object): Use
3540         py_get_event_thread.
3541         * python/py-threadevent.c (get_event_thread): Rename to ...
3542         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3543         and use it to find the thread.
3544         (create_thread_event_object): Assert that THREAD isn't null.
3545         Don't find the event thread here.
3546
3547 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3548
3549         * block.h (blockrange, blockranges): New struct declarations.
3550         (struct block): Add new field named `ranges'.
3551         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3552         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3553         macros for accessing ranges in struct block.
3554         (make_blockranges): New declaration.
3555         block.c (make_blockranges): New function.
3556         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3557         for block.
3558         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3559         * blockframe.c (cache_pc_function_block): New static global.
3560         (clear_pc_function_cache): Clear cache_pc_function_block.
3561         (find_pc_partial_function): Move comment to symtab.h.  Add
3562         support for non-contiguous blocks.
3563         * cli/cli-cmds.c (block.h): Include.
3564         (print_disassembly): Handle printing of non-contiguous blocks.
3565         (disassemble_current_function): Likewise.
3566         (disassemble_command): Likewise.
3567
3568         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3569         BLOCK_START.
3570         * blockframe.c (get_pc_function_start): Likewise.
3571         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3572         (gcc_symbol_address): Likewise.
3573         * compile/compile-object-run.c (compile_object_run): Likewise.
3574         * compile/compile.c (get_expr_block_and_pc): Likewise.
3575         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3576         (func_addr_to_tail_call_list): Likewise.
3577         * findvar.c (default_read_var_value): Likewise.
3578         * inline-frame.c (inline_frame_this_id): Likewise.
3579         (skip-inline_frames): Likewise.
3580         * infcmd.c (until_next_command): Likewise.
3581         * linespec.c (convert_linespec_to_sals): Likewise.
3582         * parse.c (parse_exp_in_context_1): Likewise.
3583         * printcmd.c (build_address_symbolic): likewise.
3584         (info_address_command): Likewise.
3585         symtab.c (find_function_start_sal): Likewise.
3586         (skip_prologue_sal): Likewise.
3587         (find_function_alias_target): Likewise.
3588         (find_gnu_ifunc): Likewise.
3589         * stack.c (find_frame_funname): Likewise.
3590         * symtab.c (fixup_symbol_section): Likewise.
3591         (find_function_start_sal): Likewise.
3592         (skip_prologue_sal): Likewsie.
3593         (find_function_alias_target): Likewise.
3594         (find_gnu_ifunc): Likewise.
3595         * tracepoint.c (info_scope_command): Likewise.
3596         * value.c (value_fn_field): Likewise.
3597
3598         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3599         in place of find_pc_partial_function.
3600         * blockframe.c (find_function_entry_range_from_pc): New function.
3601         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3602         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3603         for each range in a block.
3604
3605
3606 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3607
3608         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3609         incrementation.
3610
3611 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3612
3613         * solib-svr4.c (read_program_headers_from_bfd): Return
3614         gdb::optional<gdb::byte_vector>.
3615         (svr4_exec_displacement): Adjust.
3616
3617 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3618
3619         * solib-svr4.c (read_program_header): Return
3620         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3621         (find_program_interpreter): Return
3622         gdb::optional<gdb::byte_vector>.
3623         (scan_dyntag_auxv): Adjust.
3624         (enable_break): Adjust.
3625         (svr4_exec_displacement): Adjust.
3626
3627 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3628
3629         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3630         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3631
3632 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3633
3634         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3635         string_vprintf.
3636         * guile/scm-utils.c (gdbscm_printf): Likewise.
3637         * serial.c (serial_printf): Likewise.
3638         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3639
3640 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3641
3642         * stack.c (print_frame): Print frame architecture when printing on
3643         an MI output.
3644         * NEWS: Mention new "arch" attribute in frame output.
3645
3646 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3647
3648         * arch/aarch64.h (aarch64_regnum): Update comment.
3649
3650 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3651
3652         * NEWS: Add SVE to 8.2 section.
3653
3654 2018-08-21  Pedro Alves  <palves@redhat.com>
3655
3656         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3657         out from gdbscm_parse_function_args.
3658         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3659         gdbscm_parse_function_args_1.
3660
3661 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3662
3663         PR gdb/17816
3664         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3665         operator.
3666
3667 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3668
3669         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3670
3671 2018-08-19  Michael Spang  <spang@google.com>
3672
3673         PR gdb/11786
3674         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3675         for PT_TLS segments.
3676
3677 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3678
3679         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3680         dwarf_variable_value.
3681         * dwarf2-frame.c (class dwarf_expr_executor):
3682         Add override for dwarf_variable_value.
3683         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3684         (class symbol_needs_eval_context): Likewise.
3685         (indirect_synthetic_pointer): Add forward declaration.
3686         (sect_variable_value): New function.
3687         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3688         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3689         for DW_OP_GNU_variable_value.
3690
3691 2018-08-16  Tom Tromey  <tom@tromey.com>
3692
3693         * top.c (read_command_file): Update.
3694         (command_line_input): Remove "repeat" argument.
3695         * ada-lang.c (get_selections): Update.
3696         * linespec.c (decode_line_2): Update.
3697         * defs.h (command_line_input): Remove argument.
3698         * cli/cli-script.c (read_next_line): Update.
3699         * python/py-gdb-readline.c: Update.
3700
3701 2018-08-17  Tom Tromey  <tom@tromey.com>
3702
3703         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3704         command_line_input.
3705
3706 2018-08-15  Tom Tromey  <tom@tromey.com>
3707
3708         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3709
3710 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3711
3712         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3713         If used, use find_pc_partial_function to find address range
3714         to disassemble.
3715         * mi/mi-main.c (mi_cmd_list_features): Report
3716         "data-disassemble-a-option" feature.
3717         * NEWS: Mention new -data-disassemble option -a.
3718
3719 2018-08-13  Tom Tromey  <tom@tromey.com>
3720
3721         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3722
3723 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3724
3725         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3726         (aarch64_linux_collect_sve_regset): Likewise.
3727         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3728         * regcache.h (regcache_map_entry_size): New function.
3729
3730 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3731
3732         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3733         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3734         (SVE_HEADER_VL_LENGTH): Likewise.
3735         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3736         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3737         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3738         (SVE_HEADER_SIZE_OFFSET): Likewise.
3739         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3740         (SVE_HEADER_VL_OFFSET): Likewise.
3741         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3742         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3743         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3744         (SVE_HEADER_SIZE): Likewise.
3745         (aarch64_linux_core_read_vq): Add function.
3746         (aarch64_linux_core_read_description): Check for SVE section.
3747
3748 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3749
3750         * aarch64-fbsd-tdep.c
3751         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3752         collect_size.
3753         * aarch64-linux-tdep.c
3754         (aarch64_linux_iterate_over_regset_sections): Likewise.
3755         * alpha-linux-tdep.c
3756         (alpha_linux_iterate_over_regset_sections):
3757         * alpha-nbsd-tdep.c
3758         (alphanbsd_iterate_over_regset_sections): Likewise.
3759         * amd64-fbsd-tdep.c
3760         (amd64fbsd_iterate_over_regset_sections): Likewise.
3761         * amd64-linux-tdep.c
3762         (amd64_linux_iterate_over_regset_sections): Likewise.
3763         * arm-bsd-tdep.c
3764         (armbsd_iterate_over_regset_sections): Likewise.
3765         * arm-fbsd-tdep.c
3766         (arm_fbsd_iterate_over_regset_sections): Likewise.
3767         * arm-linux-tdep.c
3768         (arm_linux_iterate_over_regset_sections): Likewise.
3769         * corelow.c (get_core_registers_cb): Likewise.
3770         (core_target::fetch_registers): Likewise.
3771         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3772         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3773         * gdbarch.h (void): Regenerate.
3774         * gdbarch.sh: Add supply_size and collect_size.
3775         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3776         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3777         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3778         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3779         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3780         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3781         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3782         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3783         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3784         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3785         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3786         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3787         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3788         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3789         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3790         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3791         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3792         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3793         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3794         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3795         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3796         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3797         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3798         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3799         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3800         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3801         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3802         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3803         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3804         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3805
3806 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3807
3808         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3809         with string_printf.
3810
3811 2018-08-10  Keith Seitz  <keiths@redhat.com>
3812
3813         * compile/compile-c-support.c (add_code_header, add_code_footer):
3814         Move into policy class.
3815         (c_push_user_expression, pop_user_expression_nop)
3816         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3817         (compile_program): New host class.
3818         (c_compile_program): New typedef.
3819         (c_compute_porgram): Use c_compile_program.
3820
3821 2018-08-10  Keith Seitz  <keiths@redhat.com>
3822
3823         * compile/compile-internal.h (compile_instance::~compile_instance):
3824         Remove calls to htab_delete.
3825         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3826         * compile.c (compile_instance::compile_instance): Initialize
3827         htab unique pointers.
3828         (compile_instance::get_cached_type, compile_instance::insert_type)
3829         (compile_instance::error_symbol_once): Update for unique_ptr.
3830
3831 2018-08-10  Keith Seitz  <keiths@redhat.com>
3832
3833         * compile/compile-c-symbols.c (struct symbol_error)
3834         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3835         (compile_instance::insert_symbol_error)
3836         (compile_instance::error_symbol_once): Move to ...
3837         * compile/compile.c: ... here.
3838
3839 2018-08-10  Keith Seitz  <keiths@redhat.com>
3840
3841         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3842         instead of `new_compile_instance'.
3843         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3844         Update description.
3845         If the symbol error map is not initialized, create it.
3846         (generate_c_for_for_one_symbol): Do not check/initialize
3847         the symbol error map.
3848         * compile/compile-c-types.c (compile_c_instance): Make a class.
3849         Update all callers.
3850         (compile_instance::compile_instance): Initialize the type cache.
3851         (get_cached_type): New function.
3852         (insert_type): Update description.
3853         (compile_c_instance::m_default_cflags): Define.
3854         (convert_type): Update description.  Use get_cached_type.
3855         (delete_instance): Moved to destructor.
3856         (new_compile_instance): Moved to constructor.
3857         * compile/compile-c.h (compile_c_instance): Make class inheriting
3858         from compile_instance.
3859         <base>: Remove field.
3860         <type_map, symbol_err_map>: Move to base class.
3861         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3862         * compile/compile-internal.h (compile_instance): Make class.
3863         <type_map_t, symbol_err_map_t>: Define.
3864         <fe>: Rename to `m_gcc_fe'.
3865         <scope, block, gcc_target_options>: Add `m_' prefix.
3866         <m_type_map, m_symbol_err_map>: New fields, moved from
3867         compile_c_instance.
3868         <destroy>: Remove.
3869         (convert_type, new_compile_instance): Remove.
3870         * compile/compile.c (cleanup_compile_instance): Remove.
3871         (compile_to_object): Use unique_ptr to eliminate cleanups.
3872         (compile_instance::set_print_callback, compile_instance::version)
3873         (compile_instance::set_verbose)
3874         (compile_instance::set_driver_filename)
3875         (compile_instance::set_triplet_regexp)
3876         (compile_instance::set_arguments)
3877         (compile_instance::set_source_file)
3878         (compile_instance::compile): Define.
3879
3880 2018-08-10  Keith Seitz  <keiths@redhat.com>
3881
3882         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3883         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3884         gcc-c-fe.def to define C plugin.
3885         (delete_instance): Delete `c_plugin'.
3886         (new_compile_instance): Initialize `c_plugin'.
3887         * compile/compile-c.h: Include gcc_c_plugin.h.
3888         (struct compile_c_instance) <c_plugin>: New member.
3889         * gcc-c-plugin.h: New file.
3890         Update all callers with API change.
3891
3892 2018-08-10  Keith Seitz  <keiths@redhat.com>
3893
3894         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3895         (HFILES_NO_SRCDIR): ... to here.
3896         Add compile-internal.h and compile-c.h.
3897         * compile/compile-c-support.c: Include compile-c.h.
3898         * compile/compile-c-symbols.c: Include compile-c.h.
3899         (generate_c_for_variable_locations): Update comment.
3900         * compile/compile-c-types.c: Include compile-c.h.
3901         * compile/compile-c.h: New file -- moved C language declarations
3902         from other files here.
3903         * compile/compile-internal.h: Do not include hashtab.h or
3904         common/enum-flags.h.
3905         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3906         (gcc_convert_symbol, gcc_symbol_address)
3907         (generate_c_for_variable_locations, c_get_mode_for_size)
3908         (c_get_range_decl_name): Definitions moved to compile-c.h.
3909         * compile/compile-loc2c.c: Include compile-c.h.
3910
3911 2018-08-10  Keith Seitz  <keiths@redhat.com>
3912
3913         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3914         (c_symbol_substitution_name): ... this.
3915         Update all callers.
3916
3917 2018-08-10  Keith Seitz  <keiths@redhat.com>
3918
3919         * compile/compile-c-support.c (c_compute_program): Use
3920         unique_xmalloc_ptr to eliminate cleanup.
3921         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3922         Return a unique_xmalloc_ptr and eliminate cleanup.
3923         * compile/compile-internal.h (generate_c_for_variable_locations):
3924         Return unique_xmalloc_ptr and update description.
3925
3926 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3927
3928         * corelow.c (core_target::get_core_register_section): Rename
3929         min_size to section_min_size.
3930
3931 2018-08-09  Jim Wilson  <jimw@sifive.com>
3932
3933         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3934         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3935         * NEWS: Mention new GNU/Linux RISC-V target.
3936         * configure.host: Add riscv*-*-linux*.
3937         * configure.nat: Add riscv*.
3938         * configure.tgt: Add riscv*-*-linux*.
3939         * riscv-linux-nat.c: New file.
3940         * riscv-linux-tdep.c: New file.
3941
3942 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3943
3944         * infrun.c (resume): Make static, add forward declaration.
3945         (proceed): Update header comment.
3946         * infrun.h (resume): Delete declaration.
3947
3948 2018-08-09  Tom Tromey  <tom@tromey.com>
3949
3950         * riscv-tdep.h: Minor formatting fixes.
3951
3952 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3953
3954         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3955         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3956         (test_mkdir_recursive): Likewise.
3957         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3958
3959 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3960
3961         * valarith.c (value_subscripted_rvalue): If an array is not in
3962         memory, and we don't know the upper bound, then we can't know that
3963         the requested element exists or not.
3964
3965 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3966
3967         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3968         (target_options_to_string): Add comment.
3969
3970 2018-08-08  Tom Tromey  <tom@tromey.com>
3971
3972         * unittests/scoped_mmap-selftests.c: Check result of "write".
3973
3974 2018-08-08  Jim Wilson  <jimw@sifive.com>
3975
3976         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3977         (decode_register_index_short): New.
3978         (decode_j_type_insn, decode_cj_type_insn): New.
3979         (decode_b_type_insn, decode_cb_type_insn): New.
3980         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3981         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3982         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3983         is_c_sw_insn instead of is_sw_insn.
3984         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3985         (riscv_software_single_step): New.
3986         * riscv-tdep.h (riscv_software_single_step): Declare.
3987
3988         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3989         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3990
3991 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3992
3993         PR gdb/18050:
3994         * target.c (dispose_inferior): Don't dispose of inferiors that are
3995         already killed.
3996
3997 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3998
3999         * remote.c (remote_target::download_tracepoint): Change char* to
4000         const char*.
4001
4002 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4003
4004         * target.h (target_options_to_string): Return an std::string.
4005         * target.c (str_comma_list_concat_elem): Return void, use
4006         std::string.
4007         (do_option): Likewise.
4008         (target_options_to_string): Return an std::string.
4009         * linux-nat.c (linux_nat_target::wait): Adjust.
4010         * target-debug.h (target_debug_print_options): Adjust.
4011
4012 2018-08-07  Tom Tromey  <tom@tromey.com>
4013
4014         * Makefile.in (CPPFLAGS): New variable.
4015         (INTERNAL_CPPFLAGS): Use it.
4016
4017 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4018
4019         * NEWS: Mention the index cache.
4020
4021 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4022
4023         * common/pathstuff.h (get_standard_cache_dir): New.
4024         * common/pathstuff.c (get_standard_cache_dir): New.
4025         * build-id.h (build_id_to_string): New.
4026         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4027         DEBUG_STR_SUFFIX): Move to here.
4028         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4029         DEBUG_STR_SUFFIX): Move from there.
4030         (write_psymtabs_to_index): Make non-static, add basename
4031         parameter.  Write to temporary files, rename when done.
4032         (save_gdb_index_command): Adjust call to
4033         write_psymtabs_to_index.
4034         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4035         field.
4036         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4037         (get_gdb_index_contents_from_cache): New.
4038         (get_gdb_index_contents_from_cache_dwz): New.
4039         (dwarf2_initialize_objfile): Read index from cache.
4040         (dwarf2_build_psymtabs): Save to index.
4041         * dwarf-index-cache.h: New file.
4042         * dwarf-index-cache.c: New file.
4043         * dwarf-index-write.h: New file.
4044
4045 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4046
4047         * gnulib/aclocal.m4: Re-generate.
4048         * gnulib/config.in: Re-generate.
4049         * gnulib/configure: Re-generate.
4050         * gnulib/import/Makefile.am: Re-generate.
4051         * gnulib/import/Makefile.in: Re-generate.
4052         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4053         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4054         * gnulib/import/m4/mkdir.m4: New file.
4055         * gnulib/import/mkdir.c: New file.
4056         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4057         module.
4058
4059 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4060
4061         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4062         * common/scoped_mmap.c: New file.
4063         * common/scoped_mmap.h (destroy): New method.
4064         (~scoped_mmap, reset): Use destroy.
4065         (scoped_mmap): New move constructor.
4066         (mmap_file): New declaration.
4067         * unittests/scoped_mmap-selftests.c (test_normal,
4068         test_invalid_filename, run_tests): New functions.
4069         (_initialize_scoped_mmap_selftests): Register selftest.
4070
4071 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4072
4073         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4074         (read_gdb_index_from_buffer): ... this.  Remove section
4075         parameter, add buffer parameter.
4076         (get_gdb_index_contents_ftype,
4077         get_gdb_index_contents_dwz_ftype): New typedefs.
4078         (dwarf2_read_gdb_index): Add callback parameters to get the
4079         index contents.
4080         (get_gdb_index_contents_from_section): New.
4081         (dwarf2_initialize_objfile): Update call to
4082         dwarf2_read_gdb_index.
4083
4084 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4085
4086         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4087         (gdb_open_cloexec): Likewise.
4088         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4089         (commandline_from_pid): Likewise.
4090         (linux_xfer_osdata_threads): Likewise.
4091         (linux_xfer_osdata_fds): Likewise.
4092         * ada-lang.c (is_package_name): Likewise.
4093         * auxv.c (procfs_xfer_auxv): Likewise.
4094         * breakpoint.c (print_one_breakpoint_location): Use
4095         uiout::field_fmt.
4096         (print_one_catch_solib): Use string_printf.
4097         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4098         (add_pe_forwarded_sym): Likewise.
4099         * dwarf2read.c (create_type_unit_group): Likewise.
4100         (build_error_marker_type): Likewise.
4101         * infcall.c (get_function_name): Likewise.
4102         * valprint.c (print_converted_chars_to_obstack): Likewise.
4103         * xtensa-tdep.c (xtensa_register_type): Likewise.
4104
4105 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4106
4107         * remote.c (remote_target::download_tracepoint): Fix format
4108         string errors.
4109
4110 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4111
4112         * tracefile.c: Include common/byte-vector.h.
4113         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4114         with trace_regblock_size if needed.  Update uses of buf.
4115
4116 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4117
4118         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4119         std::vector<unsigned char>.
4120         * tracepoint.c (collection_list::collection_list): Remove
4121         m_regs_mask initializer from initializer list.  Resize
4122         m_regs_mask using the largest remote register number.
4123         (collection_list::add_remote_register): Remove size check on
4124         m_regs_mask.  Use at to access element.
4125         (collection_list::stringify): Change type of temp_buf to
4126         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4127         stringify the register mask.  Use pack_hex_byte for the register
4128         mask.
4129
4130 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4131
4132         * tracepoint.h (class collection_list) <add_register>: Remove.
4133         <add_remote_register, add_ax_registers, add_local_register>:
4134         Declare.
4135         <add_memrange>: Add scope parameter.
4136         * tracepoint.c (encode_actions_1): Likewise.
4137         (collection_list::add_register): Rename to ...
4138         (collection_list::add_remote_register): ... this.  Update
4139         comment.
4140         (collection_list::add_ax_registers, add_local_register): New
4141         methods.
4142         (collection_list::add_memrange): Add scope parameter.  Call
4143         add_local_register instead of add_register.
4144         (finalize_tracepoint_aexpr): New function.
4145         (collection_list::collect_symbol): Update calls to add_memrange.
4146         Call add_local_register instead of add_register.  Call
4147         add_ax_registers.  Call finalize_tracepoint_aexpr.
4148         (encode_actions_1): Get remote regnos for $reg action.  Call
4149         add_remote_register, add_ax_registers, and add_local_register.
4150         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4151         (validate_actionline): Call finalize_tracepoint_aexpr.
4152
4153 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4154
4155         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4156         Replace array buf with gdb::char_vector buf, of size
4157         get_remote_packet_size ().  Replace references to buf and
4158         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4159         and xsnprintf with snprintf.  Raise errors if the buffer is too
4160         small.
4161
4162 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4163
4164         * remote.c (remote_target::download_tracepoint): Fix the has_more
4165         predicate in the QTDP action list iteration.
4166
4167 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4168
4169         * remote.c (remote_target::download_tracepoint): Fix indentation
4170         in for block.
4171
4172 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4173
4174         * proc-api.c (_initialize_proc_api): Remove c, unused.
4175         * procfs.c (procfs_init_inferior): Remove signals, unused.
4176         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4177         unused.
4178
4179 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4180             Andrew Burgess  <andrew.burgess@embecosm.com>
4181
4182         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4183         'W_STOPCODE (0)' as this could be ambiguous.
4184
4185 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4186
4187         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4188         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4189         "ai_socktype").
4190
4191 2018-08-02  Tom Tromey  <tom@tromey.com>
4192
4193         PR symtab/16842.
4194         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4195         symbols.
4196         (process_structure_scope): Likewise.
4197
4198 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4199
4200         PR gdb/22629:
4201         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4202         kill inferior.
4203
4204 2018-08-02  Tom Tromey  <tom@tromey.com>
4205
4206         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4207         (darwin_suspend_inferior, darwin_resume_inferior)
4208         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4209         (darwin_check_new_threads): Check result of get_darwin_inferior.
4210
4211 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4212
4213         GDB 8.1.1 released.
4214
4215 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4216
4217         * varobj.c (varobj_get_path_expr_parent): Report an error if
4218         parent is a dynamic varobj.
4219
4220 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4221
4222         * gnulib/aclocal.m4: Re-generate.
4223         * gnulib/config.in: Re-generate.
4224         * gnulib/configure: Re-generate.
4225         * gnulib/import/Makefile.in: Re-generate.
4226         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4227         * gnulib/import/m4/onceonly.m4: Re-generate.
4228
4229 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4230
4231         * target-descriptions.c (struct xml_test_tdesc): New.
4232         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4233         (record_xml_tdesc): Update.
4234         (maintenance_check_xml_descriptions): Update.
4235         * target-descriptions.h (record_xml_tdesc): Update comment.
4236
4237 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4238
4239         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4240         checking array bounds are defined.
4241
4242 2018-07-30  Tom Tromey  <tom@tromey.com>
4243
4244         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4245         irreflexivity violation.
4246
4247 2018-07-30  Tom Tromey  <tom@tromey.com>
4248
4249         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4250         * value.c (unpack_long): Remove lint code.
4251         * valops.c (value_ind): Remove lint code.
4252         * valarith.c (value_x_binop, value_x_unop, value_equal)
4253         (value_pos): Remove lint code.
4254
4255 2018-07-28  Tom de Vries  <tdevries@suse.de>
4256
4257         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4258         with undefined upper bound as <optimized out>.
4259
4260 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4261
4262         * gcore.in: Rename variable "name" to "prefix".  Expand
4263         "usage" text.
4264
4265 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4266
4267         * windows-nat.c (windows_nat_target::create_inferior): Update to
4268         call close() in global namespace.
4269
4270 2018-07-26  Tom Tromey  <tom@tromey.com>
4271
4272         * dwarf-index-write.c (add_address_entry): Don't add objfile
4273         offsets.
4274         * dbxread.c (find_stab_function): Rename from
4275         find_stab_function_addr.  Return a bound_minimal_symbol.
4276         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4277         Don't add objfile offsets.
4278         (end_psymtab): Use raw_text_low, raw_text_high,
4279         MSYMBOL_VALUE_RAW_ADDRESS.
4280         (read_ofile_symtab): Update.
4281         (process_one_symbol): Update.
4282         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4283         offsets.
4284         (dw2_relocate): Remove.
4285         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4286         searching addrmap.
4287         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4288         Update.
4289         (process_psymtab_comp_unit_reader, add_partial_symbol)
4290         (add_partial_subprogram, dwarf2_ranges_read): Update.
4291         (load_partial_dies): Update.
4292         (add_address_entry): Don't add objfile offsets.
4293         (dwarf2_build_include_psymtabs): Update.
4294         (create_addrmap_from_aranges): Don't add objfile offsets.
4295         (dw2_find_pc_sect_compunit_symtab): Update.
4296         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4297         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4298         Update.
4299         (parse_partial_symbols): Don't add objfile offsets.  Use
4300         raw_text_low, raw_text_high.  Update.
4301         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4302         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4303         or call 'relocate' quick function.  Clear psymbol_map.
4304         * psympriv.h (struct partial_symbol) <address>: Add section
4305         offset.
4306         <set_unrelocated_address>: Rename from set_address.
4307         <raw_text_low, raw_text_high>: New methods.
4308         <text_low, text_high>: Add objfile parameter.
4309         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4310         set_unrelocated_address.
4311         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4312         (find_pc_psymbol): Update.
4313         (fixup_psymbol_section, relocate_psymtabs): Remove.
4314         (dump_psymtab, psym_functions): Update.
4315         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4316         parameter.
4317         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4318         (start_psymtab_common): Update.
4319         * symfile-debug.c (debug_qf_relocate): Remove.
4320         (debug_sym_quick_functions): Update.
4321         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4322         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4323         Update.
4324
4325 2018-07-26  Tom Tromey  <tromey@redhat.com>
4326
4327         * dbxread.c (end_psymtab): Use text_high_valid and
4328         text_low_valid.
4329         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4330         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4331         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4332         Update comment.
4333         <text_low_valid, text_high_valid>: New fields.
4334         <set_text_low, set_text_high>: Update.
4335         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4336
4337 2018-07-26  Tom Tromey  <tom@tromey.com>
4338
4339         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4340         Update.
4341         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4342         textlow and texthigh fields.
4343         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4344         Update.
4345         * mdebugread.c (parse_lines, parse_partial_symbols)
4346         (psymtab_to_symtab_1): Update.
4347         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4348         Rename fields.  Update comment.  Now private.
4349         <text_low, text_high, set_text_low, set_text_high>: New methods.
4350         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4351         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4352         (start_psymtab_common, maintenance_info_psymtabs)
4353         (maintenance_check_psymtabs): Update.
4354         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4355         texthigh fields.
4356         (scan_xcoff_symtab): Update.
4357
4358 2018-07-26  Tom Tromey  <tromey@redhat.com>
4359
4360         * psympriv.h (struct partial_symbol) <unrelocated_address,
4361         address, set_address>: New methods.
4362         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4363         (fixup_psymbol_section, relocate_psymtabs): Update.
4364         (print_partial_symbols): Add 'objfile' parameter.  Update.
4365         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4366         Update.
4367
4368 2018-07-26  Tom Tromey  <tom@tromey.com>
4369
4370         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4371         (debug_names::write_psymbols): Update.
4372         * psympriv.h (struct partial_symbol): Derive from
4373         general_symbol_info.
4374         <obj_section>: New method.
4375         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4376         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4377         (find_pc_sect_psymbol, fixup_psymbol_section)
4378         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4379         (print_partial_symbols, recursively_search_psymtabs)
4380         (compare_psymbols, psymbol_hash, psymbol_compare)
4381         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4382         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4383
4384 2018-07-26  Tom Tromey  <tromey@redhat.com>
4385
4386         * dbxread.c (end_psymtab): Remove dead code.
4387
4388 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4389
4390         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4391         DWARF unwinders are disabled.
4392         * dwarf2-frame.c: Add dwarf2read.h include.
4393         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4394         disabled.
4395         (dwarf2_frame_unwinders_enabled_p): Define.
4396         (show_dwarf_unwinders_enabled_p): New function.
4397         (_initialize_dwarf2_frame): Register switch to control DWARF
4398         unwinder use.
4399         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4400         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4401         (show_dwarf_cmdlist): Remove static keyword.
4402         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4403         (show_dwarf_cmdlist): Declare.
4404         * NEWS: Document new feature.
4405
4406 2018-07-26  Tom de Vries  <tdevries@suse.de>
4407
4408         PR breakpoints/23366
4409         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4410
4411 2018-07-26  Tom de Vries  <tdevries@suse.de>
4412
4413         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4414         DW_AT_count can't be translated to a dynamic prop.
4415
4416 2018-07-25  Tom de Vries  <tdevries@suse.de>
4417
4418         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4419         try/catch.
4420
4421 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4422
4423         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4424
4425 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4426
4427         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4428
4429 2018-07-24  Keith Seitz  <keiths@redhat.comt
4430
4431         PR symtab/23010
4432         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4433         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4434         instead of add_symbol_to_list.
4435         (read_file_scope): Call prepare_one_comp_unit before reading
4436         any other DIEs.
4437
4438 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4439
4440         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4441
4442 2018-07-24  Tom Tromey  <tom@tromey.com>
4443
4444         * utils.c (malloc, realloc, free): Don't declare.
4445         * configure, config.in: Rebuild.
4446         * configure.ac: Don't check for declarations of free, malloc, or
4447         realloc.
4448
4449 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4450
4451         * aarch64-linux-nat.c
4452         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4453         variable.
4454         * arm-linux-nat.c (fetch_regs): Likewise.
4455         (store_regs): Likewise.
4456         (fetch_vfp_regs): Likewise.
4457         (store_vfp_regs): Likewise.
4458         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4459         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4460         (arm_linux_nat_target::insert_watchpoint): Likewise.
4461         (arm_linux_nat_target::remove_watchpoint): Likewise.
4462         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4463         Likewise.
4464         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4465         Likewise.
4466         * ppc-linux-nat.c (fetch_register): Likewise.
4467         (fetch_all_gp_regs): Likewise.
4468         (fetch_ppc_registers): Likewise.
4469         (store_all_gp_regs): Likewise.
4470         (store_ppc_registers): Likewise.
4471         (hwdebug_insert_point): Likewise.
4472         (can_use_watchpoint_cond_accel): Likewise.
4473         * remote-sim.c (gdb_os_write_stdout): Likewise.
4474
4475 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4476             Tom Tromey  <tom@tromey.com>
4477
4478         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4479         test for it.
4480         * configure: Rebuild.
4481
4482 2018-07-22  Tom Tromey  <tom@tromey.com>
4483
4484         * regformats/regdat.sh: Define xmltarget_${name} inside
4485         #ifndef IN_PROCESS_AGENT.
4486
4487 2018-07-22  Tom Tromey  <tom@tromey.com>
4488
4489         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4490
4491 2018-07-22  Tom Tromey  <tom@tromey.com>
4492
4493         * symfile.c (reread_symbols): Notify iter, not objfile.
4494
4495 2018-07-22  Tom Tromey  <tom@tromey.com>
4496
4497         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4498         Use arch_ops.
4499         (ravenscar_thread_target::prepare_to_store): Likewise.
4500
4501 2018-07-22  Tom Tromey  <tom@tromey.com>
4502
4503         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4504         unused variable.  Call value_fetch_lazy when needed.
4505         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4506         Remove unused variable.  Call value_fetch_lazy when needed.
4507
4508 2018-07-22  Tom Tromey  <tom@tromey.com>
4509
4510         * m32c-tdep.c (mark_dma): Return void.
4511         (make_regs): Remove unused declarations.
4512
4513 2018-07-22  Tom Tromey  <tom@tromey.com>
4514
4515         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4516         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4517         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4518         bkscm_get_valid_block_smob_arg_unsafe for effect.
4519
4520 2018-07-22  Tom Tromey  <tom@tromey.com>
4521
4522         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4523         value_type.
4524
4525 2018-07-22  Tom Tromey  <tom@tromey.com>
4526
4527         * windows-nat.c (saved_context): Conditionally define.
4528         * remote.c (remote_target::remote_btrace_maybe_reopen):
4529         Conditionally declare "warned".
4530         * inflow.c (sigquit_ours): Conditionally define.
4531         (new_tty): Move "tty" declaration inside #if.
4532         * guile/guile.c (guile_datadir): Conditionally define.
4533         * charset.c (set_be_le_names): Move some declarations inside #if.
4534         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4535         #if.
4536         (parse_xml_btrace_conf): Likewise.
4537
4538 2018-07-22  Tom Tromey  <tom@tromey.com>
4539
4540         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4541
4542 2018-07-22  Tom Tromey  <tom@tromey.com>
4543
4544         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4545         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4546         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4547         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4548         * stack.c (frame_apply_level_command): Remove unused variable.
4549         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4550         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4551         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4552         unused variable.
4553         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4554         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4555         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4556         variable.
4557         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4558         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4559         variable.
4560         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4561         Remove unused variable.
4562         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4563         variable.
4564         * common/tdesc.c (print_xml_feature::visit): Remove unused
4565         variable.
4566         * compile/compile-object-load.c (store_regs): Remove unused
4567         variables.
4568         * complaints.c (clear_complaints): Remove unused variable.
4569         * corelow.c (core_target_open): Remove unused variable.
4570         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4571         variable.
4572         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4573         variable.
4574         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4575         variable.
4576         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4577         variable.
4578         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4579         variable.
4580         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4581         variable.
4582         * ia64-tdep.c (examine_prologue): Remove unused variable.
4583         * infcall.c (run_inferior_call): Remove unused variable.
4584         * inferior.c (exit_inferior): Remove unused variable.
4585         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4586         * linespec.c (decode_line_2): Remove unused variable.
4587         * linux-nat.c (super_close): Remove.
4588         * linux-tdep.c (linux_info_proc): Remove unused variable.
4589         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4590         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4591         Remove unused variable.
4592         * parse.c (find_minsym_type_and_address): Remove unused variable.
4593         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4594         variable.
4595         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4596         variable.
4597         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4598         variables.
4599         * record-btrace.c (record_btrace_target::store_registers): Remove
4600         unused variable.
4601         (cmd_show_record_btrace_cpu): Remove unused variable.
4602         * riscv-tdep.c (riscv_register_reggroup_p)
4603         (riscv_push_dummy_call, riscv_return_value): Remove unused
4604         variable.
4605         * rust-exp.y (literal): Remove unused variable.
4606         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4607         unused variable.
4608         <STRUCTOP_ANONYMOUS>: Likewise.
4609         * s390-linux-tdep.c (s390_linux_init_abi_31)
4610         (s390_linux_init_abi_64): Remove unused variable.
4611         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4612         (file_select_thread, net_windows_open, _initialize_ser_windows):
4613         Remove unused variables.
4614         * symtab.c (find_pc_sect_line): Remove unused variable.
4615         * target-memory.c (compute_garbled_blocks): Remove unused
4616         variable.
4617         (target_write_memory_blocks): Remove unused variable.
4618         * target.c (target_stack::unpush): Remove unused variables.
4619         * tracepoint.c (start_tracing, all_tracepoint_actions)
4620         (merge_uploaded_trace_state_variables)
4621         (print_one_static_tracepoint_marker): Remove unused variable.
4622         * unittests/basic_string_view/element_access/char/1.cc (test01):
4623         Remove unused variable.
4624         * windows-nat.c (windows_continue, windows_add_all_dlls)
4625         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4626         Remove unused variables.
4627
4628 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4629
4630         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4631         attr_profile in HAVE_ELF.
4632         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4633         HAVE_ELF.
4634
4635 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4636
4637         * frame.c (frame_register_unwind): Change parameter name.
4638         (frame_unwind_register): Likewise.
4639         (frame_unwind_register_value): Likewise.
4640         (frame_unwind_register_signed): Likewise.
4641         (frame_unwind_register_unsigned): Likewise.
4642         * frame.h (frame_register_unwind): Likewise.
4643         (frame_unwind_register): Likewise.
4644         (frame_unwind_register_value): Likewise.
4645         (frame_unwind_register_signed): Likewise.
4646         (frame_unwind_register_unsigned): Likewise.
4647         (frame_unwind_arch): Likewise.
4648
4649 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4650
4651         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4652         ISA maintenance.
4653
4654 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4655
4656         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4657         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4658         hand.
4659
4660 2018-07-20  Keith Seitz  <keiths@redhat.com>
4661
4662         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4663         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4664         m_compunit_symtab, m_language>: Add "m_" prefix.
4665         Update all uses.
4666         * buildsym.c: Update all uses.
4667
4668 2018-07-20  Tom Tromey  <tom@tromey.com>
4669
4670         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4671         * buildsym.h (record_line_ftype): Remove typedef.
4672
4673 2018-07-20  Tom Tromey  <tom@tromey.com>
4674
4675         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4676         (end_expandable_symtab): Likewise.
4677         (end_symtab_get_static_block): Likewise.
4678         (end_symtab_from_static_block): Likewise.
4679         * buildsym-legacy.c (augment_type_symtab): Remove.
4680         (end_expandable_symtab): Remove.
4681         (end_symtab_get_static_block): Remove.
4682         (end_symtab_from_static_block): Remove.
4683
4684 2018-07-20  Tom Tromey  <tom@tromey.com>
4685
4686         * dwarf2read.c: Include buildsym.h.
4687         (struct dwarf2_cu) <builder>: New method.
4688         (fixup_go_packaging): Update.
4689         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4690         use scoped_free_pendings.
4691         (using_directives): Add "cu" parameter, remove "language".
4692         (read_import_statement, setup_type_unit_groups, )
4693         (read_func_scope, read_lexical_block_scope)
4694         (dwarf2_record_block_ranges, read_namespace): Update.
4695         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4696         (lnp_state_machine::handle_end_sequence): Update.
4697         (class lnp_state_machine) <m_cu>: New member.
4698         <m_record_line_callback>: Remove.
4699         <m_currently_recording_lines>: New member.
4700         (lnp_state_machine::handle_set_file): Update.
4701         (noop_record_line): Remove.
4702         (dwarf_record_line_p): Add cu parameter.
4703         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4704         (lnp_state_machine::record_line)
4705         (lnp_state_machine::lnp_state_machine)
4706         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4707         (dwarf_decode_lines): Update.
4708         (dwarf2_start_subfile): Add cu parameter.
4709         (dwarf2_start_symtab, new_symbol): Update.
4710         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4711         Remove dwarf2_per_objfile parameter.
4712         (dwarf_decode_macros): Update.
4713
4714 2018-07-20  Tom Tromey  <tom@tromey.com>
4715
4716         * stabsread.c (define_symbol): Update.
4717         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4718         * dwarf2read.c (new_symbol): Update.
4719         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4720         * cp-namespace.c: Include buildsym.h.
4721         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4722         * buildsym-legacy.c (get_buildsym_compunit): New function.
4723
4724 2018-07-20  Tom Tromey  <tom@tromey.com>
4725
4726         * xcoffread.c: Include buildsym-legacy.h.
4727         * windows-nat.c: Include buildsym-legacy.h.
4728         * stabsread.c: Include buildsym-legacy.h.
4729         * mdebugread.c: Include buildsym-legacy.h.
4730         * buildsym-legacy.h: New file.
4731         * buildsym-legacy.c: New file, from buildsym.c.
4732         * go32-nat.c: Include buildsym-legacy.h.
4733         * dwarf2read.c: Include buildsym-legacy.h.
4734         * dbxread.c: Include buildsym-legacy.h.
4735         * cp-namespace.c: Include buildsym-legacy.h.
4736         * coffread.c: Include buildsym-legacy.h.
4737         * buildsym.h: Move some contents to buildsym-legacy.h.
4738         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4739         buildsym-legacy.c.
4740         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4741
4742 2018-07-20  Tom Tromey  <tom@tromey.com>
4743
4744         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4745         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4746         (buildsym_compunit::buildsym_compunit)
4747         (buildsym_compunit::~buildsym_compunit)
4748         (buildsym_compunit::get_macro_table): Define.
4749
4750 2018-07-20  Tom Tromey  <tom@tromey.com>
4751
4752         * buildsym.c (reset_symtab_globals): Remove.
4753         (buildsym_compunit::end_symtab_from_static_block): Update.
4754         (buildsym_compunit::augment_type_symtab): Update.
4755         (end_symtab_from_static_block): Call free_buildsym_compunit.
4756         (augment_type_symtab, end_symtab, end_expandable_symtab):
4757         Likewise.
4758
4759 2018-07-20  Tom Tromey  <tom@tromey.com>
4760
4761         * arch-utils.c: Do not include buildsym.h.
4762         * mipsread.c: Do not include buildsym.h.
4763         * machoread.c: Do not include buildsym.h.
4764         * elfread.c: Do not include buildsym.h.
4765
4766 2018-07-20  Tom Tromey  <tom@tromey.com>
4767
4768         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4769         initialization.
4770         (buildsym_compunit): Add new constructor.
4771         (struct buildsym_compunit) <get_last_source_file, finish_block,
4772         record_block_range, start_subfile, patch_subfile_names,
4773         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4774         set_last_source_start_addr, get_last_source_start_addr,
4775         get_local_using_directives, set_local_using_directives,
4776         get_global_using_directives, outermost_context_p,
4777         get_current_context_stack, get_context_stack_depth,
4778         get_current_subfile, get_local_symbols, get_file_symbols,
4779         get_global_symbols, record_debugformat, record_producer,
4780         push_context, pop_context, end_symtab_get_static_block,
4781         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4782         New public methods.
4783         <record_pending_block, finish_block_internal, make_blockvector,
4784         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4785         private methods.
4786         Update all users.
4787
4788 2018-05-22  Tom Tromey  <tom@tromey.com>
4789
4790         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4791         parameter.
4792         (finish_block_internal): Update.
4793
4794 2018-07-20  Tom Tromey  <tom@tromey.com>
4795
4796         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4797         parameter.
4798         (finish_block_internal): Update.
4799
4800 2018-07-20  Tom Tromey  <tom@tromey.com>
4801
4802         * buildsym.h (EXTERN): Don't define or undef.
4803         * buildsym.c (EXTERN): Don't define.
4804
4805 2018-07-20  Tom Tromey  <tom@tromey.com>
4806
4807         * buildsym.c: Remove TODO comment.
4808
4809 2018-07-20  Tom Tromey  <tom@tromey.com>
4810
4811         * coffread.c (coff_symtab_read): Update.
4812         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4813         (xcoff_new_init): Update.
4814         * mipsread.c (mipscoff_new_init): Update.
4815         * mdebugread.c (mdebug_build_psymtabs): Update.
4816         * elfread.c (elf_new_init): Update.
4817         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4818         Update.
4819         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4820         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4821         (stabsect_build_psymtabs): Update.
4822         * buildsym.h (buildsym_init): Don't declare.
4823         * buildsym.c: Update comment.
4824         (prepare_for_building): Remove.
4825         (start_symtab, restart_symtab): Update.
4826         (reset_symtab_globals): Update comment.
4827         (buildsym_init): Remove.
4828
4829 2018-07-20  Tom Tromey  <tom@tromey.com>
4830
4831         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4832         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4833         (read_enum_type, common_block_start, common_block_end)
4834         (cleanup_undefined_types_1, finish_global_stabs): Update.
4835         * mdebugread.c (psymtab_to_symtab_1): Update.
4836         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4837         (read_lexical_block_scope, new_symbol): Update.
4838         * dbxread.c (process_one_symbol): Update.
4839         * coffread.c (coff_symtab_read, process_coff_symbol)
4840         (coff_read_enum_type): Update.
4841         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4842         declare.
4843         (get_local_symbols, get_file_symbols, get_global_symbols): New
4844         functions.
4845         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4846         m_global_symbols.
4847         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4848         (~scoped_free_pendings): Update.
4849         (finish_block, prepare_for_building, reset_symtab_globals)
4850         (end_symtab_get_static_block, end_symtab_with_blockvector)
4851         (augment_type_symtab, push_context): Update.
4852         (get_local_symbols, get_file_symbols, get_global_symbols): New
4853         functions.
4854         (buildsym_init): Update.
4855
4856 2018-07-20  Tom Tromey  <tom@tromey.com>
4857
4858         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4859         (process_full_type_unit): Likewise.
4860         (dwarf2_start_symtab): Set list_in_scope.
4861
4862 2018-07-20  Tom Tromey  <tom@tromey.com>
4863
4864         * dwarf2read.c (process_psymtab_comp_unit_reader)
4865         (build_type_psymtabs_reader): Do not set list_in_scope.
4866
4867 2018-07-20  Tom Tromey  <tom@tromey.com>
4868
4869         * buildsym.c (free_pendings): Remove.
4870         (add_symbol_to_list, scoped_free_pendings)
4871         (finish_block_internal, buildsym_init): Update.
4872
4873 2018-07-20  Tom Tromey  <tom@tromey.com>
4874
4875         * xcoffread.c (read_xcoff_symtab): Update.
4876         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4877         Update.
4878         * dbxread.c (process_one_symbol): Update.
4879         * coffread.c (coff_symtab_read): Update.
4880         * buildsym.h (finish_block): Update.
4881         * buildsym.c (finish_block): Remove "listhead" argument.
4882         (end_symtab_get_static_block): Update.
4883
4884 2018-07-20  Tom Tromey  <tom@tromey.com>
4885
4886         * buildsym.h (class scoped_free_pendings): Remove constructor.
4887         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4888         method.
4889         <m_pending_block_obstack, m_pending_blocks>: New members.
4890         (pending_block_obstack, pending_blocks): Remove.
4891         (scoped_free_pendings::scoped_free_pendings): Default.
4892         (~scoped_free_pendings): Update.
4893         (free_pending_blocks): Remove.
4894         (finish_block_internal, record_pending_block, make_blockvector)
4895         (end_symtab_get_static_block, augment_type_symtab, push_context)
4896         (buildsym_init): Update.
4897
4898 2018-07-20  Tom Tromey  <tom@tromey.com>
4899
4900         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4901         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4902         members.
4903         (pending_addrmap, pending_addrmap_obstack)
4904         (pending_addrmap_interesting): Remove.
4905         (scoped_free_pendings, record_block_range, make_blockvector)
4906         (prepare_for_building, reset_symtab_globals, buildsym_init):
4907         Update.
4908
4909 2018-07-20  Tom Tromey  <tom@tromey.com>
4910
4911         * xcoffread.c (process_linenos): Update.
4912         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4913         * mdebugread.c (psymtab_to_symtab_1): Update.
4914         * dwarf2read.c (setup_type_unit_groups)
4915         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4916         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4917         * dbxread.c (process_one_symbol): Update.
4918         * coffread.c (coff_symtab_read, enter_linenos)
4919         (process_coff_symbol): Update.
4920         * buildsym.h (current_subfile): Don't declare.
4921         (get_current_subfile): Declare.
4922         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4923         member.
4924         (start_subfile, free_buildsym_compunit, push_subfile)
4925         (prepare_for_building, start_symtab): Update.
4926         (get_current_subfile): New function.
4927
4928 2018-07-20  Tom Tromey  <tom@tromey.com>
4929
4930         * coffread.c (coff_symtab_read): Update.
4931         * xcoffread.c (read_xcoff_symtab): Update.
4932         * dwarf2read.c (new_symbol): Update.
4933         (read_func_scope, read_lexical_block_scope): Update.
4934         * dbxread.c (process_one_symbol): Update.
4935         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4936         (outermost_context_p): Remove macro.
4937         (outermost_context_p, get_current_context_stack)
4938         (get_context_stack_depth): Declare.
4939         (pop_context): Return struct context_stack.
4940         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4941         member.
4942         (context_stack_size): Remove.
4943         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4944         (prepare_for_building, end_symtab_get_static_block)
4945         (augment_type_symtab, push_context): Update.
4946         (pop_context): Return struct context_stack.
4947         (outermost_context_p, get_current_context_stack)
4948         (get_context_stack_depth): New functions.
4949         (buildsym_init): Update.
4950
4951 2018-07-20  Tom Tromey  <tom@tromey.com>
4952
4953         * rust-exp.y: Now a pure parser.  Update all rules.
4954         (%union): Move earlier.
4955         (current_parser, work_obstack): Remove globals.
4956         (rust_parser, ~rust_parser): Update.
4957         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4958         lex_character, lex_number, lex_string, lex_identifier,
4959         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4960         convert_name, convert_params_to_expression,
4961         convert_ast_to_expression, ast_basic_type, ast_operation,
4962         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4963         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4964         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4965         ast_array_type, ast_slice_type, ast_reference_type,
4966         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4967         (rust_parse): Update.
4968         (rustyyerror, rustyylex): Add parser parameter.
4969         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4970         (rust_lex_stringish_test, rust_lex_test_sequence)
4971         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4972         (rust_lex_test_push_back, rust_lex_tests): Update.
4973
4974 2018-07-19  Pedro Alves  <palves@redhat.com>
4975
4976         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4977         gdb::unique_xmalloc_ptr.
4978         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4979         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4980         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4981         copy-initialization.
4982         * guile/scm-pretty-print.c (ppscm_print_children): Use
4983         gdb::unique_xmalloc_ptr instead of cleanups.
4984         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4985         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4986         gdb::unique_xmalloc_ptr.
4987         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4988         Adjust to use gdb::unique_xmalloc_ptr.
4989         * guile/scm-utils.c (extract_arg): Adjust.
4990         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4991         gdb::unique_xmalloc_ptr instead of a cleanup.
4992
4993 2018-07-19  Tom Tromey  <tom@tromey.com>
4994
4995         * utils.c (do_value_free_to_mark)
4996         (make_cleanup_value_free_to_mark): Remove.
4997         * utils.h (make_cleanup_value_free_to_mark): Remove.
4998
4999 2018-07-19  Pedro Alves  <palves@redhat.com>
5000
5001         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5002         forwarding reference.
5003
5004 2018-07-18  Pedro Alves  <palves@redhat.com>
5005
5006         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5007         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5008         cleanup.
5009
5010 2018-07-18  Pedro Alves  <palves@redhat.com>
5011
5012         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5013         exceptions.
5014         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5015         (gdbscm_wrap): New.
5016         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5017         directly instead of a cleanup.
5018         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5019         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5020         (vlscm_binop_gdbthrow): New, factored out from ...
5021         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5022         (vlscm_rich_compare): Use gdbscm_wrap.
5023         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5024         instead of a cleanup.
5025         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5026         cleanup.
5027         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5028         Use xfree directly instead of a cleanup.
5029         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5030         Adjust to use gdbscm_wrap and scoped_value_mark.
5031         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5032         (gdbscm_value_address, gdbscm_value_dereference)
5033         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5034         scoped_value_mark.
5035         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5036         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5037         scoped_value_mark.
5038         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5039         gdbscm_wrap and scoped_value_mark.
5040         (gdbscm_value_to_string): Use xfree directly instead of a
5041         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5042         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5043         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5044         scoped_value_mark.
5045         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5046         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5047         scoped_value_mark.
5048         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5049         gdbscm_wrap.
5050
5051 2018-07-18  Tom de Vries  <tdevries@suse.de>
5052
5053         * findvar.c (default_read_var_value): Also resolve dynamic type for
5054         LOC_OPTIMIZED_OUT vars.
5055
5056 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5057
5058         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5059         decoding.
5060
5061 2018-07-17  Tom Tromey  <tom@tromey.com>
5062
5063         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5064         (compute_enum_list, pascm_set_param_value_x)
5065         (gdbscm_parameter_value): Update.
5066         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5067         (gdbscm_scm_to_host_string): Update.
5068         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5069         Update.
5070         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5071         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5072         * guile/scm-string.c (gdbscm_scm_to_string): Return
5073         unique_xmalloc_ptr.
5074         (gdbscm_scm_to_host_string): Likewise.
5075
5076 2018-07-17  Tom Tromey  <tom@tromey.com>
5077
5078         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5079         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5080         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5081         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5082         unique_xmalloc_ptr.
5083
5084 2018-07-17  Tom Tromey  <tom@tromey.com>
5085
5086         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5087         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5088         Update.
5089         * guile/scm-cmd.c (cmdscm_function): Update.
5090         * guile/scm-pretty-print.c
5091         (ppscm_print_exception_unless_memory_error): Update.
5092         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5093         Return unique_xmalloc_ptr.
5094
5095 2018-07-17  Tom Tromey  <tom@tromey.com>
5096
5097         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5098         Use string_printf.
5099
5100 2018-07-17  Jim Wilson  <jimw@sifive.com>
5101
5102         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5103         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5104         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5105         unecessary braces after EF_RISCV_RVC test.  Delete call to
5106         set_gdbarch_decr_pc_after_break.
5107
5108         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5109         RISCV_LAST_FP_REGNUM + 1.
5110         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5111
5112 2018-07-17  Tom Tromey  <tom@tromey.com>
5113
5114         * configure.ac: Remove --disable-gdbcli.
5115         * configure: Rebuild.
5116         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5117         (SUBDIR_CLI_CFLAGS): Remove.
5118         (SFILES): Use SUBDIR_CLI_SRCS.
5119         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5120
5121 2018-07-17  Tom Tromey  <tom@tromey.com>
5122
5123         PR gdb/18624:
5124         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5125
5126 2018-07-16  Jim Wilson  <jimw@sifive.com>
5127
5128         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5129
5130 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5131
5132         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5133         variable.
5134         (libunwind_frame_sniffer): Likewise.
5135         (libunwind_frame_prev_register): Likewise.
5136         (libunwind_sigtramp_frame_sniffer): Likewise.
5137         * ia64-tdep.c (ia64_access_reg): Likewise.
5138         (ia64_access_rse_reg): Likewise.
5139         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5140         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5141
5142 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5143
5144         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5145
5146 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5147
5148         * remote-sim.c (gdbsim_target::close,
5149         gdbsim_target::mourn_inferior): Remove unused variables.
5150
5151 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5152
5153         * ia64-tdep.c (ktab_buf): New global.
5154         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5155         (get_kernel_table): Adjust.
5156
5157 2018-07-16  Tom Tromey  <tom@tromey.com>
5158
5159         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5160         * dwarf2read.c (using_directives, new_symbol): Use
5161         outermost_context_p.
5162         * dbxread.c (process_one_symbol): Use outermost_context_p.
5163         * coffread.c (coff_symtab_read): Use outermost_context_p.
5164
5165 2018-07-16  Tom Tromey  <tom@tromey.com>
5166
5167         * dwarf2read.c (using_directives, read_func_scope)
5168         (read_lexical_block_scope): Update.
5169         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5170         * buildsym.h (local_using_directives, global_using_directives):
5171         Don't declare.
5172         (get_local_using_directives, set_local_using_directives)
5173         (get_global_using_directives): Declare.
5174         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5175         m_global_using_directives>: New members.
5176         (finish_block_internal, prepare_for_building)
5177         (reset_symtab_globals, end_symtab_get_static_block)
5178         (push_context): Update.
5179         (get_local_using_directives, set_local_using_directives)
5180         (get_global_using_directives): New functions.
5181         (buildsym_init): Update.
5182
5183 2018-07-16  Tom Tromey  <tom@tromey.com>
5184
5185         * xcoffread.c (xcoff_initial_scan): Don't call
5186         free_pending_blocks.
5187         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5188         * buildsym.h (class scoped_free_pendings): Add constructor.
5189         (free_pending_blocks): Don't declare.
5190         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5191         (free_pending_blocks): Now static.
5192
5193 2018-07-16  Tom Tromey  <tom@tromey.com>
5194
5195         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5196         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5197         member.
5198         (struct subfile_stack): Remove.
5199         (subfile_stack): Remove.
5200         (push_subfile, pop_subfile, buildsym_init): Update.
5201
5202 2018-07-16  Tom Tromey  <tom@tromey.com>
5203
5204         * buildsym.c (push_subfile): Use gdb_assert.
5205         (pop_subfile): Use gdb_assert.
5206
5207 2018-07-16  Tom Tromey  <tom@tromey.com>
5208
5209         * buildsym.h (merge_symbol_lists): Remove.
5210         * buildsym.c (merge_symbol_lists): Remove.
5211
5212 2018-07-16  Tom Tromey  <tom@tromey.com>
5213
5214         * stabsread.c (scan_file_globals): Update comment.
5215         * stabsread.h (scan_file_globals): Move from buildsym.h.
5216         * buildsym.h (scan_file_globals): Move to stabsread.h.
5217
5218 2018-07-16  Tom Tromey  <tom@tromey.com>
5219
5220         * xcoffread.c (xcoff_new_init): Update.
5221         * mipsread.c (mipscoff_new_init): Update.
5222         * mdebugread.c (mdebug_build_psymtabs): Update.
5223         * elfread.c (elf_new_init): Update.
5224         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5225         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5226         * buildsym.h (buildsym_new_init): Don't declare.
5227         * buildsym.c (buildsym_new_init): Remove.
5228
5229 2018-07-16  Tom Tromey  <tom@tromey.com>
5230
5231         * stabsread.h (within_function): Move from buildsym.h.
5232         * stabsread.c (start_stabs): Clear within_function.
5233         * coffread.c (coff_start_symtab): Clear within_function.
5234         * buildsym.h (within_function): Move to stabsread.h.
5235         * buildsym.c (prepare_for_building): Update.
5236
5237 2018-07-16  Tom Tromey  <tom@tromey.com>
5238
5239         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5240         * dwarf2read.c (dwarf2_start_symtab): Don't set
5241         processing_gcc_compilation.
5242         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5243
5244 2018-07-16  Tom Tromey  <tom@tromey.com>
5245
5246         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5247         (next_symbol_text_func): Move from buildsym.h.
5248         * stabsread.c (hashname): Move from buildsym.c.
5249         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5250         (next_symbol_text_func, hashname): Move to stabsread.h.
5251         * buildsym.c: Don't include bcache.h
5252         (hashname): Move to stasbread.c.
5253
5254 2018-07-16  Tom Tromey  <tom@tromey.com>
5255
5256         * buildsym.h (context_stack_size): Don't declare.
5257         * buildsym.c (context_stack_size): New global.
5258
5259 2018-07-16  Tom Tromey  <tom@tromey.com>
5260
5261         * dbxread.c (processing_acc_compilation): New global.
5262         * buildsym.h (processing_acc_compilation): Don't declare.
5263
5264 2018-07-16  Tom Tromey  <tom@tromey.com>
5265
5266         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5267         * dbxread.c (read_ofile_symtab): Update.
5268         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5269         * buildsym.h (last_source_start_addr): Remove.
5270         (set_last_source_start_addr, get_last_source_start_addr):
5271         Declare.
5272         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5273         parameter.
5274         (struct buildsym_compunit) <m_last_source_start_addr>: New
5275         member.
5276         (prepare_for_building): Remove start_addr parameter.
5277         (start_symtab, restart_symtab, end_symtab_get_static_block)
5278         (end_symtab_with_blockvector): Update.
5279         (set_last_source_start_addr, get_last_source_start_addr): New
5280         functions.
5281
5282 2018-07-16  Tom Tromey  <tom@tromey.com>
5283
5284         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5285         member.
5286         (have_line_numbers): Remove.
5287         (record_line, prepare_for_building, end_symtab_get_static_block)
5288         (augment_type_symtab): Update.
5289
5290 2018-07-16  Tom Tromey  <tom@tromey.com>
5291
5292         * buildsym.c (~buildsym_compunit): Free the macro table.
5293         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5294         methods.
5295         <m_pending_macros>: New member.
5296         (pending_macros): Remove.
5297         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5298         (reset_symtab_globals, end_symtab_get_static_block)
5299         (end_symtab_with_blockvector, augment_type_symtab)
5300         (buildsym_init): Update.
5301
5302 2018-07-16  Tom Tromey  <tom@tromey.com>
5303
5304         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5305         parameter.
5306         (buildsym_compunit::set_last_source_file): New method.
5307         <m_last_source_file>: New member.
5308         (prepare_for_building): Remove "name" parameter.
5309         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5310         (last_source_file): Remove.
5311         (set_last_source_file, get_last_source_file): Update.
5312
5313 2018-07-16  Tom Tromey  <tom@tromey.com>
5314
5315         * buildsym.c (prepare_for_building): Add assert.
5316
5317 2018-07-16  Tom Tromey  <tom@tromey.com>
5318
5319         * buildsym.c (~buildsym_compunit): Update.
5320         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5321         (start_subfile, patch_subfile_names)
5322         (end_symtab_with_blockvector): Update.
5323
5324 2018-07-16  Tom Tromey  <tom@tromey.com>
5325
5326         * buildsym.c (struct buildsym_compunit): Add constructor,
5327         destructor, initializers.
5328         (start_buildsym_compunit): Remove.
5329         (free_buildsym_compunit): Use "delete".
5330         (start_symtab, restart_symtab): Use "new".
5331
5332 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5333
5334         * symfile.c (set_objfile_default_section_offset): Remove struct
5335         keyword.
5336
5337 2018-07-14  Stafford Horne  <shorne@gmail.com>
5338
5339         * (Responsible Maintainers): Add myself as or1k maintainer.
5340
5341 2018-07-13  Tom Tromey  <tom@tromey.com>
5342
5343         * symfile.c (set_objfile_default_section_offset): Use extra braces
5344         around initializer.
5345
5346 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5347
5348         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5349         non-branching basr.
5350
5351 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5352
5353         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5354         unittests/cli-utils-selftests.c
5355         * unittests/cli-utils-selftests.c: New file.
5356
5357 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5358
5359         * NEWS: Mention new commands. Mention change to 'thread apply'.
5360
5361 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5362
5363         * thread.c (thr_try_catch_cmd): New function.
5364         (thread_apply_all_command): Handle qcs flags.
5365         (thread_apply_command): Handle qcs flags.
5366         (taas_command): New function.
5367         (tfaas_command): New function.
5368         (_initialize_thread): Update to setup the new commands 'taas
5369         and 'tfaas'. Change doc string for 'thread apply'.
5370
5371 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5372
5373         * stack.c: (trailing_outermost_frame): New function, mostly
5374         extracted from backtrace_command_1.
5375         (leading_innermost_frame): New function.
5376         (backtrace_command_1): Update to call trailing_outermost_frame.
5377         (frame_apply_command_count): New function.
5378         (frame_apply_level_command): New function.
5379         (frame_apply_all_command): New function.
5380         (frame_apply_command): New function.
5381         (faas_command): New function.
5382         (frame_cmd_list): New variable.
5383         (_initialize_stack): Update to setup the new commands 'frame apply'
5384         and 'faas'.
5385
5386 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5387
5388         * cli-utils.c (number_or_range_parser::get_number): Only handle
5389         numbers or convenience var as numbers.
5390         (parse_flags): New function.
5391         (parse_flags_qcs): New function.
5392         (number_or_range_parser::finished): Ensure parsing end is detected
5393         before end of string.
5394         * cli-utils.h (parse_flags): New function.
5395         (parse_flags_qcs): New function.
5396         (number_or_range_parser): Remove m_finished bool.
5397         (number_or_range_parser::skip_range): Set m_in_range to false.
5398
5399 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5400
5401         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5402         on Windows.
5403
5404 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5405             Jan Kratochvil  <jan.kratochvil@redhat.com>
5406             Paul Fertser  <fercerpav@gmail.com>
5407             Tsutomu Seki  <sekiriki@gmail.com>
5408             Pedro Alves  <palves@redhat.com>
5409
5410         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5411         'unittests/parse-connection-spec-selftests.c'.
5412         (COMMON_SFILES): Add 'common/netstuff.c'.
5413         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5414         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5415         * common/netstuff.c: New file.
5416         * common/netstuff.h: New file.
5417         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5418         (wait_for_connect): Update comment.  New parameter
5419         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5420         Use 'sock' directly instead of 'scb->fd'.
5421         (try_connect): New function, with code from 'net_open'.
5422         (net_open): Rewrite main loop to deal with multiple
5423         sockets/addresses.  Handle IPv6-style hostnames; implement
5424         support for IPv6 connections.
5425         * unittests/parse-connection-spec-selftests.c: New file.
5426
5427 2018-07-11  Pedro Alves  <palves@redhat.com>
5428
5429         PR gdb/23377
5430         * remote.c (remote_target::remote_detach_pid): Call
5431         set_current_process.
5432
5433 2018-07-11  Pedro Alves  <palves@redhat.com>
5434
5435         * h8300-tdep.c (h8300_gdbarch_init): Remove
5436         set_gdbarch_ecoff_reg_to_regnum calls.
5437
5438 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5439
5440         PR c++/23373
5441         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5442         offsets/sizes for static members of a class/struct.
5443
5444 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5445
5446         * target-descriptions.c (tdesc_register_bitsize): Rename.
5447         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5448         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5449         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5450
5451 2018-07-10  Tom Tromey  <tom@tromey.com>
5452
5453         * breakpoint.c (moribund_locations): Now static and a
5454         std::vector.
5455         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5456         (build_bpstat_chain, update_global_location_list)
5457         (breakpoint_retire_moribund): Update.
5458         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5459         VEC.
5460
5461 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5462
5463         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5464         (riscv_register_reggroup_p): Use new function, remove unneeded
5465         parenthesis.
5466         (riscv_push_dummy_call): Extend assert to compare against xlen or
5467         flen based on register type.
5468
5469 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5470
5471         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5472
5473 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5474
5475         * remote.c (show_hardware_watchpoint_limit): New function.
5476         (show_hardware_watchpoint_length_limit): New function.
5477         (show_hardware_breakpoint_limit): New function.
5478         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5479         where appropriate, update help text.
5480
5481 2018-07-09  Tom Tromey  <tom@tromey.com>
5482
5483         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5484         (CLIBS): Don't mention NAT_CLIBS.
5485
5486 2018-07-09  Tom Tromey  <tom@tromey.com>
5487
5488         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5489         (LIBGDB_OBS, clean mostlyclean): Update.
5490         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5491
5492 2018-07-09  Tom Tromey  <tom@tromey.com>
5493
5494         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5495         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5496         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5497
5498 2018-07-09  Tom Tromey  <tom@tromey.com>
5499
5500         * Makefile.in (ALLDEPFILES): Remove exec.c.
5501         (COMMON_OBS): Remove exec.o.
5502         (COMMON_SFILES): Add exec.c.
5503
5504 2018-07-09  Tom Tromey  <tom@tromey.com>
5505
5506         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5507
5508 2018-07-09  Tom Tromey  <tom@tromey.com>
5509
5510         * Makefile.in (clean mostlyclean): Remove stamp-version.
5511         (version.c): Depend on stamp-version.
5512         (stamp-version): New rule, from version.c rule.
5513
5514 2018-07-09  Tom Tromey  <tom@tromey.com>
5515
5516         * Makefile.in (init.c): Depend on stamp-init.
5517         (stamp-init): New rule, from init.c rule.
5518         (clean mostlyclean): Remove stamp-init.
5519
5520 2018-07-09  Tom Tromey  <tom@tromey.com>
5521
5522         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5523         SUBDIR_GCC_COMPILE_SRCS.
5524
5525 2018-07-09  Tom Tromey  <tom@tromey.com>
5526
5527         * Makefile.in (init.c): Remove some unused sed rules.
5528
5529 2018-07-09  Tom Tromey  <tom@tromey.com>
5530
5531         * Makefile.in (TSOBS): Remove.
5532         (INIT_FILES): Update.
5533         (LIBGDB_OBS): Update.
5534         (COMMON_SFILES): Add inflow.c.
5535         (SFILES): Remove inflow.c.
5536
5537 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5538
5539         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5540
5541 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5542
5543         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5544         get_saveloc_name, is_signal_frame_name, step_name,
5545         init_remote_name, create_addr_space_name,
5546         destroy_addr_space_name, search_unwind_table_name,
5547         find_dyn_list_name): Constify.
5548
5549 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5550
5551         * darwin-nat.c (darwin_pthread_kill): New function.
5552         (darwin_resume_thread): Use darwin_pthread_kill.
5553
5554 2018-07-05  Tom de Vries  <tdevries@suse.de>
5555
5556         * macroexp.c (macro_buffer) <operator=>: New member function.
5557
5558 2018-07-04  Tom Tromey  <tom@tromey.com>
5559
5560         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5561
5562 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5563
5564         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5565         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5566         * maint.c: Likewise.
5567         * top.c: Likewise.
5568
5569 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5570
5571         * NEWS: Create a new section for the next release branch.
5572         Rename the section of the current branch, now that it has
5573         been cut.
5574
5575 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5576
5577         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5578         * version.in: Bump version to 8.2.50.DATE-git.
5579
5580 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5581             Pedro Alves  <palves@redhat.com>
5582
5583         * linux-nat.c (linux_init_ptrace): Rename to ...
5584         (linux_init_ptrace_procfs): ... this.  Call
5585         linux_proc_init_warnings.
5586         (linux_nat_target::post_attach)
5587         (linux_nat_target::post_startup_inferior): Adjust.
5588         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5589         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5590
5591 2018-07-04  Tom de Vries  <tdevries@suse.de>
5592
5593         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5594         check ...
5595         (read_comp_unit_head): ... here.
5596
5597 2018-07-03  Tom Tromey  <tom@tromey.com>
5598
5599         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5600         (stop_tracing, tstatus_command)
5601         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5602         (print_one_static_tracepoint_marker): Update.
5603         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5604         std::vector.
5605         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5606         VEC.
5607         (all_tracepoints, static_tracepoints_here): Return std::vector.
5608
5609 2018-07-03  Tom Tromey  <tom@tromey.com>
5610
5611         * common/ptid.c (ptid_equal): Remove.
5612         * common/ptid.h (ptid_equal): Don't declare.
5613         * ada-tasks.c: Update.
5614         * breakpoint.c: Update.
5615         * common/agent.c: Update.
5616         * corelow.c: Update.
5617         * darwin-nat-info.c: Update.
5618         * darwin-nat.c: Update.
5619         * dcache.c: Update.
5620         * dtrace-probe.c: Update.
5621         * dummy-frame.c: Update.
5622         * fbsd-nat.c: Update.
5623         * frame.c: Update.
5624         * gdbthread.h: Update.
5625         * gnu-nat.c: Update.
5626         * go32-nat.c: Update.
5627         * inf-loop.c: Update.
5628         * inf-ptrace.c: Update.
5629         * infcall.c: Update.
5630         * infcmd.c: Update.
5631         * inflow.c: Update.
5632         * infrun.c: Update.
5633         * linux-fork.c: Update.
5634         * linux-nat.c: Update.
5635         * linux-thread-db.c: Update.
5636         * mi/mi-cmd-var.c: Update.
5637         * mi/mi-interp.c: Update.
5638         * mi/mi-main.c: Update.
5639         * nto-procfs.c: Update.
5640         * ppc-linux-tdep.c: Update.
5641         * procfs.c: Update.
5642         * python/py-inferior.c: Update.
5643         * python/py-record-btrace.c: Update.
5644         * python/py-record.c: Update.
5645         * ravenscar-thread.c: Update.
5646         * regcache.c: Update.
5647         * remote-sim.c: Update.
5648         * remote.c: Update.
5649         * sol-thread.c: Update.
5650         * solib.c: Update.
5651         * target.c: Update.
5652         * tui/tui-stack.c: Update.
5653         * varobj.c: Update.
5654         * windows-nat.c: Update.
5655         * windows-tdep.c: Update.
5656
5657 2018-07-03  Tom Tromey  <tom@tromey.com>
5658
5659         * common/ptid.c (ptid_match): Remove.
5660         * common/ptid.h (ptid_match): Don't declare.
5661         * fbsd-nat.c: Update.
5662         * infcmd.c: Update.
5663         * infrun.c: Update.
5664         * linux-nat.c: Update.
5665         * record-btrace.c: Update.
5666         * regcache.c: Update.
5667         * remote.c: Update.
5668
5669 2018-07-03  Tom Tromey  <tom@tromey.com>
5670
5671         * common/ptid.c (ptid_tid_p): Remove.
5672         * common/ptid.h (ptid_tid_p): Don't declare.
5673         * sol-thread.c: Update.
5674
5675 2018-07-03  Tom Tromey  <tom@tromey.com>
5676
5677         * common/ptid.c (ptid_lwp_p): Remove.
5678         * common/ptid.h (ptid_lwp_p): Don't declare.
5679         * fbsd-nat.c: Update.
5680         * linux-nat.c: Update.
5681         * nat/linux-procfs.c: Update.
5682         * nat/x86-linux-dregs.c: Update.
5683         * sol-thread.c: Update.
5684
5685 2018-07-03  Tom Tromey  <tom@tromey.com>
5686
5687         * common/ptid.c (ptid_is_pid): Remove.
5688         * common/ptid.h (ptid_is_pid): Don't declare.
5689         * infrun.c: Update.
5690         * linux-nat.c: Update.
5691         * mi/mi-interp.c: Update.
5692         * remote.c: Update.
5693         * thread.c: Update.
5694
5695 2018-07-03  Tom Tromey  <tom@tromey.com>
5696
5697         * common/ptid.c (ptid_get_tid): Remove.
5698         * common/ptid.h (ptid_get_tid): Don't declare.
5699         * ada-tasks.c: Update.
5700         * aix-thread.c: Update.
5701         * bsd-uthread.c: Update.
5702         * darwin-nat.c: Update.
5703         * fbsd-nat.c: Update.
5704         * i386-darwin-nat.c: Update.
5705         * infrun.c: Update.
5706         * linux-tdep.c: Update.
5707         * nto-procfs.c: Update.
5708         * ppc-ravenscar-thread.c: Update.
5709         * python/py-infthread.c: Update.
5710         * ravenscar-thread.c: Update.
5711         * sol-thread.c: Update.
5712         * sparc-ravenscar-thread.c: Update.
5713         * windows-nat.c: Update.
5714
5715 2018-07-03  Tom Tromey  <tom@tromey.com>
5716
5717         * common/ptid.c (ptid_get_lwp): Remove.
5718         * common/ptid.h (ptid_get_lwp): Don't declare.
5719         * aarch64-linux-nat.c: Update.
5720         * ada-tasks.c: Update.
5721         * aix-thread.c: Update.
5722         * amd64-linux-nat.c: Update.
5723         * arm-linux-nat.c: Update.
5724         * corelow.c: Update.
5725         * fbsd-nat.c: Update.
5726         * fbsd-tdep.c: Update.
5727         * gnu-nat.c: Update.
5728         * i386-cygwin-tdep.c: Update.
5729         * i386-gnu-nat.c: Update.
5730         * i386-linux-nat.c: Update.
5731         * ia64-linux-nat.c: Update.
5732         * inf-ptrace.c: Update.
5733         * infrun.c: Update.
5734         * linux-fork.c: Update.
5735         * linux-nat.c: Update.
5736         * linux-tdep.c: Update.
5737         * linux-thread-db.c: Update.
5738         * mips-linux-nat.c: Update.
5739         * nat/aarch64-linux-hw-point.c: Update.
5740         * nat/aarch64-linux.c: Update.
5741         * nat/linux-btrace.c: Update.
5742         * nat/linux-osdata.c: Update.
5743         * nat/linux-procfs.c: Update.
5744         * nat/x86-linux-dregs.c: Update.
5745         * obsd-nat.c: Update.
5746         * ppc-fbsd-nat.c: Update.
5747         * ppc-linux-nat.c: Update.
5748         * procfs.c: Update.
5749         * python/py-infthread.c: Update.
5750         * ravenscar-thread.c: Update.
5751         * remote.c: Update.
5752         * s390-linux-nat.c: Update.
5753         * sol-thread.c: Update.
5754         * sol2-tdep.c: Update.
5755         * spu-linux-nat.c: Update.
5756         * x86-linux-nat.c: Update.
5757         * xtensa-linux-nat.c: Update.
5758
5759 2018-07-03  Tom Tromey  <tom@tromey.com>
5760
5761         * common/ptid.c (ptid_get_pid): Remove.
5762         * common/ptid.h (ptid_get_pid): Don't declare.
5763         * aarch64-linux-nat.c: Update.
5764         * ada-lang.c: Update.
5765         * aix-thread.c: Update.
5766         * alpha-bsd-nat.c: Update.
5767         * amd64-fbsd-nat.c: Update.
5768         * amd64-linux-nat.c: Update.
5769         * arm-linux-nat.c: Update.
5770         * arm-nbsd-nat.c: Update.
5771         * auxv.c: Update.
5772         * break-catch-syscall.c: Update.
5773         * breakpoint.c: Update.
5774         * bsd-uthread.c: Update.
5775         * corelow.c: Update.
5776         * ctf.c: Update.
5777         * darwin-nat.c: Update.
5778         * fbsd-nat.c: Update.
5779         * fbsd-tdep.c: Update.
5780         * gcore.c: Update.
5781         * gnu-nat.c: Update.
5782         * hppa-nbsd-nat.c: Update.
5783         * hppa-obsd-nat.c: Update.
5784         * i386-fbsd-nat.c: Update.
5785         * ia64-linux-nat.c: Update.
5786         * inf-ptrace.c: Update.
5787         * infcmd.c: Update.
5788         * inferior.c: Update.
5789         * inferior.h: Update.
5790         * inflow.c: Update.
5791         * infrun.c: Update.
5792         * linux-fork.c: Update.
5793         * linux-nat.c: Update.
5794         * linux-tdep.c: Update.
5795         * linux-thread-db.c: Update.
5796         * m68k-bsd-nat.c: Update.
5797         * mi/mi-interp.c: Update.
5798         * mi/mi-main.c: Update.
5799         * mips-linux-nat.c: Update.
5800         * mips-nbsd-nat.c: Update.
5801         * mips64-obsd-nat.c: Update.
5802         * nat/aarch64-linux-hw-point.c: Update.
5803         * nat/aarch64-linux.c: Update.
5804         * nat/linux-btrace.c: Update.
5805         * nat/linux-osdata.c: Update.
5806         * nat/linux-procfs.c: Update.
5807         * nat/x86-linux-dregs.c: Update.
5808         * nto-procfs.c: Update.
5809         * obsd-nat.c: Update.
5810         * ppc-linux-nat.c: Update.
5811         * ppc-nbsd-nat.c: Update.
5812         * ppc-obsd-nat.c: Update.
5813         * proc-service.c: Update.
5814         * procfs.c: Update.
5815         * python/py-inferior.c: Update.
5816         * python/py-infthread.c: Update.
5817         * ravenscar-thread.c: Update.
5818         * record.c: Update.
5819         * remote-sim.c: Update.
5820         * remote.c: Update.
5821         * rs6000-nat.c: Update.
5822         * s390-linux-nat.c: Update.
5823         * sh-nbsd-nat.c: Update.
5824         * sol-thread.c: Update.
5825         * sparc-nat.c: Update.
5826         * sparc64-tdep.c: Update.
5827         * spu-linux-nat.c: Update.
5828         * spu-tdep.c: Update.
5829         * target-debug.h: Update.
5830         * target.c: Update.
5831         * thread.c: Update.
5832         * tid-parse.c: Update.
5833         * tracefile-tfile.c: Update.
5834         * vax-bsd-nat.c: Update.
5835         * windows-nat.c: Update.
5836         * x86-linux-nat.c: Update.
5837         * x86-nat.c: Update.
5838
5839 2018-07-03  Tom Tromey  <tom@tromey.com>
5840
5841         * common/ptid.c (pid_to_ptid): Remove.
5842         * common/ptid.h (pid_to_ptid): Don't declare.
5843         * aix-thread.c: Update.
5844         * arm-linux-nat.c: Update.
5845         * common/ptid.c: Update.
5846         * common/ptid.h: Update.
5847         * corelow.c: Update.
5848         * ctf.c: Update.
5849         * darwin-nat.c: Update.
5850         * fbsd-nat.c: Update.
5851         * fork-child.c: Update.
5852         * gnu-nat.c: Update.
5853         * go32-nat.c: Update.
5854         * inf-ptrace.c: Update.
5855         * infcmd.c: Update.
5856         * inferior.c: Update.
5857         * infrun.c: Update.
5858         * linux-fork.c: Update.
5859         * linux-nat.c: Update.
5860         * nat/aarch64-linux-hw-point.c: Update.
5861         * nat/fork-inferior.c: Update.
5862         * nat/x86-linux-dregs.c: Update.
5863         * nto-procfs.c: Update.
5864         * obsd-nat.c: Update.
5865         * procfs.c: Update.
5866         * progspace.c: Update.
5867         * remote.c: Update.
5868         * rs6000-nat.c: Update.
5869         * s390-linux-nat.c: Update.
5870         * sol-thread.c: Update.
5871         * spu-linux-nat.c: Update.
5872         * target.c: Update.
5873         * top.c: Update.
5874         * tracefile-tfile.c: Update.
5875         * windows-nat.c: Update.
5876
5877 2018-07-03  Tom Tromey  <tom@tromey.com>
5878
5879         * common/ptid.h (ptid_build): Don't declare.
5880         * common/ptid.c (ptid_build): Remove.
5881         * aix-thread.c: Update.
5882         * bsd-kvm.c: Update.
5883         * bsd-uthread.c: Update.
5884         * common/agent.c: Update.
5885         * common/ptid.c: Update.
5886         * common/ptid.h: Update.
5887         * corelow.c: Update.
5888         * darwin-nat.c: Update.
5889         * fbsd-nat.c: Update.
5890         * gnu-nat.c: Update.
5891         * linux-fork.c: Update.
5892         * linux-nat.c: Update.
5893         * linux-thread-db.c: Update.
5894         * nat/linux-osdata.c: Update.
5895         * nat/linux-procfs.c: Update.
5896         * nto-procfs.c: Update.
5897         * obsd-nat.c: Update.
5898         * proc-service.c: Update.
5899         * procfs.c: Update.
5900         * ravenscar-thread.c: Update.
5901         * remote-sim.c: Update.
5902         * remote.c: Update.
5903         * sol-thread.c: Update.
5904         * target.c: Update.
5905         * windows-nat.c: Update.
5906
5907 2018-07-03  Tom Tromey  <tom@tromey.com>
5908
5909         * infrun.c (follow_exec): Use exit_inferior_silent.
5910         * inferior.c (exit_inferior_num_silent): Remove.
5911         * inferior.h (exit_inferior_num_silent): Don't declare.
5912
5913 2018-07-03  Tom Tromey  <tom@tromey.com>
5914
5915         PR cli/23340:
5916         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5917         inferior_ptid on error.
5918
5919 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5920             Simon Marchi  <simon.marchi@polymtl.ca>
5921
5922         PR tdep/8282
5923         * disasm.h (gdb_disassembler): Add
5924         `m_disassembler_options_holder'. member
5925         * disasm.c (get_all_disassembler_options): New function.
5926         (gdb_disassembler::gdb_disassembler): Use it.
5927         (gdb_buffered_insn_length_init_dis): Likewise.
5928         (gdb_buffered_insn_length): Adjust accordingly.
5929         (set_disassembler_options): Handle options with arguments.
5930         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5931         line if showing options with descriptions.
5932         (disassembler_options_completer): Adapt to using the
5933         `disasm_options_and_args_t' structure.
5934         * mips-tdep.c (mips_disassembler_options): New variable.
5935         (mips_disassembler_options_o32): Likewise.
5936         (mips_disassembler_options_n32): Likewise.
5937         (mips_disassembler_options_n64): Likewise.
5938         (gdb_print_insn_mips): Don't set `disassembler_options'.
5939         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5940         functions.
5941         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5942         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5943         `gdbarch_disassembler_options_implicit' and
5944         `gdbarch_valid_disassembler_options'.
5945         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5946         `disasm_options_and_args_t' structure.
5947         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5948         method.
5949         (valid_disassembler_options): Switch from `disasm_options_t' to
5950         the `disasm_options_and_args_t' structure.
5951         * NEWS: Document `set disassembler-options' support for the MIPS
5952         target.
5953         * gdbarch.h: Regenerate.
5954         * gdbarch.c: Regenerate.
5955
5956 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5957
5958         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5959
5960 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5961
5962         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5963         parameter in call to amd64_target_description.
5964         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5965         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5966         (amd64fbsd_init_abi): Likewise.
5967         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5968         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5969         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5970         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5971
5972 2018-06-29  Pedro Alves  <palves@redhat.com>
5973
5974         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5975         "segments" parameter.
5976         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5977         (_initialize_amd64_tdep): Update call to
5978         amd64_create_target_description.
5979         (amd64_target_description): Add "segments" parameter.  Adjust
5980         the implementation to use it.
5981         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5982         call to amd64_create_target_description.
5983         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5984         * gdb/arch/amd64.h (amd64_create_target_description): Add
5985         "segments" register.
5986         * gdb/arch/amd64.c (amd64_create_target_description): Add
5987         "segments" parameter.  Call create_feature_i386_64bit_segments
5988         only if SEGMENTS is true.
5989         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5990         call to amd64_create_target_description.
5991
5992 2018-06-29  Pedro Alves  <palves@redhat.com>
5993
5994         * thread.c (thread_target_id_str): New, factored out from ...
5995         (print_thread_info_1): ... here.  Use it to compute the max
5996         "Target Id" column width.
5997
5998 2018-06-29  Pedro Alves  <palves@redhat.com>
5999
6000         * remote.c (remote_target::extra_thread_info): Delete
6001         'display_buf' and 'n' locals.  from the cache, regardless of
6002         packet mechanims is in use.  Use cache for qThreadExtra and qP
6003         methods too.
6004
6005 2018-06-29  Pedro Alves  <palves@redhat.com>
6006
6007         * blockframe.c (find_pc_sect_containing_function): New function.
6008         * breakpoint.c (print_breakpoint_location): Don't call
6009         find_pc_sect_function.
6010         * linespec.c (create_sals_line_offset): Record the location's
6011         symbol in the sal.
6012         * linespec.c (convert_address_location_to_sals): Fill in sal's
6013         symbol with find_pc_sect_containing_function.
6014         * symtab.c (find_function_start_sal): Rename to ...
6015         (find_function_start_sal_1): ... this.
6016         (find_function_start_sal): Reimplement as wrapper around
6017         find_function_start_sal_1, and use
6018         find_pc_sect_containing_function to fill in the sal's symbol.
6019         (find_function_start_sal(symbol*, bool)): Adjust.
6020         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6021         comments.
6022         (find_pc_sect_containing_function): Declare.
6023
6024 2018-06-29  Pedro Alves  <palves@redhat.com>
6025
6026         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6027         true if the the location has no symbol.
6028
6029 2018-06-28  Tom Tromey  <tom@tromey.com>
6030
6031         * NEWS: Mention --enable-codesign.
6032         * silent-rules.mk (ECHO_SIGN): New variable.
6033         * configure.ac: Add --enable-codesign.
6034         * configure: Rebuild.
6035         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6036         (gdb$(EXEEXT)): Optionally invoke codesign.
6037
6038 2018-06-28  Pedro Alves  <palves@redhat.com>
6039
6040         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6041         comments.
6042         (switch_to_thread_no_regs): Adjust comment.
6043         * infcmd.c (stop_pc): Delete.
6044         (post_create_inferior, info_program_command): Replace references
6045         to stop_pc with references to thread_info->suspend.stop_pc.
6046         * inferior.h (stop_pc): Delete declaration.
6047         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6048         (handle_inferior_event_1, handle_signal_stop)
6049         (process_event_stop_test, keep_going_stepped_thread)
6050         (handle_step_into_function, handle_step_into_function_backward)
6051         (print_stop_location): Replace references to stop_pc with
6052         references to thread_info->suspend.stop_pc.
6053         (struct infcall_suspend_state) <stop_pc>: Delete field.
6054         (save_infcall_suspend_state, restore_infcall_suspend_state):
6055         Remove references to inf_stat->stop_pc.
6056         * linux-fork.c (fork_load_infrun_state): Likewise.
6057         * record-btrace.c (record_btrace_set_replay): Likewise.
6058         * record-full.c (record_full_goto_entry): Likewise.
6059         * remote.c (print_one_stopped_thread): Likewise.
6060         * target.c (target_resume): Extend comment.
6061         * thread.c (set_executing_thread): New.
6062         (set_executing): Use it.
6063         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6064         Remove references to stop_pc.
6065
6066 2018-06-28  Pedro Alves  <palves@redhat.com>
6067
6068         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6069         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6070
6071 2018-06-28  Tom Tromey  <tom@tromey.com>
6072
6073         * coffread.c (coff_symfile_finish): Update.
6074         * xcoffread.c (xcoff_symfile_finish): Update.
6075         * elfread.c (elf_symfile_finish): Update.
6076         * symfile.h (dwarf2_free_objfile): Don't declare.
6077         * dwarf2read.c (_initialize_dwarf2_read): Use
6078         register_objfile_data_with_cleanup.
6079         (dwarf2_free_objfile): Now static.  Change signature.
6080
6081 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6082
6083         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6084         option "-o" to add-symbol-file-load to add an offset to each
6085         section's load address.
6086         * symfile.c (set_objfile_default_section_offset): New function.
6087
6088 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6089
6090         * symfile.c (add_symbol_file_command): Make sure that sections
6091         with the same name are sorted in the same order.
6092
6093 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6094
6095         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6096         require the second argument.  If omitted, load sections at the
6097         addresses specified in the file.
6098
6099 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6100
6101         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6102         (_initialize_symfile): Add option "-o" to symbol-file to add an
6103         offset to each section of the symbol file.
6104
6105 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6106
6107         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6108
6109 2018-06-27  Tom Tromey  <tom@tromey.com>
6110
6111         * stack.c (_initialize_stack): Update "func" help text.
6112
6113 2018-06-27  Tom Tromey  <tom@tromey.com>
6114
6115         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6116         std::vector.
6117         (unwind_infopy_str, pyuw_create_unwind_info)
6118         (unwind_infopy_add_saved_register, pyuw_sniffer)
6119         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6120         Update.
6121         (struct saved_reg): Add constructor.
6122         <value>: Now a gdbpy_ref<>.
6123
6124 2018-06-27  Tom Tromey  <tom@tromey.com>
6125
6126         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6127
6128 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6129
6130         * gdb-gdb.py.in: Format using autopep8.
6131
6132 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6133
6134         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6135         (type_lookup_function): Recognize CORE_ADDR values.
6136
6137 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6138
6139         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6140         print tag_name.
6141
6142 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6143
6144         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6145         <__lt__>: Add.
6146
6147 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6148
6149         * gdb-gdb.py: Move to...
6150         * gdb-gdb.py.in: ... here.
6151         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6152         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6153         dependencies.
6154         (distclean): Remove gdb-gdb.py when cleaning.
6155         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6156         * configure: Re-generate.
6157
6158 2018-06-27  Pedro Alves  <palves@redhat.com>
6159
6160         * proc-service.c (get_ps_regcache): New.
6161         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6162         (ps_lsetfpregs): Use it.
6163
6164 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6165
6166         PR gdb/21695
6167         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6168         (dwarf_decode_lines_1): Adjust.
6169
6170 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6171
6172         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6173         override.
6174         <info_proc>: Likewise.
6175
6176 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6177
6178         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6179         to windows_fetch_one_register, and only handle the case of
6180         fetching one register.  Move the code that reloads the context
6181         and iterates over all registers if R is negative to...
6182         (windows_nat_target::fetch_registers): ... here.
6183         (do_windows_store_inferior_registers): Rename to
6184         windows_store_one_register, and only handle the case of storing
6185         one register.  Move the code that handles the case where r is
6186         negative to...
6187         (windows_nat_target::store_registers) ... here.
6188
6189 2018-06-26  Tom Tromey  <tom@tromey.com>
6190
6191         PR rust/22574:
6192         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6193         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6194         Update.
6195         (rust_internal_print_type): Add podata parameter.
6196         (rust_print_type): Update.
6197
6198 2018-06-26  Tom Tromey  <tom@tromey.com>
6199
6200         * typeprint.h (struct print_offset_data) <update, finish,
6201         maybe_print_hole>: New methods.
6202         <indentation>: New constant.
6203         * typeprint.c (print_offset_data::indentation): Define.
6204         (print_offset_data::maybe_print_hole, print_offset_data::update)
6205         (print_offset_data::finish): Move from c-typeprint.c and rename.
6206         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6207         (print_spaces_filtered_with_print_options): Update.
6208         (c_print_type_union_field_offset, maybe_print_hole)
6209         (c_print_type_struct_field_offset): Move to typeprint.c and
6210         rename.
6211         (c_type_print_base_struct_union): Update.
6212
6213 2018-06-25  Pedro Alves  <palves@redhat.com>
6214
6215         * gdbthread.h (thread_info_ref, delete_thread)
6216         (delete_thread_silent, first_thread_of_inferior)
6217         (any_thread_of_inferior, switch_to_thread)
6218         (enable_thread_stack_temporaries)
6219         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6220         (get_last_thread_stack_temporary)
6221         (value_in_thread_stack_temporaries, can_access_registers_thread):
6222         Spell out "struct thread_info" instead of just "thread_info".
6223         * inferior.h (notice_new_inferior): Likewise.
6224
6225 2018-06-25  Pedro Alves  <palves@redhat.com>
6226
6227         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6228         pass thread_info pointer to delete_thread.
6229         (windows_nat_target::detach): Pass inferior pointer to
6230         detach_inferior.
6231         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6232         delete_thread.
6233         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6234         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6235         and pass a thread_info pointer to delete_thread.
6236         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6237         pass thread_info pointer to delete_thread.
6238         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6239         delete_thread_silent call.
6240         * procfs.c (procfs_target::detach): Pass inferior pointer to
6241         detach_inferior.
6242         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6243         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6244         delete_thread_silent call.
6245         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6246         pass thread_info pointer to delete_thread.
6247         (windows_nat_target::detach): Pass inferior pointer to
6248         delete_inferior.
6249
6250 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6251
6252         * regcache.c (readable_regcache::read_part): Fix asserts.
6253         (reg_buffer::raw_collect_part): New function.
6254         (regcache::write_part): Fix asserts.
6255         (reg_buffer::raw_supply_part): New function.
6256         (regcache::transfer_regset_register): New helper function.
6257         (regcache::transfer_regset): Call new functions.
6258         (regcache_supply_regset): Use gdb_byte*.
6259         (regcache::supply_regset): Likewise.
6260         (regcache_collect_regset): Likewise.
6261         (regcache::collect_regset): Likewise.
6262         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6263         (reg_buffer::raw_supply_part): Likewise.
6264         (regcache::transfer_regset_register): Likewise.
6265         (regcache::transfer_regset): Use gdb_byte*.
6266
6267 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6268
6269         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6270
6271 2018-06-21  Pedro Alves  <palves@redhat.com>
6272
6273         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6274         instead of a ptid_t.  All callers adjusted.
6275         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6276         adjusted.
6277         (print_ada_task_info, display_current_task_id, task_command_1):
6278         Adjust.
6279         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6280         inferior_thread.
6281         (breakpoint_kind): Adjust.
6282         (remove_breakpoints_pid): Rename to ...
6283         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6284         pointer.  All callers adjusted.
6285         (bpstat_clear_actions): Use inferior_thread.
6286         (get_bpstat_thread): New.
6287         (bpstat_do_actions): Use it.
6288         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6289         to take a thread_info pointer.  All callers adjusted.
6290         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6291         (breakpoint_re_set_thread): Use inferior_thread.
6292         * breakpoint.h (struct inferior): Forward declare.
6293         (bpstat_stop_status): Update.
6294         (remove_breakpoints_pid): Delete.
6295         (remove_breakpoints_inf): New.
6296         * bsd-uthread.c (bsd_uthread_target::wait)
6297         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6298         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6299         (maint_btrace_packet_history_cmd)
6300         (maint_btrace_clear_packet_history_cmd): Adjust.
6301         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6302         inferior_thread.
6303         * cli/cli-interp.c: Include "inferior.h".
6304         * common/refcounted-object.h (struct
6305         refcounted_object_ref_policy): New.
6306         * compile/compile-object-load.c: Include gdbthread.h.
6307         (store_regs): Use inferior_thread.
6308         * corelow.c (core_target::close): Use current_inferior.
6309         (core_target_open): Adjust to use first_thread_of_inferior and use
6310         the current inferior.
6311         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6312         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6313         <thread>: ... this new field.  All references adjusted.
6314         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6315         Take a thread_info pointer instead of a ptid_t.
6316         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6317         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6318         thread_info pointer instead of a ptid_t.
6319         * elfread.c: Include "inferior.h".
6320         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6321         Use inferior_thread.
6322         * eval.c (evaluate_subexp): Likewise.
6323         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6324         inferior_thread.
6325         * gdb_proc_service.h (struct thread_info): Forward declare.
6326         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6327         <thread>: ... this new field.  All references adjusted.
6328         * gdbarch.h, gdbarch.c: Regenerate.
6329         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6330         'thread' parameter.  All implementations and callers adjusted.
6331         * gdbthread.h (thread_info) <set_running>: New method.
6332         (delete_thread, delete_thread_silent): Take a thread_info pointer
6333         instead of a ptid.
6334         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6335         (first_thread_of_process): Delete, replaced by ...
6336         (first_thread_of_inferior): ... this new function.  All callers
6337         adjusted.
6338         (any_live_thread_of_process): Delete, replaced by ...
6339         (any_live_thread_of_inferior): ... this new function.  All callers
6340         adjusted.
6341         (switch_to_thread, switch_to_no_thread): Declare.
6342         (is_executing): Delete.
6343         (enable_thread_stack_temporaries): Update comment.
6344         <enable_thread_stack_temporaries>: Take a thread_info pointer
6345         instead of a ptid_t.  Incref the thread.
6346         <~enable_thread_stack_temporaries>: Decref the thread.
6347         <m_ptid>: Delete
6348         <m_thr>: New.
6349         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6350         (get_last_thread_stack_temporary)
6351         (value_in_thread_stack_temporaries, can_access_registers_thread):
6352         Take a thread_info pointer instead of a ptid_t.  All callers
6353         adjusted.
6354         * infcall.c (get_call_return_value): Use inferior_thread.
6355         (run_inferior_call): Work with thread pointers instead of ptid_t.
6356         (call_function_by_hand_dummy): Work with thread pointers instead
6357         of ptid_t.  Use thread_info_ref.
6358         * infcmd.c (proceed_thread_callback): Access thread's state
6359         directly.
6360         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6361         access thread's state directly.
6362         (continue_command): Use inferior_thread.
6363         (info_program_command): Use find_thread_ptid and access thread
6364         state directly.
6365         (proceed_after_attach_callback): Use thread state directly.
6366         (notice_new_inferior): Take a thread_info pointer instead of a
6367         ptid_t.  All callers adjusted.
6368         (exit_inferior): Take an inferior pointer instead of a pid.  All
6369         callers adjusted.
6370         (exit_inferior_silent): New.
6371         (detach_inferior): Delete.
6372         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6373         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6374         (detach_inferior_command, kill_inferior_command): Use
6375         find_inferior_id instead of valid_gdb_inferior_id and
6376         gdb_inferior_id_to_pid.
6377         (inferior_command): Use inferior and thread pointers.
6378         * inferior.h (struct thread_info): Forward declare.
6379         (notice_new_inferior): Take a thread_info pointer instead of a
6380         ptid_t.  All callers adjusted.
6381         (detach_inferior): Delete declaration.
6382         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6383         instead of a pid.  All callers adjusted.
6384         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6385         (valid_gdb_inferior_id): Delete.
6386         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6387         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6388         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6389         ...
6390         <inf>: ... this new field.
6391         <step_ptid>: Delete, replaced by ...
6392         <step_thread>: ... this new field.
6393         (get_displaced_stepping_state): Take an inferior pointer instead
6394         of a pid.  All callers adjusted.
6395         (displaced_step_in_progress_any_inferior): Adjust.
6396         (displaced_step_in_progress_thread): Take a thread pointer instead
6397         of a ptid_t.  All callers adjusted.
6398         (displaced_step_in_progress, add_displaced_stepping_state): Take
6399         an inferior pointer instead of a pid.  All callers adjusted.
6400         (get_displaced_step_closure_by_addr): Adjust.
6401         (remove_displaced_stepping_state): Take an inferior pointer
6402         instead of a pid.  All callers adjusted.
6403         (displaced_step_prepare_throw, displaced_step_prepare)
6404         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6405         All callers adjusted.
6406         (start_step_over): Adjust.
6407         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6408         displaced step queue.
6409         (do_target_resume): Adjust.
6410         (fetch_inferior_event): Use inferior_thread.
6411         (context_switch, get_inferior_stop_soon): Take an
6412         execution_control_state pointer instead of a ptid_t.  All callers
6413         adjusted.
6414         (switch_to_thread_cleanup): Delete.
6415         (stop_all_threads): Use scoped_restore_current_thread.
6416         * inline-frame.c: Include "gdbthread.h".
6417         (inline_state) <inline_state>: Take a thread pointer instead of a
6418         ptid_t.  All callers adjusted.
6419         <ptid>: Delete, replaced by ...
6420         <thread>: ... this new field.
6421         (find_inline_frame_state): Take a thread pointer instead of a
6422         ptid_t.  All callers adjusted.
6423         (skip_inline_frames, step_into_inline_frame)
6424         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6425         pointer instead of a ptid_t.  All callers adjusted.
6426         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6427         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6428         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6429         pointers directly.
6430         * linux-nat.c (get_detach_signal): Likewise.
6431         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6432         (thread_db_notice_clone): Adjust.
6433         (thread_db_find_new_threads_silently)
6434         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6435         a thread pointer instead of a ptid_t.  All callers adjusted.
6436         * mi/mi-cmd-var.c: Include "inferior.h".
6437         (mi_cmd_var_update_iter): Update to use thread pointers.
6438         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6439         inferior directly.
6440         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6441         out to ...
6442         (mi_output_running): ... this new function.
6443         (mi_on_resume_1): Adjust to use it.
6444         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6445         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6446         directly.
6447         (interrupt_thread_callback): : Adjust to use thread and inferior
6448         pointers.
6449         * proc-service.c: Include "gdbthread.h".
6450         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6451         * progspace-and-thread.c: Include "inferior.h".
6452         * progspace.c: Include "inferior.h".
6453         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6454         hold a reference to an inferior_object.
6455         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6456         inferior_thread.
6457         * python/py-inferior.c (struct inferior_object): Give the type a
6458         tag name instead of a typedef.
6459         (python_on_normal_stop): No need to check if the current thread is
6460         listed.
6461         (inferior_to_inferior_object): Change return type to
6462         inferior_object.  All callers adjusted.
6463         (find_thread_object): Delete, bits factored out to ...
6464         (thread_to_thread_object): ... this new function.
6465         * python/py-infthread.c (create_thread_object): Use
6466         inferior_to_inferior_object.
6467         (thpy_is_stopped): Use thread pointer directly.
6468         (gdbpy_selected_thread): Use inferior_thread.
6469         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6470         field, replaced with ...
6471         <thread>: ... this new field.  All users adjusted.
6472         (btpy_insn_or_gap_new): Drop const.
6473         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6474         callers adjusted.
6475         * python/py-record.c: Include "gdbthread.h".
6476         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6477         a ptid_t.  All callers adjusted.
6478         (gdbpy_current_recording): Use inferior_thread.
6479         * python/py-record.h (recpy_record_object) <ptid>: Delete
6480         field, replaced with ...
6481         <thread>: ... this new field.  All users adjusted.
6482         (recpy_element_object) <ptid>: Delete
6483         field, replaced with ...
6484         <thread>: ... this new field.  All users adjusted.
6485         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6486         a ptid_t.  All callers adjusted.
6487         * python/py-threadevent.c: Include "gdbthread.h".
6488         (get_event_thread): Use thread_to_thread_object.
6489         * python/python-internal.h (struct inferior_object): Forward
6490         declare.
6491         (find_thread_object, find_inferior_object): Delete declarations.
6492         (thread_to_thread_object, inferior_to_inferior_object): New
6493         declarations.
6494         * record-btrace.c: Include "inferior.h".
6495         (require_btrace_thread): Use inferior_thread.
6496         (record_btrace_frame_sniffer)
6497         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6498         (get_thread_current_frame): Use scoped_restore_current_thread and
6499         switch_to_thread.
6500         (get_thread_current_frame): Use thread pointer directly.
6501         (record_btrace_replay_at_breakpoint): Use thread's inferior
6502         pointer directly.
6503         * record-full.c: Include "inferior.h".
6504         * regcache.c: Include "gdbthread.h".
6505         (get_thread_arch_regcache): Use the inferior's address space
6506         directly.
6507         (get_thread_regcache, registers_changed_thread): New.
6508         * regcache.h (get_thread_regcache(thread_info *thread)): New
6509         overload.
6510         (registers_changed_thread): New.
6511         (remote_target) <remote_detach_1>: Swap order of parameters.
6512         (remote_add_thread): <remote_add_thread>: Return the new thread.
6513         (get_remote_thread_info(ptid_t)): New overload.
6514         (remote_target::remote_notice_new_inferior): Use thread pointers
6515         directly.
6516         (remote_target::process_initial_stop_replies): Use
6517         thread_info::set_running.
6518         (remote_target::remote_detach_1, remote_target::detach)
6519         (extended_remote_target::detach): Adjust.
6520         * stack.c (frame_show_address): Use inferior_thread.
6521         * target-debug.h (target_debug_print_thread_info_pp): New.
6522         * target-delegates.c: Regenerate.
6523         * target.c (default_thread_address_space): Delete.
6524         (memory_xfer_partial_1): Use current_inferior.
6525         (target_detach): Use current_inferior.
6526         (target_thread_address_space): Delete.
6527         (generic_mourn_inferior): Use current_inferior.
6528         * target.h (struct target_ops) <thread_address_space>: Delete.
6529         (target_thread_address_space): Delete.
6530         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6531         pointers directly.
6532         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6533         thread pointer instead of a ptid_t.  Adjust all callers.
6534         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6535         (first_thread_of_process): Delete, replaced by ...
6536         (first_thread_of_inferior): ... this new function.  All callers
6537         adjusted.
6538         (any_thread_of_process): Rename to ...
6539         (any_thread_of_inferior): ... this, and take an inferior pointer.
6540         (any_live_thread_of_process): Rename to ...
6541         (any_live_thread_of_inferior): ... this, and take an inferior
6542         pointer.
6543         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6544         (value_in_thread_stack_temporaries)
6545         (get_last_thread_stack_temporary): Take a thread pointer instead
6546         of a ptid_t.  Adjust all callers.
6547         (thread_info::set_running): New.
6548         (validate_registers_access): Use inferior_thread.
6549         (can_access_registers_ptid): Rename to ...
6550         (can_access_registers_thread): ... this, and take a thread
6551         pointer.
6552         (print_thread_info_1): Adjust to compare thread pointers instead
6553         of ptids.
6554         (switch_to_no_thread, switch_to_thread): Make extern.
6555         (scoped_restore_current_thread::~scoped_restore_current_thread):
6556         Use m_thread pointer directly.
6557         (scoped_restore_current_thread::scoped_restore_current_thread):
6558         Use inferior_thread.
6559         (thread_command): Use thread pointer directly.
6560         (thread_num_make_value_helper): Use inferior_thread.
6561         * top.c (execute_command): Use inferior_thread.
6562         * tui/tui-interp.c: Include "inferior.h".
6563         * varobj.c (varobj_create): Use inferior_thread.
6564         (value_of_root_1): Use find_thread_global_id instead of
6565         global_thread_id_to_ptid.
6566
6567 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6568
6569         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6570         possible.
6571         (regcache::write_part): Likewise.
6572         (readable_regcache::cooked_read_part): Update comment.
6573         (readable_regcache::cooked_write_part): Likewise.
6574         * regcache.h: (readable_regcache::read_part): Likewise.
6575         (regcache::write_part): Likewise.
6576
6577 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6578             Dirk Schubert  <dirk.schubert@arm.com>
6579
6580         * aarch64-linux-nat.c (post_attach): New.
6581         (aarch64_linux_nat_target::post_attach): Override post_attach to
6582         record the number of hardware debug registers.
6583
6584 2018-06-20  Tom Tromey  <tom@tromey.com>
6585
6586         * python/py-param.c (add_setshow_generic): Make parameters const.
6587         (parmpy_init): Update.
6588
6589 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6590
6591         * regcache.h (regcache_cooked_read_ftype): Rename to...
6592         (register_read_ftype): ...this, change type to function_view.
6593         (class reg_buffer) <save>: Remove src parameter.
6594         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6595         parameter non-const in first overload.  Remove src parameter in
6596         second overload.
6597         * regcache.c (do_cooked_read): Remove.
6598         (readonly_detached_regcache::readonly_detached_regcache): Make
6599         parameter non-const, adjust call to other constructor.
6600         (reg_buffer::save): Remove src parameter.
6601         * frame.c (do_frame_register_read): Remove.
6602         (frame_save_as_regcache): Use lambda function.
6603         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6604         parameter to ppu2spu_data *.
6605         (ppu2spu_sniffer): Use lambda function.
6606
6607 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6608
6609         * record-full.c (record_full_target::insert_breakpoint): Remove
6610         "struct" keyword, add const.
6611
6612 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6613
6614         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6615         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6616         * configure.ac: Remove AC_PREREQ, add missing quoting.
6617         * gnulib/configure.ac: Modernize usage of
6618         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6619         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6620         (AUTOMAKE_VERSION): Bump to 1.15.1.
6621         * configure: Re-generate.
6622         * config.in: Re-generate.
6623         * aclocal.m4: Re-generate.
6624         * gnulib/aclocal.m4: Re-generate.
6625         * gnulib/config.in: Re-generate.
6626         * gnulib/configure: Re-generate.
6627         * gnulib/import/Makefile.in: Re-generate.
6628
6629 2018-06-19  Pedro Alves  <palves@redhat.com>
6630
6631         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6632         (lookup_minimal_symbol_by_pc_section): ... here with
6633         gdb_assert_not_reached added.
6634
6635 2018-06-19  Pedro Alves  <palves@redhat.com>
6636
6637         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6638         parameter with a block parameter.  Compare location's block symbol
6639         with the frame's block instead of addresses.
6640         (skip_inline_frames): Pass the current block instead of the
6641         frame's address.  Break out as soon as we determine the frame
6642         should not be skipped.
6643
6644 2018-06-18  Tom Tromey  <tom@tromey.com>
6645
6646         * solib-aix.c (solib_aix_get_section_offsets): Return
6647         unique_xmalloc_ptr.
6648         (solib_aix_solib_create_inferior_hook): Update.
6649
6650 2018-06-18  Tom Tromey  <tom@tromey.com>
6651
6652         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6653
6654 2018-06-18  Tom Tromey  <tom@tromey.com>
6655
6656         * solib-frv.c (frv_relocate_main_executable): Use
6657         unique_xmalloc_ptr.
6658         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6659         unique_xmalloc_ptr.
6660
6661 2018-06-18  Tom Tromey  <tom@tromey.com>
6662
6663         * objfiles.h (inhibit_section_map_updates): Update.
6664         (resume_section_map_updates, resume_section_map_updates_cleanup):
6665         Remove.
6666         * solib-svr4.c (svr4_handle_solib_event): Update.
6667         * objfiles.c (inhibit_section_map_updates): Return
6668         scoped_restore_tmpl<int>.
6669         (resume_section_map_updates, resume_section_map_updates_cleanup):
6670         Remove.
6671
6672 2018-06-18  Tom Tromey  <tom@tromey.com>
6673
6674         * valprint.h (read_string): Update.
6675         * valprint.c (read_string): Change type of "buffer".
6676         (val_print_string): Update.
6677         * python/py-value.c (valpy_string): Update.
6678         * language.h (struct language_defn) <la_get_string>: Change
6679         type of "buffer".
6680         (default_get_string, c_get_string): Update.
6681         * language.c (default_get_string): Change type of "buffer".
6682         * guile/scm-value.c (gdbscm_value_to_string): Update.
6683         * c-lang.c (c_get_string): Change type of "buffer".
6684
6685 2018-06-18  Tom Tromey  <tom@tromey.com>
6686
6687         * ser-mingw.c (struct pipe_state_destroyer): New.
6688         (pipe_state_up): New typedef.
6689         (cleanup_pipe_state): Remove.
6690         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6691
6692 2018-06-18  Tom Tromey  <tom@tromey.com>
6693
6694         * rust-lang.h (rust_yyerror): Don't declare.
6695         * rust-lang.c (rust_language_defn): Update.
6696         * rust-exp.y (yyerror): Now static.
6697         * parse.c (parse_exp_in_context_1): Update.
6698         * p-lang.h (p_yyerror): Don't declare.
6699         * p-lang.c (p_language_defn): Update.
6700         * p-exp.y (yyerror): Now static.
6701         * opencl-lang.c (opencl_language_defn): Update.
6702         * objc-lang.c (objc_language_defn): Update.
6703         * m2-lang.h (m2_yyerror): Don't declare.
6704         * m2-lang.c (m2_language_defn): Update.
6705         * m2-exp.y (yyerror): Now static.
6706         * language.h (struct language_defn) <la_error>: Remove.
6707         * language.c (unk_lang_error): Remove.
6708         (unknown_language_defn, auto_language_defn): Remove.
6709         * go-lang.h (go_yyerror): Don't declare.
6710         * go-lang.c (go_language_defn): Update.
6711         * go-exp.y (yyerror): Now static.
6712         * f-lang.h (f_yyerror): Don't declare.
6713         * f-lang.c (f_language_defn): Update.
6714         * f-exp.y (yyerror): Now static.
6715         * d-lang.h (d_yyerror): Don't declare.
6716         * d-lang.c (d_language_defn): Update.
6717         * d-exp.y (yyerror): Now static.
6718         * c-lang.h (c_yyerror): Don't declare.
6719         * c-lang.c (c_language_defn, cplus_language_defn)
6720         (asm_language_defn, minimal_language_defn): Update.
6721         * c-exp.y (yyerror): Now static.
6722         * ada-lang.h (ada_yyerror): Don't declare.
6723         * ada-lang.c (ada_language_defn): Update.
6724         * ada-exp.y (yyerror): Now static.
6725
6726 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6727
6728         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6729         (store_sveregs_to_thread): Likewise.
6730         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6731         (aarch64_linux_store_inferior_registers): Likewise.
6732         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6733         function.
6734         (aarch64_sve_regs_copy_to_regcache): Likewise.
6735         (aarch64_sve_regs_copy_from_regcache): Likewise.
6736         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6737         declaration.
6738         (aarch64_sve_regs_copy_to_regcache): Likewise.
6739         (aarch64_sve_regs_copy_from_regcache): Likewise.
6740         (sve_context): Structure from Linux headers.
6741         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6742         (SVE_SIG_ZREG_SIZE): Likewise.
6743         (SVE_SIG_PREG_SIZE): Likewise.
6744         (SVE_SIG_FFR_SIZE): Likewise.
6745         (SVE_SIG_REGS_OFFSET): Likewise.
6746         (SVE_SIG_ZREGS_OFFSET): Likewise.
6747         (SVE_SIG_ZREG_OFFSET): Likewise.
6748         (SVE_SIG_ZREGS_SIZE): Likewise.
6749         (SVE_SIG_PREGS_OFFSET): Likewise.
6750         (SVE_SIG_PREG_OFFSET): Likewise.
6751         (SVE_SIG_PREGS_SIZE): Likewise.
6752         (SVE_SIG_FFR_OFFSET): Likewise.
6753         (SVE_SIG_REGS_SIZE): Likewise.
6754         (SVE_SIG_CONTEXT_SIZE): Likewise.
6755         (SVE_PT_REGS_MASK): Likewise.
6756         (SVE_PT_REGS_FPSIMD): Likewise.
6757         (SVE_PT_REGS_SVE): Likewise.
6758         (SVE_PT_VL_INHERIT): Likewise.
6759         (SVE_PT_VL_ONEXEC): Likewise.
6760         (SVE_PT_REGS_OFFSET): Likewise.
6761         (SVE_PT_FPSIMD_OFFSET): Likewise.
6762         (SVE_PT_FPSIMD_SIZE): Likewise.
6763         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6764         (SVE_PT_SVE_PREG_SIZE): Likewise.
6765         (SVE_PT_SVE_FFR_SIZE): Likewise.
6766         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6767         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6768         (__SVE_SIG_TO_PT): Likewise.
6769         (SVE_PT_SVE_OFFSET): Likewise.
6770         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6771         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6772         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6773         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6774         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6775         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6776         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6777         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6778         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6779         (SVE_PT_SVE_SIZE): Likewise.
6780         (SVE_PT_SIZE): Likewise.
6781         (HAS_SVE_STATE): New define.
6782
6783 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6784
6785         * nat/aarch64-sve-linux-sigcontext.h: New file.
6786         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6787         new files.
6788         (SVE_VQ_MIN): Likewise.
6789         (SVE_VQ_MAX): Likewise.
6790         (SVE_VL_MIN): Likewise.
6791         (SVE_VL_MAX): Likewise.
6792         (SVE_NUM_ZREGS): Likewise.
6793         (SVE_NUM_PREGS): Likewise.
6794         (sve_vl_valid): Likewise.
6795         (struct user_sve_header): Likewise.
6796
6797 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6798             Richard Bunt <Richard.Bunt@arm.com>
6799
6800         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6801         was requested by GDB.
6802
6803 2018-06-15  Tom de Vries  <tdevries@suse.de>
6804
6805         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6806
6807 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6808
6809         * gnulib/update-gnulib.sh: Print expected versions of
6810         autoconf/aclocal.
6811
6812 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6813
6814         * arch-utils.c (default_type_align): Use type_length_units.
6815         * gdbtypes.c (type_align): Use type_length_units.
6816
6817 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6818
6819         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6820         of 'define' command.
6821
6822 2018-06-14  Tom de Vries  <tdevries@suse.de>
6823
6824         PR cli/22573
6825         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6826         get_no_prettyformat_print_options.
6827
6828 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6829
6830         * sparc-nat.h: Include target.h.
6831         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6832         <fetch_registers>: Remove this argument in function call.
6833         <store_registers>: Remove this argument in function call, remove
6834         extra semicolon.
6835         <low_forget_process>: Call sparc64_forget_process instead of
6836         sparc_forget_process.
6837
6838 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6839
6840         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6841         (procfs_target::make_corefile_notes): Adjust to new
6842         target_read_alloc return type.
6843
6844 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6845             Stephen Roberts  <stephen.roberts@arm.com>
6846
6847         PR gdb/22882
6848         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6849         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6850         Move should_notify_stop local into more inner scope.
6851
6852 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6853             Stephen Roberts  <stephen.roberts@arm.com>
6854
6855         PR gdb/22882
6856         * infrun.c (resume_1): Add call to mark_async_event_handler.
6857
6858 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6859
6860         * infrun.c (do_target_wait): Change old version of $pc printed.
6861
6862 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6863
6864         * dwarf2read.c (read_index_from_section): Rename to...
6865         (read_gdb_index_from_section): ... this, update all callers.
6866         (dwarf2_read_index): Rename to...
6867         (dwarf2_read_gdb_index): ... this, update all callers.
6868
6869 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6870
6871         * gdb/hppa-linux-nat.c
6872         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6873         hppa_linux_nat_target::fetch_registers.
6874
6875 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6876
6877         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6878         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6879         (AARCH64_DWARF_SVE_FFR): Likewise.
6880         (AARCH64_DWARF_SVE_P0): Likewise.
6881         (AARCH64_DWARF_SVE_Z0): Likewise.
6882
6883 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6884
6885         * common/common-regcache.h (raw_compare): New function.
6886         * regcache.c (regcache::raw_compare): Likewise.
6887         * regcache.h (regcache::raw_compare): New declaration.
6888
6889 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6890
6891         * common/common-regcache.h (reg_buffer_common): New structure.
6892         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6893         (reg_buffer::raw_supply): Likewise.
6894         (reg_buffer::raw_supply_integer): Likewise.
6895         (reg_buffer::raw_supply_zeroed): Likewise.
6896         (reg_buffer::raw_collect): Likewise.
6897         (reg_buffer::raw_collect_integer): Likewise.
6898         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6899         (reg_buffer::raw_supply): Likewise.
6900         (reg_buffer::raw_supply_integer): Likewise.
6901         (reg_buffer::raw_supply_zeroed): Likewise.
6902         (reg_buffer::raw_collect): Likewise.
6903         (reg_buffer::raw_collect_integer): Likewise.
6904
6905 2018-06-10  Tom Tromey  <tom@tromey.com>
6906
6907         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6908         (class remote_state) <stop_reply_queue>: Now std::vector.
6909         (remote_state::~remote_state)
6910         (remote_target::stop_reply_queue_length): Update.
6911         (struct queue_iter_param, remove_child_of_pending_fork)
6912         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6913         (check_pending_event_prevents_wildcard_vcont_callback)
6914         (remove_stop_reply_for_inferior)
6915         (remove_stop_reply_of_remote_state)
6916         (remote_notif_remove_once_on_match)
6917         (stop_reply_match_ptid_and_ws)
6918         (remote_kill_child_of_pending_fork): Remove.
6919         (remote_target::remove_new_fork_children)
6920         (remote_target::check_pending_events_prevent_wildcard_vcont)
6921         (remote_target::discard_pending_stop_replies)
6922         (remote_target::discard_pending_stop_replies_in_queue)
6923         (remote_target::remote_notif_remove_queued_reply)
6924         (remote_target::queued_stop_reply)
6925         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6926         (remote_target::wait, remote_target::kill_new_fork_children)
6927         (remote_target::async): Update.
6928
6929 2018-06-10  Tom Tromey  <tom@tromey.com>
6930
6931         * record-full.c (record_full_arch_list_cleanups): Remove.
6932         (record_full_message): Use try/catch.
6933         (record_full_wait_cleanups): Remove.
6934         (record_full_wait_1): Use try/catch.
6935         (record_full_restore): Likewise.
6936
6937 2018-06-10  Tom Tromey  <tom@tromey.com>
6938
6939         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6940         declare VEC.  Add constructor.
6941         <in_target_beneath>: Now bool.
6942         (record_full_breakpoints): Now a std::vector, static.
6943         (record_full_sync_record_breakpoints)
6944         (record_full_init_record_breakpoints)
6945         (record_full_target::insert_breakpoint)
6946         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6947
6948 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6949
6950         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6951         * serial.c (serial_interface_lookup): Remove struct keyword.
6952
6953 2018-06-10  Tom Tromey  <tom@tromey.com>
6954
6955         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6956         method.
6957         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6958         a method.
6959         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6960         method.
6961         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6962         "beneath" as a method.
6963         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6964         Use "beneath" as a method.
6965
6966 2018-06-10  Tom Tromey  <tom@tromey.com>
6967
6968         * tracefile.c (struct trace_file_writer_deleter): New.
6969         <operator()>: Rename from trace_file_writer_xfree.
6970         (trace_file_writer_up): New typedef.
6971         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6972
6973 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6974
6975         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6976         <m_registers, m_register_status>: Change type to
6977         std::unique_ptr.
6978         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6979         XCNEWVEC.
6980
6981 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6982
6983         * common/common-regcache.h (enum register_status): Add
6984         underlying type "signed char".
6985         * regcache.h (reg_buffer) <m_register_status>: Change type to
6986         register_status *.
6987         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6988         register_status instead of signed char.
6989         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6990         (reg_buffer::get_register_status): Remove cast.
6991         (readable_regcache::raw_read): Remove cast.
6992         (readable_regcache::cooked_read): Remove cast.
6993
6994 2018-06-09  Tom Tromey  <tom@tromey.com>
6995
6996         * source.c (reverse_search_command, forward_search_command): Use
6997         scoped_fd.
6998
6999 2018-06-09  Tom Tromey  <tom@tromey.com>
7000
7001         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7002         (serial_ops_list): Now static, std::vector.
7003         (serial_interface_lookup, serial_add_interface): Update.
7004
7005 2018-06-09  Tom Tromey  <tom@tromey.com>
7006
7007         * dwarf2read.c (process_cu_includes): Update.
7008         (process_full_comp_unit): Update.
7009         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7010         std::vector.
7011
7012 2018-06-08  Paul Koning  <paul_koning@dell.com>
7013
7014         PR gdb/23252
7015
7016         * python/python.c (do_start_initialization):
7017         Avoid call to internal Python API.
7018         (init__gdb_module): New function.
7019
7020 2018-06-08  Gary Benson <gbenson@redhat.com>
7021
7022         * linux-thread-db.c (valprint.h): New include.
7023         (struct check_thread_db_info): New structure.
7024         (check_thread_db_on_load, tdb_testinfo): New static globals.
7025         (check_thread_db, check_thread_db_callback): New functions.
7026         (try_thread_db_load_1): Run integrity checks if requested.
7027         (maintenance_check_libthread_db): New function.
7028         (_initialize_thread_db): Register "maint check libthread-db"
7029         and "maint set/show check-libthread-db".
7030         * NEWS: Mention the above new commands.
7031
7032 2018-06-08  Tom Tromey  <tom@tromey.com>
7033
7034         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7035         now a method.
7036
7037 2018-06-08  Tom Tromey  <tom@tromey.com>
7038
7039         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7040
7041 2018-06-08  Tom Tromey  <tom@tromey.com>
7042
7043         * common/btrace-common.h (struct btrace_data): Add constructor,
7044         destructor, move assignment operator.
7045         <empty, clear, fini>: New methods.
7046         <format>: Initialize.
7047         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7048         (btrace_data_empty): Don't declare.
7049         * common/btrace-common.c (btrace_data_init): Remove.
7050         (btrace_data::fini): Rename from btrace_data_fini.
7051         (btrace_data::empty): Rename from btrace_data_empty.
7052         (btrace_data::clear): Rename from btrace_data_clear.  Return
7053         bool.
7054         * btrace.h (make_cleanup_btrace_data): Don't declare.
7055         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7056         (parse_xml_btrace): Update.
7057         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7058         (maint_btrace_clear_packet_history_cmd): Update.
7059
7060 2018-06-07  Pedro Alves  <palves@redhat.com>
7061
7062         * target.h (target_ops) <beneath>: Now a method.  All references
7063         updated.
7064         (class target_stack): New.
7065         * target.c (g_target_stack): New.
7066         (g_current_top_target): Delete.
7067         (current_top_target): Get the top target out of g_target_stack.
7068         (target_stack::push, target_stack::unpush): New.
7069         (push_target, unpush_target): Reimplement.
7070         (target_is_pushed): Reimplement in terms of g_target_stack.
7071         (target_ops::beneath, target_stack::find_beneath): New.
7072
7073 2018-06-07  Pedro Alves  <palves@redhat.com>
7074
7075         * target.h (find_target_beneath): Delete declaration.
7076         * target.c (find_target_beneath): Delete definition.
7077         * aix-thread.c: All callers of find_target_beneath adjusted to
7078         call target_ops::beneath instead.
7079         * bsd-uthread.c: Likewise.
7080         * linux-thread-db.c: Likewise.
7081         * ravenscar-thread.c: Likewise.
7082         * sol-thread.c: Likewise.
7083         * spu-multiarch.c: Likewise.
7084
7085 2018-06-07  Pedro Alves  <palves@redhat.com>
7086
7087         * target.h (target_ops) <beneath>: Now a method.  All references
7088         updated.
7089         (target_ops) <m_beneath>: New.
7090         * target.c (target_ops::beneath): New.
7091         * corelow.c: Adjust all references to target_ops::beneath.
7092         * linux-thread-db.c: Likewise.
7093         * make-target-delegates: Likewise.
7094         * record-btrace.c: Likewise.
7095         * record-full.c: Likewise.
7096         * remote.c: Likewise.
7097         * target.c: Likewise.
7098         * target-delegates.c: Regenerate.
7099
7100 2018-06-07  Pedro Alves  <palves@redhat.com>
7101
7102         * target.h (target_stack): Delete.
7103         (current_top_target): Declare function.
7104         * target.c (target_stack): Delete.
7105         (g_current_top_target): New.
7106         (current_top_target): New function.
7107         * auxv.c: Use current_top_target instead of target_stack
7108         throughout.
7109         * avr-tdep.c: Likewise.
7110         * breakpoint.c: Likewise.
7111         * corefile.c: Likewise.
7112         * elfread.c: Likewise.
7113         * eval.c: Likewise.
7114         * exceptions.c: Likewise.
7115         * frame.c: Likewise.
7116         * gdbarch-selftests.c: Likewise.
7117         * gnu-v3-abi.c: Likewise.
7118         * ia64-tdep.c: Likewise.
7119         * ia64-vms-tdep.c: Likewise.
7120         * infcall.c: Likewise.
7121         * infcmd.c: Likewise.
7122         * infrun.c: Likewise.
7123         * linespec.c: Likewise.
7124         * linux-tdep.c: Likewise.
7125         * minsyms.c: Likewise.
7126         * ppc-linux-nat.c: Likewise.
7127         * ppc-linux-tdep.c: Likewise.
7128         * procfs.c: Likewise.
7129         * regcache.c: Likewise.
7130         * remote.c: Likewise.
7131         * rs6000-tdep.c: Likewise.
7132         * s390-linux-nat.c: Likewise.
7133         * s390-tdep.c: Likewise.
7134         * solib-aix.c: Likewise.
7135         * solib-darwin.c: Likewise.
7136         * solib-dsbt.c: Likewise.
7137         * solib-spu.c: Likewise.
7138         * solib-svr4.c: Likewise.
7139         * solib-target.c: Likewise.
7140         * sparc-tdep.c: Likewise.
7141         * sparc64-tdep.c: Likewise.
7142         * spu-tdep.c: Likewise.
7143         * symfile.c: Likewise.
7144         * symtab.c: Likewise.
7145         * target-descriptions.c: Likewise.
7146         * target-memory.c: Likewise.
7147         * target.c: Likewise.
7148         * target.h: Likewise.
7149         * tracefile-tfile.c: Likewise.
7150         * tracepoint.c: Likewise.
7151         * valops.c: Likewise.
7152         * valprint.c: Likewise.
7153         * value.c: Likewise.
7154         * windows-tdep.c: Likewise.
7155         * mi/mi-main.c: Likewise.
7156
7157 2018-06-07  Tom Tromey  <tom@tromey.com>
7158
7159         * valprint.h (build_address_symbolic): Declare.
7160         * printcmd.c (print_address_symbolic): Update.
7161         (build_address_symbolic): Change "name" and "filename" to
7162         std::string.
7163         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7164         Update.
7165         * defs.h (build_address_symbolic): Remove declaration.
7166
7167 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7168
7169         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7170         (aarch64_vnv_type): Add function.
7171         (aarch64_pseudo_register_name): Add V regs for SVE.
7172         (aarch64_pseudo_register_type): Likewise.
7173         (aarch64_pseudo_register_reggroup_p): Likewise.
7174         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7175         (aarch64_pseudo_read_value): Add V regs for SVE.
7176         (aarch64_pseudo_write_2): Use V0 offset for SVE
7177         (aarch64_pseudo_write): Add V regs for SVE.
7178         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7179
7180 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7181
7182         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7183         (sve_vl_from_vq): Likewise.
7184
7185 2018-06-05  Tom Tromey  <tom@tromey.com>
7186
7187         * cli/cli-cmds.c (show_version): Update.
7188         * top.c (print_gdb_version): Add "interactive" parameter.
7189         Update.
7190         * main.c (captured_main_1): Update.
7191         * top.h (print_gdb_version): Add "interactive" parameter and a
7192         comment.
7193
7194 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7195
7196         * common/enum-flags.h: Add trailing semicolon to example in
7197         comment.
7198
7199 2018-06-05  Tom Tromey  <tom@tromey.com>
7200
7201         PR cli/12326:
7202         * NEWS: Add entry about pager.
7203         * utils.c (pagination_disabled_for_command): New global.
7204         (prompt_for_continue): Allow "c" response to prompt.
7205         (reinitialize_more_filter): Clear
7206         pagination_disabled_for_command.
7207         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7208
7209 2018-06-04  Tom Tromey  <tom@tromey.com>
7210
7211         * ada-lang.h (ada_lookup_symbol_list): Update.
7212         * ada-lang.c (resolve_subexp): Update.
7213         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7214         parameter.
7215         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7216         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7217         results parameter to std::vector.
7218         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7219         Update.
7220         * ada-exp.y (block_lookup): Update.
7221         (select_possible_type_sym): Change type of syms.  Remove nsyms
7222         parameter.
7223         (write_var_or_type, write_name_assoc): Update.
7224
7225 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7226
7227         * windows-nat.c (windows_nat_target::xfer_partial): Return
7228         TARGET_XFER_E_IO if we need to delegate to the target beneath
7229         but BENEATH is NULL.
7230
7231 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7232
7233         * Makefile.in (config.status): Add configure.nat as a
7234         dependency.
7235
7236 2018-06-04  Tom Tromey  <tom@tromey.com>
7237
7238         * cp-name-parser.y (cpname_state): Add method declarations.
7239         (HANDLE_QUAL): Update.
7240         (cpname_state::d_grab, cpname_state::fill_comp)
7241         (cpname_state::make_operator, cpname_state::make_dtor)
7242         (cpname_state::make_builtin_type, cpname_state::make_name)
7243         (cpname_state::d_qualify, cpname_state::d_int_type)
7244         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7245         (%union): Move earlier.
7246
7247 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7248
7249         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7250
7251 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7252
7253         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7254         (aarch64_pseudo_write_1): Likewise.
7255         (aarch64_pseudo_read_value): Use helper.
7256         (aarch64_pseudo_write): Likewise.
7257
7258 2018-06-04  Pedro Alves  <palves@redhat.com>
7259
7260         * darwin-nat.c (darwin_ops): Delete.
7261         (darwin_attach_pid): Use get_native_target.
7262
7263 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7264
7265         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7266         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7267
7268 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7269
7270         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7271         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7272         (aarch64_gdbarch_init): Check for SVE.
7273         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7274
7275 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7276
7277         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7278         * aarch64-tdep.h (aarch64_read_description): Likewise.
7279         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7280         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7281         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7282         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7283         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7284
7285 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7286
7287         * value.c (value_fetch_lazy_bitfield): New.
7288         (value_fetch_lazy_memory): New.
7289         (value_fetch_lazy_register): New.
7290         (value_fetch_lazy): Factor out to smaller functions.
7291
7292 2018-06-01  Tom Tromey  <tom@tromey.com>
7293
7294         * cp-name-parser.y (backslashable, represented): Now const.
7295
7296 2018-06-01  Tom Tromey  <tom@tromey.com>
7297
7298         * cp-name-parser.y: Include parser-defs.h.
7299         (parser_fprintf): Remove declaration.
7300
7301 2018-06-01  Tom Tromey  <tom@tromey.com>
7302
7303         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7304         %parse-param.
7305         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7306         (global_result): Remove globals.
7307         (struct cpname_state): New.
7308         (yyparse): Don't declare.
7309         (yylex, yyerror): Move declarations after %union.
7310         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7311         (make_name): Add state parameter.
7312         Update all callers.
7313         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7314         parameter.
7315         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7316         Update.
7317         (yylex): Add lvalp, state parameters.
7318         (yyerror): Add state parameter.
7319         (cp_demangled_name_to_comp): Update.
7320
7321 2018-06-01  Tom Tromey  <tom@tromey.com>
7322
7323         * cp-name-parser.y (parser_fprintf): Declare.
7324         (GDB_YY_REMAP_PREFIX): Define.
7325         Include yy-remap.h.  Don't redefine yy* identifiers.
7326
7327 2018-06-01  Tom Tromey  <tom@tromey.com>
7328
7329         * python/py-type.c (typy_legacy_template_argument): Update.
7330         * cp-support.h (cp_demangled_name_to_comp): Update.
7331         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7332         parameter to be a "std::string *".
7333         (main): Update.
7334
7335 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7336
7337         * ada-lex.l: Include "diagnostics.h" instead of
7338         "common/diagnostics.h".
7339         * unittests/environ-selftests.c: Likewise.
7340         * common/diagnostics.h: Moved to ../include.
7341
7342 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7343
7344         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7345         to language_mode_manual while calling breakpoint_re_set_one.
7346
7347 2018-06-01  Tom Tromey  <tom@tromey.com>
7348
7349         * valops.c (value_cast_structs, destructor_name_p): Update.
7350         * symtab.c (gdb_mangle_name): Update.
7351         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7352         Update.
7353         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7354         (pascal_object_print_value_fields, pascal_object_print_value):
7355         Update.
7356         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7357         * linespec.c (find_methods): Update.
7358         * gdbtypes.h (type_name_no_tag): Remove.
7359         (type_name_or_error): Rename from type_name_no_tag_or_error.
7360         * gdbtypes.c (type_name_no_tag): Remove.
7361         (type_name_or_error): Rename from type_name_no_tag_or_error.
7362         (lookup_struct_elt_type, check_typedef): Update.
7363         * expprint.c (print_subexp_standard): Update.
7364         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7365         * d-namespace.c (d_lookup_nested_symbol): Update.
7366         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7367         (cp_print_class_member): Update.
7368         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7369         * completer.c (add_struct_fields): Update.
7370         * c-typeprint.c (cp_type_print_derivation_info)
7371         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7372         Update.
7373         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7374         (ada_prefer_type, ada_is_exception_sym): Update.
7375
7376 2018-06-01  Tom Tromey  <tom@tromey.com>
7377
7378         * valops.c (enum_constant_from_type, value_namespace_elt)
7379         (value_maybe_namespace_elt): Update.
7380         * valarith.c (find_size_for_pointer_math): Update.
7381         * target-descriptions.c (make_gdb_type): Update.
7382         * symmisc.c (print_symbol): Update.
7383         * stabsread.c (define_symbol, read_type)
7384         (complain_about_struct_wipeout, add_undefined_type)
7385         (cleanup_undefined_types_1): Update.
7386         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7387         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7388         (rust_internal_print_type, rust_composite_type)
7389         (rust_evaluate_funcall, rust_evaluate_subexp)
7390         (rust_inclusive_range_type_p): Update.
7391         * python/py-type.c (typy_get_tag): Update.
7392         * p-typeprint.c (pascal_type_print_base): Update.
7393         * mdebugread.c (parse_symbol, parse_type): Update.
7394         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7395         Update.
7396         * guile/scm-type.c (gdbscm_type_tag): Update.
7397         * go-lang.c (sixg_string_p): Update.
7398         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7399         Update.
7400         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7401         (TYPE_TAG_NAME): Remove.
7402         * gdbtypes.c (type_name_no_tag): Simplify.
7403         (check_typedef, check_types_equal, recursive_dump_type)
7404         (copy_type_recursive, arch_composite_type): Update.
7405         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7406         in summary mode when needed.
7407         * eval.c (evaluate_funcall): Update.
7408         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7409         (process_structure_scope, read_enumeration_type)
7410         (read_namespace_type, read_module_type, determine_prefix): Update.
7411         * cp-support.c (inspect_type): Update.
7412         * coffread.c (process_coff_symbol, decode_base_type): Update.
7413         * c-varobj.c (c_is_path_expr_parent): Update.
7414         * c-typeprint.c (c_type_print_base_struct_union): Update.
7415         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7416         summary when using C language.
7417         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7418         (gen_maybe_namespace_elt): Update.
7419         * ada-lang.c (ada_type_name): Simplify.
7420         (empty_record, ada_template_to_fixed_record_type_1)
7421         (template_to_static_fixed_type)
7422         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7423
7424 2018-06-01  Tom Tromey  <tom@tromey.com>
7425
7426         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7427         c_print_type.
7428         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7429         (c_print_type): Update.
7430         (c_print_type): New overload.
7431         (c_type_print_varspec_prefix, c_type_print_args)
7432         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7433         (c_type_print_base_struct_union, c_type_print_base_1)
7434         (cp_type_print_method_args): Add "language" parameter.
7435         (c_type_print_base): Update.
7436         * c-lang.h (c_print_type): Add new overload.
7437
7438 2018-06-01  Tom Tromey  <tom@tromey.com>
7439
7440         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7441         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7442
7443 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7444
7445         * aarch64-tdep.c (aarch64_sve_register_names): New const
7446         var.
7447         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7448         (AARCH64_SVE_Z_REGS_NUM): New define.
7449         (AARCH64_SVE_P_REGS_NUM): Likewise.
7450         (AARCH64_SVE_NUM_REGS): Likewise.
7451
7452 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7453
7454         * nat/linux-ptrace.h [__alpha__]
7455         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7456         definitions.
7457
7458 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7459
7460         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7461         the endianness selected.
7462         * NEWS: Document `set endian auto' mode operation update.
7463
7464 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7465
7466         * Makefile.in: Add new header.
7467         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7468         (sve_vl_from_vg): Likewise.
7469         (sve_vq_from_vl): Likewise.
7470         (sve_vl_from_vq): Likewise.
7471         (sve_vq_from_vg): Likewise.
7472         (sve_vg_from_vq): Likewise.
7473         * configure.nat: Add new c file.
7474         * nat/aarch64-sve-linux-ptrace.c: New file.
7475         * nat/aarch64-sve-linux-ptrace.h: New file.
7476
7477 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7478
7479         * aarch64-linux-nat.c (aarch64_linux_read_description):
7480         Add parmeter zero.
7481         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7482         Likewise.
7483         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7484         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7485         (aarch64_gdbarch_init): Add parmeter zero.
7486         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7487         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7488         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7489         parmeter.
7490         * doc/gdb.texinfo: Describe SVE feature
7491         * features/aarch64-sve.c: New file.
7492
7493 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7494
7495         PR gdb/23210
7496         * gdbarch.sh (significant_addr_bit): Default to zero when
7497         not set by target architecture.
7498         * gdbarch.c: Re-generated.
7499         * utils.c (address_significant): Update.
7500
7501 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7502
7503         * stack.c (func_command): Remove trailing newline in call to error.
7504
7505 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7506
7507         * regcache.h (regcache_raw_collect): Remove, update callers to
7508         use regcache::raw_collect.
7509         * regcache.c (regcache_raw_collect): Remove.
7510
7511 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7512
7513         * regcache.h (regcache_raw_supply): Remove, update callers to
7514         use detached_regcache::raw_supply.
7515         * regcache.c (regcache_raw_supply): Remove.
7516
7517 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7518
7519         * regcache.h (regcache_cooked_write_part): Remove, update
7520         callers to use regcache::cooked_write_part.
7521         * regcache.c (regcache_cooked_write_part): Remove.
7522
7523 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7524
7525         * regcache.h (regcache_cooked_read_part): Remove, update callers
7526         to use readable_regcache::cooked_read_part.
7527         * regcache.c (regcache_cooked_read_part): Remove.
7528
7529 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7530
7531         * regcache.h (regcache_cooked_read_value): Remove, update
7532         callers to use readable_regcache::cooked_read_value.
7533         * regcache.c (regcache_cooked_read_value): Remove.
7534
7535 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7536
7537         * regcache.h (regcache_cooked_write): Remove, update callers to
7538         use regcache::cooked_write.
7539         * regcache.c (regcache_cooked_write): Remove.
7540
7541 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7542
7543         * regcache.h (regcache_invalidate): Remove, update callers to
7544         use detached_regcache::invalidate instead.
7545         * regcache.c (regcache_invalidate): Remove.
7546
7547 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7548
7549         * regcache.h (regcache_raw_write_part): Remove, update callers
7550         to use regcache::raw_write_part instead.
7551         * regcache.c (regcache_raw_write_part): Remove.
7552
7553 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7554
7555         * regcache.h (regcache_raw_read_part): Remove, update callers to
7556         use readable_regcache::raw_read_part instead.
7557         * regcache.c (regcache_raw_read_part): Remove.
7558
7559 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7560
7561         * regcache.h (regcache_cooked_read): Remove, update callers to
7562         use readable_regcache::cooked_read instead.
7563         * regcache.c (regcache_cooked_read): Remove.
7564
7565 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7566
7567         * regcache.h (regcache_raw_write): Remove, update callers to use
7568         regcache::raw_write instead.
7569         * regcache.c (regcache_raw_write): Remove.
7570
7571 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7572
7573         * regcache.h (regcache_raw_read): Remove, update callers to use
7574         readable_regcache::raw_read instead.
7575         * regcache.c (regcache_raw_read): Remove.
7576
7577 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7578
7579         * regcache.h (regcache_raw_update): Remove, update callers to
7580         use readable_regcache::raw_update instead.
7581         * regcache.c (regcache_raw_update): Remove.
7582
7583 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7584
7585         * regcache.h (regcache_register_status): Remove, update callers
7586         to use reg_buffer::get_register_status directly instead.
7587         * regcache.c (regcache_register_status): Remove.
7588
7589 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7590
7591         * regcache.h (regcache_get_ptid): Remove, update all callers to
7592         call regcache::ptid instead.
7593         * regcache.c (regcache_get_ptid): Remove.
7594
7595 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7596
7597         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7598
7599 2018-05-30  Pedro Alves  <palves@redhat.com>
7600
7601         * common/common-exceptions.h (exception_rethrow): Use
7602         ATTRIBUTE_NORETURN.
7603
7604 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7605
7606         * breakpoint.c (print_solib_event, check_status_catch_solib):
7607         Remove struct keyword in range-based for loops.
7608         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7609         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7610         Likewise.
7611         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7612         Likewise.
7613         * symfile.c (addr_info_make_relative): Likewise.
7614         * thread.c (value_in_thread_stack_temporaries): Likewise.
7615
7616 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7617
7618         PR gdb/16841
7619         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7620         aggregate type to get its real type before accessing it.
7621
7622 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7623
7624         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7625         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7626         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7627         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7628         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7629         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7630         * printcmd.c (info_address_command): Likewise.
7631
7632 2018-05-29  Tom Tromey  <tom@tromey.com>
7633
7634         * windows-nat.c (handle_exception): Update fall-through comment.
7635
7636 2018-05-29  Tom Tromey  <tom@tromey.com>
7637
7638         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7639         (struct program_space) <added_solibs>: Now a std::vector.
7640         * breakpoint.c (print_solib_event): Update.
7641         (check_status_catch_solib): Update.
7642         * progspace.c (clear_program_space_solib_cache): Update.
7643         * solib.c (update_solib_list): Update.
7644
7645 2018-05-29  Tom Tromey  <tom@tromey.com>
7646
7647         * python/py-type.c (typy_richcompare): Update.
7648         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7649         * gdbtypes.h (types_deeply_equal): Return bool.
7650         (types_equal): Likewise.
7651         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7652         declare VEC.
7653         (check_types_equal): Change worklist to std::vector.  Return
7654         bool.
7655         (struct type_equality_entry): Add constructor.
7656         (compare_maybe_null_strings): Return bool.
7657         (check_types_worklist): Return bool.  Change worklist to
7658         std::vector.
7659         (types_deeply_equal): Use std::vector.
7660         (types_equal): Return bool.
7661         (compare_maybe_null_strings): Simplify.
7662
7663 2018-05-29  Tom Tromey  <tom@tromey.com>
7664
7665         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7666
7667 2018-05-29  Tom Tromey  <tom@tromey.com>
7668
7669         * objc-lang.h: Don't include cp-support.h.
7670         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7671         declare VEC.
7672
7673 2018-05-27  Tom Tromey  <tom@tromey.com>
7674
7675         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7676
7677 2018-05-25  Tom Tromey  <tom@tromey.com>
7678
7679         * value.c (value::location): Initialize.
7680
7681 2018-05-25  Tom Tromey  <tom@tromey.com>
7682
7683         * dbxread.c (init_bincl_list): Remove.
7684         (bincl_list): Now a std::vector.
7685         (bincls_allocated, next_bincl): Remove.
7686         (free_bincl_list, do_free_bincl_list_cleanup)
7687         (make_cleanup_free_bincl_list): Remove.
7688         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7689         unique_xmalloc_ptr.
7690         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7691         (struct header_file_location): Add constructor.
7692         (add_bincl_to_list): Remove.
7693
7694 2018-05-25  Tom Tromey  <tom@tromey.com>
7695
7696         * tui/tui.c (tui_enable): Update.
7697         * mi/mi-interp.c (mi_interp::init): Update.
7698         * interps.h (class interp) <name>: New method.
7699         <m_name>: Rename from name.
7700         (~scoped_restore_interp): Update.
7701         * interps.c (interp::interp): Update.
7702         (interp_add, interp_set, interp_lookup_existing)
7703         (current_interp_named_p): Update.
7704
7705 2018-05-25  Tom Tromey  <tom@tromey.com>
7706
7707         * interps.c (interp_name): Remove.
7708         * mi/mi-interp.c (mi_interp::init): Update.
7709         * interps.h (interp_name): Remove.
7710         (~scoped_restore_interp): Update.
7711         * tui/tui.c (tui_enable): Update.
7712
7713 2018-05-25  Tom Tromey  <tom@tromey.com>
7714
7715         * utils.c (fputs_maybe_filtered): Update.
7716         * linespec.c (decode_line_full): Update.
7717         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7718         (mi_print_breakpoint_for_event, mi_solib_loaded)
7719         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7720         (mi_user_selected_context_changed): Update.
7721         * mi/mi-main.c (mi_execute_command): Update.
7722         * cli/cli-script.c (execute_control_command): Update.
7723         * python/python.c (execute_gdb_command): Update.
7724         * solib.c (info_sharedlibrary_command): Update.
7725         * interps.c (interp_ui_out): Remove.
7726         * interps.h (interp_ui_out): Remove.
7727
7728 2018-05-25  Tom Tromey  <tom@tromey.com>
7729
7730         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7731         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7732         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7733
7734 2018-05-25  Tom Tromey  <tom@tromey.com>
7735
7736         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7737         * interps.c (interp_exec): Use scoped_restore.
7738
7739 2018-05-25  Tom Tromey  <tom@tromey.com>
7740
7741         * remote.c (remote_target::remote_file_get): Use
7742         gdb::byte_vector.
7743         (remote_target::remote_file_put): Likewise.
7744
7745 2018-05-25  Tom Tromey  <tom@tromey.com>
7746
7747         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7748         a std::string.
7749         (get_pe_section_index, add_pe_exported_sym): Update.
7750         (read_pe_exported_syms): Use gdb::def_vector.
7751
7752 2018-05-25  Tom Tromey  <tom@tromey.com>
7753
7754         * frame.c (remove_prev_frame): Remove.
7755         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7756
7757 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7758
7759         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7760         Remove prototypes.
7761         * mips-linux-nat.c (supply_fpregset): Always call
7762         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7763         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7764         `mips_fill_fpregset'.
7765         * mips-linux-tdep.c (mips_supply_fpregset)
7766         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7767         (mips_fill_fpregset_wrapper): Remove functions.
7768         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7769         (mips_linux_fpregset): Remove variable.
7770         (mips_linux_iterate_over_regset_sections): Use
7771         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7772         (mips_linux_o32_sigframe_init): Remove comment.
7773
7774 2018-05-25  Pedro Alves  <palves@redhat.com>
7775
7776         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7777         (struct readahead_cache, struct packet_reg, struct
7778         remote_arch_state, class remote_state): Move higher up in the
7779         file.
7780         (remote_target::m_remote_state): Now an object instead of a pointer.
7781         (remote_target::get_remote_state): Adjust.
7782
7783 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7784
7785         * stack.c (select_and_print_frame): Delete.
7786         (struct function_bounds): Move struct within function.
7787         (func_command): Most content moved into new function
7788         find_frame_for_function, use new function, print result, add
7789         function comment.
7790         (find_frame_for_function): New function, now returns a result.
7791
7792 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7793
7794         * stack.c (iterate_over_block_arg_vars): Fix comment.
7795         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7796
7797 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7798
7799         PR gdb/23203
7800         * frame.c
7801         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7802         Define.
7803         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7804         Define.
7805         * frame.h (class scoped_restore_selected_frame): New class.
7806         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7807         of any exception, use scoped_restore_selected_frame to restore the
7808         frame instead.
7809
7810 2018-05-24  Pedro Alves  <palves@redhat.com>
7811
7812         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7813         override.
7814
7815 2018-05-23  Tom Tromey  <tom@tromey.com>
7816
7817         * complaints.c (struct complaints): Remove.
7818         (symfile_complaint_book): Remove.
7819         (series): New global.
7820         (complaint_internal): Update.
7821         (clear_complaints): Update.
7822
7823 2018-05-23  Tom Tromey  <tom@tromey.com>
7824
7825         * complaints.c (counters): New global.
7826         (struct complain): Remove.
7827         (struct complaints) <root>: Remove.
7828         (complaint_sentinel): Remove.
7829         (symfile_complaint_book): Update.
7830         (find_complaint) Remove.
7831         (complaint_internal, clear_complaints): Update.
7832
7833 2018-05-23  Tom Tromey  <tom@tromey.com>
7834
7835         * complaints.c (struct complain) <file, line>: Remove.
7836         (find_complaint): Remove file, line parameters.
7837         (complaint_internal): Update.
7838
7839 2018-05-23  Tom Tromey  <tom@tromey.com>
7840
7841         * complaints.c (vcomplaint): Remove.
7842         (complaint_internal) Merge in contents of vcomplaint.
7843
7844 2018-05-23  Tom Tromey  <tom@tromey.com>
7845
7846         * complaints.c (struct complaints) <explanation>: Remove.
7847         (symfile_explanations): Remove.
7848         (symfile_complaint_book): Update.
7849         (vcomplaint): Update.
7850         (struct explanation): Remove.
7851
7852 2018-05-23  Tom Tromey  <tom@tromey.com>
7853
7854         * complaints.c (symfile_complaints): Remove.
7855         (complaint_internal): Remove "complaints" parameter.
7856         (clear_complaints, vcomplaint): Remove "c" parameter.
7857         (get_complaints): Remove.
7858         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7859         (dwarf2_debug_line_missing_file_complaint)
7860         (dwarf2_debug_line_missing_end_sequence_complaint)
7861         (dwarf2_complex_location_expr_complaint)
7862         (dwarf2_const_value_length_mismatch_complaint)
7863         (dwarf2_section_buffer_overflow_complaint)
7864         (dwarf2_macro_malformed_definition_complaint)
7865         (dwarf2_invalid_attrib_class_complaint)
7866         (create_addrmap_from_index, dw2_symtab_iter_next)
7867         (dw2_expand_marked_cus)
7868         (dw2_debug_names_iterator::find_vec_in_debug_names)
7869         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7870         (create_debug_type_hash_table, init_cutu_and_read_dies)
7871         (partial_die_parent_scope, add_partial_enumeration)
7872         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7873         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7874         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7875         (create_cus_hash_table, create_dwp_hash_table)
7876         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7877         (dwarf2_rnglists_process, dwarf2_ranges_process)
7878         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7879         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7880         (handle_struct_member_die, process_structure_scope)
7881         (read_array_type, read_common_block, read_module_type)
7882         (read_tag_pointer_type, read_typedef, read_base_type)
7883         (read_subrange_type, load_partial_dies, partial_die_info::read)
7884         (partial_die_info::read, partial_die_info::read)
7885         (partial_die_info::read, read_checked_initial_length_and_offset)
7886         (dwarf2_string_attr, read_formatted_entries)
7887         (dwarf_decode_line_header)
7888         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7889         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7890         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7891         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7892         (get_signatured_type, get_DW_AT_signature_type)
7893         (decode_locdesc, file_file_name, consume_improper_spaces)
7894         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7895         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7896         (dwarf2_symbol_mark_computed, set_die_type)
7897         (read_attribute_value): Update.
7898         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7899         Update.
7900         * dbxread.c (unknown_symtype_complaint)
7901         (lbrac_mismatch_complaint, repeated_header_complaint)
7902         (set_namestring, function_outside_compilation_unit_complaint)
7903         (read_dbx_symtab, process_one_symbol): Update.
7904         * gdbtypes.c (stub_noname_complaint): Update.
7905         * windows-nat.c (handle_unload_dll): Update.
7906         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7907         (decode_base_type): Update.
7908         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7909         (eb_complaint, record_include_begin, record_include_end)
7910         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7911         (process_xcoff_symbol, read_symbol)
7912         (function_outside_compilation_unit_complaint)
7913         (scan_xcoff_symtab): Update.
7914         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7915         * buildsym.c (finish_block_internal, make_blockvector)
7916         (end_symtab_get_static_block, augment_type_symtab): Update.
7917         * dtrace-probe.c (dtrace_process_dof)
7918         (dtrace_static_probe_ops::get_probes): Update.
7919         * complaints.h (struct complaint): Don't declare.
7920         (symfile_complaints): Remove.
7921         (complaint_internal): Remove "complaints" parameter.
7922         (complaint): Likewise.
7923         (clear_complaints): Likewise.
7924         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7925         (reread_symbols): Update.
7926         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7927         (dwarf2_frame_cache, decode_frame_entry): Update.
7928         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7929         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7930         (info_selectors_command): Update.
7931         * macrotab.c (macro_include, check_for_redefinition)
7932         (macro_undef): Update.
7933         * objfiles.c (filter_overlapping_sections): Update.
7934         * stabsread.c (invalid_cpp_abbrev_complaint)
7935         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7936         (define_symbol, error_type, read_type, rs6000_builtin_type)
7937         (stabs_method_name_from_physname, read_member_functions)
7938         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7939         (attach_fields_to_type, complain_about_struct_wipeout)
7940         (read_range_type, read_args, common_block_start)
7941         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7942         Update.
7943         * mdebugread.c (index_complaint, unknown_ext_complaint)
7944         (basic_type_complaint, bad_tag_guess_complaint)
7945         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7946         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7947         (parse_procedure, parse_lines)
7948         (function_outside_compilation_unit_complaint)
7949         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7950         (bad_tag_guess_complaint, reg_value_complaint): Update.
7951         * cp-support.c (demangled_name_complaint): Update.
7952         * macroscope.c (sal_macro_scope): Update.
7953         * dwarf-index-write.c (class debug_names): Update.
7954
7955 2018-05-23  Tom Tromey  <tom@tromey.com>
7956
7957         * complaints.c (clear_complaints): Remove "noisy" parameter.
7958         * complaints.h (clear_complaints): Update.
7959         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7960         (reread_symbols): Update.
7961
7962 2018-05-23  Tom Tromey  <tom@tromey.com>
7963
7964         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7965         SUBSEQUENT_MESSAGE.
7966         (vcomplaint, clear_complaints): Update.
7967         (symfile_explanations): Remove some messages.
7968
7969 2018-05-23  Tom Tromey  <tom@tromey.com>
7970
7971         * complaints.c (internal_complaint): Remove.
7972         * complaints.h (internal_complaint): Remove.
7973
7974 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7975
7976         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7977
7978 2018-05-22  Pedro Alves  <palves@redhat.com>
7979
7980         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7981         (remote_fileio_badfd, remote_fileio_return_errno)
7982         (remote_fileio_return_success, remote_fileio_func_open)
7983         (remote_fileio_func_open, remote_fileio_func_close)
7984         (remote_fileio_func_read, remote_fileio_func_write)
7985         (remote_fileio_func_lseek, remote_fileio_func_rename)
7986         (remote_fileio_func_unlink, remote_fileio_func_stat)
7987         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7988         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7989         remote_target parameter.
7990         (remote_fio_func_map) <func>: Add remote_target parameter.
7991         (do_remote_fileio_request, remote_fileio_request):
7992         * remote-fileio.h (remote_fileio_request):
7993         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7994         remote_target parameter.
7995         (remote_notif_process, handle_notification): Adjust to pass down
7996         the remote.
7997         (remote_notif_state_allocate): Add remote_target parameter.  Save
7998         it.
7999         * remote-notif.h (struct remote_target): Forward declare.
8000         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8001         remote_target parameter.
8002         (struct remote_notif_state) <remote>: New field.
8003         (remote_notif_ack, remote_notif_parse): Add remote_target
8004         parameter.
8005         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8006         remote_target parameter.
8007         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8008         (threads_listing_context, rmt_thread_action, protocol_feature)
8009         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8010         (packet_result, struct threads_listing_context, remote_state):
8011         Move definitions and declarations higher up.
8012         (remote_target) <~remote_target>: Declare.
8013         (remote_download_command_source, remote_file_put, remote_file_get)
8014         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8015         (remote_hostio_pread_vFile, remote_hostio_send_command)
8016         (remote_hostio_set_filesystem, remote_hostio_open)
8017         (remote_hostio_close, remote_hostio_unlink, remote_state)
8018         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8019         (get_memory_write_packet_size, get_memory_read_packet_size)
8020         (append_pending_thread_resumptions, remote_detach_1)
8021         (append_resumption, remote_resume_with_vcont)
8022         (add_current_inferior_and_thread, wait_ns, wait_as)
8023         (process_stop_reply, remote_notice_new_inferior)
8024         (process_initial_stop_replies, remote_add_thread)
8025         (btrace_sync_conf, remote_btrace_maybe_reopen)
8026         (remove_new_fork_children, kill_new_fork_children)
8027         (discard_pending_stop_replies, stop_reply_queue_length)
8028         (check_pending_events_prevent_wildcard_vcont)
8029         (discard_pending_stop_replies_in_queue, stop_reply)
8030         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8031         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8032         (remote_interrupt_as, remote_interrupt_ns)
8033         (remote_get_noisy_reply, remote_query_attached)
8034         (remote_add_inferior, remote_current_thread, get_current_thread)
8035         (set_thread, set_general_thread, set_continue_thread)
8036         (set_general_process, write_ptid)
8037         (remote_unpack_thread_info_response, remote_get_threadinfo)
8038         (parse_threadlist_response, remote_get_threadlist)
8039         (remote_threadlist_iterator, remote_get_threads_with_ql)
8040         (remote_get_threads_with_qxfer)
8041         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8042         (get_offsets, remote_check_symbols, remote_supported_packet)
8043         (remote_query_supported, remote_packet_size)
8044         (remote_serial_quit_handler, remote_detach_pid)
8045         (remote_vcont_probe, remote_resume_with_hc)
8046         (send_interrupt_sequence, interrupt_query)
8047         (remote_notif_get_pending_events, fetch_register_using_p)
8048         (send_g_packet, process_g_packet, fetch_registers_using_g)
8049         (store_register_using_P, store_registers_using_G)
8050         (set_remote_traceframe, check_binary_download)
8051         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8052         (remote_xfer_live_readonly_partial, remote_read_bytes)
8053         (remote_send_printf, remote_flash_write, readchar)
8054         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8055         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8056         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8057         (extended_remote_disable_randomization, extended_remote_run)
8058         (send_environment_packet, extended_remote_environment_support)
8059         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8060         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8061         (packet_command): Now methods of ...
8062         (remote_target): ... this class.
8063         (m_remote_state) <remote_target>: New field.
8064         (struct remote_state) <stop_reply_queue,
8065         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8066         fields.
8067         (remote_state::remote_state): Allocate stop_reply_queue.
8068         (remote_state): Delete global.
8069         (get_remote_state_raw): Delete.
8070         (remote_target::get_remote_state): Allocate m_remote_state on
8071         demand.
8072         (get_current_remote_target): New.
8073         (remote_ops, extended_remote_ops): Delete.
8074         (wait_forever_enabled_p, remote_async_inferior_event_token):
8075         Delete, moved to struct remote_state.
8076         (remote_target::close): Delete self.  Destruction bits split to
8077         ...
8078         (remote_target::~remote_target): ... this.
8079         (show_memory_packet_size): Adjust to use
8080         get_current_remote_target.
8081         (struct protocol_feature) <func>: Add remote_target parameter.
8082         All callers adjusted.
8083         (curr_quit_handler_target): New.
8084         (remote_serial_quit_handler): Reimplement.
8085         (remote_target::open_1): Adjust to use get_current_remote_target.
8086         Heap-allocate remote_target/extended_remote_target instances.
8087         (vcont_builder::vcont_builder): Add remote_target parameter, and
8088         save it in m_remote.  All callers adjusted.
8089         (vcont_builder::m_remote): New field.
8090         (vcont_builder::restart, vcont_builder::flush)
8091         (vcont_builder::push_action): Use it.
8092         (remote_target::commit_resume): Use it.
8093         (struct queue_iter_param) <remote>: New field.
8094         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8095         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8096         (check_pending_event_prevents_wildcard_vcont_callback)
8097         (remote_target::check_pending_events_prevent_wildcard_vcont)
8098         (remote_target::discard_pending_stop_replies)
8099         (remote_target::discard_pending_stop_replies_in_queue)
8100         (remote_target::remote_notif_remove_queued_reply): Fill in
8101         'remote' field.
8102         (remote_notif_get_pending_events): New.
8103         (remote_target::readchar, remote_target::remote_serial_write):
8104         Save/restore curr_quit_handler_target.
8105         (putpkt): New.
8106         (kill_new_fork_children): Fill in 'remote' field.
8107         (packet_command): Use get_current_remote_target, defer to
8108         remote_target method of same name.
8109         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8110         parameter, and save it in m_remote.  All callers adjusted.
8111         (scoped_remote_fd::release): Use m_remote.
8112         (scoped_remote_fd::m_remote): New field.
8113         (remote_file_put, remote_file_get, remote_file_delete): Use
8114         get_current_remote_target, defer to remote_target method of same
8115         name.
8116         (remote_btrace_reset): Add remote_state paremeter.  Update all
8117         callers.
8118         (remote_async_inferior_event_handler). Pass down 'data'.
8119         (remote_new_objfile): Use get_current_remote_target.
8120         (remote_target::vcont_r_supported): New.
8121         (set_range_stepping): Use get_current_remote_target and
8122         remote_target::vcont_r_supported.
8123         (_initialize_remote): Don't allocate 'remote_state' and
8124         'stop_reply_queue' globals.
8125         * remote.h (struct remote_target): Forward declare.
8126         (getpkt, putpkt, remote_notif_get_pending_events): Add
8127         'remote_target' parameter.
8128
8129 2018-05-22  Pedro Alves  <palves@redhat.com>
8130
8131         * remote.c (vcont_builder): Now a class.  Make all data members
8132         private.
8133         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8134         Declare methods.
8135         (vcont_builder_restart): Rename to ...
8136         (vcont_builder::restart): ... this.
8137         (vcont_builder_flush): Rename to ...
8138         (vcont_builder::flush): ... this.
8139         (vcont_builder_push_action): Rename to ...
8140         (vcont_builder::push_action): ... this.
8141         (remote_target::commit_resume): Adjust.
8142
8143 2018-05-22  Pedro Alves  <palves@redhat.com>
8144
8145         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8146         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8147         (get_fixed_memory_packet_size): New.
8148         (get_memory_packet_size): Use it.
8149         (set_memory_packet_size): Don't override the config size with
8150         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8151         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8152         Don't refer to get_memory_packet_size if not connected to a remote
8153         target.  Show "(default)" if configured size is 0.
8154
8155 2018-05-22  Pedro Alves  <palves@redhat.com>
8156
8157         * remote.c (remote_target::mourn_inferior): Move
8158         discard_pending_stop_replies call here from ...
8159         (_initialize_remote): ... here.
8160
8161 2018-05-22  Pedro Alves  <palves@redhat.com>
8162
8163         * remote.c (compare_section_command): Remove set_general_process
8164         call.
8165
8166 2018-05-22  Pedro Alves  <palves@redhat.com>
8167
8168         * remote.c (struct packet_reg, struct remote_arch_state):
8169         Move higher up in the file.
8170         (remote_state) <m_arch_states>: Store remote_arch_state values
8171         instead of remote_arch_state pointers.
8172         (remote_state::get_remote_arch_state): Adjust.
8173
8174 2018-05-22  Pedro Alves  <palves@redhat.com>
8175
8176         * remote.c: Include <unordered_map>.
8177         (remote_state): Now a class.
8178         (remote_state) <get_remote_arch_state>: Declare method.
8179         <get_remote_arch_state>: New field.
8180         (remote_arch_state) <remote_arch_state>: Declare ctor.
8181         <regs>: Now a unique_ptr.
8182         (remote_gdbarch_data_handle): Delete.
8183         (get_remote_arch_state): Delete.
8184         (remote_state::get_remote_arch_state): New.
8185         (get_remote_state): Adjust to call remote_state's
8186         get_remote_arch_state method.
8187         (init_remote_state): Delete, bits factored out to ...
8188         (remote_arch_state::remote_arch_state): ... this new method.
8189         (get_remote_packet_size, get_memory_packet_size)
8190         (process_g_packet, remote_target::fetch_registers)
8191         (remote_target::prepare_to_store, store_registers_using_G)
8192         (remote_target::store_registers, remote_target::get_trace_status):
8193         Adjust to call remote_state's method.
8194         (_initialize_remote): Remove reference to
8195         remote_gdbarch_data_handle.
8196
8197 2018-05-22  Pedro Alves  <palves@redhat.com>
8198
8199         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8200         pread>: New method declarations.
8201         (remote_target::open_1): Adjust.
8202         (readahead_cache_invalidate): Rename to ...
8203         (readahead_cache::invalidate): ... this, and adjust to be a class
8204         method.
8205         (readahead_cache_invalidate_fd): Rename to ...
8206         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8207         class method.
8208         (remote_hostio_pwrite): Adjust.
8209         (remote_hostio_pread_from_cache): Rename to ...
8210         (readahead_cache::pread): ... this, and adjust to be a class
8211         method.
8212         (remote_hostio_close): Adjust.
8213
8214 2018-05-22  Pedro Alves  <palves@redhat.com>
8215
8216         * remote.c (remote_hostio_close_cleanup): Delete.
8217         (class scoped_remote_fd): New.
8218         (remote_file_put, remote_file_get): Use it.
8219
8220 2018-05-22  Pedro Alves  <palves@redhat.com>
8221
8222         (struct vCont_action_support): Use bool and initialize all fields.
8223         (struct readahead_cache): Initialize all fields.
8224         (remote_state): Use bool and initialize all fields.
8225         (remote_state::remote_state, remote_state::~remote_state): New.
8226         (new_remote_state): Delete.
8227         (_initialize_remote): Use new to allocate remote_state.
8228
8229 2018-05-22  Pedro Alves  <palves@redhat.com>
8230             張俊芝  <zjz@zjz.name>
8231
8232         PR gdb/22973
8233         * c-exp.y: Include "c-support.h".
8234         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8235         of tolower.  Use c_ident_is_alpha to scan names.
8236         * c-lang.c: Include "c-support.h".
8237         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8238         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8239         * c-support.h: New file, with bits factored out from ...
8240         * cp-name-parser.y: ... this file.
8241         Include "c-support.h".
8242         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8243         c-support.h and renamed.
8244         (symbol_end, yylex): Adjust.
8245
8246 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8247
8248         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8249         parameter type to CORE_ADDR.
8250         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8251         parameter type in declaration to CORE_ADDR.
8252         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8253         target_auxv_search to get AT_HWCAP and use the result to get the
8254         target description.
8255         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8256         to CORE_ADDR. Remove the cast of the return value to unsigned
8257         long. Fix error predicate of target_auxv_search.
8258         (ppc_linux_nat_target::read_description): Change the type of the
8259         hwcap variable to CORE_ADDR.
8260
8261 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8262
8263         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8264         if the size of fpscr is larger than 32 bits.
8265
8266 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8267
8268         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8269         (ppc32_linux_vsxregmap): New global.
8270         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8271         regcache_supply_regset, and regcache_collect_regset.
8272         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8273         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8274         (fetch_vsx_register, store_vsx_register): Remove.
8275         (fetch_vsx_registers): Add regno parameter. Get regset using
8276         ppc_linux_vsxregset. Use regset to supply registers.
8277         (store_vsx_registers): Add regno parameter. Get regset using
8278         ppc_linux_vsxregset. Use regset to collect registers.
8279         (fetch_register): Call fetch_vsx_registers instead of
8280         fetch_vsx_register.
8281         (store_register): Call store_vsx_registers instead of
8282         store_vsx_register.
8283         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8284         new regno parameter.
8285         (store_ppc_registers): Call store_vsx_registers with -1 for the
8286         new regno parameter.
8287         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8288         (ppc_collect_vsxregset): Remove.
8289
8290 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8291
8292         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8293         offset fields.
8294         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8295         for vector register offset fields.
8296         (ppc64_fbsd_reg_offsets): Likewise.
8297         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8298         to vector register offset fields.
8299         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8300         to vector register offset fields.
8301         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8302         vector register offset fields.
8303         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8304         initializers for vector register offset fields.
8305         (rs6000_aix64_reg_offsets): Likewise.
8306         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8307         (ppc_supply_vrregset): Remove.
8308         (ppc_collect_vrregset): Remove.
8309         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8310         (ppc_linux_vrregset) : New function.
8311         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8312         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8313         (ppc32_linux_vrregset): Remove.
8314         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8315         and use result instead of ppc32_linux_vrregset.
8316         (ppc32_linux_reg_offsets): Remove initializers for vector register
8317         offset fields.
8318         (ppc64_linux_reg_offsets): Likewise.
8319         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8320         * ppc-linux-nat.c: Include regset.h.
8321         (gdb_vrregset_t): Adjust comment to account for little-endian
8322         mode.
8323         (supply_vrregset, fill_vrregset): Remove.
8324         (fetch_altivec_register, store_altivec_register): Remove.
8325         (fetch_altivec_registers): Add regno parameter. Get regset using
8326         ppc_linux_vrregset. Use regset to supply registers.
8327         (store_altivec_registers): Add regno parameter. Get regset using
8328         ppc_linux_vrregset. Use regset to collect registers.
8329         (fetch_register): Call fetch_altivec_registers instead of
8330         fetch_altivec_register.
8331         (store_register): Call store_altivec_registers instead of
8332         store_altivec_register.
8333         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8334         the new regno parameter.
8335         (store_ppc_registers): Call store_altivec_registers with -1 for
8336         the new regno parameter.
8337
8338 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8339
8340         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8341         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8342         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8343         (gdb_vrregset_t): Change array type size to
8344         PPC_LINUX_SIZEOF_VRREGSET.
8345         (gdb_vsxregset_t): Change array type size to
8346         PPC_LINUX_SIZEOF_VSXREGSET.
8347         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8348         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8349         PPC_LINUX_SIZEOF_VSXREGSET.
8350
8351 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8352
8353         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8354         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8355         nat/ppc-linux.c.
8356         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8357         ppc_linux_target_wordsize with tid.
8358         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8359         wordsize with tid.
8360         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8361         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8362         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8363         tid parameter. Remove static specifier.
8364         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8365         (ppc_linux_target_wordsize): New declaration.
8366
8367 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8368
8369         * arch/ppc-linux-common.c: New file.
8370         * arch/ppc-linux-common.h: New file.
8371         * arch/ppc-linux-tdesc.h: New file.
8372         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8373         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8374         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8375         arch/ppc-linux-tdesc.h.
8376         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8377         arch/ppc-linux-tdesc.h.
8378         (ppc_linux_nat_target::read_description): Remove target
8379         description matching code. Fill a ppc_linux_features struct and
8380         call ppc_linux_match_description with it. Move comment about ISA
8381         2.05 to ppc-linux-common.c.
8382         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8383         arch/ppc-linux-tdesc.h.
8384         (ppc_linux_core_read_description): Remove target description
8385         matching code. Fill a ppc_linux_features struct and call
8386         ppc_linux_match_description with it.
8387         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8388         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8389         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8390         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8391         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8392         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8393         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8394         (tdesc_powerpc_e500l): Remove.
8395
8396 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8397
8398         * ada-lang.c (catch_assert_command): Pass empty string instead
8399         of NULL for excep_string argument.
8400
8401 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8402
8403         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8404         the width of the requested register exceeds the width of the
8405         `ptrace' data type.
8406
8407 2018-05-21  Tom Tromey  <tom@tromey.com>
8408
8409         * printcmd.c (output_command): Remove.
8410         (output_command_const): Rename to output_command.
8411         * valprint.h (output_command): Rename from output_command_const.
8412         * tracepoint.c (trace_dump_actions): Call output_command.
8413
8414 2018-05-21  Tom Tromey  <tom@tromey.com>
8415
8416         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8417         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8418         * ada-lang.h (create_ada_exception_catchpoint): Update.
8419         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8420         std::string.
8421         (create_excep_cond_exprs, ~ada_catchpoint)
8422         (should_stop_exception, print_one_exception)
8423         (print_mention_exception, print_recreate_exception): Update.
8424         (ada_get_next_arg): Remove.
8425         (catch_ada_exception_command_split): Use std::string.  Change type
8426         of "excep_string", "cond_string".
8427         (catch_ada_exception_command): Update.
8428         (create_ada_exception_catchpoint): Change type of excep_string.
8429         (ada_exception_sal): Remove excep_string parameter.
8430         (~ada_catchpoint): Remove.
8431
8432 2018-05-21  Tom Tromey  <tom@tromey.com>
8433
8434         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8435         cleanup.
8436
8437 2018-05-21  Tom Tromey  <tom@tromey.com>
8438
8439         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8440         Return unique_xmalloc_ptr.
8441         (print_it_exception): Update.
8442
8443 2018-05-21  Tom Tromey  <tom@tromey.com>
8444
8445         * tracepoint.c (trace_dump_actions): Use std::string.
8446
8447 2018-05-21  Tom Tromey  <tom@tromey.com>
8448
8449         * symfile.c (reread_symbols): Use std::string for original_name.
8450
8451 2018-05-21  Tom Tromey  <tom@tromey.com>
8452
8453         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8454         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8455         constructor.
8456
8457 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8458
8459         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8460         instance to...
8461         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8462         * objfiles.c (get_objfile_bfd_data): Allocate
8463         objfile_per_bfd_storage with obstack_new when allocating on
8464         obstack.
8465
8466 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8467
8468         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8469         OBSTACK_ZALLOC.
8470         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8471         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8472         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8473         (add_pending): Likewise.
8474         (parse_symbol): Likewise.
8475         (parse_partial_symbols): Likewise.
8476         (psymtab_to_symtab_1): Likewise.
8477         (new_psymtab): Likewise.
8478         (elfmdebug_build_psymtabs): Likewise.
8479         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8480         * objfiles.c (get_objfile_bfd_data): Likewise.
8481         (objfile_register_static_link): Likewise.
8482         * psymtab.c (allocate_psymtab): Likewise.
8483         * stabsread.c (read_member_functions): Likewise.
8484         * xcoffread.c (xcoff_end_psymtab): Likewise.
8485
8486 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8487
8488         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8489         compiler supports std::is_trivially_constructible.
8490         * common/poison.h: Include obstack.h.
8491         (IsMallocable): Define to is_trivially_constructible if the
8492         compiler supports it, define to true_type otherwise.
8493         (xobnew): New.
8494         (XOBNEW): Redefine.
8495         (xobnewvec): New.
8496         (XOBNEWVEC): Redefine.
8497         * gdb_obstack.h (obstack_zalloc): New.
8498         (OBSTACK_ZALLOC): Redefine.
8499         (obstack_calloc): New.
8500         (OBSTACK_CALLOC): Redefine.
8501         (obstack_new): New.
8502         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8503         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8504         gdbarch.c.
8505         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8506         obstack_calloc/obstack_zalloc.
8507         (gdbarch_obstack_zalloc): Remove.
8508         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8509
8510 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8511
8512         * stack.c (backtrace_command_1): Remove useless variable int i.
8513
8514 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8515
8516         * stack.c (print_frame_info): Fix comment.
8517
8518 2018-05-18  Tom Tromey  <tom@tromey.com>
8519
8520         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8521         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8522         (~dwarf2_per_objfile): Update
8523         (dwarf2_get_dwz_file): Use new.
8524         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8525         unique_ptr.
8526
8527 2018-05-18  Tom Tromey  <tom@tromey.com>
8528
8529         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8530         unique_ptr.
8531         * dwarf2read.c (struct dwp_file): Add constructor and
8532         initializers.
8533         (open_and_init_dwp_file): Return a unique_ptr.
8534         (dwarf2_per_objfile, create_dwp_hash_table)
8535         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8536         (lookup_dwo_unit_in_dwp): Update.
8537         (open_and_init_dwp_file, get_dwp_file): Update.
8538
8539 2018-05-18  Tom Tromey  <tom@tromey.com>
8540
8541         * dwarf2read.c (dwarf2_per_objfile): Update.
8542         (struct mapped_index): Add initializers.
8543         (dwarf2_read_index): Use new.
8544         (dw2_symtab_iter_init): Update.
8545         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8546         unique_ptr.
8547
8548 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8549
8550         * dwarf2read.c (mapped_index) <total_size>: Remove.
8551
8552 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8553
8554         * unittests/format_pieces-selftests.c (test_format_specifier):
8555         Add ARI comments.
8556
8557 2018-05-18  Tom Tromey  <tom@tromey.com>
8558
8559         * c-typeprint.c (maybe_print_hole): New function.
8560         (c_print_type_struct_field_offset): Update.
8561         (c_type_print_base_struct_union): Call maybe_print_hole.
8562
8563 2018-05-17  Keith Seitz  <keiths@redhat.com>
8564
8565         * breakpoint.c (build_bpstat_chain): New function, moved from
8566         bpstat_stop_status.
8567         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8568         If no stop chain is passed, call build_bpstat_chain to build it.
8569         * breakpoint.h (build_bpstat_chain): Declare.
8570         (bpstat_stop_status): Move documentation here from breakpoint.c.
8571         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8572         build the stop chain and pass it to skip_inline_frames.
8573         Pass this stop chain to bpstat_stop_status.
8574         * inline-frame.c: Include breakpoint.h.
8575         (stopped_by_user_bp_inline_frame): New function.
8576         (skip_inline_frames): Add parameter `stop_chain'.
8577         Move documention to inline-frame.h.
8578         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8579         whether the frame should be elided.
8580         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8581         Add moved documentation and update for new parameter.
8582
8583 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8584
8585         PR cli/14975
8586         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8587         unittests/format_pieces-selftests.c.
8588         * common/format.h (format_piece) <operator==>: New.
8589         (format_pieces) <operator[]>: Remove.
8590         * common/format.c (format_pieces::format_pieces): Handle \e.
8591         * unittests/format_pieces-selftests.c: New.
8592
8593 2018-05-17  Tom Tromey  <tom@tromey.com>
8594
8595         PR symtab/23010:
8596         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8597         (dw2_instantiate_symtab): Add skip_partial parameter.
8598         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8599         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8600         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8601         (dw2_expand_symtabs_matching_one)
8602         (dw2_find_pc_sect_compunit_symtab)
8603         (dw2_debug_names_lookup_symbol)
8604         (dw2_debug_names_expand_symtabs_for_function): Update.
8605         (init_cutu_and_read_dies): Add skip_partial parameter.
8606         (process_psymtab_comp_unit, build_type_psymtabs_1)
8607         (process_skeletonless_type_unit, load_partial_comp_unit)
8608         (psymtab_to_symtab_1): Update.
8609         (load_full_comp_unit): Add skip_partial parameter.
8610         (process_imported_unit_die, dwarf2_read_addr_index)
8611         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8612         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8613         (read_signatured_type): Update.
8614
8615 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8616
8617         * value.c (release_value): Remove unused variable.
8618         (record_latest_value): Likewise.
8619         (access_value_history): Likewise.
8620         (preserve_values): Likewise.
8621
8622 2018-05-17  Tom Tromey  <tom@tromey.com>
8623
8624         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8625         Initialize.
8626
8627 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8628
8629         PR gdb/22286
8630         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8631         Also handle registers whose width is not a multiple of
8632         PTRACE_TYPE_RET.
8633         (linux_nat_trad_target::store_register): Likewise.
8634
8635 2018-05-16  Tom Tromey  <tom@tromey.com>
8636
8637         * gdbcore.h (core_bfd): Redefine.
8638         * corelow.c (core_target::close): Update.
8639         (core_target_open): Update.
8640         * progspace.h (struct program_space) <cbfd>: Now a
8641         gdb_bfd_ref_ptr.
8642
8643 2018-05-16  Tom Tromey  <tom@tromey.com>
8644
8645         PR cli/19551:
8646         * symfile-add-flags.h (enum symfile_add_flags)
8647         <SYMFILE_NOT_FILENAME>: New constant.
8648         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8649         objfile name from BFD.
8650         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8651         * minidebug.c (find_separate_debug_file_in_section): Put
8652         ".gnu_debugdata" into BFD's file name.
8653
8654 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8655
8656         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8657         Remove.
8658
8659 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8660
8661         PR binutils/21446
8662         * aarch64-tdep.c (aarch64_analyze_prologue,
8663         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8664         Indicate not interested in errors.
8665
8666 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8667
8668         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8669         Supply the MIPS_ZERO_REGNUM register.
8670
8671 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8672
8673         * mips-tdep.c (mask_address_var): Make variable static.
8674
8675 2018-05-14  Tom Tromey  <tom@tromey.com>
8676
8677         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8678
8679 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8680
8681         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8682         FXSAVE_ADDR for the mxcsr register.
8683
8684 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8685
8686         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8687
8688 2018-05-11  Pedro Alves  <palves@redhat.com>
8689
8690         * corelow.c (core_target) <core_target>: No longer inline.
8691         Initialize m_core_gdbarch, m_core_vec and build the section table
8692         here.
8693         <~core_target>: New.
8694         <core_gdbarch, get_core_register_section>: New methods.
8695         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8696         factored out from ...
8697         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8698         (core_ops): Delete.
8699         (sniff_core_bfd): Add gdbarch parameter.
8700         (core_close): Delete, merged into ...
8701         (core_target::close): ... here.  Delete self.
8702         (core_close_cleanup): Delete.
8703         (core_target_open): Allocate a core_target on the heap.  Use a
8704         unique_ptr instead of a cleanup.  Bits moved into the core_target
8705         ctor.  Adjust to use core_target methods instead of globals.
8706         (get_core_register_section): Rename to ...
8707         (core_target::get_core_register_section): ... this and adjust.
8708         (struct get_core_registers_cb_data): New.
8709         (get_core_registers_cb): Use it.  Use bool.
8710         (core_target::fetch_registers, core_target::files_info)
8711         (core_target::xfer_partial, core_target::read_description)
8712         (core_target::pid_to, core_target::thread_name): Adjust to
8713         reference class fields instead of globals.
8714         * target.h (struct target_ops_deleter, target_ops_up): New.
8715
8716 2018-05-11  Pedro Alves  <palves@redhat.com>
8717
8718         * corefile.c (core_file_command): Move to corelow.c.
8719         * corelow.c (the_core_target): Delete.
8720         (core_file_command): Moved from corefile.c.  Check exec_bfd
8721         instead of the_core_target.  Use target_detach instead of calling
8722         into the_core_target directly.
8723         (maybe_say_no_core_file_now): New.
8724         (core_target::detach): Use it.
8725         (_initialize_corelow): Remove references to the_core_target.
8726         * gdbcore.h (the_core_target): Delete.
8727
8728 2018-05-11  Tom Tromey  <tromey@redhat.com>
8729             Pedro Alves  <palves@redhat.com>
8730
8731         * corefile.c (core_bfd): Remove.
8732         * gdbcore.h (core_bfd): Now a macro.
8733         * progspace.h (struct program_space) <cbfd>: New field.
8734
8735 2018-05-11  Tom Tromey  <tom@tromey.com>
8736
8737         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8738         gdb::def_vector.
8739
8740 2018-05-10  Tom Tromey  <tom@tromey.com>
8741
8742         * configure: Rebuild.
8743         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8744
8745 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8746
8747         PR server/23158:
8748         * regformats/regdat.sh: Adjust script, following the addition
8749         of the new expedite_regs parameter to init_target_desc.
8750
8751 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8752     
8753         PR gdb/23127
8754         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8755         set_gdbarch_significant_addr_bit.
8756         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8757         set_gdbarch_significant_addr_bit.
8758         * utils.c (address_significant): Update to sign extend addr.
8759
8760 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8761
8762         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8763         (xtensa_linux_init_abi): Limit tdep->num_regs by
8764         tdep->num_nopriv_regs.
8765         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8766         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8767         not initialized.
8768
8769 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8770
8771         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8772
8773 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8774
8775         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8776         (I387_MXCSR_INIT_VAL): New constant.
8777         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8778         buffer if it was supplied by the inferior.
8779         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8780         (i387_xsave_get_clear_bv): New function.
8781         (i387_supply_xsave): Only read x87 control registers from the
8782         xsave buffer if the feature is enabled, and the state will have
8783         been written, otherwise, provide a suitable default.
8784         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8785         including x87 control registers.  Update control registers if they
8786         have changed from the default value, and mark features as enabled
8787         as required.
8788         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8789
8790 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8791
8792         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8793
8794 2018-05-07  Tom Tromey  <tom@tromey.com>
8795
8796         * configure: Rebuild.
8797         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8798
8799 2018-05-07  Tom Tromey  <tom@tromey.com>
8800
8801         PR tdep/20362:
8802         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8803         bit.  Use correct value for VDIV.
8804
8805 2018-05-04  Tom Tromey  <tom@tromey.com>
8806
8807         * configure: Rebuild.
8808         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8809
8810 2018-05-04  Tom Tromey  <tom@tromey.com>
8811
8812         * linux-record.c (record_linux_system_call) <case
8813         RECORD_SYS_RECVFROM>: Add "break".
8814
8815 2018-05-04  Tom Tromey  <tom@tromey.com>
8816
8817         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8818         Add missing "break".
8819         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8820         Add missing "break".
8821
8822 2018-05-04  Tom Tromey  <tom@tromey.com>
8823
8824         * rs6000-tdep.c (ppc_process_record_op4)
8825         (ppc_process_record_op63): Add fall-through comment.
8826
8827 2018-05-04  Tom Tromey  <tom@tromey.com>
8828
8829         * i386-tdep.c (i386_process_record): Add fall-through comment.
8830
8831 2018-05-04  Tom Tromey  <tom@tromey.com>
8832
8833         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8834         comment.
8835
8836 2018-05-04  Tom Tromey  <tom@tromey.com>
8837
8838         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8839         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8840         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8841         comment.
8842         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8843         comment.
8844         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8845         comment.
8846
8847 2018-05-04  Tom Tromey  <tom@tromey.com>
8848
8849         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8850
8851 2018-05-04  Tom Tromey  <tom@tromey.com>
8852
8853         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8854         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8855         * symfile.c (section_is_mapped): Fix fall-through comment.
8856         * stabsread.c (define_symbol, read_member_functions): Fix
8857         fall-through comment.
8858         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8859         comment.
8860         * remote.c (remote_wait_as): Fix fall-through comment.
8861         * p-exp.y (yylex): Fix fall-through comment.
8862         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8863         comment.
8864         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8865         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8866         * jv-exp.y (yylex): Fix fall-through comment.
8867         * go-exp.y (lex_one_token): Fix fall-through comment.
8868         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8869         fall-through comment.
8870         * f-exp.y (yylex): Fix fall-through comment.
8871         * dwarf2read.c (process_die): Fix fall-through comments.
8872         * dbxread.c (process_one_symbol): Fix fall-through comment.
8873         * d-exp.y (lex_one_token): Fix fall-through comment.
8874         * cp-name-parser.y (yylex): Fix fall-through comment.
8875         * coffread.c (coff_symtab_read): Fix fall-through comment.
8876         * c-exp.y (lex_one_token): Fix fall-through comment.
8877         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8878         comment.
8879         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8880         comment.
8881
8882 2018-05-04  Tom Tromey  <tom@tromey.com>
8883
8884         PR python/22730:
8885         * NEWS: Mention gdb.execute change.
8886         * gdbcmd.h (execute_control_command): Don't declare.
8887         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8888         execute_control_commands, execute_control_commands_to_string.
8889         * cli/cli-script.h (execute_control_commands)
8890         (execute_control_commands_to_string): Declare.
8891         (execute_control_command): Add from_tty parameter.
8892         * cli/cli-script.c (execute_control_commands)
8893         (execute_control_commands_to_string): New functions.
8894         (execute_user_command): Use execute_control_commands.
8895         (execute_control_command_1): Add "from_tty" parameter.  Update.
8896         (execute_control_command): Likewise.
8897
8898 2018-05-04  Tom Tromey  <tom@tromey.com>
8899
8900         PR python/22731:
8901         * NEWS: Mention that breakpoint commands are writable.
8902         * python/py-breakpoint.c (bppy_set_commands): New function.
8903         (breakpoint_object_getset) <"commands">: Use it.
8904
8905 2018-05-04  Tom Tromey  <tom@tromey.com>
8906
8907         * tracepoint.c (actions_command): Update.
8908         * mi/mi-cmd-break.c (mi_command_line_array)
8909         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8910         (mi_read_next_line): Remove.
8911         (mi_cmd_break_commands): Update.
8912         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8913         function_view.
8914         * cli/cli-script.c (get_command_line): Update.
8915         (process_next_line): Use function_view.  Constify.
8916         (recurse_read_control_structure, read_command_lines)
8917         (read_command_lines_1): Change argument types to function_view.
8918         (do_define_command, document_command): Update.
8919         * breakpoint.h (check_tracepoint_command): Don't declare.
8920         * breakpoint.c (check_tracepoint_command): Remove.
8921         (commands_command_1, create_tracepoint_from_upload): Update.
8922
8923 2018-05-04  Tom Tromey  <tom@tromey.com>
8924
8925         PR gdb/11750:
8926         * cli/cli-script.h (enum command_control_type) <define_control>:
8927         New constant.
8928         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8929         (build_command_line, execute_control_command_1)
8930         (process_next_line): Likewise.
8931         (do_define_command): New function, extracted from define_command.
8932         (define_command): Use it.
8933
8934 2018-05-04  Tom Tromey  <tom@tromey.com>
8935
8936         * tracepoint.c (actions_command): Update.
8937         * cli/cli-script.h (read_command_lines): Update.
8938         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8939         (MAX_TMPBUF): Remove define.
8940         (define_command): Use string_printf.
8941         (document_command): Likewise.
8942         * breakpoint.c (commands_command_1): Update.
8943
8944 2018-05-04  Tom Tromey  <tom@tromey.com>
8945
8946         * top.c (execute_command): Update.
8947         * cli/cli-script.h (print_command_lines): Now varargs.
8948         * cli/cli-script.c (print_command_lines): Now varargs.
8949         (execute_control_command_1) <case while_control, case if_control>:
8950         Update.
8951
8952 2018-05-04  Tom Tromey  <tom@tromey.com>
8953
8954         * tracepoint.c (all_tracepoint_actions): Rename from
8955         all_tracepoint_actions_and_cleanup.  Change return type.
8956         (actions_command, encode_actions_1, encode_actions)
8957         (trace_dump_actions, tdump_command): Update.
8958         * remote.c (remote_download_command_source): Update.
8959         * python/python.c (gdbpy_eval_from_control_command)
8960         (python_command, python_interactive_command): Update.
8961         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8962         * guile/guile.c (guile_command)
8963         (gdbscm_eval_from_control_command, guile_command): Update.
8964         * compile/compile.c (compile_code_command)
8965         (compile_print_command, compile_to_object): Update.
8966         * cli/cli-script.h (struct command_lines_deleter): New.
8967         (counted_command_line): New typedef.
8968         (struct command_line): Add constructor, destructor.
8969         <body_list>: Remove.
8970         <body_list_0, body_list_1>: New members.
8971         (command_line_up): Remove typedef.
8972         (read_command_lines, read_command_lines_1, get_command_line):
8973         Update.
8974         (copy_command_lines): Don't declare.
8975         * cli/cli-script.c (build_command_line): Use "new".
8976         (get_command_line): Return counted_command_line.
8977         (print_command_lines, execute_user_command)
8978         (execute_control_command_1, while_command, if_command): Update.
8979         (realloc_body_list): Remove.
8980         (process_next_line, recurse_read_control_structure): Update.
8981         (read_command_lines, read_command_lines_1): Return counted_command_line.
8982         (free_command_lines): Use "delete".
8983         (copy_command_lines): Remove.
8984         (define_command, document_command, show_user_1): Update.
8985         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8986         a counted_command_line.
8987         * breakpoint.h (counted_command_line): Remove typedef.
8988         (breakpoint_set_commands): Update.
8989         * breakpoint.c (check_no_tracepoint_commands)
8990         (validate_commands_for_breakpoint): Update.
8991         (breakpoint_set_commands): Change commands to be a
8992         counted_command_line.
8993         (commands_command_1, update_dprintf_command_list)
8994         (create_tracepoint_from_upload): Update.
8995
8996 2018-05-04  Tom Tromey  <tom@tromey.com>
8997
8998         * cli/cli-decode.h (cmd_list_element): New constructor.
8999         (~cmd_list_element): New destructor.
9000         (struct cmd_list_element): Add initializers.
9001         * cli/cli-decode.c (do_add_cmd): Use "new".
9002         (delete_cmd): Use "delete".
9003
9004 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9005             Pedro Alves <palves@redhat.com>
9006
9007         PR breakpoints/19806 and support for PR external/20207.
9008         * NEWS: Mention Aarch64 watchpoint improvements.
9009         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9010         watchpoints and PR external/20207 watchpoints.
9011         * nat/aarch64-linux-hw-point.c
9012         (kernel_supports_any_contiguous_range): New.
9013         (aarch64_watchpoint_offset): New.
9014         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9015         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9016         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9017         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9018         next_addr_orig_p.  Support PR external/20207 watchpoints.
9019         (aarch64_downgrade_regs): New.
9020         (aarch64_dr_state_insert_one_point): New parameters offset and
9021         addr_orig.
9022         (aarch64_dr_state_remove_one_point): Likewise.
9023         (aarch64_handle_breakpoint): Update caller.
9024         (aarch64_handle_aligned_watchpoint): Likewise.
9025         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9026         aligned_offset.
9027         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9028         aarch64_downgrade_regs.
9029         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9030         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9031         (DR_CONTROL_MASK): ... this.
9032         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9033         (unsigned int aarch64_watchpoint_offset): New prototype.
9034         (aarch64_linux_set_debug_regs): Remove const from state.
9035         * utils.c (align_up, align_down): Move to ...
9036         * common/common-utils.c (align_up, align_down): ... here.
9037         * utils.h (align_up, align_down): Move to ...
9038         * common/common-utils.h (align_up, align_down): ... here.
9039
9040 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9041
9042         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9043         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9044         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9045         Re-implement to match the ABI as summarized in GCC's
9046         gcc/config/sparc/sparc.c.  All callers updated.
9047         (sparc32_store_arguments): Remove assertion.
9048
9049 2018-05-04  Tom Tromey  <tom@tromey.com>
9050
9051         * printcmd.c: Don't include tui.h.
9052         (decode_format): Use skip_spaces.
9053
9054 2018-05-04  Tom Tromey  <tom@tromey.com>
9055
9056         PR gdb/22619:
9057         * printcmd.c (last_count): New global.
9058         (x_command): Use saved count when repeating.
9059
9060 2018-05-04  Tom Tromey  <tom@tromey.com>
9061
9062         * nto-procfs.c (do_closedir_cleanup): Remove.
9063         (procfs_pidlist): Use gdb_dir_up.
9064         * procfs.c (do_closedir_cleanup): Remove.
9065         (proc_update_threads): Use gdb_dir_up.
9066         * common/filestuff.h (struct gdb_dir_deleter): New.
9067         (gdb_dir_up): New typedef.
9068
9069 2018-05-04  Tom Tromey  <tom@tromey.com>
9070
9071         * ada-lang.c (print_mention_exception): Use std::string.
9072
9073 2018-05-04  Tom Tromey  <tom@tromey.com>
9074
9075         * ada-lang.c (create_excep_cond_exprs): Update.
9076         (ada_exception_catchpoint_cond_string): Use std::string.
9077
9078 2018-05-04  Tom Tromey  <tom@tromey.com>
9079
9080         * ada-lang.c (xget_renaming_scope): Return std::string.
9081         (old_renaming_is_invisible): Update.
9082
9083 2018-05-04  Tom Tromey  <tom@tromey.com>
9084
9085         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9086         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9087
9088 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9089
9090         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9091
9092 2018-05-04  Tom Tromey  <tom@tromey.com>
9093
9094         * remote.c (remote_query_supported_append): Change type.
9095         (remote_check_symbols): Update.
9096
9097 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9098
9099         PR gdb/11420
9100         * configure.ac: Prepend libpython.
9101         * python/python-config.py: Likewise.
9102         * configure: Regenerate.
9103
9104 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9105
9106         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9107
9108 2018-05-03  Pedro Alves  <palves@redhat.com>
9109
9110         * s390-linux-nat.c
9111         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9112         override.  Write 'true' instead of '1'.
9113         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9114         declaration.
9115
9116 2018-05-02  Pedro Alves  <palves@redhat.com>
9117
9118         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9119         add_inf_child_target.
9120         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9121         add_inf_child_target.
9122         * aix-thread.c (aix_thread_target_info): New.
9123         (aix_thread_target) <shortname, longname, doc>: Delete.
9124         <info>: New.
9125         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9126         add_inf_child_target.
9127         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9128         add_inf_child_target.
9129         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9130         add_inf_child_target.
9131         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9132         add_inf_child_target.
9133         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9134         add_inf_child_target.
9135         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9136         add_inf_child_target.
9137         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9138         add_inf_child_target.
9139         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9140         add_inf_child_target.
9141         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9142         add_inf_child_target.
9143         * bfd-target.c (target_bfd_target_info): New.
9144         (target_bfd) <shortname, longname, doc>: Delete.
9145         <info>: New.
9146         * bsd-kvm.c (bsd_kvm_target_info): New.
9147         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9148         <info>: New.
9149         (bsd_kvm_target::open): Rename to ...
9150         (bsd_kvm_target_open): ... this.  Adjust.
9151         * bsd-uthread.c (bsd_uthread_target_info): New.
9152         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9153         <info>: New.
9154         * corefile.c (core_file_command): Adjust.
9155         * corelow.c (core_target_info): New.
9156         (core_target) <shortname, longname, doc>: Delete.
9157         <info>: New.
9158         (core_target::open): Rename to ...
9159         (core_target_open): ... this.  Adjust.
9160         * ctf.c (ctf_target_info): New.
9161         (ctf_target) <shortname, longname, doc>: Delete.
9162         <info>: New.
9163         (ctf_target::open): Rename to ...
9164         (ctf_target_open): ... this.
9165         (_initialize_ctf): Adjust.
9166         * exec.c (exec_target_info): New.
9167         (exec_target) <shortname, longname, doc>: Delete.
9168         <info>: New.
9169         (exec_target::open): Rename to ...
9170         (exec_target_open): ... this.
9171         * gdbcore.h (core_target_open): Declare.
9172         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9173         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9174         add_inf_child_target.
9175         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9176         add_inf_child_target.
9177         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9178         add_inf_child_target.
9179         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9180         add_inf_child_target.
9181         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9182         add_inf_child_target.
9183         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9184         add_inf_child_target.
9185         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9186         add_inf_child_target.
9187         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9188         add_inf_child_target.
9189         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9190         add_inf_child_target.
9191         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9192         add_inf_child_target.
9193         * inf-child.c (inf_child_target_info): New.
9194         (inf_child_target::info): New.
9195         (inf_child_open_target): Remove 'target' parameter.  Use
9196         get_native_target instead.
9197         (inf_child_target::open): Delete.
9198         (add_inf_child_target): New.
9199         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9200         Delete.
9201         <info>: New.
9202         (add_inf_child_target): Declare.
9203         (inf_child_open_target): Declare.
9204         * linux-thread-db.c (thread_db_target_info): New.
9205         (thread_db_target) <shortname, longname, doc>: Delete.
9206         <info>: New.
9207         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9208         add_inf_child_target.
9209         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9210         add_inf_child_target.
9211         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9212         add_inf_child_target.
9213         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9214         add_inf_child_target.
9215         * make-target-delegates (print_class): Adjust.
9216         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9217         add_inf_child_target.
9218         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9219         add_inf_child_target.
9220         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9221         add_inf_child_target.
9222         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9223         add_inf_child_target.
9224         * nto-procfs.c (nto_native_target_info): New.
9225         (nto_procfs_target_native) <shortname, longname, doc>:
9226         Delete.
9227         <info>: New.
9228         (nto_procfs_target_info): New.
9229         (nto_procfs_target_procfs) <shortname, longname, doc>:
9230         Delete.
9231         <info>: New.
9232         (init_procfs_targets): Adjust.
9233         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9234         add_inf_child_target.
9235         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9236         add_inf_child_target.
9237         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9238         add_inf_child_target.
9239         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9240         add_inf_child_target.
9241         * ravenscar-thread.c (ravenscar_target_info): New.
9242         (ravenscar_thread_target) <shortname, longname, doc>:
9243         Delete.
9244         <info>: New.
9245         * record-btrace.c (record_btrace_target_info):
9246         (record_btrace_target) <shortname, longname, doc>: Delete.
9247         <info>: New.
9248         (record_btrace_target::open): Rename to ...
9249         (record_btrace_target_open): ... this.  Adjust.
9250         * record-full.c (record_longname, record_doc): New.
9251         (record_full_base_target) <shortname, longname, doc>: Delete.
9252         <info>: New.
9253         (record_full_target_info): New.
9254         (record_full_target): <shortname>: Delete.
9255         <info>: New.
9256         (record_full_core_open_1, record_full_open_1): Update comments.
9257         (record_full_base_target::open): Rename to ...
9258         (record_full_open): ... this.
9259         (cmd_record_full_restore): Update.
9260         (_initialize_record_full): Update.
9261         * remote-sim.c (remote_sim_target_info): New.
9262         (gdbsim_target) <shortname, longname, doc>: Delete.
9263         <info>: New.
9264         (gdbsim_target::open): Rename to ...
9265         (gdbsim_target_open): ... this.
9266         (_initialize_remote_sim): Adjust.
9267         * remote.c (remote_doc): New.
9268         (remote_target_info): New.
9269         (remote_target) <shortname, longname, doc>: Delete.
9270         <info>: New.
9271         (extended_remote_target_info): New.
9272         (extended_remote_target) <shortname, longname, doc>: Delete.
9273         <info>: New.
9274         (remote_target::open_1): Make static.  Adjust.
9275         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9276         * s390-linux-nat.c (_initialize_s390_nat): Use
9277         add_inf_child_target.
9278         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9279         add_inf_child_target.
9280         * sol-thread.c (thread_db_target_info): New.
9281         (sol_thread_target) <shortname, longname, doc>: Delete.
9282         <info>: New.
9283         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9284         add_inf_child_target.
9285         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9286         add_inf_child_target.
9287         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9288         add_inf_child_target.
9289         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9290         add_inf_child_target.
9291         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9292         add_inf_child_target.
9293         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9294         add_inf_child_target.
9295         * spu-linux-nat.c (_initialize_spu_nat): Use
9296         add_inf_child_target.
9297         * spu-multiarch.c (spu_multiarch_target_info): New.
9298         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9299         <info>: New.
9300         * target-delegates.c: Regenerate.
9301         * target.c: Include <unordered_map>.
9302         (target_ops_p): Delete.
9303         (DEF_VEC_P(target_ops_p)): Delete.
9304         (target_factories): New.
9305         (test_target_info): New.
9306         (test_target_ops::info): New.
9307         (open_target): Adjust to use target_factories.
9308         (add_target_with_completer): Rename to ...
9309         (add_target): ... this.  Change prototype.  Register target_info
9310         and open callback in target_factories.  Register target_info in
9311         command context instead of target_ops.
9312         (add_target): Delete old implementation.
9313         (add_deprecated_target_alias): Change prototype.  Adjust.
9314         (the_native_target): New.
9315         (set_native_target, get_native_target): New.
9316         (find_default_run_target): Use the_native_target.
9317         (find_attach_target, find_run_target): Simplify.
9318         (target_ops::open): Delete.
9319         (dummy_target_info): New.
9320         (dummy_target::shortname, dummy_target::longname)
9321         (dummy_target::doc): Delete.
9322         (dummy_target::info): New.
9323         (debug_target::shortname, debug_target::longname)
9324         (debug_target::doc): Delete.
9325         (debug_target::info): New.
9326         * target.h (struct target_info): New.
9327         (target_ops::~target_ops): Add comment.
9328         (target_ops::info): New.
9329         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9330         longer virtual.  Implement in terms of target_info.
9331         (set_native_target, get_native_target): Declare.
9332         (target_open_ftype): New.
9333         (add_target, add_target_with_completer)
9334         (add_deprecated_target_alias): Change prototype.
9335         (test_target) <shortname, longname, doc>: Delete.
9336         <info>: New.
9337         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9338         add_inf_child_target.
9339         * tracefile-tfile.c (tfile_target_info): New.
9340         (tfile_target) <shortname, longname, doc>: Delete.
9341         <info>: New.
9342         (tfile_target::open): Rename to ...
9343         (tfile_target_open): ... this.
9344         (_initialize_tracefile_tfile): Adjust.
9345         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9346         add_inf_child_target.
9347         * windows-nat.c (_initialize_windows_nat): Use
9348         add_inf_child_target.
9349         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9350         add_inf_child_target.
9351
9352 2018-05-02  Pedro Alves  <palves@redhat.com>
9353
9354         * linux-nat.h (linux_nat_target) <low_new_thread,
9355         low_delete_thread, low_new_fork, low_forget_process,
9356         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9357         New virtual methods.
9358         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9359         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9360         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9361         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9362         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9363         Delete.
9364         * linux-fork.c (delete_fork): Adjust to call low method.
9365         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9366         (linux_nat_new_fork, linux_nat_forget_process_hook)
9367         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9368         (linux_nat_status_is_event):
9369         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9370         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9371         to call low method.
9372         (sigtrap_is_event): Rename to ...
9373         (linux_nat_target::low_status_is_event): ... this.
9374         (linux_nat_set_status_is_event): Delete.
9375         (save_stop_reason, linux_nat_wait_1)
9376         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9377         low methods.
9378         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9379         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9380         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9381         (linux_nat_set_prepare_to_resume): Delete.
9382         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9383         low virtual methods.
9384         * amd64-linux-nat.c: Likewise.
9385         * arm-linux-nat.c: Likewise.
9386         * i386-linux-nat.c: Likewise.
9387         * ia64-linux-nat.c: Likewise.
9388         * mips-linux-nat.c: Likewise.
9389         * ppc-linux-nat.c: Likewise.
9390         * s390-linux-nat.c: Likewise.
9391         * sparc64-linux-nat.c: Likewise.
9392         * x86-linux-nat.c: Likewise.
9393         * x86-linux-nat.h: Include "nat/x86-linux.h".
9394         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9395         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9396         Override methods.
9397
9398 2018-05-02  Pedro Alves  <palves@redhat.com>
9399
9400         * target.h (target_ops)
9401         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9402         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9403         stopped_by_watchpoint, have_continuable_watchpoint,
9404         stopped_data_address, watchpoint_addr_within_range,
9405         can_accel_watchpoint_condition, can_run, thread_alive,
9406         has_all_memory, has_memory, has_stack, has_registers,
9407         has_execution, can_async_p, is_async_p, supports_non_stop,
9408         always_non_stop_p, can_execute_reverse, supports_multi_process,
9409         supports_enable_disable_tracepoint,
9410         supports_disable_randomization, supports_string_tracing,
9411         supports_evaluation_of_breakpoint_conditions,
9412         can_run_breakpoint_commands, filesystem_is_local,
9413         can_download_tracepoint, get_trace_state_variable_value,
9414         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9415         record_is_replaying, record_will_replay,
9416         augmented_libraries_svr4_read>: Adjust to return bool.
9417         * aarch64-linux-nat.c: All implementations adjusted.
9418         * aix-thread.c: All implementations adjusted.
9419         * arm-linux-nat.c: All implementations adjusted.
9420         * breakpoint.c: All implementations adjusted.
9421         * bsd-kvm.c: All implementations adjusted.
9422         * bsd-uthread.c: All implementations adjusted.
9423         * corelow.c: All implementations adjusted.
9424         * ctf.c: All implementations adjusted.
9425         * darwin-nat.c: All implementations adjusted.
9426         * darwin-nat.h: All implementations adjusted.
9427         * exec.c: All implementations adjusted.
9428         * fbsd-nat.c: All implementations adjusted.
9429         * fbsd-nat.h: All implementations adjusted.
9430         * gnu-nat.c: All implementations adjusted.
9431         * gnu-nat.h: All implementations adjusted.
9432         * go32-nat.c: All implementations adjusted.
9433         * ia64-linux-nat.c: All implementations adjusted.
9434         * inf-child.c: All implementations adjusted.
9435         * inf-child.h: All implementations adjusted.
9436         * inf-ptrace.c: All implementations adjusted.
9437         * inf-ptrace.h: All implementations adjusted.
9438         * linux-nat.c: All implementations adjusted.
9439         * linux-nat.h: All implementations adjusted.
9440         * mips-linux-nat.c: All implementations adjusted.
9441         * nto-procfs.c: All implementations adjusted.
9442         * ppc-linux-nat.c: All implementations adjusted.
9443         * procfs.c: All implementations adjusted.
9444         * ravenscar-thread.c: All implementations adjusted.
9445         * record-btrace.c: All implementations adjusted.
9446         * record-full.c: All implementations adjusted.
9447         * remote-sim.c: All implementations adjusted.
9448         * remote.c: All implementations adjusted.
9449         * s390-linux-nat.c: All implementations adjusted.
9450         * sol-thread.c: All implementations adjusted.
9451         * spu-multiarch.c: All implementations adjusted.
9452         * target-delegates.c: All implementations adjusted.
9453         * target.c: All implementations adjusted.
9454         * target.h: All implementations adjusted.
9455         * tracefile-tfile.c: All implementations adjusted.
9456         * tracefile.c: All implementations adjusted.
9457         * tracefile.h: All implementations adjusted.
9458         * windows-nat.c: All implementations adjusted.
9459         * x86-linux-nat.h: All implementations adjusted.
9460         * x86-nat.h: All implementations adjusted.
9461
9462 2018-05-02  Pedro Alves  <palves@redhat.com>
9463
9464         * make-target-delegates (scan_target_h): Don't trim lines here.
9465         Replace sequences of tabs and/or whitespace with a single
9466         whitespace.
9467         (top level, parsing methods): Trim each line before processing it
9468         here.
9469
9470 2018-05-02  Pedro Alves  <palves@redhat.com>
9471             John Baldwin  <jhb@freebsd.org>
9472
9473         * target.h (enum strata) <debug_stratum>: New.
9474         (struct target_ops) <all delegation methods>: Replace by C++
9475         virtual methods, and drop "to_" prefix.  All references updated
9476         throughout.
9477         <to_shortname, to_longname, to_doc, to_data,
9478         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9479         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9480         virtual methods.  All references updated throughout.
9481         <can_attach, supports_terminal_ours, can_create_inferior,
9482         get_thread_control_capabilities, attach_no_wait>: New
9483         virtual methods.
9484         <insert_breakpoint, remove_breakpoint>: Now
9485         TARGET_DEFAULT_NORETURN methods.
9486         <info_proc>: Now returns bool.
9487         <to_magic>: Delete.
9488         (OPS_MAGIC): Delete.
9489         (current_target): Delete.  All references replaced by references
9490         to ...
9491         (target_stack): ... this.  New.
9492         (target_shortname, target_longname): Adjust.
9493         (target_can_run): Now a function declaration.
9494         (default_child_has_all_memory, default_child_has_memory)
9495         (default_child_has_stack, default_child_has_registers)
9496         (default_child_has_execution): Remove target_ops parameter.
9497         (complete_target_initialization): Delete.
9498         (memory_breakpoint_target): New template class.
9499         (test_target_ops): Refactor as a C++ class with virtual methods.
9500         * make-target-delegates (NAME_PART): Tighten.
9501         (POINTER_PART, CP_SYMBOL): New.
9502         (SIMPLE_RETURN_PART): Reimplement.
9503         (VEC_RETURN_PART): Expect less.
9504         (RETURN_PART, VIRTUAL_PART): New.
9505         (METHOD): Adjust to C++ virtual methods.
9506         (scan_target_h): Remove reference to C99.
9507         (dname): Output "target_ops::" prefix.
9508         (write_function_header): Adjust to output a C++ class method.
9509         (write_declaration): New.
9510         (write_delegator): Adjust to output a C++ class method.
9511         (tdname): Output "dummy_target::" prefix.
9512         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9513         method.
9514         (tdefault_names, debug_names): Delete.
9515         (return_types, tdefaults, styles, argtypes_array): New.
9516         (top level): All methods are delegators.
9517         (print_class): New.
9518         (top level): Print dummy_target and debug_target classes.
9519         * target-delegates.c: Regenerate.
9520         * target-debug.h (target_debug_print_enum_info_proc_what)
9521         (target_debug_print_thread_control_capabilities)
9522         (target_debug_print_thread_info_p): New.
9523         * target.c (dummy_target): Delete.
9524         (the_dummy_target, the_debug_target): New.
9525         (target_stack): Now extern.
9526         (set_targetdebug): Push/unpush debug target.
9527         (default_child_has_all_memory, default_child_has_memory)
9528         (default_child_has_stack, default_child_has_registers)
9529         (default_child_has_execution): Remove target_ops parameter.
9530         (complete_target_initialization): Delete.
9531         (add_target_with_completer): No longer call
9532         complete_target_initialization.
9533         (target_supports_terminal_ours): Use regular delegation.
9534         (update_current_target): Delete.
9535         (push_target): No longer check magic number.  Don't call
9536         update_current_target.
9537         (unpush_target): Don't call update_current_target.
9538         (target_is_pushed): No longer check magic number.
9539         (target_require_runnable): Skip for all stratums over
9540         process_stratum.
9541         (target_ops::info_proc): New.
9542         (target_info_proc): Use find_target_at and
9543         find_default_run_target.
9544         (target_supports_disable_randomization): Use regular delegation.
9545         (target_get_osdata): Use find_target_at.
9546         (target_ops::open, target_ops::close, target_ops::can_attach)
9547         (target_ops::attach, target_ops::can_create_inferior)
9548         (target_ops::create_inferior, target_ops::can_run)
9549         (target_can_run): New.
9550         (default_fileio_target): Use regular delegation.
9551         (target_ops::fileio_open, target_ops::fileio_pwrite)
9552         (target_ops::fileio_pread, target_ops::fileio_fstat)
9553         (target_ops::fileio_close, target_ops::fileio_unlink)
9554         (target_ops::fileio_readlink): New.
9555         (target_fileio_open_1, target_fileio_unlink)
9556         (target_fileio_readlink): Always call the target method.  Handle
9557         FILEIO_ENOSYS.
9558         (return_zero, return_zero_has_execution): Delete.
9559         (init_dummy_target): Delete.
9560         (dummy_target::dummy_target, dummy_target::shortname)
9561         (dummy_target::longname, dummy_target::doc)
9562         (debug_target::debug_target, debug_target::shortname)
9563         (debug_target::longname, debug_target::doc): New.
9564         (target_supports_delete_record): Use regular delegation.
9565         (setup_target_debug): Delete.
9566         (maintenance_print_target_stack): Skip debug_stratum.
9567         (initialize_targets): Instantiate the_dummy_target and
9568         the_debug_target.
9569         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9570         use target_stack.
9571         (target_auxv_search, fprint_target_auxv): Adjust.
9572         (info_auxv_command): Adjust to use target_stack.
9573         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9574         * exceptions.c (print_flush): Handle a NULL target_stack.
9575         * regcache.c (target_ops_no_register): Refactor as class with
9576         virtual methods.
9577
9578         * exec.c (exec_target): New class.
9579         (exec_ops): Now an exec_target.
9580         (exec_open, exec_close_1, exec_get_section_table)
9581         (exec_xfer_partial, exec_files_info, exec_has_memory)
9582         (exec_make_note_section): Refactor as exec_target methods.
9583         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9584         Delete.
9585         (exec_target::find_memory_regions): New.
9586         (_initialize_exec): Don't call init_exec_ops.
9587         * gdbcore.h (exec_file_clear): Delete.
9588
9589         * corefile.c (core_target): Delete.
9590         (core_file_command): Adjust.
9591         * corelow.c (core_target): New class.
9592         (the_core_target): New.
9593         (core_close): Remove target_ops parameter.
9594         (core_close_cleanup): Adjust.
9595         (core_target::close): New.
9596         (core_open, core_detach, get_core_registers, core_files_info)
9597         (core_xfer_partial, core_thread_alive, core_read_description)
9598         (core_pid_to_str, core_thread_name, core_has_memory)
9599         (core_has_stack, core_has_registers, core_info_proc): Rework as
9600         core_target methods.
9601         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9602         (_initialize_corelow): Initialize the_core_target.
9603         * gdbcore.h (core_target): Delete.
9604         (the_core_target): New.
9605
9606         * ctf.c: (ctf_target): New class.
9607         (ctf_ops): Now a ctf_target.
9608         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9609         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9610         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9611         methods.
9612         (init_ctf_ops): Delete.
9613         (_initialize_ctf): Don't call it.
9614         * tracefile-tfile.c (tfile_target): New class.
9615         (tfile_ops): Now a tfile_target.
9616         (tfile_open, tfile_close, tfile_files_info)
9617         (tfile_get_tracepoint_status, tfile_trace_find)
9618         (tfile_fetch_registers, tfile_xfer_partial)
9619         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9620         Refactor as tfile_target methods.
9621         (tfile_xfer_partial_features): Remove target_ops parameter.
9622         (init_tfile_ops): Delete.
9623         (_initialize_tracefile_tfile): Don't call it.
9624         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9625         (tracefile_has_stack, tracefile_has_registers)
9626         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9627         tracefile_target methods.
9628         (init_tracefile_ops): Delete.
9629         (tracefile_target::tracefile_target): New.
9630         * tracefile.h: Include "target.h".
9631         (tracefile_target): New class.
9632         (init_tracefile_ops): Delete.
9633
9634         * spu-multiarch.c (spu_multiarch_target): New class.
9635         (spu_ops): Now a spu_multiarch_target.
9636         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9637         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9638         (spu_search_memory, spu_mourn_inferior): Refactor as
9639         spu_multiarch_target methods.
9640         (init_spu_ops): Delete.
9641         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9642         complete_target_initialization.
9643
9644         * ravenscar-thread.c (ravenscar_thread_target): New class.
9645         (ravenscar_ops): Now a ravenscar_thread_target.
9646         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9647         (ravenscar_thread_alive, ravenscar_pid_to_str)
9648         (ravenscar_fetch_registers, ravenscar_store_registers)
9649         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9650         (ravenscar_stopped_by_hw_breakpoint)
9651         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9652         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9653         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9654         methods.
9655         (init_ravenscar_thread_ops): Delete.
9656         (_initialize_ravenscar): Remove references to
9657         init_ravenscar_thread_ops and complete_target_initialization.
9658
9659         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9660         (bsd_uthread_target): New class.
9661         (bsd_uthread_ops): Now a bsd_uthread_target.
9662         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9663         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9664         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9665         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9666         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9667         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9668         (bsd_uthread_target): Delete function.
9669         (_initialize_bsd_uthread): Remove reference to
9670         complete_target_initialization.
9671
9672         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9673         (target_bfd): ... this new class.
9674         (target_bfd_xfer_partial, target_bfd_get_section_table)
9675         (target_bfd_close): Refactor as target_bfd methods.
9676         (target_bfd::~target_bfd): New.
9677         (target_bfd_reopen): Adjust.
9678         (target_bfd::close): New.
9679
9680         * record-btrace.c (record_btrace_target): New class.
9681         (record_btrace_ops): Now a record_btrace_target.
9682         (record_btrace_open, record_btrace_stop_recording)
9683         (record_btrace_disconnect, record_btrace_close)
9684         (record_btrace_async, record_btrace_info)
9685         (record_btrace_insn_history, record_btrace_insn_history_range)
9686         (record_btrace_insn_history_from, record_btrace_call_history)
9687         (record_btrace_call_history_range)
9688         (record_btrace_call_history_from, record_btrace_record_method)
9689         (record_btrace_is_replaying, record_btrace_will_replay)
9690         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9691         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9692         (record_btrace_store_registers, record_btrace_prepare_to_store)
9693         (record_btrace_to_get_unwinder)
9694         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9695         (record_btrace_commit_resume, record_btrace_wait)
9696         (record_btrace_stop, record_btrace_can_execute_reverse)
9697         (record_btrace_stopped_by_sw_breakpoint)
9698         (record_btrace_supports_stopped_by_sw_breakpoint)
9699         (record_btrace_stopped_by_hw_breakpoint)
9700         (record_btrace_supports_stopped_by_hw_breakpoint)
9701         (record_btrace_update_thread_list, record_btrace_thread_alive)
9702         (record_btrace_goto_begin, record_btrace_goto_end)
9703         (record_btrace_goto, record_btrace_stop_replaying_all)
9704         (record_btrace_execution_direction)
9705         (record_btrace_prepare_to_generate_core)
9706         (record_btrace_done_generating_core): Refactor as
9707         record_btrace_target methods.
9708         (init_record_btrace_ops): Delete.
9709         (_initialize_record_btrace): Remove reference to
9710         init_record_btrace_ops.
9711         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9712         the execution_direction global.
9713         (record_full_base_target, record_full_target)
9714         (record_full_core_target): New classes.
9715         (record_full_ops): Now a record_full_target.
9716         (record_full_core_ops): Now a record_full_core_target.
9717         (record_full_target::detach, record_full_target::disconnect)
9718         (record_full_core_target::disconnect)
9719         (record_full_target::mourn_inferior, record_full_target::kill):
9720         New.
9721         (record_full_open, record_full_close, record_full_async): Refactor
9722         as methods of the record_full_base_target class.
9723         (record_full_resume, record_full_commit_resume): Refactor
9724         as methods of the record_full_target class.
9725         (record_full_wait, record_full_stopped_by_watchpoint)
9726         (record_full_stopped_data_address)
9727         (record_full_stopped_by_sw_breakpoint)
9728         (record_full_supports_stopped_by_sw_breakpoint)
9729         (record_full_stopped_by_hw_breakpoint)
9730         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9731         methods of the record_full_base_target class.
9732         (record_full_store_registers, record_full_xfer_partial)
9733         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9734         Refactor as methods of the record_full_target class.
9735         (record_full_can_execute_reverse, record_full_get_bookmark)
9736         (record_full_goto_bookmark, record_full_execution_direction)
9737         (record_full_record_method, record_full_info, record_full_delete)
9738         (record_full_is_replaying, record_full_will_replay)
9739         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9740         (record_full_stop_replaying): Refactor as methods of the
9741         record_full_base_target class.
9742         (record_full_core_resume, record_full_core_kill)
9743         (record_full_core_fetch_registers)
9744         (record_full_core_prepare_to_store)
9745         (record_full_core_store_registers, record_full_core_xfer_partial)
9746         (record_full_core_insert_breakpoint)
9747         (record_full_core_remove_breakpoint)
9748         (record_full_core_has_execution): Refactor
9749         as methods of the record_full_core_target class.
9750         (record_full_base_target::supports_delete_record): New.
9751         (init_record_full_ops): Delete.
9752         (init_record_full_core_ops): Delete.
9753         (record_full_save): Refactor as method of the
9754         record_full_base_target class.
9755         (_initialize_record_full): Remove references to
9756         init_record_full_ops and init_record_full_core_ops.
9757
9758         * remote.c (remote_target, extended_remote_target): New classes.
9759         (remote_ops): Now a remote_target.
9760         (extended_remote_ops): Now an extended_remote_target.
9761         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9762         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9763         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9764         (remote_pass_signals, remote_set_syscall_catchpoint)
9765         (remote_program_signals, )
9766         (remote_thread_always_alive): Remove target_ops parameter.
9767         (remote_thread_alive, remote_thread_name)
9768         (remote_update_thread_list, remote_threads_extra_info)
9769         (remote_static_tracepoint_marker_at)
9770         (remote_static_tracepoint_markers_by_strid)
9771         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9772         (remote_open): Refactor as methods of remote_target.
9773         (extended_remote_open, extended_remote_detach)
9774         (extended_remote_attach, extended_remote_post_attach):
9775         (extended_remote_supports_disable_randomization)
9776         (extended_remote_create_inferior): : Refactor as method of
9777         extended_remote_target.
9778         (remote_set_permissions, remote_open_1, remote_detach)
9779         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9780         (remote_resume, remote_commit_resume, remote_stop)
9781         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9782         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9783         (remote_prepare_to_store, remote_store_registers)
9784         (remote_flash_erase, remote_flash_done, remote_files_info)
9785         (remote_kill, remote_mourn, remote_insert_breakpoint)
9786         (remote_remove_breakpoint, remote_insert_watchpoint)
9787         (remote_watchpoint_addr_within_range)
9788         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9789         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9790         (remote_supports_stopped_by_sw_breakpoint)
9791         (remote_stopped_by_hw_breakpoint)
9792         (remote_supports_stopped_by_hw_breakpoint)
9793         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9794         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9795         (remote_verify_memory): Refactor as methods of remote_target.
9796         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9797         parameter.
9798         (remote_xfer_partial, remote_get_memory_xfer_limit)
9799         (remote_search_memory, remote_rcmd, remote_memory_map)
9800         (remote_pid_to_str, remote_get_thread_local_address)
9801         (remote_get_tib_address, remote_read_description): Refactor as
9802         methods of remote_target.
9803         (remote_target::fileio_open, remote_target::fileio_pwrite)
9804         (remote_target::fileio_pread, remote_target::fileio_close): New.
9805         (remote_hostio_readlink, remote_hostio_fstat)
9806         (remote_filesystem_is_local, remote_can_execute_reverse)
9807         (remote_supports_non_stop, remote_supports_disable_randomization)
9808         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9809         (remote_supports_enable_disable_tracepoint)
9810         (remote_supports_string_tracing)
9811         (remote_can_run_breakpoint_commands, remote_trace_init)
9812         (remote_download_tracepoint, remote_can_download_tracepoint)
9813         (remote_download_trace_state_variable, remote_enable_tracepoint)
9814         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9815         (remote_trace_start, remote_get_trace_status)
9816         (remote_get_tracepoint_status, remote_trace_stop)
9817         (remote_trace_find, remote_get_trace_state_variable_value)
9818         (remote_save_trace_data, remote_get_raw_trace_data)
9819         (remote_set_disconnected_tracing, remote_core_of_thread)
9820         (remote_set_circular_trace_buffer, remote_traceframe_info)
9821         (remote_get_min_fast_tracepoint_insn_len)
9822         (remote_set_trace_buffer_size, remote_set_trace_notes)
9823         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9824         (remote_disable_btrace, remote_teardown_btrace)
9825         (remote_read_btrace, remote_btrace_conf)
9826         (remote_augmented_libraries_svr4_read, remote_load)
9827         (remote_pid_to_exec_file, remote_can_do_single_step)
9828         (remote_execution_direction, remote_thread_handle_to_thread_info):
9829         Refactor as methods of remote_target.
9830         (init_remote_ops, init_extended_remote_ops): Delete.
9831         (remote_can_async_p, remote_is_async_p, remote_async)
9832         (remote_thread_events, remote_upload_tracepoints)
9833         (remote_upload_trace_state_variables): Refactor as methods of
9834         remote_target.
9835         (_initialize_remote): Remove references to init_remote_ops and
9836         init_extended_remote_ops.
9837
9838         * remote-sim.c (gdbsim_target): New class.
9839         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9840         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9841         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9842         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9843         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9844         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9845         Refactor as methods of gdbsim_target.
9846         (gdbsim_ops): Now a gdbsim_target.
9847         (init_gdbsim_ops): Delete.
9848         (gdbsim_cntrl_c): Adjust.
9849         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9850
9851         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9852         (the_amd64_linux_nat_target): New.
9853         (amd64_linux_fetch_inferior_registers)
9854         (amd64_linux_store_inferior_registers): Refactor as methods of
9855         amd64_linux_nat_target.
9856         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9857         * i386-linux-nat.c: Don't include "linux-nat.h".
9858         (i386_linux_nat_target): New class.
9859         (the_i386_linux_nat_target): New.
9860         (i386_linux_fetch_inferior_registers)
9861         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9862         as methods of i386_linux_nat_target.
9863         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9864         * inf-child.c (inf_child_ops): Delete.
9865         (inf_child_fetch_inferior_registers)
9866         (inf_child_store_inferior_registers): Delete.
9867         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9868         methods of inf_child_target.
9869         (inf_child_target::supports_terminal_ours)
9870         (inf_child_target::terminal_init)
9871         (inf_child_target::terminal_inferior)
9872         (inf_child_target::terminal_ours_for_output)
9873         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9874         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9875         New.
9876         (inf_child_open, inf_child_disconnect, inf_child_close)
9877         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9878         (inf_child_post_startup_inferior, inf_child_can_run)
9879         (inf_child_pid_to_exec_file): Refactor as methods of
9880         inf_child_target.
9881         (inf_child_follow_fork): Delete.
9882         (inf_child_target::can_create_inferior)
9883         (inf_child_target::can_attach): New.
9884         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9885         (inf_child_target::has_stack, inf_child_target::has_registers)
9886         (inf_child_target::has_execution): New.
9887         (inf_child_fileio_open, inf_child_fileio_pwrite)
9888         (inf_child_fileio_pread, inf_child_fileio_fstat)
9889         (inf_child_fileio_close, inf_child_fileio_unlink)
9890         (inf_child_fileio_readlink, inf_child_use_agent)
9891         (inf_child_can_use_agent): Refactor as methods of
9892         inf_child_target.
9893         (return_zero, inf_child_target): Delete.
9894         (inf_child_target::inf_child_target): New.
9895         * inf-child.h: Include "target.h".
9896         (inf_child_target): Delete function prototype.
9897         (inf_child_target): New class.
9898         (inf_child_open_target, inf_child_mourn_inferior)
9899         (inf_child_maybe_unpush_target): Delete.
9900         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9901         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9902         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9903         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9904         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9905         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9906         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9907         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9908         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9909         methods of inf_ptrace_target.
9910         (inf_ptrace_target): Delete function.
9911         * inf-ptrace.h: Include "inf-child.h".
9912         (inf_ptrace_target): Delete function declaration.
9913         (inf_ptrace_target): New class.
9914         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9915         * linux-nat.c (linux_target): New.
9916         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9917         (linux_nat_target::~linux_nat_target): New.
9918         (linux_child_post_attach, linux_child_post_startup_inferior)
9919         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9920         (linux_child_remove_fork_catchpoint)
9921         (linux_child_insert_vfork_catchpoint)
9922         (linux_child_remove_vfork_catchpoint)
9923         (linux_child_insert_exec_catchpoint)
9924         (linux_child_remove_exec_catchpoint)
9925         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9926         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9927         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9928         (linux_nat_stopped_data_address)
9929         (linux_nat_stopped_by_sw_breakpoint)
9930         (linux_nat_supports_stopped_by_sw_breakpoint)
9931         (linux_nat_stopped_by_hw_breakpoint)
9932         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9933         (linux_nat_kill, linux_nat_mourn_inferior)
9934         (linux_nat_xfer_partial, linux_nat_thread_alive)
9935         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9936         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9937         (linux_child_static_tracepoint_markers_by_strid)
9938         (linux_nat_is_async_p, linux_nat_can_async_p)
9939         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9940         (linux_nat_supports_multi_process)
9941         (linux_nat_supports_disable_randomization, linux_nat_async)
9942         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9943         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9944         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9945         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9946         methods of linux_nat_target.
9947         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9948         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9949         parameter.
9950         (check_stopped_by_watchpoint): Adjust.
9951         (linux_xfer_partial): Delete.
9952         (linux_target_install_ops, linux_target, linux_nat_add_target):
9953         Delete.
9954         (linux_nat_target::linux_nat_target): New.
9955         * linux-nat.h: Include "inf-ptrace.h".
9956         (linux_nat_target): New.
9957         (linux_target, linux_target_install_ops, linux_nat_add_target):
9958         Delete function declarations.
9959         (linux_target): Declare global.
9960         * linux-thread-db.c (thread_db_target): New.
9961         (thread_db_target::thread_db_target): New.
9962         (thread_db_ops): Delete.
9963         (the_thread_db_target): New.
9964         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9965         (thread_db_update_thread_list, thread_db_pid_to_str)
9966         (thread_db_extra_thread_info)
9967         (thread_db_thread_handle_to_thread_info)
9968         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9969         (thread_db_resume): Refactor as methods of thread_db_target.
9970         (init_thread_db_ops): Delete.
9971         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9972         * x86-linux-nat.c: Don't include "linux-nat.h".
9973         (super_post_startup_inferior): Delete.
9974         (x86_linux_nat_target::~x86_linux_nat_target): New.
9975         (x86_linux_child_post_startup_inferior)
9976         (x86_linux_read_description, x86_linux_enable_btrace)
9977         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9978         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9979         methods of x86_linux_nat_target.
9980         (x86_linux_create_target): Delete.  Bits folded ...
9981         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9982         pointer.
9983         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9984         (x86_linux_nat_target): New class.
9985         (x86_linux_create_target): Delete.
9986         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9987         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9988         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9989         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9990         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9991         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9992         make extern.
9993         (x86_use_watchpoints): Delete.
9994         * x86-nat.h: Include "breakpoint.h" and "target.h".
9995         (x86_use_watchpoints): Delete.
9996         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9997         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9998         (x86_insert_watchpoint, x86_remove_watchpoint)
9999         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10000         (x86_stopped_by_hw_breakpoint): New declarations.
10001         (x86_nat_target): New template class.
10002
10003         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10004         (the_ppc_linux_nat_target): New.
10005         (ppc_linux_fetch_inferior_registers)
10006         (ppc_linux_can_use_hw_breakpoint)
10007         (ppc_linux_region_ok_for_hw_watchpoint)
10008         (ppc_linux_ranged_break_num_registers)
10009         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10010         (ppc_linux_insert_mask_watchpoint)
10011         (ppc_linux_remove_mask_watchpoint)
10012         (ppc_linux_can_accel_watchpoint_condition)
10013         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10014         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10015         (ppc_linux_watchpoint_addr_within_range)
10016         (ppc_linux_masked_watch_num_registers)
10017         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10018         (ppc_linux_read_description): Refactor as methods of
10019         ppc_linux_nat_target.
10020         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10021
10022         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10023         (procfs_target): New class.
10024         (the_procfs_target): New.
10025         (procfs_target): Delete function.
10026         (procfs_auxv_parse, procfs_attach, procfs_detach)
10027         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10028         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10029         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10030         (procfs_create_inferior, procfs_update_thread_list)
10031         (procfs_thread_alive, procfs_pid_to_str)
10032         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10033         (procfs_stopped_data_address, procfs_insert_watchpoint)
10034         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10035         (proc_find_memory_regions, procfs_info_proc)
10036         (procfs_make_note_section): Refactor as methods of procfs_target.
10037         (_initialize_procfs): Adjust.
10038         * sol-thread.c (sol_thread_target): New class.
10039         (sol_thread_ops): Now a sol_thread_target.
10040         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10041         (sol_thread_fetch_registers, sol_thread_store_registers)
10042         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10043         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10044         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10045         (init_sol_thread_ops): Delete.
10046         (_initialize_sol_thread): Adjust.  Remove references to
10047         init_sol_thread_ops and complete_target_initialization.
10048
10049         * windows-nat.c (windows_nat_target): New class.
10050         (windows_fetch_inferior_registers)
10051         (windows_store_inferior_registers, windows_resume, windows_wait)
10052         (windows_attach, windows_detach, windows_pid_to_exec_file)
10053         (windows_files_info, windows_create_inferior)
10054         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10055         (windows_close, windows_pid_to_str, windows_xfer_partial)
10056         (windows_get_tib_address, windows_get_ada_task_ptid)
10057         (windows_thread_name, windows_thread_alive): Refactor as
10058         windows_nat_target methods.
10059         (do_initial_windows_stuff): Adjust.
10060         (windows_target): Delete function.
10061         (_initialize_windows_nat): Adjust.
10062
10063         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10064         (darwin_mourn_inferior, darwin_kill_inferior)
10065         (darwin_create_inferior, darwin_attach, darwin_detach)
10066         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10067         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10068         (darwin_supports_multi_process): Refactor as darwin_nat_target
10069         methods.
10070         (darwin_resume_to, darwin_files_info): Delete.
10071         (_initialize_darwin_inferior): Rename to ...
10072         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10073         * darwin-nat.h: Include "inf-child.h".
10074         (darwin_nat_target): New class.
10075         (darwin_complete_target): Delete.
10076         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10077         (darwin_target): New.
10078         (i386_darwin_fetch_inferior_registers)
10079         (i386_darwin_store_inferior_registers): Refactor as methods of
10080         darwin_nat_target.
10081         (darwin_complete_target): Delete, with ...
10082         (_initialize_i386_darwin_nat): ... bits factored out here.
10083
10084         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10085         (the_alpha_linux_nat_target): New.
10086         (alpha_linux_register_u_offset): Refactor as
10087         alpha_linux_nat_target method.
10088         (_initialize_alpha_linux_nat): Adjust.
10089         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10090         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10091         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10092         methods of linux_nat_trad_target.
10093         (linux_trad_target): Delete.
10094         * linux-nat-trad.h (linux_trad_target): Delete function.
10095         (linux_nat_trad_target): New class.
10096         * mips-linux-nat.c (mips_linux_nat_target): New class.
10097         (super_fetch_registers, super_store_registers, super_close):
10098         Delete.
10099         (the_mips_linux_nat_target): New.
10100         (mips64_linux_regsets_fetch_registers)
10101         (mips64_linux_regsets_store_registers)
10102         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10103         (mips_linux_register_u_offset, mips_linux_read_description)
10104         (mips_linux_can_use_hw_breakpoint)
10105         (mips_linux_stopped_by_watchpoint)
10106         (mips_linux_stopped_data_address)
10107         (mips_linux_region_ok_for_hw_watchpoint)
10108         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10109         (mips_linux_close): Refactor as methods of mips_linux_nat.
10110         (_initialize_mips_linux_nat): Adjust to C++ification.
10111
10112         * aix-thread.c (aix_thread_target): New class.
10113         (aix_thread_ops): Now an aix_thread_target.
10114         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10115         (aix_thread_fetch_registers, aix_thread_store_registers)
10116         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10117         (aix_thread_thread_alive, aix_thread_pid_to_str)
10118         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10119         Refactor as methods of aix_thread_target.
10120         (init_aix_thread_ops): Delete.
10121         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10122         and complete_target_initialization.
10123         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10124         (rs6000_nat_target): New class.
10125         (the_rs6000_nat_target): New.
10126         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10127         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10128         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10129         (super_create_inferior): Delete.
10130         (_initialize_rs6000_nat): Adjust to C++ification.
10131
10132         * arm-linux-nat.c (arm_linux_nat_target): New class.
10133         (the_arm_linux_nat_target): New.
10134         (arm_linux_fetch_inferior_registers)
10135         (arm_linux_store_inferior_registers, arm_linux_read_description)
10136         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10137         (arm_linux_remove_hw_breakpoint)
10138         (arm_linux_region_ok_for_hw_watchpoint)
10139         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10140         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10141         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10142         arm_linux_nat_target.
10143         (_initialize_arm_linux_nat): Adjust to C++ification.
10144
10145         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10146         (the_aarch64_linux_nat_target): New.
10147         (aarch64_linux_fetch_inferior_registers)
10148         (aarch64_linux_store_inferior_registers)
10149         (aarch64_linux_child_post_startup_inferior)
10150         (aarch64_linux_read_description)
10151         (aarch64_linux_can_use_hw_breakpoint)
10152         (aarch64_linux_insert_hw_breakpoint)
10153         (aarch64_linux_remove_hw_breakpoint)
10154         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10155         (aarch64_linux_region_ok_for_hw_watchpoint)
10156         (aarch64_linux_stopped_data_address)
10157         (aarch64_linux_stopped_by_watchpoint)
10158         (aarch64_linux_watchpoint_addr_within_range)
10159         (aarch64_linux_can_do_single_step): Refactor as methods of
10160         aarch64_linux_nat_target.
10161         (super_post_startup_inferior): Delete.
10162         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10163
10164         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10165         (the_hppa_linux_nat_target): New.
10166         (hppa_linux_fetch_inferior_registers)
10167         (hppa_linux_store_inferior_registers): Refactor as methods of
10168         hppa_linux_nat_target.
10169         (_initialize_hppa_linux_nat): Adjust to C++ification.
10170
10171         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10172         (the_ia64_linux_nat_target): New.
10173         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10174         (ia64_linux_stopped_data_address)
10175         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10176         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10177         ia64_linux_nat_target methods.
10178         (super_xfer_partial): Delete.
10179         (_initialize_ia64_linux_nat): Adjust to C++ification.
10180
10181         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10182         (the_m32r_linux_nat_target): New.
10183         (m32r_linux_fetch_inferior_registers)
10184         (m32r_linux_store_inferior_registers): Refactor as
10185         m32r_linux_nat_target methods.
10186         (_initialize_m32r_linux_nat): Adjust to C++ification.
10187
10188         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10189         (the_m68k_linux_nat_target): New.
10190         (m68k_linux_fetch_inferior_registers)
10191         (m68k_linux_store_inferior_registers): Refactor as
10192         m68k_linux_nat_target methods.
10193         (_initialize_m68k_linux_nat): Adjust to C++ification.
10194
10195         * s390-linux-nat.c (s390_linux_nat_target): New class.
10196         (the_s390_linux_nat_target): New.
10197         (s390_linux_fetch_inferior_registers)
10198         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10199         (s390_insert_watchpoint, s390_remove_watchpoint)
10200         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10201         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10202         (s390_auxv_parse, s390_read_description): Refactor as methods of
10203         s390_linux_nat_target.
10204         (_initialize_s390_nat): Adjust to C++ification.
10205
10206         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10207         (the_sparc_linux_nat_target): New.
10208         (_initialize_sparc_linux_nat): Adjust to C++ification.
10209         * sparc-nat.c (sparc_fetch_inferior_registers)
10210         (sparc_store_inferior_registers): Remove target_ops parameter.
10211         * sparc-nat.h (sparc_fetch_inferior_registers)
10212         (sparc_store_inferior_registers): Remove target_ops parameter.
10213         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10214         (the_sparc64_linux_nat_target): New.
10215         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10216
10217         * spu-linux-nat.c (spu_linux_nat_target): New class.
10218         (the_spu_linux_nat_target): New.
10219         (spu_child_post_startup_inferior, spu_child_post_attach)
10220         (spu_child_wait, spu_fetch_inferior_registers)
10221         (spu_store_inferior_registers, spu_xfer_partial)
10222         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10223         methods.
10224         (_initialize_spu_nat): Adjust to C++ification.
10225
10226         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10227         (the_tilegx_linux_nat_target): New.
10228         (fetch_inferior_registers, store_inferior_registers):
10229         Refactor as methods.
10230         (_initialize_tile_linux_nat): Adjust to C++ification.
10231
10232         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10233         (the_xtensa_linux_nat_target): New.
10234         (xtensa_linux_fetch_inferior_registers)
10235         (xtensa_linux_store_inferior_registers): Refactor as
10236         xtensa_linux_nat_target methods.
10237         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10238
10239         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10240         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10241         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10242         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10243         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10244         (fbsd_stopped_by_sw_breakpoint)
10245         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10246         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10247         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10248         (fbsd_post_startup_inferior, fbsd_post_attach)
10249         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10250         (fbsd_set_syscall_catchpoint)
10251         (super_xfer_partial, super_resume, super_wait)
10252         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10253         (fbsd_handle_debug_trap): Remove target_ops parameter.
10254         (fbsd_nat_add_target): Delete.
10255         * fbsd-nat.h: Include "inf-ptrace.h".
10256         (fbsd_nat_add_target): Delete.
10257         (USE_SIGTRAP_SIGINFO): Define.
10258         (fbsd_nat_target): New class.
10259
10260         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10261         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10262         (amd64bsd_target): Delete.
10263         * amd64-bsd-nat.h: New file.
10264         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10265         "x86-bsd-nat.h".
10266         (amd64_fbsd_nat_target): New class.
10267         (the_amd64_fbsd_nat_target): New.
10268         (amd64fbsd_read_description): Refactor as method of
10269         amd64_fbsd_nat_target.
10270         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10271         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10272         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10273         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10274         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10275         (i386bsd_target): Delete.
10276         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10277         (i386bsd_fetch_inferior_registers)
10278         (i386bsd_store_inferior_registers): Declare.
10279         (i386_bsd_nat_target): New class.
10280         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10281         (the_i386_fbsd_nat_target): New.
10282         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10283         i386_fbsd_nat_target methods.
10284         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10285         (_initialize_i386fbsd_nat): Adjust to C++ification.
10286         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10287         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10288         (_initialize_x86_bsd_nat): Adjust to C++ification.
10289         * x86-bsd-nat.h: Include "x86-nat.h".
10290         (x86bsd_target): Delete declaration.
10291         (x86bsd_nat_target): New class.
10292
10293         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10294         (the_aarch64_fbsd_nat_target): New.
10295         (aarch64_fbsd_fetch_inferior_registers)
10296         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10297         aarch64_fbsd_nat_target.
10298         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10299         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10300         (the_alpha_bsd_nat_target): New.
10301         (alphabsd_fetch_inferior_registers)
10302         (alphabsd_store_inferior_registers): Refactor as
10303         alpha_bsd_nat_target methods.
10304         (_initialize_alphabsd_nat): Refactor as methods of
10305         alpha_bsd_nat_target.
10306         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10307         (the_amd64_nbsd_nat_target): New.
10308         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10309         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10310         (the_amd64_obsd_nat_target): New.
10311         (_initialize_amd64obsd_nat): Adjust to C++ification.
10312         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10313         (the_arm_fbsd_nat_target): New.
10314         (arm_fbsd_fetch_inferior_registers)
10315         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10316         (_initialize_arm_fbsd_nat): Refactor as methods of
10317         arm_fbsd_nat_target.
10318         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10319         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10320         (the_arm_netbsd_nat_target): New.
10321         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10322         arm_netbsd_nat_target.
10323         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10324         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10325         (the_hppa_nbsd_nat_target): New.
10326         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10327         hppa_nbsd_nat_target methods.
10328         (_initialize_hppanbsd_nat): Adjust to C++ification.
10329         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10330         (the_hppa_obsd_nat_target): New.
10331         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10332         methods of hppa_obsd_nat_target.
10333         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10334         add_target.
10335         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10336         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10337         add_target.
10338         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10339         (_initialize_i386obsd_nat): Use add_target.
10340         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10341         (the_m68k_bsd_nat_target): New.
10342         (m68kbsd_fetch_inferior_registers)
10343         (m68kbsd_store_inferior_registers): Refactor as methods of
10344         m68k_bsd_nat_target.
10345         (_initialize_m68kbsd_nat): Adjust to C++ification.
10346         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10347         (the_mips_fbsd_nat_target): New.
10348         (mips_fbsd_fetch_inferior_registers)
10349         (mips_fbsd_store_inferior_registers): Refactor as methods of
10350         mips_fbsd_nat_target.
10351         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10352         add_target.
10353         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10354         (the_mips_nbsd_nat_target): New.
10355         (mipsnbsd_fetch_inferior_registers)
10356         (mipsnbsd_store_inferior_registers): Refactor as methods of
10357         mips_nbsd_nat_target.
10358         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10359         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10360         (the_mips64_obsd_nat_target): New.
10361         (mips64obsd_fetch_inferior_registers)
10362         (mips64obsd_store_inferior_registers): Refactor as methods of
10363         mips64_obsd_nat_target.
10364         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10365         add_target.
10366         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10367         nbsd_nat_target.
10368         * nbsd-nat.h: Include "inf-ptrace.h".
10369         (nbsd_nat_target): New class.
10370         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10371         (obsd_wait): Refactor as methods of obsd_nat_target.
10372         (obsd_add_target): Delete.
10373         * obsd-nat.h: Include "inf-ptrace.h".
10374         (obsd_nat_target): New class.
10375         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10376         (the_ppc_fbsd_nat_target): New.
10377         (ppcfbsd_fetch_inferior_registers)
10378         (ppcfbsd_store_inferior_registers): Refactor as methods of
10379         ppc_fbsd_nat_target.
10380         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10381         add_target.
10382         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10383         (the_ppc_nbsd_nat_target): New.
10384         (ppcnbsd_fetch_inferior_registers)
10385         (ppcnbsd_store_inferior_registers): Refactor as methods of
10386         ppc_nbsd_nat_target.
10387         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10388         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10389         (the_ppc_obsd_nat_target): New.
10390         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10391         methods of ppc_obsd_nat_target.
10392         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10393         add_target.
10394         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10395         (the_sh_nbsd_nat_target): New.
10396         (shnbsd_fetch_inferior_registers)
10397         (shnbsd_store_inferior_registers): Refactor as methods of
10398         sh_nbsd_nat_target.
10399         (_initialize_shnbsd_nat): Adjust to C++ification.
10400         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10401         (inf_ptrace_xfer_partial): Delete.
10402         (sparc_xfer_partial, sparc_target): Delete.
10403         * sparc-nat.h (sparc_fetch_inferior_registers)
10404         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10405         (sparc_target): Delete function declaration.
10406         (sparc_target): New template class.
10407         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10408         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10409         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10410         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10411         add_target.
10412         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10413         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10414         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10415         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10416         add_target.
10417         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10418         (the_vax_bsd_nat_target): New.
10419         (vaxbsd_fetch_inferior_registers)
10420         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10421         methods.
10422         (_initialize_vaxbsd_nat): Adjust to C++ification.
10423
10424         * bsd-kvm.c (bsd_kvm_target): New class.
10425         (bsd_kvm_ops): Now a bsd_kvm_target.
10426         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10427         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10428         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10429         bsd_kvm_target.
10430         (bsd_kvm_return_one): Delete.
10431         (bsd_kvm_add_target): Adjust to C++ification.
10432
10433         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10434         (nto_procfs_target_procfs): New classes.
10435         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10436         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10437         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10438         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10439         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10440         (procfs_remove_hw_breakpoint, procfs_resume)
10441         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10442         (procfs_kill_inferior, procfs_store_registers)
10443         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10444         as methods of nto_procfs_target.
10445         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10446         (nto_native_ops): Delete.
10447         (procfs_open, procfs_native_open): Delete.
10448         (nto_native_ops): Now an nto_procfs_target_native.
10449         (init_procfs_targets): Adjust to C++ification.
10450         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10451         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10452         Refactor as methods of nto_procfs_target.
10453
10454         * go32-nat.c (go32_nat_target): New class.
10455         (the_go32_nat_target): New.
10456         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10457         (go32_store_registers, go32_xfer_partial, go32_files_info)
10458         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10459         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10460         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10461         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10462         (go32_target): Delete.
10463         (_initialize_go32_nat): Adjust to C++ification.
10464
10465         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10466         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10467         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10468         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10469         gnu_nat_target.
10470         (gnu_target): Delete.
10471         * gnu-nat.h (gnu_target): Delete.
10472         (gnu_nat_target): New class.
10473         * i386-gnu-nat.c (gnu_base_target): New.
10474         (i386_gnu_nat_target): New class.
10475         (the_i386_gnu_nat_target): New.
10476         (_initialize_i386gnu_nat): Adjust to C++ification.
10477
10478 2018-05-02  Pedro Alves  <palves@redhat.com>
10479
10480         * bfd-target.c (target_bfd_xclose): Rename to ...
10481         (target_bfd_close): ... this.
10482         (target_bfd_reopen): Adjust.
10483         * target.c (target_close): Remove references to to_xclose.
10484         * target.h (target_ops::to_xclose): Delete.
10485         (target_ops::to_close): Update comments.
10486
10487 2018-05-02  Pedro Alves  <palves@redhat.com>
10488
10489         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10490         "linux-nat.h".
10491         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10492         * inf-ptrace.c (inf_ptrace_register_u_offset)
10493         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10494         (inf_ptrace_store_register, inf_ptrace_store_registers)
10495         (inf_ptrace_trad_target): Move to ...
10496         * linux-nat-trad.c: ... this new file.
10497         * linux-nat-trad.h: New file.
10498         * linux-nat.c (linux_target_install_ops): Make extern.
10499         (linux_trad_target): Delete.
10500         * linux-nat.h (linux_trad_target): Delete declaration.
10501         (linux_target_install_ops): Declare.
10502         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10503         "linux-nat.h".
10504
10505 2018-05-02  Pedro Alves  <palves@redhat.com>
10506
10507         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10508         procfs_target/add_target here.
10509         * procfs.c (procfs_target): Make static.
10510         (_initialize_procfs): Call add_target here.
10511         * procfs.h (struct target_ops): Remove forward declaration.
10512         (procfs_target): Remove declaration.
10513         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10514
10515 2018-05-02  Pedro Alves  <palves@redhat.com>
10516
10517         * procfs.c (procfs_stopped_by_watchpoint)
10518         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10519         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10520         Forward declare.
10521         (procfs_use_watchpoints): Delete, move contents...
10522         (procfs_target): ... here.
10523         * procfs.h (procfs_use_watchpoints): Delete declaration.
10524         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10525         procfs_use_watchpoints.
10526         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10527         procfs_use_watchpoints.
10528
10529 2018-05-02  Tom Tromey  <tom@tromey.com>
10530
10531         PR python/20084:
10532         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10533         and var_zuinteger_unlimited.
10534         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10535         and PARAM_ZUINTEGER_UNLIMITED.
10536         (set_parameter_value): Handle var_zuinteger and
10537         var_zuinteger_unlimited.
10538         (add_setshow_generic): Likewise.
10539         (parmpy_init): Likewise.
10540
10541 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10542
10543         PR rust/23124
10544         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10545         pointer is not null before dereferencing it.
10546
10547 2018-04-30  Tom Tromey  <tom@tromey.com>
10548
10549         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10550         is_mi_like_p.
10551
10552 2018-04-30  Tom Tromey  <tom@tromey.com>
10553
10554         * breakpoint.c (mention): Remove use of is_mi_like_p.
10555         (print_mention_ranged_breakpoint): Likewise.
10556         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10557         of is_mi_like_p.
10558
10559 2018-04-30  Tom Tromey  <tom@tromey.com>
10560
10561         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10562
10563 2018-04-30  Tom Tromey  <tom@tromey.com>
10564
10565         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10566         (info_spu_event_command): Remove some uses of is_mi_like_p.
10567
10568 2018-04-30  Tom Tromey  <tom@tromey.com>
10569
10570         * python/py-framefilter.c (py_print_single_arg)
10571         (enumerate_locals, py_print_args, py_print_frame): Remove some
10572         uses of is_mi_like_p.
10573
10574 2018-04-30  Tom Tromey  <tom@tromey.com>
10575
10576         * ui-out.c: Update.
10577         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10578         * ui-out.h (ui_out::is_mi_like_p): Now const.
10579         (ui_out::do_is_mi_like_p): Now const.
10580         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10581
10582 2018-04-30  Tom Tromey  <tom@tromey.com>
10583
10584         * varobj.c (varobj_set_visualizer): Use new_reference.
10585         * python/python.c (gdbpy_decode_line): Use new_reference.
10586         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10587         new_reference.
10588
10589 2018-04-30  Tom Tromey  <tom@tromey.com>
10590
10591         * varobj.c (install_new_value): Use new_reference.
10592         * value.h (value_incref): Return void.  Swap intro comment with
10593         value_decref.
10594         * value.c (set_value_parent): Use new_reference.
10595         (value_incref): Return void.  Update intro comment.
10596         (release_value): Use new_reference.
10597         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10598
10599 2018-04-30  Tom Tromey  <tom@tromey.com>
10600
10601         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10602         * gdb_bfd.h (new_bfd_ref): Remove.
10603         (gdb_bfd_open): Update comment.
10604         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10605         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10606         (gdb_bfd_fdopenr): Use new_reference.
10607         * exec.c (exec_file_attach): Use new_reference.
10608
10609 2018-04-30  Tom Tromey  <tom@tromey.com>
10610
10611         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10612         method.
10613
10614 2018-04-30  Tom Tromey  <tom@tromey.com>
10615
10616         * jit.c (jit_read_code_entry): Use type_align.
10617         * i386-tdep.c (i386_gdbarch_init): Don't call
10618         set_gdbarch_long_long_align_bit.
10619         * gdbarch.sh: Remove long_long_align_bit.
10620         * gdbarch.c, gdbarch.h: Rebuild.
10621         * arc-tdep.c (arc_type_align): New function.
10622         (arc_gdbarch_init): Use arc_type_align.  Don't call
10623         set_gdbarch_long_long_align_bit.
10624
10625 2018-04-30  Tom Tromey  <tom@tromey.com>
10626
10627         * rust-lang.c (rust_type_alignment): Remove.
10628         (rust_composite_type): Use type_align.
10629
10630 2018-04-30  Tom Tromey  <tom@tromey.com>
10631
10632         * NEWS: Mention Type.align.
10633         * python/py-type.c (typy_get_alignof): New function.
10634         (type_object_getset): Add "alignof".
10635
10636 2018-04-30  Tom Tromey  <tom@tromey.com>
10637
10638         PR exp/17095:
10639         * NEWS: Update.
10640         * std-operator.def (UNOP_ALIGNOF): New operator.
10641         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10642         New.
10643         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10644         * c-lang.c (c_op_print_tab): Add alignof.
10645         * c-exp.y (ALIGNOF): New token.
10646         (exp): Add "ALIGNOF" production.
10647         (ident_tokens): Add _Alignof and alignof.
10648
10649 2018-04-30  Tom Tromey  <tom@tromey.com>
10650
10651         * i386-tdep.c (i386_type_align): New function.
10652         (i386_gdbarch_init): Update.
10653         * gdbarch.sh (type_align): New method.
10654         * gdbarch.c, gdbarch.h: Rebuild.
10655         * arch-utils.h (default_type_align): Declare.
10656         * arch-utils.c (default_type_align): New function.
10657         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10658         (struct type) <align_log2>: New field.
10659         <instance_flags>: Now a bitfield.
10660         (TYPE_RAW_ALIGN): New macro.
10661         (type_align, type_raw_align, set_type_align): Declare.
10662         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10663         functions.
10664         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10665         (get_alignment, maybe_set_alignment): New functions.
10666         (read_structure_type, read_enumeration_type, read_array_type)
10667         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10668         (read_subrange_type, read_base_type): Set type alignment.
10669
10670 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10671
10672         * dwarf2read.c (read_index_from_section): Use bool.
10673
10674 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10675
10676         PR gdb/22950
10677         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10678         with #ifdef.
10679
10680 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10681
10682         PR build/22873
10683         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10684         last step, and do it atomically.
10685
10686 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10687
10688         * compile/compile-c-types.c (convert_int, convert_float):
10689         Update for C FE v1.
10690
10691 2018-04-27  Tom Tromey  <tom@tromey.com>
10692
10693         PR rust/22545:
10694         * rust-lang.c (rust_inclusive_range_type_p): New function.
10695         (rust_range): Handle inclusive ranges.
10696         (rust_compute_range): Likewise.
10697         * rust-exp.y (struct rust_op) <inclusive>: New field.
10698         (DOTDOTEQ): New constant.
10699         (range_expr): Add "..=" productions.
10700         (operator_tokens): Add "..=" token.
10701         (ast_range): Add "inclusive" parameter.
10702         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10703         ranges.
10704         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10705         bounds values.
10706         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10707         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10708         Update comments.
10709         * expprint.c (print_subexp_standard): Handle new bounds values.
10710         (dump_subexp_body_standard): Likewise.
10711
10712 2018-04-27  Tom Tromey  <tom@tromey.com>
10713
10714         * configure: Rebuild.
10715         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10716         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10717         "OVERRIDE".
10718         (class symbol_needs_eval_context): Likewise.
10719         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10720         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10721         "virtual".
10722         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10723         "override".
10724         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10725         * aarch64-tdep.c (instruction_reader::read): Use "override".
10726         (instruction_reader_test::read): Likewise.
10727         * arm-tdep.c (instruction_reader::read): Use "override".
10728         (instruction_reader_thumb::read): Likewise.
10729
10730 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10731
10732         PR remote/9665
10733         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10734         instead of remote_send.
10735         (remote_send): Remove.
10736
10737 2018-04-26  Pedro Alves  <palves@redhat.com>
10738
10739         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10740         find_function_start_sal instead of find_pc_line.
10741
10742 2018-04-26  Pedro Alves  <palves@redhat.com>
10743
10744         * breakpoint.c (set_breakpoint_location_function): Handle
10745         mst_data_gnu_ifunc.
10746         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10747         * elfread.c (elf_symtab_read): Give data symbols with
10748         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10749         (elf_rel_plt_read): Update comment.
10750         * linespec.c (convert_linespec_to_sals): Handle
10751         mst_data_gnu_ifunc.
10752         (minsym_found): Handle mst_data_gnu_ifunc.
10753         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10754         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10755         * parse.c (find_minsym_type_and_address): Handle
10756         mst_data_gnu_ifunc.
10757         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10758         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10759         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10760         comment.
10761         <mst_data_gnu_ifunc>: New enumerator.
10762
10763 2018-04-26  Pedro Alves  <palves@redhat.com>
10764
10765         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10766         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10767         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10768         Handle it.
10769         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10770         (lookup_minimal_symbol_by_pc): Adjust.
10771         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10772         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10773         * minsyms.h (lookup_msym_prefer): New enum.
10774         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10775         parameter by a lookup_msym_prefer parameter.
10776
10777 2018-04-26  Pedro Alves  <palves@redhat.com>
10778
10779         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10780         ends in "@plt" instead of looking at the symbol's section.
10781
10782 2018-04-26  Pedro Alves  <palves@redhat.com>
10783
10784         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10785         all references.
10786         (find_pc_partial_function_gnu_ifunc): Rename to ...
10787         (find_pc_partial_function): ... this, and remove references to
10788         'is_gnu_ifunc_p'.
10789         (find_pc_partial_function): Delete old implementation.
10790         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10791
10792 2018-04-26  Pedro Alves  <palves@redhat.com>
10793
10794         * linespec.c (struct bound_minimal_symbol_search_key): New.
10795         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10796         skip first line if we found a GNU ifunc minimal symbol by name.
10797         (compare_msymbols): Change parameters to work with a destructured
10798         lhs minsym.
10799         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10800         functions.
10801
10802 2018-04-26  Pedro Alves  <palves@redhat.com>
10803
10804         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10805         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10806         address/name.
10807         (add_location_to_breakpoint): Store the minsym and the objfile in
10808         the breakpoint location.
10809         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10810         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10811         Record the minsym in the sal.
10812         * symtab.h (symtab_and_line) <msymbol>: New field.
10813
10814 2018-04-26  Pedro Alves  <palves@redhat.com>
10815
10816         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10817         unless we actually resolved the ifunc.
10818
10819 2018-04-26  Pedro Alves  <palves@redhat.com>
10820
10821         * c-exp.y (variable production): Prefer ifunc minsyms over
10822         regular function symbols.
10823         * symtab.c (find_gnu_ifunc): New function.
10824         * minsyms.h (lookup_msym_prefer): New enum.
10825         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10826         parameter by a lookup_msym_prefer parameter.
10827         * symtab.h (find_gnu_ifunc): New declaration.
10828
10829 2018-04-26  Pedro Alves  <palves@redhat.com>
10830
10831         * blockframe.c (find_gnu_ifunc_target_type): New function.
10832         (find_function_type): New.
10833         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10834         return a value with a memory address.
10835         (eval_call): For calls to GNU ifunc functions, try to find the
10836         type of the target function from the type that the resolver
10837         returns.
10838         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10839         symbols.
10840         * infcall.c (find_function_return_type): Delete.
10841         (find_function_addr): Add 'function_type' parameter.  For calls to
10842         GNU ifunc functions, try to find the type of the target function
10843         from the type that the resolver returns, and return it via
10844         FUNCTION_TYPE.
10845         (call_function_by_hand_dummy): Adjust to use the function type
10846         returned by find_function_addr.
10847         (find_function_addr): Add 'function_type' parameter and move
10848         description here.
10849         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10850         declarations.
10851
10852 2018-04-26  Pedro Alves  <palves@redhat.com>
10853
10854         * c-exp.y (variable production): Skip finding an alias for ifunc
10855         symbols.
10856
10857 2018-04-26  Pedro Alves  <palves@redhat.com>
10858
10859         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10860
10861 2018-04-25  Pedro Alves  <palves@redhat.com>
10862
10863         * infcmd.c (kill_command): Print the pid as string, not the whole
10864         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10865         message.
10866         * remote.c (remote_detach_1): Print the pid as string, not the
10867         whole thread's ptid.
10868
10869 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10870             Sergio Durigan Junior  <sergiodj@redhat.com>
10871             Pedro Alves  <palves@redhat.com>
10872
10873         * infcmd.c (kill_command): Print message when inferior has
10874         been killed.
10875         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10876         '1'.
10877         (add_inferior): Improve message printed when
10878         'print_inferior_events' is on.
10879         (exit_inferior): Remove message printed when
10880         'print_inferior_events' is on.
10881         (detach_inferior): Improve message printed when
10882         'print_inferior_events' is on.
10883         (initialize_inferiors): Use 'add_inferior_silent' to set
10884         'current_inferior_'.
10885         * inferior.h (print_inferior_events): Declare here as
10886         'extern'.
10887         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10888         '[Detaching...]' messages when 'print_inferior_events' is on.
10889         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10890         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10891         'Detaching after fork from child...', replace it by '... from
10892         parent...'.
10893         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10894         prefix/suffix when printing 'Detaching...' messages.  Print
10895         them when 'print_inferior_events' is on.
10896         * remote.c (remote_detach_1): Print message when detaching
10897         from inferior and '!is_fork_parent'.
10898
10899 2018-04-24  Tom Tromey  <tom@tromey.com>
10900
10901         * cli-out.h: Reindent.
10902
10903 2018-04-24  Tom Tromey  <tom@tromey.com>
10904
10905         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10906         (cli_ui_out::do_field_string): Use fputs_filtered.
10907         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10908
10909 2018-04-23  Tom Tromey  <tom@tromey.com>
10910
10911         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10912         gdb::unique_xmalloc_ptr.
10913
10914 2018-04-23  Tom Tromey  <tom@tromey.com>
10915
10916         * configure: Rebuild.
10917
10918 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10919
10920         PR gdb/23095
10921         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10922         prepare_for_testing.  Set normal_bp to r_debug_state if target
10923         is bsd.
10924
10925 2018-04-21  Pedro Alves  <palves@redhat.com>
10926             Rajendra SY  <rajendra.sy@gmail.com>
10927
10928         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10929         * remote.c (extended_remote_attach): In all-stop mode, mark the
10930         thread as executing.
10931
10932 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10933
10934         * thread.c (thread_apply_all_command): Fix comment.
10935         (thread_command): Fix comment.
10936
10937 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10938
10939         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10940         parameter.
10941         * features/aarch64-core.c (create_feature_aarch64_core):
10942         Regenerate.
10943         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10944         Likewise.
10945         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10946         Likewise.
10947         * features/i386/32bit-avx512.c
10948         (create_feature_i386_32bit_avx512): Likewise.
10949         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10950         Likewise.
10951         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10952         Likewise.
10953         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10954         Likewise.
10955         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10956         Likewise.
10957         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10958         Likewise.
10959         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10960         Likewise.
10961         * features/i386/64bit-avx512.c
10962         (create_feature_i386_64bit_avx512): Likewise.
10963         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10964         Likewise.
10965         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10966         Likewise.
10967         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10968         Likewise.
10969         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10970         Likewise.
10971         * features/i386/64bit-segments.c
10972         (create_feature_i386_64bit_segments): Likewise.
10973         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10974         Likewise.
10975         * features/i386/x32-core.c
10976         (create_feature_i386_x32_core): Likewise.
10977         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10978         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10979         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10980         * target-descriptions.c: In generated code, don't pass xml
10981         filename.
10982
10983 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10984
10985         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10986         (print_xml_feature::visit_post): Likewise.
10987         (print_xml_feature::visit): Likewise.
10988         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10989         (print_xml_feature): Add new class.
10990         * regformats/regdat.sh: Null xmltarget on feature targets.
10991         * target-descriptions.c (struct target_desc): Add xmltarget.
10992         (maintenance_check_tdesc_xml_convert): Add unittest function.
10993         (tdesc_get_features_xml): Add function to get xml.
10994         (maintenance_check_xml_descriptions): Test xml generation.
10995         * xml-tdesc.c (string_read_description_xml): Add function.
10996         * xml-tdesc.h (string_read_description_xml): Add declaration.
10997
10998 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10999
11000         * features/Makefile: Add feature marker to targets with new style
11001         target descriptions.
11002         * regformats/aarch64.dat: Regenerate.
11003         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11004         * regformats/i386/amd64-avx-linux.dat: Likewise.
11005         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11006         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11007         * regformats/i386/amd64-linux.dat: Likewise.
11008         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11009         * regformats/i386/amd64.dat: Likewise.
11010         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11011         * regformats/i386/i386-avx-linux.dat: Likewise.
11012         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11013         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11014         * regformats/i386/i386-linux.dat: Likewise.
11015         * regformats/i386/i386-mmx-linux.dat: Likewise.
11016         * regformats/i386/i386-mpx-linux.dat: Likewise.
11017         * regformats/i386/i386.dat: Likewise.
11018         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11019         * regformats/i386/x32-avx-linux.dat: Likewise.
11020         * regformats/i386/x32-linux.dat: Likewise.
11021         * regformats/tic6x-c62x-linux.dat: Likewise.
11022         * regformats/tic6x-c64x-linux.dat: Likewise.
11023         * regformats/tic6x-c64xp-linux.dat: Likewise.
11024         * regformats/regdat.sh: Parse feature marker.
11025
11026 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11027
11028         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11029         (tdesc_osabi_name): Likewise.
11030         * target-descriptions.c (tdesc_architecture_name): Add new
11031         function.
11032         (tdesc_osabi_name): Likewise.
11033
11034 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11035
11036         * common/tdesc.c (tdesc_predefined_type): Move to here.
11037         (tdesc_named_type): Likewise.
11038         (tdesc_create_vector): Likewise.
11039         (tdesc_create_struct): Likewise.
11040         (tdesc_set_struct_size): Likewise.
11041         (tdesc_create_union): Likewise.
11042         (tdesc_create_flags): Likewise.
11043         (tdesc_create_enum): Likewise.
11044         (tdesc_add_field): Likewise.
11045         (tdesc_add_typed_bitfield): Likewise.
11046         (tdesc_add_bitfield): Likewise.
11047         (tdesc_add_flag): Likewise.
11048         (tdesc_add_enum_value): Likewise.
11049         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11050         (struct tdesc_type_vector): Likewise.
11051         (struct tdesc_type_field): Likewise.
11052         (struct tdesc_type_with_fields): Likewise.
11053         (tdesc_create_enum): Add declaration.
11054         (tdesc_add_typed_bitfield): Likewise.
11055         (tdesc_add_enum_value): Likewise.
11056         * target-descriptions.c (tdesc_type_field): Move from here.
11057         (tdesc_type_builtin): Likewise.
11058         (tdesc_type_vector): Likewise.
11059         (tdesc_type_with_fields): Likewise.
11060         (tdesc_predefined_types): Likewise.
11061         (tdesc_named_type): Likewise.
11062         (tdesc_create_vector): Likewise.
11063         (tdesc_create_struct): Likewise.
11064         (tdesc_set_struct_size): Likewise.
11065         (tdesc_create_union): Likewise.
11066         (tdesc_create_flags): Likewise.
11067         (tdesc_create_enum): Likewise.
11068         (tdesc_add_field): Likewise.
11069         (tdesc_add_typed_bitfield): Likewise.
11070         (tdesc_add_bitfield): Likewise.
11071         (tdesc_add_flag): Likewise.
11072         (tdesc_add_enum_value): Likewise.
11073         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11074         (tdesc_add_typed_bitfield): Likewise.
11075         (tdesc_add_enum_value): Likewise.
11076
11077 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11078
11079         * common/tdesc.c (tdesc_feature::accept): Move to here.
11080         (tdesc_feature::operator==): Likewise.
11081         (tdesc_create_reg): Likewise.
11082         * common/tdesc.h (tdesc_type_kind): Likewise.
11083         (struct tdesc_type): Likewise.
11084         (struct tdesc_feature): Likewise.
11085         * regformats/regdat.sh: Create a feature.
11086         * target-descriptions.c (tdesc_type_kind): Move from here.
11087         (tdesc_type): Likewise.
11088         (tdesc_type_up): Likewise.
11089         (tdesc_feature): Likewise.
11090         (tdesc_create_reg): Likewise.
11091
11092 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11093
11094         * Makefile.in: Add arch/tdesc.c
11095         * common/tdesc.c: New file.
11096         * common/tdesc.h (tdesc_element_visitor): Move to here.
11097         (tdesc_element): Likewise.
11098         (tdesc_reg): Likewise.
11099         (tdesc_reg_up): Likewise.
11100         * regformats/regdef.h (reg): Add offset to constructors.
11101         * target-descriptions.c (tdesc_element_visitor): Move from here.
11102         (tdesc_element): Likewise.
11103         (tdesc_reg): Likewise.
11104         (tdesc_reg_up): Likewise.
11105
11106 2018-04-17  Tom Tromey  <tom@tromey.com>
11107
11108         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11109         discriminant field.
11110
11111 2018-04-17  Tom Tromey  <tom@tromey.com>
11112
11113         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11114
11115 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11116
11117         * symtab.c (print_symbol_info): Skip printing filename and line
11118         number when `last' is NULL.
11119         (symtab_symbol_info): Use empty string instead of NULL for first
11120         invocation of print_symbol_info.
11121         (rbreak_command): Pass NULL to `last' parameter of
11122         print_symbol_info.
11123
11124 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11125
11126         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11127         instead of nullptr.
11128
11129 2018-04-16  Pedro Alves  <palves@redhat.com>
11130
11131         * MAINTAINERS (sh): Remove.
11132         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11133         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11134         (ALLDEPFILES): Remove sh64-tdep.c.
11135         * NEWS: Mentions that support for SH-5/SH64 is removed.
11136         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11137         (sh*-*-openbsd*): Ditto.
11138         (sh64-*-elf*): Remove.
11139         (sh*): Remove.
11140         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11141         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11142         * sh-tdep.c: No longer include "sh64-tdep.h".
11143         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11144         * sh64-tdep.c, sh64-tdep.h: Remove files.
11145
11146 2018-04-16  Pedro Alves  <palves@redhat.com>
11147
11148         * MAINTAINERS: Remove m88k.
11149         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11150         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11151         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11152         * NEWS: Mention that support for m88k was removed.
11153         * configure.host (m88*-*-*): Remove support.
11154         * configure.nat (m88k-*-*): Remove support.
11155         * configure.tgt (m88*-*-openbsd*): Remove.
11156         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11157
11158 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11159
11160         * configure.tgt (x86_tobjs): New variable.
11161         (amd64_tobjs, i386_tobjs): Use it.
11162
11163 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11164
11165         * symtab.c (print_symbol_info): Precede the symbol definition by
11166         the line number when available.
11167         * NEWS: Advertise this enhancement.
11168
11169 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11170
11171         * NEWS (New options): announce set/show record btrace cpu.
11172         * btrace.c: Include record-btrace.h.
11173         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11174         the vendor is unknown.
11175         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11176         Maybe overwrite the btrace configuration's cpu.
11177         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11178         (btrace_fetch): Add cpu parameter.  Update callers.
11179         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11180         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11181         errata workarounds if the vendor is unknown.
11182         * python/py-record-btrace.c: Include record-btrace.h.
11183         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11184         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11185         * record-btrace.c (record_btrace_cpu_state_kind): New.
11186         (record_btrace_cpu): New.
11187         (set_record_btrace_cpu_cmdlist): New.
11188         (record_btrace_get_cpu): New.
11189         (require_btrace_thread, record_btrace_info)
11190         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11191         (cmd_set_record_btrace_cpu_none): New.
11192         (cmd_set_record_btrace_cpu_auto): New.
11193         (cmd_set_record_btrace_cpu): New.
11194         (cmd_show_record_btrace_cpu): New.
11195         (_initialize_record_btrace): Initialize set/show record btrace cpu
11196         commands.
11197         * record-btrace.h (record_btrace_get_cpu): New.
11198
11199 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11200
11201         * record.c (set_record_command): Fix typo in message.
11202
11203 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11204
11205         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11206
11207 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11208
11209         * infrun.c (process_event_stop_test): Call
11210         gdbarch_in_indirect_branch_thunk.
11211         * gdbarch.sh (in_indirect_branch_thunk): New.
11212         * gdbarch.c: Regenerated.
11213         * gdbarch.h: Regenerated.
11214         * x86-tdep.h: New.
11215         * x86-tdep.c: New.
11216         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11217         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11218         (ALLDEPFILES): Add x86-tdep.c.
11219         * arch-utils.h (default_in_indirect_branch_thunk): New.
11220         * arch-utils.c (default_in_indirect_branch_thunk): New.
11221         * i386-tdep: Include x86-tdep.h.
11222         (i386_in_indirect_branch_thunk): New.
11223         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11224         function.
11225         * amd64-tdep: Include x86-tdep.h.
11226         (amd64_in_indirect_branch_thunk): New.
11227         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11228
11229 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11230
11231         PR gdb/23053
11232         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11233         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11234         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11235         regression.
11236
11237 2018-04-12  Tom Tromey  <tom@tromey.com>
11238
11239         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11240         (rust_evaluate_subexp): Likewise.
11241
11242 2018-04-12  Pedro Alves  <palves@redhat.com>
11243
11244         * procfs.c (procfs_detach): Make forward declaration's prototype
11245         match definition's protototype.
11246         (proc_get_LDT_entry): Remove stale do_cleanups call.
11247
11248 2018-04-12  Pedro Alves  <palves@redhat.com>
11249
11250         * target.h (target_ops::to_has_exited): Delete.
11251         (target_has_exited): Delete.
11252         * target-delegates.c: Regenerate.
11253
11254 2018-04-11  Pedro Alves  <palves@redhat.com>
11255
11256         * target.c (fileio_fh_t::t): Add comment.
11257         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11258         (target_fileio_close): Handle a NULL target.
11259         (invalidate_fileio_fh): New.
11260         (target_close): Call it.
11261         * remote.c (remote_hostio_send_command): No longer check whether
11262         remote_desc is open.
11263
11264 2018-04-11  Pedro Alves  <palves@redhat.com>
11265
11266         * target.c (fileio_fh_t): Make it a named struct instead of a
11267         typedef.
11268         (fileio_fh_t::is_closed): New method.
11269         (DEF_VEC_O (fileio_fh_t)): Remove.
11270         (fileio_fhandles): Now a std::vector.
11271         (is_closed_fileio_fh): Delete.
11272         (acquire_fileio_fd): Adjust.  Rename parameters.
11273         (release_fileio_fd): Adjust.
11274         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11275         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11276         (target_fileio_close): Adjust.
11277
11278 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11279
11280         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11281         index.
11282
11283 2018-04-10  Pedro Alves  <palves@redhat.com>
11284
11285         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11286         (scoped_finish_thread_state): New class.
11287         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11288         cleanup.
11289         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11290         (fetch_inferior_event, normal_stop): Likewise.
11291         * thread.c (finish_thread_state_cleanup): Delete.
11292
11293 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11294             Pedro Alves  <palves@redhat.com>
11295
11296         * value.c: Include "selftest.h" and "common/array-view.h".
11297         (struct range) <operator ==>: New.
11298         (test_ranges_contain): New.
11299         (check_ranges_vector): New.
11300         (test_insert_into_bit_range_vector): New.
11301         (_initialize_values): Register selftests.
11302         * common/array-view.h (operator==, operator!=): New.
11303
11304 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11305
11306         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11307         an iterator.
11308         * inline-frame.c: Include <algorithm>.
11309         (struct inline_state): Add constructor.
11310         (inline_state_s): Remove.
11311         (DEF_VEC_O(inline_state_s)): Remove.
11312         (inline_states): Change type to std::vector.
11313         (find_inline_frame_state): Adjust to std::vector.
11314         (allocate_inline_frame_state): Remove.
11315         (clear_inline_frame_state): Adjust to std::vector.
11316         (skip_inline_frames): Adjust to std::vector.
11317
11318 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11319
11320         * tracepoint.h (struct trace_state_variable): Add constructor.
11321         <name>: Change type to std::string.
11322         * tracepoint.c (tsv_s): Remove.
11323         (DEF_VEC_O(tsv_s)): Remove.
11324         (tvariables): Change to std::vector.
11325         (create_trace_state_variable): Adjust to std::vector.
11326         (find_trace_state_variable): Likewise.
11327         (find_trace_state_variable_by_number): Likewise.
11328         (delete_trace_state_variable): Likewise.
11329         (trace_variable_command): Adjust to std::string.
11330         (delete_trace_variable_command): Likewise.
11331         (tvariables_info_1): Adjust to std::vector.
11332         (save_trace_state_variables): Likewise.
11333         (start_tracing): Likewise.
11334         (merge_uploaded_trace_state_variables): Adjust to std::vector
11335         and std::string.
11336         * target.h (struct target_ops)
11337         <to_download_trace_state_variable>: Pass reference to
11338         trace_state_variable.
11339         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11340         * target-delegates.c: Re-generate.
11341         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11342         (mi_tsv_deleted): Likewise.
11343         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11344         * remote.c (remote_download_trace_state_variable): Change
11345         pointer to reference and adjust.
11346         * make-target-delegates (parse_argtypes): Handle references.
11347         (write_function_header): Likewise.
11348         (munge_type): Likewise.
11349
11350 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11351
11352         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11353         string_view-selftests.c.
11354         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11355         testsuite.
11356         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11357         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11358         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11359         * unittests/basic_string_view/element_access/char/1.cc:
11360         Likewise.
11361         * unittests/basic_string_view/element_access/char/empty.cc:
11362         Likewise.
11363         * unittests/basic_string_view/element_access/char/front_back.cc:
11364         Likewise.
11365         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11366         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11367         Likewise.
11368         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11369         Likewise.
11370         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11371         Likewise.
11372         * unittests/basic_string_view/operations/compare/char/1.cc:
11373         Likewise.
11374         * unittests/basic_string_view/operations/compare/char/13650.cc:
11375         Likewise.
11376         * unittests/basic_string_view/operations/copy/char/1.cc:
11377         Likewise.
11378         * unittests/basic_string_view/operations/data/char/1.cc:
11379         Likewise.
11380         * unittests/basic_string_view/operations/find/char/1.cc:
11381         Likewise.
11382         * unittests/basic_string_view/operations/find/char/2.cc:
11383         Likewise.
11384         * unittests/basic_string_view/operations/find/char/3.cc:
11385         Likewise.
11386         * unittests/basic_string_view/operations/find/char/4.cc:
11387         Likewise.
11388         * unittests/basic_string_view/operations/rfind/char/1.cc:
11389         Likewise.
11390         * unittests/basic_string_view/operations/rfind/char/2.cc:
11391         Likewise.
11392         * unittests/basic_string_view/operations/rfind/char/3.cc:
11393         Likewise.
11394         * unittests/basic_string_view/operations/substr/char/1.cc:
11395         Likewise.
11396         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11397         * unittests/string_view-selftests.c: New file.
11398
11399 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11400
11401         * unittests/basic_string_view/capacity/1.cc: New file.
11402         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11403         * unittests/basic_string_view/cons/char/1.cc: New file.
11404         * unittests/basic_string_view/cons/char/2.cc: New file.
11405         * unittests/basic_string_view/cons/char/3.cc: New file.
11406         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11407         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11408         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11409         * unittests/basic_string_view/element_access/char/1.cc: New file.
11410         * unittests/basic_string_view/element_access/char/2.cc: New file.
11411         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11412         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11413         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11414         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11415         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11416         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11417         * unittests/basic_string_view/include.cc: New file.
11418         * unittests/basic_string_view/inserters/char/1.cc: New file.
11419         * unittests/basic_string_view/inserters/char/2.cc: New file.
11420         * unittests/basic_string_view/inserters/char/3.cc: New file.
11421         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11422         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11423         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11424         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11425         * unittests/basic_string_view/literals/types.cc: New file.
11426         * unittests/basic_string_view/literals/values.cc: New file.
11427         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11428         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11429         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11430         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11431         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11432         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11433         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11434         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11435         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11436         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11437         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11438         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11439         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11440         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11441         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11442         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11443         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11444         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11445         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11446         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11447         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11448         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11449         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11450         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11451         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11452         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11453         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11454         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11455         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11456         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11457         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11458         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11459         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11460         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11461         * unittests/basic_string_view/operators/char/2.cc: New file.
11462         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11463         * unittests/basic_string_view/range_access/char/1.cc: New file.
11464         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11465         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11466         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11467         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11468         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11469         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11470         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11471         * unittests/basic_string_view/typedefs.cc: New file.
11472         * unittests/basic_string_view/types/1.cc: New file.
11473
11474 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11475
11476         * common/gdb_string_view.h: Remove libstdc++ implementation
11477         details, adjust to gdb reality.
11478         * common/gdb_string_view.tcc: Likewise.
11479         * cli/cli-script.c (struct string_view): Remove.
11480         (user_args) <m_args>: Change element type to gdb::string_view.
11481         (user_args::insert_args): Adjust.
11482
11483 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11484
11485         * common/gdb_string_view.h: New file.
11486         * common/gdb_string_view.tcc: New file.
11487
11488 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11489
11490         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11491         * configure: Re-generate.
11492
11493 2018-04-09  Pedro Alves  <palves@redhat.com>
11494
11495         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11496         (set_target_gdbarch): Call
11497         gdb::observers::architecture_changed.notify instead of
11498         observer_notify_architecture_changed.
11499
11500 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11501
11502         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11503         (do_restore_current_traceframe_cleanup): Remove.
11504         (restore_current_traceframe_cleanup_dtor): Remove.
11505         (make_cleanup_restore_current_traceframe): Remove.
11506         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11507         New.
11508         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11509         * infrun.c (fetch_inferior_event): Use
11510         scoped_restore_current_traceframe.
11511
11512 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11513
11514         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11515         Remove.
11516         <n_allocated_type_units>: Remove.
11517         <all_type_units>: Change to std::vector.
11518         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11519         to std::vector change.
11520         (dwarf2_per_objfile::get_cutu): Likewise.
11521         (dwarf2_per_objfile::get_tu): Likewise.
11522         (create_signatured_type_table_from_index): Likewise.
11523         (create_signatured_type_table_from_debug_names): Likewise.
11524         (dw2_symtab_iter_next): Likewise.
11525         (dw2_print_stats): Likewise.
11526         (dw2_expand_all_symtabs): Likewise.
11527         (dw2_expand_marked_cus): Likewise.
11528         (dw2_debug_names_iterator::next): Likewise.
11529         (dwarf2_initialize_objfile): Likewise.
11530         (add_signatured_type_cu_to_table): Likewise.
11531         (create_all_type_units): Likewise.
11532         (add_type_unit): Likewise.
11533         (struct tu_abbrev_offset): Add constructor.
11534         (build_type_psymtabs_1): Adjust to std::vector change.
11535         (print_tu_stats): Likewise.
11536         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11537         (write_debug_names): Likewise.
11538
11539 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11540
11541         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11542         Make an std::vector.
11543         <n_comp_units>: Remove.
11544         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11545         to std::vector change.
11546         (dwarf2_per_objfile::get_cutu): Likewise.
11547         (dwarf2_per_objfile::get_cu): Likewise.
11548         (create_cus_from_index): Likewise.
11549         (create_addrmap_from_index): Likewise.
11550         (create_addrmap_from_aranges): Likewise.
11551         (dwarf2_read_index): Likewise.
11552         (dw2_find_last_source_symtab): Likewise.
11553         (dw2_map_symtabs_matching_filename): Likewise.
11554         (dw2_symtab_iter_next): Likewise.
11555         (dw2_print_stats): Likewise.
11556         (dw2_expand_all_symtabs): Likewise.
11557         (dw2_expand_symtabs_with_fullname): Likewise.
11558         (dw2_expand_marked_cus): Likewise.
11559         (dw2_map_symbol_filenames): Likewise.
11560         (create_cus_from_debug_names): Likewise.
11561         (dwarf2_read_debug_names): Likewise.
11562         (dw2_debug_names_iterator::next): Likewise.
11563         (dwarf2_initialize_objfile): Likewise.
11564         (set_partial_user): Likewise.
11565         (dwarf2_build_psymtabs_hard): Likewise.
11566         (read_comp_units_from_section): Remove arguments, adjust to
11567         std::vector change.
11568         (create_all_comp_units): Adjust to std::vector and
11569         read_comp_units_from_section changes.
11570         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11571         change.
11572         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11573         (psyms_seen_size): Likewise.
11574         (write_gdbindex): Likewise.
11575         (write_debug_names): Likewise.
11576
11577 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11578
11579         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11580         with dwarf2_per_objfile.
11581         (create_cus_from_index): Likewise.
11582         (create_signatured_type_table_from_index): Likewise.
11583         (dwarf2_read_index): Likewise.
11584         (dwarf2_initialize_objfile): Likewise.
11585         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11586         per_cu rather than get_dwarf2_per_objfile.
11587
11588 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11589
11590         * dwarf2read.h (struct signatured_type): Forward declare.
11591         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11592         New methods.
11593         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11594         (dw2_get_cutu): ...this.
11595         (dwarf2_per_objfile::get_cu): Rename from...
11596         (dw2_get_cu): ...this.
11597         (dwarf2_per_objfile::get_tu): New.
11598         (create_addrmap_from_index): Adjust.
11599         (create_addrmap_from_aranges): Adjust.
11600         (dw2_find_last_source_symtab): Adjust.
11601         (dw2_map_symtabs_matching_filename): Adjust.
11602         (dw2_symtab_iter_next): Adjust.
11603         (dw2_print_stats): Adjust.
11604         (dw2_expand_all_symtabs): Adjust.
11605         (dw2_expand_symtabs_with_fullname): Adjust.
11606         (dw2_expand_marked_cus): Adjust.
11607         (dw_expand_symtabs_matching_file_matcher): Adjust.
11608         (dw2_map_symbol_filenames): Adjust.
11609         (dw2_debug_names_iterator::next): Adjust.
11610         (dwarf2_initialize_objfile): Adjust.
11611         (set_partial_user): Adjust.
11612         (dwarf2_build_psymtabs_hard): Adjust.
11613
11614 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11615
11616         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11617         Remove unused variables.
11618         (dw2_map_symtabs_matching_filename): Likewise.
11619         (dwarf2_record_block_ranges): Likewise.
11620         (dwarf2_read_addr_index): Likewise.
11621         (follow_die_offset): Likewise.
11622
11623 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11624
11625         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11626         to symbol_file_add_main.
11627
11628 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11629
11630         PR mi/22299
11631         * mi/mi-console.c (do_fputc_async_safe): New.
11632         (mi_console_file::write_async_safe): New.
11633         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11634         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11635         New.
11636         * ui-file.c (ui_file::putstrn): Adjust call to
11637         fputstrn_unfiltered.
11638         * utils.c (printchar): Replace do_fputs and do_fprintf
11639         parameters by do_fputc.
11640         (fputstr_filtered): Adjust call to printchar.
11641         (fputstr_unfiltered): Likewise.
11642         (fputstrn_filtered): Likewise.
11643         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11644         printchar.
11645         * utils.h (do_fputc_ftype): New typedef.
11646         (fputstrn_unfiltered): Add do_fputc parameter.
11647
11648 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11649
11650         * regformats/i386/i386-avx.dat: Remove.
11651
11652 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11653
11654         PR gdb/22979
11655         * amd64-tdep.c (amd64_none_init_abi): New function.
11656         (amd64_x32_none_init_abi): New function.
11657         (_initialize_amd64_tdep): Register handlers for x86-64 and
11658         x64_32 with GDB_OSABI_NONE.
11659         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11660         GDB_OSABI_NONE osabi.
11661
11662 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11663
11664         PR gdb/22980
11665         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11666         GDB_OSABI_NONE.
11667         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11668         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11669
11670 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11671
11672         * common/byte-vector.h (char_vector): New type.
11673         * target.h (target_read_alloc): Return
11674         gdb::optional<byte_vector>.
11675         (target_read_stralloc): Return gdb::optional<char_vector>.
11676         (target_get_osdata): Return gdb::optional<char_vector>.
11677         * target.c (target_read_alloc_1): Templatize.  Replacement
11678         manual memory management with vector.
11679         (target_read_alloc): Change return type, adjust.
11680         (target_read_stralloc): Change return type, adjust.
11681         (target_get_osdata): Change return type, adjust.
11682         * auxv.c (struct auxv_info) <length>: Remove.
11683         <data>: Change type to gdb::optional<byte_vector>.
11684         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11685         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11686         (target_auxv_search): Adjust.
11687         (fprint_target_auxv): Adjust.
11688         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11689         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11690         (linux_make_corefile_notes): Adjust.
11691         * osdata.c (get_osdata): Adjust.
11692         * remote.c (remote_get_threads_with_qxfer): Adjust.
11693         (remote_memory_map): Adjust.
11694         (remote_traceframe_info): Adjust.
11695         (btrace_read_config): Adjust.
11696         (remote_read_btrace): Adjust.
11697         (remote_pid_to_exec_file): Adjust.
11698         * solib-aix.c (solib_aix_get_library_list): Adjust.
11699         * solib-dsbt.c (decode_loadmap): Don't free buf.
11700         (dsbt_get_initial_loadmaps): Adjust.
11701         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11702         * solib-target.c (solib_target_current_sos): Adjust.
11703         * tracepoint.c (sdata_make_value): Adjust.
11704         * xml-support.c (xinclude_start_include): Adjust.
11705         (xml_fetch_content_from_file): Adjust.
11706         * xml-support.h (xml_fetch_another): Change return type.
11707         (xml_fetch_content_from_file): Change return type.
11708         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11709         * xml-tdesc.c (file_read_description_xml): Adjust.
11710         (fetch_available_features_from_target): Change return type.
11711         (target_fetch_description_xml): Adjust.
11712         (target_read_description_xml): Adjust.
11713
11714 2018-04-06  Tom Tromey  <tom@tromey.com>
11715
11716         * value.c (~value): Update.
11717         (struct value) <contents>: Now unique_xmalloc_ptr.
11718         (value_contents_bits_eq, allocate_value_contents)
11719         (value_contents_raw, value_contents_all_raw)
11720         (value_contents_for_printing, value_contents_for_printing_const)
11721         (set_value_enclosing_type): Update.
11722
11723 2018-04-06  Tom Tromey  <tom@tromey.com>
11724
11725         * value.c (range_s): Remove typedef, VEC.
11726         (struct range): Add operator<.
11727         (range_lessthan): Remove.
11728         (ranges_contain): Change type.
11729         (~value): Update.
11730         (struct value) <unavailable, optimized_out>: Now std::vector.
11731         (value_entirely_available)
11732         (value_entirely_covered_by_range_vector)
11733         (value_entirely_unavailable, value_entirely_optimized_out):
11734         Update.
11735         (insert_into_bit_range_vector): Change argument type.
11736         (find_first_range_overlap): Likewise.
11737         (struct ranges_and_idx, value_contents_bits_eq)
11738         (require_not_optimized_out, require_available): Update.
11739         (ranges_copy_adjusted): Change argument types.
11740         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11741
11742 2018-04-06  Tom Tromey  <tom@tromey.com>
11743
11744         * value.c (~value): Update.
11745         (struct value) <parent>: Now a value_ref_ptr.
11746         (value_parent, set_value_parent, value_address, value_copy):
11747         Update.
11748
11749 2018-04-06  Tom Tromey  <tom@tromey.com>
11750
11751         * value.c (struct value): Add constructor, destructor, and member
11752         initializers.
11753         (allocate_value_lazy, value_decref): Update.
11754
11755 2018-04-06  Tom Tromey  <tom@tromey.com>
11756
11757         * value.c (struct value) <released, next>: Remove.
11758         (all_values): Now a std::vector.
11759         (allocate_value_lazy): Update.
11760         (value_next): Remove.
11761         (value_mark, value_free_to_mark, release_value)
11762         (value_release_to_mark): Update.
11763
11764 2018-04-06  Tom Tromey  <tom@tromey.com>
11765
11766         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11767         (free_value_chain): Remove.
11768         * value.c (free_value_chain): Remove.
11769         (value_release_to_mark): Return a std::vector.
11770         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11771         std::vector.
11772         (check_condition): Update.
11773         * eval.c (fetch_subexp_value): Change "val_chain" to a
11774         std::vector.
11775         * breakpoint.c (update_watchpoint): Update.
11776         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11777
11778 2018-04-06  Tom Tromey  <tom@tromey.com>
11779
11780         * value.h (free_all_values): Remove.
11781         * value.c (free_all_values): Remove.
11782
11783 2018-04-06  Tom Tromey  <tom@tromey.com>
11784
11785         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11786         (value_history_chain, value_history_count): Remove.
11787         (value_history): New global.
11788         (record_latest_value, access_value_history, show_values)
11789         (preserve_values): Update.
11790
11791 2018-04-06  Tom Tromey  <tom@tromey.com>
11792
11793         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11794         * varobj.c (varobj_set_display_format, varobj_set_value)
11795         (install_default_visualizer, construct_visualizer)
11796         (install_new_value, ~varobj, varobj_get_value_type)
11797         (my_value_of_variable, varobj_editable_p): Update.
11798         * c-varobj.c (c_describe_child, c_value_of_variable)
11799         (cplus_number_of_children, cplus_describe_child): Update.
11800         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11801         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11802         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11803
11804 2018-04-06  Tom Tromey  <tom@tromey.com>
11805
11806         * printcmd.c (last_examine_address): Change type to
11807         value_ref_ptr.
11808         (do_examine, x_command): Update.
11809
11810 2018-04-06  Tom Tromey  <tom@tromey.com>
11811
11812         * value.c (release_value): Update.
11813         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11814         (struct bpstats) <val>: Now a value_ref_ptr.
11815         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11816         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11817         (~watchpoint, print_it_watchpoint, watch_command_1)
11818         (invalidate_bp_value_on_memory_change): Update.
11819
11820 2018-04-06  Tom Tromey  <tom@tromey.com>
11821
11822         * varobj.c (varobj_clear_saved_item)
11823         (update_dynamic_varobj_children, install_new_value, ~varobj):
11824         Update.
11825         * value.h (value_incref): Move declaration earlier.
11826         (value_decref): Rename from value_free.
11827         (struct value_ref_policy): New.
11828         (value_ref_ptr): New typedef.
11829         (struct value_deleter): Remove.
11830         (gdb_value_up): Remove typedef.
11831         (release_value): Change return type.
11832         (release_value_or_incref): Remove.
11833         * value.c (set_value_parent): Update.
11834         (value_incref): Change return type.
11835         (value_decref): Rename from value_free.
11836         (value_free_to_mark, free_all_values, free_value_chain): Update.
11837         (release_value): Return value_ref_ptr.
11838         (release_value_or_incref): Remove.
11839         (record_latest_value, set_internalvar, clear_internalvar):
11840         Update.
11841         * stack.c (info_frame_command): Don't call value_free.
11842         * python/py-value.c (valpy_dealloc, valpy_new)
11843         (value_to_value_object): Update.
11844         * printcmd.c (do_examine): Update.
11845         * opencl-lang.c (lval_func_free_closure): Update.
11846         * mi/mi-main.c (register_changed_p): Don't call value_free.
11847         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11848         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11849         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11850         value_free.
11851         * guile/scm-value.c (vlscm_free_value_smob)
11852         (vlscm_scm_from_value): Update.
11853         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11854         (frame_unwind_register_unsigned, get_frame_register_bytes)
11855         (put_frame_register_bytes): Don't call value_free.
11856         * findvar.c (address_from_register): Don't call value_free.
11857         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11858         * dwarf2loc.c (entry_data_value_free_closure)
11859         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11860         (dwarf2_evaluate_loc_desc_full): Update.
11861         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11862         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11863         (~watchpoint, watch_command_1)
11864         (invalidate_bp_value_on_memory_change): Update.
11865         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11866
11867 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11868
11869         PR gdb/23022
11870         * warning.m4: Add -Wno-error=deprecated-register.
11871         * configure: Re-generate.
11872
11873 2018-04-05  Tom Tromey  <tom@tromey.com>
11874
11875         * linespec.h: Remove include of "vec.h".
11876
11877 2018-04-05  Tom Tromey  <tom@tromey.com>
11878
11879         * linespec.c (typep): Remove typedef.
11880         (find_methods, find_superclass_methods): Take a std::vector.
11881         (find_method): Use std::vector.
11882
11883 2018-04-05  Tom Tromey  <tom@tromey.com>
11884
11885         * utils.c (compare_strings): Remove.
11886         * utils.h (compare_strings): Remove.
11887         * objc-lang.h (find_imps): Update.
11888         * objc-lang.c (find_methods): Take a std::vector.
11889         (uniquify_strings, find_imps): Likewise.
11890         * linespec.c (find_methods): Take a std::vector.
11891         (decode_objc): Use std::vector.
11892         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11893         a std::vector.
11894         (find_method, find_function_symbols): Use std::vector.
11895
11896 2018-04-05  Tom Tromey  <tom@tromey.com>
11897
11898         * completer.c (completion_tracker::completion_tracker): Remove
11899         cast.
11900         (completion_tracker::discard_completions): Likewise.
11901         * breakpoint.c (ambiguous_names_p): Remove cast.
11902         * ada-lang.c (_initialize_ada_language): Remove cast.
11903         * utils.h (streq): Update.
11904         (streq_hash): Add new declaration.
11905         * utils.c (streq): Return bool.
11906         (streq_hash): New function.
11907
11908 2018-04-05  Tom Tromey  <tom@tromey.com>
11909
11910         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11911         Remove a string copy.
11912
11913 2018-04-05  Tom Tromey  <tom@tromey.com>
11914
11915         * linespec.c (filter_results): Use std::vector.
11916         (decode_line_2, decode_line_full): Update.
11917
11918 2018-04-05  Tom Tromey  <tom@tromey.com>
11919
11920         * linespec.c (canonical_to_fullform): Return std::string.
11921         (filter_results): Update.
11922         (struct decode_line_2_item): Add constructor.
11923         <fullform, displayform>: Now std::string.
11924         (decode_line_2_compare_items): Now a std::sort comparator.
11925         (decode_line_2): Update.
11926
11927 2018-04-05  Tom Tromey  <tom@tromey.com>
11928
11929         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11930         (unexpected_linespec_error): Update.
11931         (linespec_parse_basic, parse_linespec): Update.
11932
11933 2018-04-05  Tom Tromey  <tom@tromey.com>
11934
11935         * linespec.c (linespec_parse_basic): Reindent.
11936
11937 2018-04-05  Tom Tromey  <tom@tromey.com>
11938
11939         * minsyms.h (iterate_over_minimal_symbols): Update.
11940         * minsyms.c (iterate_over_minimal_symbols): Take a
11941         gdb::function_view.
11942         * linespec.c (struct collect_minsyms): Remove.
11943         (compare_msyms): Now a std::sort comparator.
11944         (add_minsym): Add parameters.
11945         (search_minsyms_for_name): Update.  Use std::vector.
11946
11947 2018-04-03  Tom Tromey  <tom@tromey.com>
11948
11949         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11950         gdb::byte_vector.
11951
11952 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11953
11954         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11955
11956 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11957
11958         PR gdb/16959
11959         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11960         printing static type.
11961
11962 2018-04-01  Tom Tromey  <tom@tromey.com>
11963
11964         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11965         (rs6000_xfer_shared_libraries): Update.
11966
11967 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11968
11969         * common/gdb_vecs.h (char_ptr): Remove.
11970         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11971
11972 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11973
11974         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11975         with std::vector.
11976         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11977
11978 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11979
11980         * tracepoint.h (struct uploaded_tp): Initialize fields.
11981         <actions, step_actions, cmd_strings>: Change type to
11982         std::vector<char *>.
11983         * tracepoint.c (get_uploaded_tp): Allocate with new.
11984         (free_uploaded_tps): Free with delete.
11985         (parse_tracepoint_definition): Adjust to std::vector change.
11986         * breakpoint.c (read_uploaded_action): Likewise.
11987         (create_tracepoint_from_upload): Likewise.
11988         * ctf.c (ctf_write_uploaded_tp): Likewise.
11989         (SET_ARRAY_FIELD): Likewise.
11990         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11991
11992 2018-03-30  Tom Tromey  <tom@tromey.com>
11993
11994         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11995         std::unique_ptr.
11996         (svr4_keep_data_in_core): Update.
11997         (svr4_read_so_list): Update.
11998
11999 2018-03-30  Tom Tromey  <tom@tromey.com>
12000
12001         * windows-nat.c (handle_output_debug_string, handle_exception):
12002         Update.
12003         * target.h (target_read_string): Update.
12004         * target.c (target_read_string): Change "string" to
12005         unique_xmalloc_ptr.
12006         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12007         Update.
12008         * solib-frv.c (frv_current_sos): Update.
12009         * solib-dsbt.c (dsbt_current_sos): Update.
12010         * solib-darwin.c (darwin_current_sos): Update.
12011         * linux-thread-db.c (inferior_has_bug): Update.
12012         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12013         Update.  Remove alloca.
12014         * ada-lang.c (ada_main_name): Update.
12015
12016 2018-03-30  Tom Tromey  <tom@tromey.com>
12017
12018         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12019         (struct dwo_file_deleter): New.
12020         (dwo_file_up): New typedef.
12021         (open_and_init_dwo_file): Use dwo_file_up.
12022         (free_dwo_file_cleanup): Remove.
12023
12024 2018-03-30  Tom Tromey  <tom@tromey.com>
12025
12026         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12027         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12028
12029 2018-03-30  Tom Tromey  <tom@tromey.com>
12030
12031         * dwarf2read.c (class free_cached_comp_units): New class.
12032         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12033         (free_cached_comp_units): Remove function.
12034
12035 2018-03-30  Tom Tromey  <tom@tromey.com>
12036
12037         * utils.h (make_cleanup_unpush_target): Remove.
12038         * inf-ptrace.c (struct target_unpusher): New.
12039         (target_unpush_up) New typedef.
12040         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12041         target_unpush_up.
12042         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12043
12044 2018-03-27  Tom Tromey  <tom@tromey.com>
12045
12046         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12047
12048 2018-03-27  Pedro Alves  <palves@redhat.com>
12049             Tom Tromey  <tom@tromey.com>
12050
12051         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12052         destructor.  Now a class.
12053         (gdb_readline_wrapper_cleanup): Remove function.
12054         (gdb_readline_wrapper): Remove cleanups.
12055
12056 2018-03-27  Tom Tromey  <tom@tromey.com>
12057
12058         * typeprint.h (struct type_print_options) <local_typedefs,
12059         global_typedefs>: Remove "struct" keyword.
12060         (class typedef_hash_table): New class.
12061         (recursively_update_typedef_hash, add_template_parameters)
12062         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12063         (find_typedef_in_hash): Don't declare.
12064         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12065         (typedef_hash_table::recursively_update): Rename from
12066         recursively_update_typedef_hash.  Now a member.
12067         (typedef_hash_table::add_template_parameters): Rename from
12068         add_template_parameters.  Now a member.
12069         (typedef_hash_table::typedef_hash_table): Now a constructor;
12070         rename from create_typedef_hash.
12071         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12072         rename from free_typedef_hash.
12073         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12074         (do_free_global_table): Remove.
12075         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12076         from copy_type_recursive.
12077         (create_global_typedef_table): Remove.
12078         (typedef_hash_table::find_global_typedef): Now a member of
12079         typedef_hash_table.
12080         (typedef_hash_table::find_typedef): Rename from
12081         find_typedef_in_hash; now a member.
12082         (whatis_exp): Update.
12083         * extension.h (struct ext_lang_type_printers): Add constructor and
12084         destructor.
12085         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12086         declare.
12087         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12088         Now a constructor; rename from start_ext_lang_type_printers.
12089         (ext_lang_type_printers): Now a destructor; rename from
12090         free_ext_lang_type_printers.
12091         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12092         Update.
12093         (c_type_print_base_struct_union): Update.  Remove cleanups.
12094
12095 2018-03-27  Tom Tromey  <tom@tromey.com>
12096
12097         * dwarf-index-write.c: Include <cmath>.
12098
12099 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12100
12101         * NEWS: Add entry describing new "set|show varsize-limit" command.
12102         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12103         command.
12104         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12105         "set variable".
12106
12107 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12108
12109         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12110         dwarf-index-write.c
12111         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12112         * dwarf-index-common.c: New file.
12113         * dwarf-index-common.h: New file.
12114         * dwarf-index-write.c: New file.
12115         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12116         (struct dwarf2_section_info): Move from here.
12117         (dwarf2_section_info_def): Likewise.
12118         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12119         (offset_type): Likewise.
12120         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12121         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12122         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12123         (byte_swap): Likewise.
12124         (MAYBE_SWAP): Likewise.
12125         (dwarf2_per_cu_ptr): Likewise.
12126         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12127         (struct tu_stats): Likewise.
12128         (struct dwarf2_per_objfile): Likewise.
12129         (struct dwarf2_per_cu_data): Likewise.
12130         (struct signatured_type): Likewise.
12131         (sig_type_ptr): Likewise.
12132         (DEF_VEC_P (sig_type_ptr)): Likewise.
12133         (INDEX4_SUFFIX): Likewise.
12134         (INDEX5_SUFFIX): Likewise.
12135         (DEBUG_STR_SUFFIX): Likewise.
12136         (dwarf2_read_section): Make non-static.
12137         (mapped_index_string_hash): Move from here.
12138         (dwarf5_djb_hash): Likewise.
12139         (file_write): Likewise.
12140         (class data_buf): Likewise.
12141         (struct symtab_index_entry): Likewise.
12142         (struct mapped_symtab): Likewise.
12143         (find_slot): Likewise.
12144         (hash_expand): Likewise.
12145         (add_index_entry): Likewise.
12146         (uniquify_cu_indices): Likewise.
12147         (class c_str_view): Likewise.
12148         (class c_str_view_hasher): Likewise.
12149         (class vector_hasher): Likewise.
12150         (write_hash_table): Likewise.
12151         (psym_index_map): Likewise.
12152         (struct addrmap_index_data): Likewise.
12153         (add_address_entry): Likewise.
12154         (add_address_entry_worker): Likewise.
12155         (write_address_map): Likewise.
12156         (symbol_kind): Likewise.
12157         (write_psymbols): Likewise.
12158         (struct signatured_type_index_data): Likewise.
12159         (write_one_signatured_type): Likewise.
12160         (recursively_count_psymbols): Likewise.
12161         (recursively_write_psymbols): Likewise.
12162         (class debug_names): Likewise.
12163         (check_dwarf64_offsets): Likewise.
12164         (psyms_seen_size): Likewise.
12165         (write_gdbindex): Likewise.
12166         (write_debug_names): Likewise.
12167         (assert_file_size): Likewise.
12168         (write_psymtabs_to_index): Likewise.
12169         (save_gdb_index_command): Likewise.
12170         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12171         command.
12172         * dwarf2read.h: New file.
12173
12174 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12175
12176         PR gdb/22670
12177         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12178         symbol name if the CU's language stores symbol names in linkage
12179         format.
12180         * language.h (struct language_defn)
12181         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12182         all instances of this struct.
12183
12184 2018-03-26  Tom Tromey  <tom@tromey.com>
12185
12186         * stack.c (backtrace_command_1): Remove verbose code.
12187
12188 2018-03-26  Tom Tromey  <tom@tromey.com>
12189
12190         * python/py-framefilter.c (py_print_type): Don't catch
12191         exceptions.  Return void.
12192         (py_print_value): Likewise.
12193         (py_print_single_arg): Likewise.
12194         (enumerate_args): Don't catch exceptions.
12195         (py_print_args): Likewise.
12196         (py_print_frame): Likewise.
12197         (gdbpy_apply_frame_filter): Catch exceptions here.
12198
12199 2018-03-26  Tom Tromey  <tom@tromey.com>
12200
12201         * stack.c (_initialize_stack): Remove trailing newlines from help
12202         text.  Add "Usage" line to "backtrace" help.
12203
12204 2018-03-26  Tom Tromey  <tom@tromey.com>
12205
12206         PR python/16486:
12207         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12208
12209 2018-03-26  Tom Tromey  <tom@tromey.com>
12210
12211         * python/py-framefilter.c (py_print_single_arg): Return
12212         EXT_LANG_BT_ERROR from catch.
12213
12214 2018-03-26  Tom Tromey  <tom@tromey.com>
12215
12216         PR backtrace/15584:
12217         * stack.c (backtrace_command_1): Move some code into no-filters
12218         "if".
12219
12220 2018-03-26  Tom Tromey  <tom@tromey.com>
12221
12222         * python/py-framefilter.c (throw_quit_or_print_exception): New
12223         function.
12224         (gdbpy_apply_frame_filter): Use it.
12225
12226 2018-03-26  Tom Tromey  <tom@tromey.com>
12227
12228         PR cli/17716:
12229         * python/py-framefilter.c (py_print_type, py_print_value)
12230         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12231         RETURN_MASK_ERROR.
12232
12233 2018-03-26  Tom Tromey  <tom@tromey.com>
12234
12235         * python/py-framefilter.c (enumerate_args): Use
12236         gdb::unique_xmalloc_ptr.
12237
12238 2018-03-26  Tom Tromey  <tom@tromey.com>
12239
12240         * python/py-framefilter.c (py_print_frame): Return
12241         EXT_LANG_BT_OK.
12242         (gdbpy_apply_frame_filter): Update comment.
12243         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12244         Remove.
12245         <EXT_LANG_BT_NO_FILTERS>: Change value.
12246
12247 2018-03-26  Tom Tromey  <tom@tromey.com>
12248
12249         PR backtrace/15582:
12250         * stack.c (backtrace_command): Parse "hide" argument.
12251         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12252         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12253         constant.
12254
12255 2018-03-26  Tom Tromey  <tom@tromey.com>
12256
12257         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12258         add "flags".
12259         (backtrace_command): Remove "fulltrace", add "flags".
12260
12261 2018-03-26  Tom Tromey  <tom@tromey.com>
12262
12263         * stack.c (backtrace_command): Rewrite command line parsing.
12264
12265 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12266
12267         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12268
12269 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12270
12271         * filename-seen-cache.h: Add include guard.
12272
12273 2018-03-26  Keith Seitz  <keiths@redhat.com>
12274
12275         * symfile.c (place_section): Remove "struct" from section_addr_info
12276         in comment.
12277         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12278         "struct" keyword from section_addr_info.
12279
12280 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12281
12282         * regformats/regdef.h (reg): Add constructors.
12283
12284 2018-03-25  Pedro Alves  <palves@redhat.com>
12285
12286         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12287         if then/else bodies in var_func_name extraction.
12288
12289 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12290
12291         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12292         lookup_minimal_symbol() to find symbol entry.
12293         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12294
12295 2018-03-23  Keith Seitz  <keiths@redhat.com>
12296
12297         PR c++/22968
12298         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12299         nested type definitions for C++, too.
12300
12301 2018-03-23  Tom Tromey  <tom@tromey.com>
12302
12303         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12304         a typedef.
12305         (macho_register_oso): Remove.
12306         (macho_symtab_read): Take a std::vector.
12307         (oso_el_compare_name): Now a std::sort comparator.
12308         (macho_symfile_read_all_oso): Take a std::vector.
12309         (macho_symfile_read): Use std::vector.  Remove cleanups.
12310
12311 2018-03-22  Tom Tromey  <tom@tromey.com>
12312
12313         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12314         (record_full_goto_bookmark): Use std::string.
12315
12316 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12317
12318         PR tdep/18295
12319         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12320         a single mask.
12321
12322 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12323
12324         * rs6000-tdep.c (store_insn_p): New function.
12325         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12326         and cr_reg to their unshifted values. Use store_insn_p to
12327         match LR saves using either R1 or fdata->alloca_reg. Use
12328         store_insn_p to match CR saves. Set alloca_reg_offset
12329         when alloca_reg and framep are set. Remove lr_reg shift
12330         when assigning to fdata->lr_register.
12331
12332 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12333
12334         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12335         command line args instead of emitting a warning.
12336
12337 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12338
12339         * tracepoint.h (struct static_tracepoint_marker): Initialize
12340         fields, define default constructor, move constructor and move
12341         assignment, disable the rest.
12342         <str_id, extra>: Make std::string.
12343         (release_static_tracepoint_marker): Remove.
12344         (free_current_marker): Remove.
12345         * tracepoint.c (free_current_marker): Remove.
12346         (parse_static_tracepoint_marker_definition): Adjust to
12347         std::string, use new hex2str overload.
12348         (release_static_tracepoint_marker): Remove.
12349         (print_one_static_tracepoint_marker): Get marker by reference
12350         and adjust to std::string.
12351         (info_static_tracepoint_markers_command): Adjust to std::vector
12352         changes
12353         * target.h (static_tracepoint_marker_p): Remove typedef.
12354         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12355         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12356         bool.
12357         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12358         * target-debug.h
12359         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12360         (target_debug_print_std_vector_static_tracepoint_marker): New.
12361         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12362         to...
12363         (target_debug_print_static_tracepoint_marker_p): ... this.
12364         * target-delegates.c: Re-generate.
12365         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12366         Make std::string.
12367         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12368         (decode_static_tracepoint_spec): Adjust to std::vector.
12369         (tracepoint_print_one_detail): Adjust to std::string.
12370         (strace_marker_decode_location): Adjust to std::string.
12371         (update_static_tracepoint): Adjust to std::string, remove call
12372         to release_static_tracepoint_marker.
12373         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12374         Adjust to std::vector.
12375         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12376         (remote_static_tracepoint_markers_by_strid): Adjust to
12377         std::vector.
12378         * common/rsp-low.h (hex2str): New overload with explicit count
12379         of bytes.
12380         * common/rsp-low.c (hex2str): New overload with explicit count
12381         of bytes.
12382         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12383         (_initialize_rsp_low_selftests): Add test_hex2str test.
12384         * unittests/tracepoint-selftests.c
12385         (test_parse_static_tracepoint_marker_definition): Adjust to
12386         std::string.
12387
12388 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12389
12390         * tracepoint.c (parse_static_tracepoint_marker_definition):
12391         Consider case where the definition is followed by more
12392         definitions.
12393         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12394         tracepoint-selftests.c.
12395         * unittests/tracepoint-selftests.c: New.
12396
12397 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12398
12399         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12400         Carvalho.
12401
12402 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12403
12404         * symtab.c (find_pc_sect_line): fixed indentation.
12405
12406 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12407
12408         * symtab.c (find_pc_sect_line): now uses binary search.
12409
12410 2018-03-19  Tom Tromey  <tom@tromey.com>
12411
12412         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12413         "IDENT" production.
12414
12415 2018-03-19  Pedro Alves  <palves@redhat.com>
12416             Tom Tromey  <tom@tromey.com>
12417
12418         * unittests/observable-selftests.c: New file.
12419         * common/observable.h: New file.
12420         * observable.h: New file.
12421         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12422         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12423         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12424         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12425         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12426         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12427         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12428         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12429         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12430         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12431         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12432         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12433         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12434         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12435         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12436         tui/tui-interp.c, valops.c: Update all users.
12437         * tui/tui-hooks.c (tui_bp_created_observer)
12438         (tui_bp_deleted_observer, tui_bp_modified_observer)
12439         (tui_inferior_exit_observer, tui_before_prompt_observer)
12440         (tui_normal_stop_observer, tui_register_changed_observer):
12441         Remove.
12442         (tui_observers_token): New global.
12443         (attach_or_detach, tui_attach_detach_observers): New functions.
12444         (tui_install_hooks, tui_remove_hooks): Use
12445         tui_attach_detach_observers.
12446         * record-btrace.c (record_btrace_thread_observer): Remove.
12447         (record_btrace_thread_observer_token): New global.
12448         * observer.sh: Remove.
12449         * observer.c: Rename to observable.c.
12450         * observable.c (namespace gdb_observers): Define new objects.
12451         (observer_debug): Move into gdb_observers namespace.
12452         (struct observer, struct observer_list, xalloc_observer_list_node)
12453         (xfree_observer_list_node, generic_observer_attach)
12454         (generic_observer_detach, generic_observer_notify): Remove.
12455         (_initialize_observer): Update.
12456         Don't include observer.inc.
12457         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12458         (clean mostlyclean): Likewise.
12459         (observer.h, observer.inc): Remove targets.
12460         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12461         (COMMON_SFILES): Use observable.c, not observer.c.
12462         * .gitignore: Remove observer.h.
12463
12464 2018-03-18  Tom Tromey  <tom@tromey.com>
12465
12466         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12467         gdb::def_vector.
12468         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12469
12470 2018-03-17  Tom Tromey  <tom@tromey.com>
12471
12472         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12473
12474 2018-03-17  Tom Tromey  <tom@tromey.com>
12475
12476         * target.c (class scoped_target_fd): New.
12477         (target_fileio_close_cleanup): Remove.
12478         (target_fileio_read_alloc_1): Use scoped_target_fd.
12479
12480 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12481
12482         * silent-rules.mk: New.
12483         * Makefile.in: Include silent-rules.mk
12484         (srcdir, VPATH, top_srcdir): Move up.
12485         (COMPILE): Add ECHO_CXX.
12486         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12487         (init.c): Add ECHO_INIT_C.
12488         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12489         (version.c): Add ECHO_GEN.
12490         (printcmd.o): Add ECHO_CXX.
12491         (target-float.o): Add ECHO_CXX.
12492         (ada-exp.o): Add ECHO_CXX.
12493         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12494         (insight$(EXEEXT)): Add ECHO_CXXLD.
12495         * gnulib/configure.ac: Add AM_SILENT_RULES.
12496         * gnulib/aclocal.m4: Re-generate.
12497         * gnulib/configure: Re-generate.
12498         * gnulib/import/Makefile.in: Re-generate.
12499
12500 2018-03-16  Tom Tromey  <tom@tromey.com>
12501
12502         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12503         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12504         * utils.c (do_free_section_addr_info)
12505         (make_cleanup_free_section_addr_info): Remove.
12506         * symfile.h (struct other_sections): Add constructor.
12507         (struct section_addr_info): Remove.
12508         (section_addr_info): New typedef.
12509         (struct sym_fns) <sym_offsets>: Change type of parameter.
12510         (build_section_addr_info_from_objfile)
12511         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12512         (default_symfile_offsets, symbol_file_add)
12513         (symbol_file_add_from_bfd)
12514         (build_section_addr_info_from_section_table): Update.
12515         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12516         * symfile.c (alloc_section_addr_info): Remove.
12517         (build_section_addr_info_from_section_table): Change return type.
12518         Update.
12519         (build_section_addr_info_from_bfd)
12520         (build_section_addr_info_from_objfile): Likewise.
12521         (free_section_addr_info): Remove.
12522         (relative_addr_info_to_section_offsets): Change type of "addrs".
12523         (addrs_section_compar): Now a std::sort comparator.
12524         (addrs_section_sort): Change return type.
12525         (addr_info_make_relative): Change type of "addrs".  Update.
12526         (default_symfile_offsets, syms_from_objfile_1)
12527         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12528         (symbol_file_add_separate): Update.
12529         (symbol_file_add): Change type of "addrs".  Update.
12530         (add_symbol_file_command): Update.  Remove cleanups.
12531         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12532         cleanups.
12533         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12534         * solib.c (solib_read_symbols): Update.
12535         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12536         * machoread.c (macho_symfile_offsets): Update.
12537         * jit.c (jit_bfd_try_read_symtab): Update.
12538
12539 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12540
12541         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12542         unittests/utils-selftests.c.
12543         * unittests/utils-selftests.c: New file.
12544
12545 2018-03-14  Tom Tromey  <tom@tromey.com>
12546
12547         PR cli/14977:
12548         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12549         for NULL.
12550
12551 2018-03-14  Tom Tromey  <tom@tromey.com>
12552
12553         PR cli/19918:
12554         * printcmd.c (printf_pointer): Allow "-" in format.
12555
12556 2018-03-14  Tom Tromey  <tom@tromey.com>
12557
12558         * printcmd.c (_initialize_printcmd): Add usage to printf.
12559
12560 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12561
12562         * MAINTAINERS: Update my email address.
12563
12564 2018-03-13  Tom Tromey  <tom@tromey.com>
12565
12566         * machoread.c (macho_check_dsym): Change filenamep to a
12567         std::string*.
12568         (macho_symfile_read): Update.
12569         * symfile.c (load_command): Use std::string.
12570
12571 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12572
12573         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12574         to error message string.
12575         (riscv_register_name): Use xsnprintf instead of sprintf.
12576         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12577         internal_error.
12578         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12579         error.
12580         (riscv_push_dummy_call): Likewise.
12581
12582 2018-03-12  Tom Tromey  <tom@tromey.com>
12583
12584         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12585         Use gdb::byte_vector.
12586         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12587
12588 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12589
12590         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12591         parameter type to readable_regcache.
12592         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12593         the declaration.
12594
12595 2018-03-11  Tom Tromey  <tom@tromey.com>
12596
12597         * dwarf2read.c (struct nextfield): Add initializers.
12598         (struct nextfnfield): Remove.
12599         (struct fnfieldlist): Add initializers.  Remove "length" and
12600         "head", use std::vector.
12601         (struct decl_field_list): Remove.
12602         (struct field_info): Add initializers.
12603         <fields, baseclasses>: Now std::vector.
12604         <nbaseclasses, nfnfields, typedef_field_list_count,
12605         nested_types_list_count>: Remove.
12606         (dwarf2_add_field, dwarf2_add_type_defn)
12607         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12608         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12609         (process_structure_scope): Update.
12610
12611 2018-03-11  Tom Tromey  <tom@tromey.com>
12612
12613         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12614         for use by std::sort.
12615         (build_type_psymtabs_1): Use std::vector.
12616
12617 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12618
12619         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12620         and LIBMPFR in the printed configuration.
12621
12622 2018-03-08  Tom Tromey  <tom@tromey.com>
12623
12624         * source.c (get_filename_and_charpos): Use scoped_fd.
12625         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12626         (procfs_pidlist): Likewise.
12627         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12628         (iterate_over_mappings): Likewise.
12629
12630 2018-03-08  Tom Tromey  <tom@tromey.com>
12631
12632         * infcall.c (struct call_return_meta_info)
12633         <stack_temporaries_enabled>: Remove.
12634         (get_call_return_value, call_function_by_hand_dummy): Update.
12635         * thread.c (disable_thread_stack_temporaries): Remove.
12636         (enable_thread_stack_temporaries): Remove.
12637         (thread_stack_temporaries_enabled_p): Return bool.
12638         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12639         (get_last_thread_stack_temporary): Update.
12640         * eval.c (evaluate_subexp): Update.
12641         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12642         class, not a function.
12643         (value_ptr, value_vec): Remove typedefs.
12644         (class thread_info) <stack_temporaries_enabled>: Now bool.
12645         <stack_temporaries>: Now a std::vector.
12646         (thread_stack_temporaries_enabled_p)
12647         (value_in_thread_stack_temporaries): Return bool.
12648
12649 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12650
12651         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12652         (getpkt_or_notif_sane_1): Likewise.
12653
12654 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12655
12656         * build-id.c (build_id_to_debug_bfd): Use std::string.
12657
12658 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12659
12660         * build-id.c (find_separate_debug_file_by_buildid): Return
12661         std::string.
12662         * build-id.h (find_separate_debug_file_by_buildid): Return
12663         std::string.
12664         * coffread.c (coff_symfile_read): Adjust to std::string.
12665         * elfread.c (elf_symfile_read): Adjust to std::string.
12666         * symfile.c (separate_debug_file_exists): Change parameter to
12667         std::string.
12668         (find_separate_debug_file): Return std::string.
12669         (find_separate_debug_file_by_debuglink): Return std::string.
12670         * symfile.h (find_separate_debug_file_by_debuglink): Return
12671         std::string.
12672
12673 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12674
12675         * common/xml-utils.c (xml_escape_text): Move code to...
12676         (xml_escape_text_append): ... this new function.
12677         * common/xml-utils.h (xml_escape_text_append): New declaration.
12678         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12679         New function.
12680         (_initialize_xml_utils): register test_xml_escape_text_append as
12681         a selftest.
12682
12683 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12684
12685         * defs.h: Remove MAX_REGISTER_SIZE.
12686         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12687         asserts.
12688         * python/py-unwind.c (pyuw_sniffer): Likewise.
12689
12690 2018-03-07  Tom Tromey  <tom@tromey.com>
12691
12692         * linux-tdep.c (linux_info_proc): Update.
12693         * target.h (struct target_ops) <to_fileio_readlink>: Return
12694         optional<string>.
12695         (target_fileio_readlink): Return optional<string>.
12696         * remote.c (remote_hostio_readlink): Return optional<string>.
12697         * inf-child.c (inf_child_fileio_readlink): Return
12698         optional<string>.
12699         * target.c (target_fileio_readlink): Return optional<string>.
12700
12701 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12702
12703         * regcache.c (cooked_read_test): Add riscv to the list of
12704         architectures that have a save_reggroup.
12705
12706 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12707
12708         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12709         value is not a dynamic class object.
12710
12711 2018-03-06  Tom Tromey  <tom@tromey.com>
12712
12713         * rust-exp.y: Formatting fixes.
12714
12715 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12716
12717         * riscv-tdep.c (riscv_register_name): Remove target description
12718         support.
12719         (riscv_gdbarch_init): Remove target description check.
12720
12721 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12722
12723         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12724         comment.
12725         * riscv-tdep.h: Likewise.
12726
12727 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12728
12729         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12730         (riscv_pseudo_register_write): Delete.
12731         (riscv_gdbarch_init): Remove all use of pseudo registers.
12732
12733 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12734
12735         * record-btrace.c (btrace_print_lines): Replace cleanup
12736         parameter with RAII equivalents.
12737         (btrace_insn_history): Replace cleanup with RAII equivalents.
12738         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12739         make_cleanup_ui_out_tuple_begin_end): Remove.
12740         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12741         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12742         make_cleanup_ui_out_list_begin_end): Remove.
12743
12744 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12745
12746         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12747         parameter types to std::vector.  Use bool.
12748         (record_btrace_wait): Replace VEC(tp_t) with
12749         std::vector<thread_info *>.
12750         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12751
12752 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12753
12754         * record-btrace.c (record_btrace_disable_callback): Remove.
12755         (struct scoped_btrace_disable): New.
12756         (record_btrace_open): Use scoped_btrace_disable.
12757
12758 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12759
12760         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12761         reading values from registers.
12762
12763 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12764
12765         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12766         where appropriate.
12767
12768 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12769
12770         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12771         change parameter type.  Use GDB's print functions, and use
12772         core_addr_to_string where appropriate.
12773         (riscv_push_dummy_call): Use core_addr_to_string where
12774         appropriate, update call to riscv_print_arg_location, and reindent
12775         a few lines.
12776         (riscv_return_value): Update call to riscv_print_arg_location.
12777
12778 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12779             Tim Newsome <tim@sifive.com>
12780             Albert Ou <a0u@eecs.berkeley.edu>
12781             Darius Rad <darius@bluespec.com>
12782
12783         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12784         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12785         (ALLDEPFILES): Add riscv-tdep.c
12786         * configure.tgt: Add riscv support.
12787         * riscv-tdep.c: New file.
12788         * riscv-tdep.h: New file.
12789         * NEWS: Mention new target.
12790         * MAINTAINERS: Add entry for riscv.
12791
12792 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12793
12794         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12795         fields within aggregates.
12796
12797 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12798
12799         * record-btrace.c (btrace_print_lines): Change type of flags to
12800         gdb_disassembly_flags.
12801
12802 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12803
12804         * fbsd-nat.c: Include "inf-ptrace.h".
12805         (USE_SIGTRAP_SIGINFO): Conditionally define.
12806         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12807         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12808         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12809         function.
12810         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12811         Likewise.
12812         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12813         Likewise.
12814         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12815         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12816         "supports_stopped_by_hw_breakpoint" target methods.
12817
12818 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12819
12820         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12821         * fbsd-nat.c (debug_fbsd_nat): New variable.
12822         (show_fbsd_nat_debug): New function.
12823         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12824         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12825
12826 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12827
12828         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12829         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12830         prototype.
12831         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12832         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12833         method.
12834
12835 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12836
12837         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12838         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12839
12840 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12841
12842         * charset.c (struct charset_vector): New.
12843         (charsets): Change type to charset_vector.
12844         (find_charset_names): Adjust.
12845         (add_one): Adjust.
12846         (_initialize_charset): Adjust.
12847
12848 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12849
12850         * progspace.h (struct program_space) <deleted_solibs>: Change
12851         type to std::vector<std::string>.
12852         * progspace.c (clear_program_space_solib_cache): Adjust.
12853         * breakpoint.c (print_solib_event): Adjust.
12854         (check_status_catch_solib): Adjust.
12855         * solib.c (update_solib_list): Adjust.
12856         * ui-out.h (class ui_out) <field_string>: New overload.
12857         * ui-out.c (ui_out::field_string): New overload.
12858
12859 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12860
12861         * progspace.h (struct program_space): Add constructor and
12862         destructor, initialize fields.
12863         (add_program_space): Remove.
12864         * progspace.c (add_program_space): Rename to...
12865         (program_space::program_space): ... this.
12866         (release_program_space): Rename to...
12867         (program_space::~program_space): ... this.
12868         (delete_program_space): Use delete to delete program_space.
12869         (initialize_progspace): Use new to allocate program_space.
12870         * inferior.c (add_inferior_with_spaces): Likewise.
12871         (clone_inferior_command): Likewise.
12872         * infrun.c (follow_fork_inferior): Likewise.
12873         (handle_vfork_child_exec_or_exit): Likewise.
12874
12875 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12876
12877         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12878         (delim_string_to_char_ptr_vec): Return std::vector of
12879         gdb::unique_xmalloc_ptr.
12880         (dirnames_to_char_ptr_vec_append): Take std::vector of
12881         gdb::unique_xmalloc_ptr.
12882         (dirnames_to_char_ptr_vec): Return std::vector of
12883         gdb::unique_xmalloc_ptr.
12884         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12885         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12886         (delim_string_to_char_ptr_vec): Return an std::vector of
12887         gdb::unique_xmalloc_ptr, adjust the code.
12888         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12889         gdb::unique_xmalloc_ptr, adjust the code.
12890         (dirnames_to_char_ptr_vec): Return an std::vector of
12891         gdb::unique_xmalloc_ptr, adjust the code.
12892         * auto-load.c (auto_load_safe_path_vec): Change type to
12893         std::vector of gdb::unique_xmalloc_ptr.
12894         (auto_load_expand_dir_vars): Return an std::vector of
12895         gdb::unique_xmalloc_ptr, adjust the code.
12896         (auto_load_safe_path_vec_update): Adjust.
12897         (filename_is_in_auto_load_safe_path_vec): Adjust.
12898         (auto_load_objfile_script_1): Adjust.
12899         * build-id.c (build_id_to_debug_bfd): Adjust.
12900         * linux-thread-db.c (thread_db_load_search): Adjust.
12901         * source.c (add_path): Adjust.
12902         (openp): Adjust.
12903         * symfile.c (find_separate_debug_file): Adjust.
12904         * utils.c (do_free_char_ptr_vec): Remove.
12905         (make_cleanup_free_char_ptr_vec): Remove.
12906
12907 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12908
12909         PR gdb/22907
12910         * common/pathstuff.c: Conditionally include "<windows.h>".
12911
12912 2018-03-01  Georg Sauthoff  <mail@georg.so>
12913
12914         PR gdb/22888
12915         * gcore.in: Quote variables and switch interpreter to bash.
12916
12917 2018-03-01  Tom Tromey  <tom@tromey.com>
12918
12919         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12920         assertion.  Add assertion for discriminant_index.
12921         (quirk_rust_enum): Use correct base type name in univariant case.
12922
12923 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12924
12925         * record.c (get_call_history_modifiers): Return a
12926         record_print_flags.
12927         (cmd_record_call_history): Adjust.
12928         * record-btrace.c (record_btrace_call_history): Adjust.
12929         (record_btrace_call_history_range): Adjust.
12930         (record_btrace_call_history_from): Adjust.
12931         * target-debug.h (target_debug_print_record_print_flags): New.
12932         * target-delegates.c: Re-generate.
12933         * target.c (target_call_history): Change flags type.
12934         (target_call_history_from): Likewise.
12935         (target_call_history_range): Likewise.
12936         * target.h (struct target_ops) <target_call_history>: Likewise.
12937         (target_call_history_from): Likewise.
12938         (target_call_history_range): Likewise.
12939
12940 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12941             Simon Marchi  <simon.marchi@polymtl.ca>
12942
12943         * common/common-utils.c: Include "sys/stat.h".
12944         (is_regular_file): Move here from "source.c"; change return
12945         type to "bool".
12946         * common/common-utils.h (is_regular_file): New prototype.
12947         * common/pathstuff.c (contains_dir_separator): New function.
12948         * common/pathstuff.h (contains_dir_separator): New prototype.
12949         * source.c: Don't include "sys/stat.h".
12950         (is_regular_file): Move to "common/common-utils.c".
12951
12952 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12953
12954         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12955         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12956         * auto-load.c: Include "common/pathstuff.h".
12957         * common/common-def.h (current_directory): Move here.
12958         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12959         function.
12960         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12961         prototype.
12962         * common/pathstuff.c: New file.
12963         * common/pathstuff.h: New file.
12964         * compile/compile.c: Include "common/pathstuff.h".
12965         * defs.h (current_directory): Move to "common/common-defs.h".
12966         * dwarf2read.c: Include "common/pathstuff.h".
12967         * exec.c: Likewise.
12968         * guile/scm-safe-call.c: Likewise.
12969         * linux-thread-db.c: Likewise.
12970         * main.c: Likewise.
12971         * nto-tdep.c: Likewise.
12972         * objfiles.c: Likewise.
12973         * source.c: Likewise.
12974         * symtab.c: Likewise.
12975         * utils.c: Include "common/pathstuff.h".
12976         (gdb_realpath): Move to "common/pathstuff.c".
12977         (gdb_realpath_keepfile): Likewise.
12978         (gdb_abspath): Likewise.
12979         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12980         (gdb_realpath_keepfile): Likewise.
12981         (gdb_abspath): Likewise.
12982
12983 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12984
12985         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12986         wildcard process pid for super_resume for kernels with a
12987         specific bug.
12988
12989 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12990
12991         * compile/compile.c (get_args): Add additional comments
12992         explaining function.
12993
12994 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12995             Tom Tromey  <tom@tromey.com>
12996
12997         * target.h (memory_write_request_s): Remove typedef.  Don't define
12998         VEC.
12999         (target_write_memory_blocks): Change argument to std::vector.
13000         (struct memory_write_request): Add constructor.
13001         * target-memory.c (compare_block_starting_address): Return bool.
13002         Change argument types.
13003         (claim_memory): Change arguments to use std::vector.
13004         (split_regular_and_flash_blocks, blocks_to_erase)
13005         (compute_garbled_blocks): Likewise.
13006         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13007         (target_write_memory_blocks): Change argument to std::vector.
13008         * symfile.c (struct load_section_data): Add constructor and
13009         destructor.  Use std::vector for "requests".
13010         (struct load_progress_data): Add initializers.
13011         (load_section_callback): Update.  Use "new".
13012         (clear_memory_write_data): Remove.
13013         (generic_load): Update.
13014
13015 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13016
13017         * arch/aarch64.h: Use common/tdesc.h.
13018
13019 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13020
13021         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13022         architecture with a 64-bit ABI.
13023
13024 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13025
13026         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13027         ahead of target description loading.
13028
13029 2018-02-26  Tom Tromey  <tom@tromey.com>
13030
13031         * stack.c (backtrace_command_1): Update.
13032         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13033         of "flags".
13034         * python/py-framefilter.c (py_print_frame)
13035         (gdbpy_apply_frame_filter): Change type of "flags".
13036         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13037         of "flags".
13038         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13039         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13040         * extension.h (enum frame_filter_flag): Rename from
13041         frame_filter_flags.
13042         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13043         (apply_ext_lang_frame_filter): Change type of "flags".
13044         * extension.c (apply_ext_lang_frame_filter): Change type of
13045         "flags".
13046         * extension-priv.h (struct extension_language_ops)
13047         <apply_frame_filter>: Change type of "flags".
13048
13049 2018-02-26  Tom Tromey  <tom@tromey.com>
13050
13051         PR python/16497:
13052         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13053         off-by-one in py_end computation.
13054         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13055         PRINT_MORE_FRAMES.
13056         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13057         constant.
13058
13059 2018-02-26  Tom Tromey  <tom@tromey.com>
13060
13061         * dwarf2read.c (struct variant_field): New.
13062         (struct nextfield) <variant>: New field.
13063         (dwarf2_add_field): Handle DW_TAG_variant_part.
13064         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13065         discriminated union.
13066         (read_structure_type): Handle DW_TAG_variant_part.
13067         (handle_struct_member_die): New function, extracted from
13068         process_structure_scope.  Handle DW_TAG_variant.
13069         (process_structure_scope): Handle discriminated unions.  Call
13070         handle_struct_member_die.
13071
13072 2018-02-26  Tom Tromey  <tom@tromey.com>
13073
13074         * rust-lang.h (rust_last_path_segment): Declare.
13075         * rust-lang.c (rust_last_path_segment): Now public.  Change
13076         contract.
13077         (struct disr_info): Remove.
13078         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13079         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13080         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13081         (rust_enum_p, rust_enum_variant): New function.
13082         (rust_underscore_fields): Remove "offset" parameter.
13083         (rust_print_enum): New function.
13084         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13085         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13086         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13087         enums.
13088         (rust_internal_print_type): New function, from rust_print_type.
13089         Remove enum code.
13090         (rust_print_type): Call rust_internal_print_type.
13091         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13092         Update enum handling.
13093         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13094         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13095         (rust_union_quirks): New functions.
13096         (process_full_comp_unit, process_full_type_unit): Call
13097         rust_union_quirks.
13098         (process_structure_scope): Update rust_unions if necessary.
13099
13100 2018-02-26  Tom Tromey  <tom@tromey.com>
13101
13102         * value.h (value_union_variant): Declare.
13103         * valops.c (value_union_variant): New function.
13104         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13105         (struct discriminant_info): New.
13106         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13107         enumerator.
13108         (struct main_type) <flag_discriminated_union>: New field.
13109
13110 2018-02-26  Tom Tromey  <tom@tromey.com>
13111
13112         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13113         unittests/unpack-selftests.c.
13114         * unittests/unpack-selftests.c: New file.
13115         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13116
13117 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13118
13119         * dwarf2read.c (struct partial_die_info) <read>: New method.
13120         (read_partial_die): Remove the declaration.
13121         (load_partial_dies): Update.
13122         (partial_die_info::partial_die_info):
13123         (read_partial_die): Change it to partial_die_info::read.
13124
13125 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13126
13127         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13128         (fixup_partial_die): Remove declaration.
13129         (scan_partial_symbols): Update.
13130         (partial_die_parent_scope): Likewise.
13131         (partial_die_full_name): Likewise.
13132         (fixup_partial_die): Change it to partial_die_info::fixup.
13133
13134 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13135
13136         * dwarf2read.c (read_partial_die): Update the declaration.
13137         (load_partial_dies): Caller update.
13138         (read_partial_die): Remove one argument abbrev_len.
13139
13140 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13141
13142         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13143         assignment operator.
13144         (load_partial_dies): Use ctor and copy ctor.
13145         (read_partial_die): Update.
13146         (dwarf2_cu::find_partial_die): Use ctor.
13147
13148 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13149
13150         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13151         (find_partial_die_in_comp_unit): Change it to
13152         dwarf2_cu::find_partial_die.
13153         (find_partial_die): Update.
13154
13155 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13156
13157         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13158         is NULL.
13159
13160 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13161
13162         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13163
13164 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13165
13166         * arch/amd64.h: Use common/tdesc.h.
13167         * arch/i386.c: Likewise.
13168         * arch/i386.h: Likewise.
13169         * arch/tic6x.c: Likewise.
13170         * arch/tdesc.h: Move file from here...
13171         * common/tdesc.h: ...to here.
13172         * features/aarch64-core.c: Regenerate.
13173         * features/aarch64-fpu.c: Regenerate.
13174         * features/i386/32bit-avx.c: Regenerate.
13175         * features/i386/32bit-avx512.c: Regenerate.
13176         * features/i386/32bit-core.c: Regenerate.
13177         * features/i386/32bit-linux.c: Regenerate.
13178         * features/i386/32bit-mpx.c: Regenerate.
13179         * features/i386/32bit-pkeys.c: Regenerate.
13180         * features/i386/32bit-sse.c: Regenerate.
13181         * features/i386/64bit-avx.c: Regenerate.
13182         * features/i386/64bit-avx512.c: Regenerate.
13183         * features/i386/64bit-core.c: Regenerate.
13184         * features/i386/64bit-linux.c: Regenerate.
13185         * features/i386/64bit-mpx.c: Regenerate.
13186         * features/i386/64bit-pkeys.c: Regenerate.
13187         * features/i386/64bit-segments.c: Regenerate.
13188         * features/i386/64bit-sse.c: Regenerate.
13189         * features/i386/x32-core.c: Regenerate.
13190         * features/tic6x-c6xp.c: Regenerate.
13191         * features/tic6x-core.c: Regenerate.
13192         * features/tic6x-gp.c: Regenerate.
13193         * target-descriptions.c: Use common/tdesc.h.
13194         * target-descriptions.h: Likewise.
13195
13196 2018-02-24  Tom Tromey  <tom@tromey.com>
13197
13198         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13199         (try_thread_db_load_from_dir, thread_db_load_search): Use
13200         std::string.
13201         (info_auto_load_libthread_db_compare): Return bool.  Change
13202         argument types.
13203         (info_auto_load_libthread_db): Use std::vector, std::string.
13204         Remove cleanups.
13205
13206 2018-02-24  Tom Tromey  <tom@tromey.com>
13207
13208         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13209         std::string.
13210         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13211         std::string*.
13212         * gdbarch.c: Rebuild.
13213         * gdbarch.h: Rebuild.
13214         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13215         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13216         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13217         std::string*.
13218
13219 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13220
13221         * gdbtypes.h (sect_offset): Change type to uint64_t.
13222         (sect_offset_str): New function.
13223         * dwarf2read.c (create_addrmap_from_aranges): Use
13224         sect_offset_str.
13225         (error_check_comp_unit_head): Likewise.
13226         (create_debug_type_hash_table): Likewise.
13227         (read_cutu_die_from_dwo): Likewise.
13228         (init_cutu_and_read_dies): Likewise.
13229         (init_cutu_and_read_dies_no_follow): Likewise.
13230         (process_psymtab_comp_unit_reader): Likewise.
13231         (partial_die_parent_scope): Likewise.
13232         (peek_die_abbrev): Likewise.
13233         (process_queue): Likewise.
13234         (dwarf2_physname): Likewise.
13235         (read_namespace_alias): Likewise.
13236         (read_import_statement): Likewise.
13237         (create_dwo_cu_reader): Likewise.
13238         (create_cus_hash_table): Likewise.
13239         (lookup_dwo_cutu): Likewise.
13240         (inherit_abstract_dies): Likewise.
13241         (read_func_scope): Likewise.
13242         (read_call_site_scope): Likewise.
13243         (dwarf2_add_member_fn): Likewise.
13244         (read_common_block): Likewise.
13245         (read_module_type): Likewise.
13246         (read_typedef): Likewise.
13247         (read_subrange_type): Likewise.
13248         (load_partial_dies): Likewise.
13249         (read_partial_die): Likewise.
13250         (find_partial_die): Likewise.
13251         (read_str_index): Likewise.
13252         (dwarf2_string_attr): Likewise.
13253         (build_error_marker_type): Likewise.
13254         (lookup_die_type): Likewise.
13255         (dump_die_shallow): Likewise.
13256         (follow_die_ref): Likewise.
13257         (dwarf2_fetch_die_loc_sect_off): Likewise.
13258         (dwarf2_fetch_constant_bytes): Likewise.
13259         (follow_die_sig): Likewise.
13260         (get_signatured_type): Likewise.
13261         (get_DW_AT_signature_type): Likewise.
13262         (dwarf2_find_containing_comp_unit): Likewise.
13263         (set_die_type): Likewise.
13264
13265 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13266
13267         * arch/aarch64.c: Include "common-defs.h".
13268         * arch/amd64.c: Likewise.
13269         * arch/i386.c: Likewise.
13270
13271 2018-02-21  Tom Tromey  <tom@tromey.com>
13272
13273         * value.h: (extract_field_op): Update.
13274         * eval.c (extract_field_op): Return a const char *.
13275         * expression.h (parse_expression_for_completion): Update.
13276         * completer.c (complete_expression): Update.
13277         (add_struct_fields): Make fieldname const.
13278         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13279         (mark_completion_tag, parse_exp_in_context_1): Update.
13280         (parse_expression_for_completion): Change "name" to
13281         unique_xmalloc_ptr*.
13282
13283 2018-02-21  Tom Tromey  <tom@tromey.com>
13284
13285         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13286
13287 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13288
13289         * avr-tdep.c (avr_read_pc): Change parameter type to
13290         readable_regcache.
13291         * gdbarch.sh (read_pc): Likewise.
13292         * gdbarch.c: Re-generated.
13293         * gdbarch.h: Re-generated.
13294         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13295         readable_regcache.
13296         * ia64-tdep.c (ia64_read_pc): Likewise.
13297         * mips-tdep.c (mips_read_pc): Likewise.
13298         * spu-tdep.c (spu_read_pc): Likewise.
13299
13300 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13301
13302         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13303         * regcache-dump.c: New file.
13304         * regcache.c: Move register_dump to regcache-dump.c.
13305         (maintenance_print_registers): Likewise.
13306         (maintenance_print_raw_registers): Likewise.
13307         (maintenance_print_cooked_registers): Likewise.
13308         (maintenance_print_register_groups): Likewise.
13309         (maintenance_print_remote_registers): Likewise.
13310         (_initialize_regcache): Likewise.
13311         * regcache.h (register_dump): Moved from regcache.c.
13312
13313 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13314
13315         * regcache.c (regcache::regcache): Update.
13316         (regcache::invalidate): Move it to detached_regcache::invalidate.
13317         (get_thread_arch_aspace_regcache): Update.
13318         (regcache::raw_update): Update.
13319         (regcache::cooked_read): Remove some code.
13320         (regcache::cooked_read_value): Likewise.
13321         (regcache::raw_write): Remove assert on m_readonly_p.
13322         (regcache::raw_supply_integer): Move it to
13323         detached_regcache::raw_supply_integer.
13324         (regcache::raw_supply_zeroed): Likewise.
13325         * regcache.h (detached_regcache) <raw_supply_integer>: New
13326         declaration.
13327         <raw_supply_zeroed, invalidate>: Likewise.
13328         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13329         <invalidate>: Likewise.
13330         <m_readonly_p>: Removed.
13331
13332 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13333
13334         * infcmd.c (get_return_value): Let stop_regs point to
13335         get_current_regcache.
13336         * regcache.c (regcache::regcache): Remove.
13337         (register_dump_reg_buffer): New class.
13338         (regcache_print): Adjust.
13339         * regcache.h (regcache): Remove constructors.
13340
13341 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13342
13343         * regcache.c (class register_dump): New class.
13344         (register_dump_regcache, register_dump_none): New class.
13345         (register_dump_remote, register_dump_groups): New class.
13346         (regcache_print): Update.
13347         * regcache.h (regcache_dump_what): Move it to regcache.c.
13348         (regcache) <dump>: Remove.
13349
13350 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13351
13352         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13353          reg_buffer_rw *.
13354         (jit_unwind_reg_set_impl): Call raw_supply.
13355         (jit_frame_sniffer): Use reg_buffer_rw.
13356         * record-full.c (record_full_core_regbuf): Change its type.
13357         (record_full_core_open_1): Use reg_buffer_rw.
13358         (record_full_close): Likewise.
13359         (record_full_core_fetch_registers): Use regcache->raw_supply.
13360         (record_full_core_store_registers): Likewise.
13361         * regcache.c (regcache::get_register_status): Move it to
13362         reg_buffer.
13363         (regcache_raw_set_cached_value): Remove.
13364         (regcache::raw_set_cached_value): Remove.
13365         (regcache::raw_write): Call raw_supply.
13366         (regcache::raw_supply): Move it to reg_buffer_rw.
13367         * regcache.h (regcache_raw_set_cached_value): Remove.
13368         (reg_buffer_rw): New class.
13369
13370 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13371
13372         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13373         readonly_detached_regcache.
13374         (dummy_frame_prev_register): Use regcache->cooked_read.
13375         * frame.c (frame_save_as_regcache): Change return type.
13376         (frame_pop): Update.
13377         * frame.h (frame_save_as_regcache): Update declaration.
13378         * inferior.h (get_infcall_suspend_state_regcache): Update
13379         declaration.
13380         * infrun.c (infcall_suspend_state) <registers>: use
13381         readonly_detached_regcache.
13382         (save_infcall_suspend_state): Don't use regcache_dup.
13383         (get_infcall_suspend_state_regcache): Change return type.
13384         * linux-fork.c (struct fork_info) <savedregs>: Change to
13385         readonly_detached_regcache.
13386         <pc>: New field.
13387         (fork_save_infrun_state): Don't use regcache_dup.
13388         (info_checkpoints_command): Adjust.
13389         * mi/mi-main.c (register_changed_p): Update declaration.
13390         (mi_cmd_data_list_changed_registers): Use
13391         readonly_detached_regcache.
13392         (register_changed_p): Change parameter type to
13393         readonly_detached_regcache.
13394         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13395         readonly_detached_regcache.
13396         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13397         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13398         New.
13399         (regcache::save): Move it to reg_buffer.
13400         (regcache::restore): Change parameter type.
13401         (regcache_dup): Remove.
13402         * regcache.h (reg_buffer) <save>: New method.
13403         (readonly_detached_regcache): New class.
13404         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13405         readonly_detached_regcache.
13406         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13407
13408 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13409
13410         * frame.c (frame_save_as_regcache): Use regcache method save.
13411         (frame_pop): Use regcache method restore.
13412         * infrun.c (restore_infcall_suspend_state): Likewise.
13413         * linux-fork.c (fork_load_infrun_state): Likewise.
13414         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13415         save.
13416         * regcache.c (regcache_save): Remove.
13417         (regcache::restore): More asserts.
13418         (regcache_cpy): Remove.
13419         * regcache.h (regcache_save): Remove the declaration.
13420         (regcache::restore): Move from private to public.
13421         Remove the friend declaration of regcache_cpy.
13422         (regcache_cpy): Remove declaration.
13423
13424 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13425
13426         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13427         parameter type to 'readable_regcache *'.
13428         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13429         * arm-tdep.c (arm_neon_quad_read): Likewise.
13430         (arm_pseudo_read): Likewise.
13431         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13432         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13433         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13434         * gdbarch.c: Re-generated.
13435         * gdbarch.h: Re-generated.
13436         * gdbarch.sh (pseudo_register_read): Change parameter type to
13437         'readable_regcache *'.
13438         (pseudo_register_read_value): Likewise.
13439         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13440         (h8300_pseudo_register_read): Likewise.
13441         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13442         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13443         (i386_pseudo_register_read_into_value): Likewise.
13444         (i386_pseudo_register_read_value): Likewise.
13445         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13446         declaration.
13447         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13448         * m32c-tdep.c (m32c_raw_read): Likewise.
13449         (m32c_read_flg): Likewise.
13450         (m32c_banked_register): Likewise.
13451         (m32c_banked_read): Likewise.
13452         (m32c_sb_read): Likewise.
13453         (m32c_part_read): Likewise.
13454         (m32c_cat_read): Likewise.
13455         (m32c_r3r2r1r0_read): Likewise.
13456         (m32c_pseudo_register_read): Likewise.
13457         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13458         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13459         (mep_pseudo_cr64_read): Likewise.
13460         (mep_pseudo_register_read): Likewise.
13461         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13462         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13463         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13464         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13465         (regcache::cooked_read): Likewise.
13466         (regcache::cooked_read_value): Likewise.
13467         (regcache_cooked_read_signed):
13468         (regcache::cooked_read): Likewise.
13469         * regcache.h (readable_regcache): New class.
13470         (regcache): Inherit readable_regcache.  Move some methods to
13471         readable_regcache.
13472         * rl78-tdep.c (rl78_pseudo_register_read): Change
13473         parameter type to 'readable_regcache *'.
13474         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13475         (e500_pseudo_register_read): Change parameter type to
13476         'readable_regcache *'.
13477         (dfp_pseudo_register_read): Likewise.
13478         (vsx_pseudo_register_read): Likewise.
13479         (efpr_pseudo_register_read): Likewise.
13480         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13481         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13482         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13483         (sh64_pseudo_register_read): Likewise.
13484         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13485         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13486         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13487         (spu_pseudo_register_read): Likewise.
13488         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13489         (xtensa_pseudo_register_read): Likewise.
13490
13491 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13492
13493         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13494         (regcache::arch): Move it to reg_buffer::arch.
13495         (regcache::register_buffer): Likewise.
13496         (regcache::assert_regnum): Likewise.
13497         (regcache::num_raw_registers): Likewise.
13498         * regcache.h (reg_buffer): New class.
13499         (regcache): Inherit reg_buffer.
13500
13501 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13502
13503         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13504         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13505
13506 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13507
13508         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13509
13510 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13511
13512         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13513         (SFILES): Remove common/*.c files.
13514         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13515         * common/common.host: Add common reference.
13516         * configure.ac: Likewise.
13517         * configure: Regenerate.
13518
13519 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13520
13521         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13522         (block_initialize_namespace): Use new.
13523         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13524         (dwarf2_free_objfile): Use delete.
13525         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13526         (copy_type_recursive): Use new.
13527         * gdb_obstack.h (allocate_on_obstack): New.
13528
13529 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13530
13531         PR gdb/22849
13532         * inferior.c (exit_inferior_1): Reset inf->control.
13533
13534 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13535
13536         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13537         declaration.
13538
13539 2018-02-14  Pedro Alves  <palves@redhat.com>
13540
13541         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13542         frame_cleanup_after_sniffer on exception.
13543
13544 2018-02-14  Tom Tromey  <tom@tromey.com>
13545
13546         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13547         const.
13548         (solib_bfd_open): Make pathname const.
13549         * solib.c (solib_bfd_open): Make pathname const.
13550         * solib-spu.c (spu_bfd_fopen): Make name const.
13551         (spu_bfd_open): Make pathname const.
13552         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13553         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13554
13555 2018-02-14  Tom Tromey  <tom@tromey.com>
13556
13557         * symfile.c (symfile_bfd_open): Update.
13558         * source.h (openp, source_full_path_of, find_and_open_source):
13559         Change argument type to unique_xmalloc_ptr.
13560         * source.c (openp): Take a unique_xmalloc_ptr.
13561         (source_full_path_of, find_and_open_source): Likewise.
13562         (open_source_file, symtab_to_fullname): Update.
13563         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13564         unique_xmalloc_ptr.
13565         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13566         (exec_file_find): Update.
13567         * psymtab.c (psymtab_to_fullname): Update.
13568         * nto-tdep.h (nto_find_and_open_solib): Update.
13569         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13570         unique_xmalloc_ptr.
13571         * exec.c (exec_file_attach): Update.
13572         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13573         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13574
13575 2018-02-14  Tom Tromey  <tom@tromey.com>
13576
13577         * solib.c: Include source.h.
13578         * nto-tdep.c: Include source.h.
13579         * mi/mi-cmd-env.c: Include source.h.
13580         * infcmd.c: Include source.h.
13581         * exec.c: Include source.h.
13582         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13583         (add_path, directory_switch, source_path, init_source_path): Move
13584         declarations...
13585         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13586         (add_path, directory_switch, source_path, init_source_path):
13587         ...here.
13588
13589 2018-02-14  Tom Tromey  <tom@tromey.com>
13590
13591         * solist.h (exec_file_find, solib_find): Return
13592         unique_xmalloc_ptr.
13593         (solib_bfd_fopen): Take a const char *.
13594         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13595         (exec_file_find, solib_find): Likewise.
13596         (solib_bfd_fopen): Do not take ownership of "pathname".
13597         (solib_bfd_open): Use unique_xmalloc_ptr.
13598         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13599         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13600         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13601         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13602
13603 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13604
13605         * ada-lang.c (name_match_type_from_name): Remove reference to
13606         ada_name_for_lookup in function's documentation.
13607         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13608
13609 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13610
13611         * defs.h (enum openp_flags): New enum.
13612         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13613         Move to enum openp_flags.
13614         (openp_flags): New enum flags.
13615         (openp): Change parameter type to openp_flags.
13616         * source.c (openp): Change parameter type to openp_flags.
13617         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13618         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13619
13620 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13621
13622         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13623         per-command.
13624
13625 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13626
13627         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13628         into...
13629         (class dwarf2_queue_guard): ...the destructor of this new class.
13630         (dw2_do_instantiate_symtab): Create instance of the new class
13631         dwarf2_queue_guard, remove cleanup.
13632
13633 2018-02-09  Tom Tromey  <tom@tromey.com>
13634
13635         * source.c (find_source_lines): Don't reference past the end of
13636         the vector.
13637
13638 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13639
13640         * remote.c (remote_btrace_maybe_reopen): Change error message.
13641         * btrace.c (btrace_enable): Likewise.
13642         (parse_xml_btrace): Likewise.
13643         (parse_xml_btrace_conf): Likewise.
13644
13645 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13646
13647         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13648         (linux_enable_pt, linux_enable_bts): Call
13649         diagnose_perf_event_open_fail.
13650
13651 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13652
13653         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13654         Remove parameter and change return type.  Update callers.  Move it.
13655         (linux_enable_bts, linux_enable_pt): Improve error message.
13656         (linux_enable_pt): Remove zero buffer size check.
13657         (linux_enable_btrace): Improve error messages.  Remove NULL return
13658         check.
13659
13660 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13661
13662         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13663         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13664         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13665         (linux_supports_pt, linux_supports_btrace): Remove.
13666         (linux_enable_bts): Call cpu_supports_bts.
13667         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13668         * remote.c (remote_supports_btrace): Remove.
13669         (init_remote_ops): Remove remote_supports_btrace.
13670         * target-delegates.c: Regenerated.
13671         * target.c (target_supports_btrace): Remove.
13672         * target.h (target_ops) <to_supports_btrace>: Remove
13673         (target_supports_btrace): Remove.
13674         * x86-linux-nat.c (x86_linux_create_target): Remove
13675         linux_supports_btrace.
13676
13677 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13678
13679         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13680         btrace failed.
13681         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13682         exception and use message in own exception.
13683
13684 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13685
13686         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13687         (perf_event_pt_event_type): Use gdb_file_up.
13688         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13689         scoped_fd, and scoped_mmap.
13690
13691 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13692
13693         * common/scoped_mmap.h: New.
13694         * unittests/scoped_mmap-selftest.c: New.
13695         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13696         unittests/scoped_mmap-selftest.c.
13697
13698 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13699
13700         * common/scoped_fd.h: New.
13701         * unittests/scoped_fd-selftest.c: New.
13702         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13703         unittests/scoped_fd-selftest.c.
13704
13705 2018-02-09  Tom Tromey  <tom@tromey.com>
13706
13707         * auto-load.c (auto_load_section_scripts): Use
13708         gdb::unique_xmalloc_ptr.
13709
13710 2018-02-09  Tom Tromey  <tom@tromey.com>
13711
13712         * auto-load.c (execute_script_contents): Use std::string.
13713
13714 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13715
13716         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13717         Python function, rather than a new command.
13718
13719 2018-02-08  Tom Tromey  <tom@tromey.com>
13720
13721         * solib.c (solib_find_1): Use std::string.
13722         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13723
13724 2018-02-08  Tom Tromey  <tom@tromey.com>
13725
13726         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13727
13728 2018-02-08  Tom Tromey  <tom@tromey.com>
13729
13730         * source.c (find_source_lines): Use gdb::def_vector.
13731
13732 2018-02-08  Tom Tromey  <tom@tromey.com>
13733
13734         * macrocmd.c (struct temporary_macro_definition): New.
13735         (macro_define_command): Use temporary_macro_definition.  Remove
13736         cleanups.
13737         (free_macro_definition_ptr): Remove.
13738
13739 2018-02-08  Tom Tromey  <tom@tromey.com>
13740
13741         * macroexp.c (maybe_expand): Use std::string.
13742
13743 2018-02-08  Tom Tromey  <tom@tromey.com>
13744
13745         * macroexp.c (struct macro_buffer): Add initializers for some
13746         members.
13747         (init_buffer, init_shared_buffer, free_buffer)
13748         (free_buffer_return_text): Remove.
13749         (macro_buffer): New constructors.
13750         (~macro_buffer): New destructor.
13751         (macro_buffer::set_shared): New method.
13752         (macro_buffer::resize_buffer, macro_buffer::appendc)
13753         (macro_buffer::appendmem): Now methods, not free functions.
13754         (set_token, append_tokens_without_splicing, stringify)
13755         (macro_stringify): Update.
13756         (gather_arguments): Change return type.  Remove argc_p argument,
13757         add args_ptr argument.  Use std::vector.
13758         (substitute_args): Remove argc argument.  Accept std::vector.
13759         (expand): Update.  Use std::vector.
13760         (scan, macro_expand, macro_expand_next): Update.
13761
13762 2018-02-08  Tom Tromey  <tom@tromey.com>
13763
13764         * symtab.c (default_collect_symbol_completion_matches_break_on):
13765         Use unique_xmalloc_ptr.
13766         * macroscope.h: (sal_macro_scope, user_macro_scope)
13767         (default_macro_scope): Return unique_xmalloc_ptr.
13768         * macroscope.c (sal_macro_scope, user_macro_scope)
13769         (default_macro_scope): Return unique_xmalloc_ptr.
13770         * macroexp.h (macro_expand, macro_expand_once): Return
13771         unique_xmalloc_ptr.
13772         * macroexp.c (macro_expand, macro_expand_once): Return
13773         unique_xmalloc_ptr.
13774         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13775         (info_macro_command, info_macros_command): Use
13776         unique_xmalloc_ptr.
13777         * compile/compile-c-support.c (write_macro_definitions): Use
13778         unique_xmalloc_ptr.
13779         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13780
13781 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13782
13783         * value.c (value_static_field): Assign field type instead of
13784         containing type when returning an optimized out value.
13785
13786 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13787
13788         * ft32-tdep.c (ft32_read_pc): Remove.
13789         (ft32_write_pc): Remove.
13790         (ft32_gdbarch_init): Update.
13791         * m32r-tdep.c (m32r_read_pc): Remove.
13792         (m32r_gdbarch_init): Update.
13793         * mep-tdep.c (mep_read_pc): Remove.
13794         (mep_gdbarch_init): Update.
13795         * microblaze-tdep.c (microblaze_write_pc): Remove.
13796         (microblaze_gdbarch_init): Update.
13797         * mn10300-tdep.c (mn10300_read_pc): Remove.
13798         (mn10300_write_pc): Remove.
13799         (mn10300_gdbarch_init): Update.
13800         * moxie-tdep.c (moxie_read_pc): Remove.
13801         (moxie_write_pc): Remove.
13802         (moxie_gdbarch_init): Update.
13803
13804 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13805
13806         * expprint.c (print_subexp_standard): Handle
13807         OP_F77_UNDETERMINED_ARGLIST.
13808         (dump_subexp_body_standard): Likewise.
13809
13810 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13811
13812         * target-descriptions.c (tdesc_element_visitor) Add empty
13813         implementations.
13814         (tdesc_type): Move make_gdb_type from here.
13815         (tdesc_type_builtin): Likewise.
13816         (tdesc_type_vector): Likewise.
13817         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13818         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13819         (make_gdb_type_union): Likewise.
13820         (make_gdb_type_flags): Likewise.
13821         (make_gdb_type_enum): Likewise.
13822         (make_gdb_type): New function.
13823         (tdesc_register_type): Use static make_gdb_type.
13824
13825 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13826
13827         * infcmd.c (default_print_one_register_info): Align natural-format
13828         column values consistently one under another.
13829         (pad_to_column): New function.
13830
13831 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13832
13833         * dwarf2read.c (dwarf2_physname): Move commment.
13834
13835 2018-02-01  Leszek Swirski  <leszeks@google.com>
13836
13837         * varobj.c (varobj_formatted_print_options): Allow recursive
13838         pretty printing if pretty printing is enabled.
13839
13840 2018-02-01  Leszek Swirski  <leszeks@google.com>
13841
13842         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13843         names after a structop as a filename.
13844
13845 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13846
13847         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13848         (arm_record_coproc_data_proc): Likewise.
13849
13850 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13851
13852         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13853
13854 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13855
13856         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13857         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13858
13859 2018-01-31  Pedro Alves  <palves@redhat.com>
13860
13861         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13862         * inflow.c (child_terminal_save_inferior): Wrap reference to
13863         tcgetpgrp in HAVE_TERMIOS_H.
13864         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13865         _WIN32.
13866         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13867         always iterate over all inferiors.
13868         (gdbsim_cntrl_c): Adjust.
13869         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13870
13871 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13872
13873         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13874         index type is objfile-owned if the element type is as well.
13875
13876 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13877
13878         GDB 8.1 released.
13879
13880 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13881
13882         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13883         "features/s390x-linux64.c".
13884         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13885         s390_linux32 and s390x_linux64.
13886         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13887         default tdesc.
13888         * s390-tdep.c: Include "features/s390-linux32.c" and
13889         "features/s390x-linux64.c".
13890         (s390_tdesc_valid): Add check for tdesc_has_registers.
13891         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13892         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13893         tdesc_s390x_linux64.
13894         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13895         tdesc_s390x_linux64 to...
13896         * s390-tdep.h: ...here.
13897
13898 2018-01-30  Pedro Alves  <palves@redhat.com>
13899
13900         PR gdb/13211
13901         * config.in, configure: Regenerate.
13902         * configure.ac: Check for getpgid.
13903         * go32-nat.c (go32_pass_ctrlc): New.
13904         (go32_target): Install it.
13905         * inf-child.c (inf_child_target): Install
13906         child_terminal_save_inferior, child_pass_ctrlc and
13907         child_interrupt.
13908         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13909         (inf_ptrace_target): No longer install it.
13910         * infcmd.c (interrupt_target_1): Adjust.
13911         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13912         (child_interrupt): Declare.
13913         (inferior::terminal_state): New.
13914         * inflow.c (struct terminal_info): Update comments.
13915         (inferior_process_group): Delete.
13916         (terminal_is_ours): Delete.
13917         (gdb_tty_state): New.
13918         (child_terminal_init): Adjust.
13919         (is_gdb_terminal, sharing_input_terminal_1)
13920         (sharing_input_terminal): New functions.
13921         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13922         Set the process's actual process group in the foreground if
13923         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13924         mark terminal as the inferior's if not sharing GDB's terminal.
13925         Don't check attach_flag.
13926         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13927         pass down a target_terminal_state.
13928         (child_terminal_save_inferior): New, factored out from ...
13929         (child_terminal_ours_1): ... this.  Handle
13930         target_terminal_state::is_ours_for_output.
13931         (child_interrupt, child_pass_ctrlc): New.
13932         (inflow_inferior_exit): Clear the inferior's terminal_state.
13933         (copy_terminal_info): Copy the inferior's terminal state.
13934         (_initialize_inflow): Remove reference to terminal_is_ours.
13935         * inflow.h (inferior_process_group): Delete.
13936         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13937         * procfs.c (procfs_target): Don't install procfs_interrupt.
13938         (procfs_interrupt): Delete.
13939         * remote.c (remote_serial_quit_handler): Adjust.
13940         (remote_interrupt): Remove ptid parameter.  Adjust.
13941         * target-delegates.c: Regenerate.
13942         * target.c: Include "terminal.h".
13943         (target_terminal::terminal_state): Rename to ...
13944         (target_terminal::m_terminal_state): ... this.
13945         (target_terminal::init): Adjust.
13946         (target_terminal::inferior): Adjust to per-inferior
13947         terminal_state.
13948         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13949         (target_terminal::ours, target_terminal::ours_for_output): Use
13950         target_terminal_is_ours_kind.
13951         (target_interrupt): Remove ptid parameter.  Adjust.
13952         (default_target_pass_ctrlc): Adjust.
13953         * target.h (target_ops::to_terminal_save_inferior): New field.
13954         (target_ops::to_interrupt): Remove ptid_t parameter.
13955         (target_interrupt): Remove ptid_t parameter.  Update comment.
13956         (target_pass_ctrlc): Update comment.
13957         * target/target.h (target_terminal_state): New scoped enum,
13958         factored out of ...
13959         (target_terminal::terminal_state): ... here.
13960         (target_terminal::inferior): Update comments.
13961         (target_terminal::restore_inferior): New.
13962         (target_terminal::is_inferior, target_terminal::is_ours)
13963         (target_terminal::is_ours_for_output): Adjust.
13964         (target_terminal::scoped_restore_terminal_state): Adjust to
13965         rename, and call restore_inferior() instead of inferior().
13966         (target_terminal::scoped_restore_terminal_state::m_state): Change
13967         type.
13968         (target_terminal::terminal_state): Rename to ...
13969         (target_terminal::m_terminal_state): ... this and change type.
13970
13971 2018-01-30  Pedro Alves  <palves@redhat.com>
13972
13973         * linux-nat.c (wait_for_signal): New function.
13974         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13975         directly.
13976         (async_terminal_is_ours)
13977         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13978         (linux_nat_add_target): Don't override
13979         to_terminal_inferior/to_terminal_ours.
13980
13981 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13982
13983         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13984
13985 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13986
13987         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13988         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13989         dwarf2_per_objfile_free here.
13990         (dwarf2_per_objfile_free): Remove.
13991         (_initialize_dwarf2_read): Don't register
13992         dwarf2_per_objfile_free as a registry cleanup.
13993
13994 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13995
13996         Avoid compilation errors in MinGW native builds
13997
13998         The error is triggered by including python-internal.h, and the
13999         error message is:
14000
14001              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14002                       from build-gnulib/import/math.h:27,
14003                       from d:/usr/Python26/include/pyport.h:235,
14004                       from d:/usr/Python26/include/Python.h:58,
14005                       from python/python-internal.h:94,
14006                       from python/py-arch.c:24:
14007              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14008         using ::hypot;
14009                 ^~~~~
14010
14011         This happens because Python headers define 'hypot' to expand t
14012         '_hypot' in the Windows builds.
14013         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14014         'hypoth'.  This avoids a compilation error.
14015
14016 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14017
14018         * MAINTAINERS (Write After Approval): Fix ordering.
14019
14020 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14021
14022         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14023
14024 2018-01-26  Alan Modra  <amodra@gmail.com>
14025
14026         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14027         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14028         Remove nop.  Make const.  Comment.
14029         (powerpc32_plt_stub_so_2): New.
14030         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14031         Correct count.  Update uses.
14032         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14033         Move common code reading PLT entry word.  Correct
14034         powerpc32_plt_stub PLT address calculation.
14035         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14036         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14037         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14038         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14039         (ppc64_standard_linkage8): Likewise.
14040         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14041         Correct insns description.
14042         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14043
14044 2018-01-24  Pedro Alves  <palves@redhat.com>
14045
14046         GCC PR libstdc++/83906
14047         * gdbtypes.c (operator==(const dynamic_prop &,
14048         const dynamic_prop &)): New.
14049         (operator==(const range_bounds &, const range_bounds &)): New.
14050         (check_types_equal): Use them instead of memcmp.
14051         * gdbtypes.h (operator==(const dynamic_prop &,
14052         const dynamic_prop &)): Declare.
14053         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14054         (operator==(const range_bounds &, const range_bounds &)): Declare.
14055         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14056
14057 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14058
14059         * s390-linux-tdep.c (s390_record_address_mask)
14060         (s390_record_calc_disp_common, s390_record_calc_disp)
14061         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14062         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14063         (s390_process_record): Move to s390-tdep.c.
14064         (s390_linux_init_abi_any): Adjust.
14065         * s390-tdep.c (s390_record_address_mask)
14066         (s390_record_calc_disp_common, s390_record_calc_disp)
14067         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14068         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14069         (s390_process_record): Moved from s390-linux-tdep.c
14070         (s390_gdbarch_init): Adjust.
14071
14072 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14073
14074         * s390-linux-nat.c (s390-tdep.h): New include.
14075         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14076         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14077         (ALLDEPFILES): Add s390-tdep.c.
14078         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14079         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14080         * s390-tdep.h: ...this.  New file.
14081         * s390-linux-tdep.c (s390-tdep.h): New include.
14082         (_initialize_s390_tdep): Rename to...
14083         (_initialize_s390_linux_tdep): ...this and adjust.
14084         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14085         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14086         s390-tdep.h.
14087         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14088         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14089         (s390_is_partial_instruction, s390_software_single_step)
14090         (is_non_branch_ril, s390_displaced_step_copy_insn)
14091         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14092         (s390_prologue_data, s390_addr, s390_store, s390_load)
14093         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14094         (s390_register_call_saved, s390_guess_tracepoint_registers)
14095         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14096         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14097         (s390_pseudo_register_name, s390_pseudo_register_type)
14098         (s390_pseudo_register_read, s390_pseudo_register_write)
14099         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14100         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14101         (s390_addr_bits_remove, s390_address_class_type_flags)
14102         (s390_address_class_type_flags_to_name)
14103         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14104         (s390_function_arg_float, s390_function_arg_vector)
14105         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14106         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14107         (s390_frame_align, s390_register_return_value, s390_return_value)
14108         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14109         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14110         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14111         (s390_trad_frame_prev_register, s390_unwind_cache)
14112         (s390_prologue_frame_unwind_cache)
14113         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14114         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14115         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14116         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14117         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14118         (s390_frame_base_address, s390_local_base_address)
14119         (s390_frame_base, s390_gcc_target_options)
14120         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14121         (s390_validate_reg_range, s390_tdesc_valid)
14122         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14123         * s390-tdep.c: ...this.  New file.
14124
14125 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14126
14127         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14128         (s390_process_record, s390_gdbarch_tdep_alloc)
14129         (s390_linux_init_abi_any): Use/set new hook.
14130
14131 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14132
14133         * s390-linux-tdep.c (osabi.h): New include.
14134         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14135         (s390_linux_init_abi_any): New functions.
14136         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14137
14138 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14139
14140         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14141         tdesc_has_registers check
14142
14143 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14144
14145         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14146         (s390_validate_reg_range): New macro.
14147         (s390_gdbarch_init): Adjust.
14148
14149 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14150
14151         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14152         (s390_gdbarch_tdep_alloc): Adjust.
14153         (s390_gdbarch_init): Adjust.
14154
14155 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14156
14157         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14158         <have_tdb>: Change type to bool.
14159         (s390_gdbarch_tdep_alloc): Adjust.
14160         (s390_gdbarch_init): Adjust.
14161
14162 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14163
14164         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14165         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14166         (s390_gdbarch_tdep_alloc): New function.
14167         (s390_gdbarch_init): Allocate tdep at start and use its fields
14168         instead of separate variables.
14169
14170 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14171
14172         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14173         when looking for cached gdbarch and add comment for remaining.
14174
14175 2018-01-22  Pedro Alves  <palves@redhat.com>
14176             Sergio Durigan Junior  <sergiodj@redhat.com>
14177
14178         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14179         case.
14180
14181 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14182
14183         * MAINTAINERS: Update my company e-mail address.
14184
14185 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14186
14187         * regcache.c (cooked_write_test): New function.
14188         (_initialize_regcache): Register the test.
14189
14190 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14191
14192         * ia64-tdep.c (ia64_pseudo_register_read): Call
14193         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14194         * m32c-tdep.c (m32c_cat_read): Likewise.
14195         (m32c_r3r2r1r0_read): Likewise.
14196         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14197         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14198
14199 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14200
14201         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14202         method raw_read instead of regcache_raw_read.
14203         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14204         * arm-tdep.c (arm_neon_quad_read): Likewise.
14205         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14206         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14207         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14208         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14209         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14210         (i386_pseudo_register_read_into_value): Likewise.
14211         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14212         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14213         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14214         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14215         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14216         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14217         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14218         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14219         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14220
14221 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14222
14223         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14224         * configure.tgt: Remove target mt.
14225         * mt-tdep.c: Remove.
14226         * regcache.c (cooked_read_test): Remove the check for mt.
14227
14228 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14229
14230         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14231         instead of gdbarch_pseudo_register_read_value.
14232
14233 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14234
14235         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14236         language is Ada.
14237
14238 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14239
14240         * linespec.c (create_sals_line_offset): Remove code that preserved
14241         the symtab_and_line's line number.
14242
14243 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14244
14245         * varobj.c (varobj_create): Don't set valid_block when creating a
14246         floating varobj.
14247
14248 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14249
14250         * varobj.c (varobj_create): Remove out of date comment.
14251
14252 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14253
14254         PR mi/20395
14255         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14256         updating innermost block.
14257         * parse.c (innermost_block_tracker::update): Take extra type
14258         parameter, and check types match before updating innermost block.
14259         (write_dollar_variable): Update innermost block for registers.
14260         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14261         (innermost_block_tracker::innermost_block_tracker): Initialise
14262         m_types member.
14263         (innermost_block_tracker::reset): Take type parameter.
14264         (innermost_block_tracker::update): Take type parameter, and pass
14265         type through as needed.
14266         (innermost_block_tracker::m_types): New member.
14267         * varobj.c (varobj_create): Pass type when reseting innermost
14268         block.
14269
14270 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14271
14272         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14273         * ada-lang.c (resolve_subexp): Likewise.
14274         * breakpoint.c (set_breakpoint_condition) Likewise.
14275         (watch_command_1) Likewise.
14276         * c-exp.y (variable): Likewise.
14277         * d-exp.y (PrimaryExpression): Likewise.
14278         * f-exp.y (variable): Likewise.
14279         * go-exp.y (variable): Likewise.
14280         * m2-exp.y (variable): Likewise.
14281         * objfiles.c (objfile::~objfile): Likewise.
14282         * p-exp.y (variable): Likewise.
14283         * parse.c (innermost_block): Change type.
14284         * parser-defs.h (class innermost_block_tracker): New.
14285         (innermost_block): Change to innermost_block_tracker.
14286         * printcmd.c (display_command): Switch to innermost_block API.
14287         (do_one_display): Likewise.
14288         * rust-exp.y (do_one_display): Likewise.
14289         * symfile.c (clear_symtab_users): Likewise.
14290         * varobj.c (varobj_create): Switch to innermost_block API, replace
14291         use of innermost_block with block stored on varobj object.
14292
14293 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14294
14295         * expression.h (innermost_block): Remove declaration.
14296         * varobj.c: Add 'parser-defs.h' include.
14297
14298 2018-01-19  Tom Tromey  <tom@tromey.com>
14299
14300         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14301         symbols in the static and global blocks.
14302
14303 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14304
14305         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14306         gdb_ptrace.h, and move including gdb_wait.h ...
14307         * nat/linux-ptrace.h: ... to here.
14308
14309 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14310
14311         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14312         inf_ptrace_detach_success.
14313         (inf_ptrace_detach_success): Add inferior parameter, use it
14314         instead of inferior_ptid, pass it to detach_inferior.
14315         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14316         parameter.
14317         * inferior.c (detach_inferior): Add overload that takes an
14318         inferior object.
14319         * inferior.h (detach_inferior): Likewise.
14320         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14321         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14322         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14323
14324 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14325
14326         * target.h (struct target_ops) <to_detach>: Add inferior
14327         parameter.
14328         (target_detach): Likewise.
14329         * target.c (dispose_inferior): Pass inferior down.
14330         (target_detach): Pass inferior down.  Assert that it is equal to
14331         the current inferior.
14332         * aix-thread.c (aix_thread_detach): Pass inferior down.
14333         * corefile.c (core_file_command): Pass current_inferior() down.
14334         * corelow.c (core_detach): Add inferior parameter.
14335         * darwin-nat.c (darwin_detach): Likewise.
14336         * gnu-nat.c (gnu_detach): Likewise.
14337         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14338         * infcmd.c (detach_command): Pass current_inferior() down to
14339         target_detach.
14340         * infrun.c (follow_fork_inferior): Pass parent_inf to
14341         target_detach.
14342         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14343         target_detach.
14344         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14345         * linux-thread-db.c (thread_db_detach): Likewise.
14346         * nto-procfs.c (procfs_detach): Likewise.
14347         * procfs.c (procfs_detach): Likewise.
14348         * record.c (record_detach): Likewise.
14349         * record.h (struct inferior): Forward-declare.
14350         (record_detach): Add inferior parameter.
14351         * remote-sim.c (gdbsim_detach): Likewise.
14352         * remote.c (remote_detach_1): Likewise.
14353         (remote_detach): Likewise.
14354         (extended_remote_detach): Likewise.
14355         * sol-thread.c (sol_thread_detach): Likewise.
14356         * target-debug.h (target_debug_print_inferior_p): New macro.
14357         * target-delegates.c: Re-generate.
14358         * top.c (kill_or_detach): Pass inferior down to target_detach.
14359         * windows-nat.c (windows_detach): Add inferior parameter.
14360
14361 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14362
14363         * target.h (struct target_ops) <to_detach>: Remove args
14364         parameter.
14365         (target_detach): Likewise.
14366         * target.c (dispose_inferior): Adjust.
14367         (target_detach): Remove args parameter, adjust.
14368         * aix-thread.c (aix_thread_detach): Adjust.
14369         * corefile.c (core_file_command): Adjust.
14370         * corelow.c (core_detach): Adjust.
14371         * darwin-nat.c (darwin_detach): Adjust.
14372         * gnu-nat.c (gnu_detach): Adjust.
14373         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14374         * infcmd.c (detach_command): Adjust
14375         * infrun.c (follow_fork_inferior): Adjust.
14376         (handle_vfork_child_exec_or_exit): Adjust.
14377         * linux-fork.c (linux_fork_detach): Remove args parameter.
14378         * linux-fork.h (linux_fork_detach): Likewise.
14379         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14380         * linux-thread-db.c (thread_db_detach): Likewise.
14381         * nto-procfs.c (procfs_detach): Likewise.
14382         * procfs.c (procfs_detach): Likewise.
14383         (do_detach): Remove signo parameter.
14384         * record.c (record_detach): Remove args parameter.
14385         * record.h (record_detach): Likewise.
14386         * remote-sim.c (gdbsim_detach): Likewise.
14387         * remote.c (remote_detach_1): Likewise.
14388         (remote_detach): Likewise.
14389         (extended_remote_detach): Likewise.
14390         * sol-thread.c (sol_thread_detach): Likewise.
14391         * target-delegates.c: Re-generate.
14392         * top.c (struct qt_args) <args>: Remove field.
14393         (kill_or_detach): Don't pass args.
14394         (quit_force): Don't set args.
14395         * windows-nat.c (windows_detach): Remove args parameter.
14396
14397 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14398
14399         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14400         (arm_linux_init_abi): Install it.
14401
14402 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14403
14404         * osabi.c (gdb_osabi_names): Extend the regexp for
14405         arm-linux-gnueabihf.
14406
14407 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14408
14409         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14410         m_abbrevs.
14411         (abbrev_table::add_abbrev): Update.
14412         (abbrev_table::lookup_abbrev): Update.
14413
14414 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14415
14416         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14417
14418 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14419
14420         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14421         to "std::string".
14422
14423 2018-01-17  Tom Tromey  <tom@tromey.com>
14424
14425         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14426
14427 2018-01-17  Tom Tromey  <tom@tromey.com>
14428
14429         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14430         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14431         (create_array_type_with_stride): Update.
14432         * dwarf2read.c (set_die_type): Update.
14433
14434 2018-01-17  Tom Tromey  <tom@tromey.com>
14435
14436         * dwarf2read.c (delayed_method_info): Remove typedef.
14437         (dwarf2_cu::method_info): Now a std::vector.
14438         (add_to_method_list): Update.
14439         (free_delayed_list): Remove.
14440         (compute_delayed_physnames): Update.
14441         (process_full_comp_unit, process_full_type_unit): Clear the method
14442         list.  Remove cleanups.
14443         (psymtab_include_file_name): Add name_holder parameter.  Use
14444         unique_xmalloc_ptr.
14445         (dwarf_decode_lines): Update.
14446
14447 2018-01-17  Tom Tromey  <tom@tromey.com>
14448             Simon Marchi  <simon.marchi@ericsson.com>
14449
14450         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14451         (dwarf2_per_objfile::free_cached_comp_units)
14452         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14453         (init_cutu_and_read_dies_no_follow): Update.
14454         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14455         (dwarf2_cu::~dwarf2_cu): New.
14456         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14457         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14458
14459 2018-01-17  Tom Tromey  <tom@tromey.com>
14460             Simon Marchi  <simon.marchi@ericsson.com>
14461
14462         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14463         (struct die_reader_specs) <abbrev_table>: New member.
14464         (struct abbrev_table): Add constructor.
14465         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14466         <abbrev_obstack>: Now an auto_obstack.
14467         (abbrev_table_up): New typedef.
14468         (init_cu_die_reader): Add abbrev_table parameter.
14469         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14470         Add result_dwo_abbrev_table.
14471         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14472         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14473         Update.
14474         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14475         parameter.
14476         (skip_children): Update.
14477         (abbrev_table::alloc_abbrev): Rename from
14478         abbrev_table_alloc_abbrev.
14479         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14480         (abbrev_table::lookup_abbrev): Rename from
14481         abbrev_table_lookup_abbrev.
14482         (abbrev_table_read_table): Return abbrev_table_up.
14483         (abbrev_table_free, abbrev_table_free_cleanup)
14484         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14485         (load_partial_dies): Update.
14486
14487 2018-01-17  Tom Tromey  <tom@tromey.com>
14488
14489         * dwarf2read.c (dwarf2_compute_name): Update comment.
14490         (read_func_scope, read_variable): Update.
14491         (new_symbol): Remove.
14492         (new_symbol_full): Rename to new_symbol.
14493
14494 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14495
14496         PR gdb/16577
14497         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14498         a warning instead of throwing an error, set section size to 0 and return
14499         NULL.
14500         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14501
14502 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14503
14504         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14505         std::string.
14506         (linux_ptrace_attach_fail_reason_string): Likewise.
14507         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14508         Likewise.
14509         (linux_ptrace_attach_fail_reason_string): Likewise.
14510         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14511
14512 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14513
14514         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14515
14516 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14517
14518         PR gdb/21559
14519         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14520         checking for fs_base/gs_base fields in struct user_regs_struct.
14521         * configure: Regenerate.
14522
14523 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14524
14525         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14526         function.
14527         (aarch64_linux_init_abi): Install it to gdbarch hook
14528         gcc_target_options.
14529
14530 2018-01-15  Pedro Alves  <palves@redhat.com>
14531
14532         * common/signals-state-save-restore.c
14533         (save_original_signals_state): Fix typos.
14534
14535 2017-01-12  Tom Tromey  <tom@tromey.com>
14536             Sergio Durigan Junior  <sergiodj@redhat.com>
14537
14538         * Makefile.in (install-only): Install gdb-add-index.
14539
14540 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14541
14542         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14543
14544 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14545
14546         * infrun.c (keep_going_pass_signal): Clear step-over info when
14547         insert_breakpoints fails.
14548
14549 2018-01-11  Pedro Alves  <palves@redhat.com>
14550
14551         PR gdb/22583
14552         * infrun.c (resume): Rename to ...
14553         (resume_1): ... this.
14554         (resume): Reimplement as wrapper around resume_1.
14555
14556 2018-01-11  Pedro Alves  <palves@redhat.com>
14557
14558         PR remote/22597
14559         * remote.c (remote_parse_stop_reply): Default to the last-set
14560         general thread instead of to 'magic_null_ptid'.
14561
14562 2018-01-10  Pedro Alves  <palves@redhat.com>
14563
14564         * language.h (language_get_symbol_name_matcher): Rename ...
14565         (get_symbol_name_matcher): ... this.
14566         * language.c (language_get_symbol_name_matcher): Ditto.
14567         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14568         callers adjusted.
14569
14570 2018-01-10  Pedro Alves  <palves@redhat.com>
14571
14572         PR gdb/22670
14573         * dwarf2read.c
14574         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14575         Adjust to use language_get_symbol_name_matcher instead of
14576         language_defn::la_get_symbol_name_matcher.
14577         * language.c (language_get_symbol_name_matcher): If in Ada mode
14578         and the lookup name is a verbatim match, return Ada's matcher.
14579         * language.h (language_get_symbol_name_matcher): Adjust comment.
14580         (ada_lookup_name_info::verbatim_p):: New method.
14581
14582 2018-01-10  Pedro Alves  <palves@redhat.com>
14583
14584         PR gdb/22670
14585         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14586         minsym's language is language_auto or language_cplus, pass down
14587         language_ada instead.
14588         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14589
14590 2018-01-10  Pedro Alves  <palves@redhat.com>
14591
14592         PR gdb/22670
14593         * minsyms.c (linkage_name_str): New function.
14594         (iterate_over_minimal_symbols): Use it.
14595
14596 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14597
14598         * NEWS: Document that 'info proc' now works on FreeBSD.
14599
14600 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14601
14602         * configure.ac: Check for kinfo_getfile in libutil.
14603         * configure: Regenerate.
14604         * config.in: Regenerate.
14605         * fbsd-nat.c: Include "fbsd-tdep.h".
14606         (fbsd_fetch_cmdline): New.
14607         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14608         rather than calling error.
14609         (fbsd_info_proc): New.
14610         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14611         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14612         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14613
14614 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14615
14616         * fbsd-nat.c (struct free_deleter): Remove.
14617         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14618
14619 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14620
14621         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14622         NULL for an empty pathname.
14623
14624 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14625
14626         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14627         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14628         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14629         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14630         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14631         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14632         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14633         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14634         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14635         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14636         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14637         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14638         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14639         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14640         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14641
14642 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14643
14644         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14645         (gnu_xfer_auxv): New function.
14646         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14647         TARGET_OBJECT_AUXV.
14648
14649 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14650             Simon Marchi  <simon.marchi@ericsson.com>
14651
14652         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14653         common/selftest.c.
14654         (COMMON_OBS): Remove selftest.o.
14655         * configure.ac: Append selftest-arch.c and common/selftest.c to
14656         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14657         * configure: Re-generated.
14658         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14659         GDB_SELF_TEST.
14660         (maintenance_info_selftests): Likewise.
14661
14662 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14663
14664         * ada-valprint.c (val_print_packed_array_elements): Use
14665         proper number of elements when printing an array indexed
14666         by an enumeration type.
14667
14668 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14669
14670         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14671         (dw2_get_file_names_reader): Adjust.
14672         (lookup_dwo_signatured_type): Adjust.
14673         (lookup_dwp_signatured_type): Adjust.
14674         (lookup_signatured_type): Adjust.
14675         (create_type_unit_group): Adjust.
14676         (get_type_unit_group): Adjust.
14677         (process_psymtab_comp_unit_reader): Adjust.
14678         (build_type_psymtabs_reader): Adjust.
14679         (scan_partial_symbols): Adjust.
14680         (add_partial_symbol): Adjust.
14681         (add_partial_subprogram): Adjust.
14682         (peek_die_abbrev): Adjust.
14683         (fixup_go_packaging): Adjust.
14684         (process_imported_unit_die): Adjust.
14685         (dwarf2_compute_name): Adjust.
14686         (dwarf2_physname): Adjust.
14687         (read_import_statement): Adjust.
14688         (handle_DW_AT_stmt_list): Adjust.
14689         (read_file_scope): Adjust.
14690         (read_func_scope): Adjust.
14691         (read_lexical_block_scope): Adjust.
14692         (read_call_site_scope): Adjust.
14693         (read_variable): Adjust.
14694         (dwarf2_rnglists_process): Adjust.
14695         (dwarf2_ranges_process): Adjust.
14696         (dwarf2_ranges_read): Adjust.
14697         (dwarf2_get_pc_bounds): Adjust.
14698         (dwarf2_record_block_ranges): Adjust.
14699         (dwarf2_add_field): Adjust.
14700         (dwarf2_add_member_fn): Adjust.
14701         (read_structure_type): Adjust.
14702         (process_structure_scope): Adjust.
14703         (read_enumeration_type): Adjust.
14704         (read_array_type): Adjust.
14705         (mark_common_block_symbol_computed): Adjust.
14706         (read_common_block): Adjust.
14707         (read_namespace_type): Adjust.
14708         (read_namespace): Adjust.
14709         (read_module_type): Adjust.
14710         (read_tag_pointer_type): Adjust.
14711         (read_tag_ptr_to_member_type): Adjust.
14712         (read_tag_string_type): Adjust.
14713         (read_subroutine_type): Adjust.
14714         (read_typedef): Adjust.
14715         (read_base_type): Adjust.
14716         (attr_to_dynamic_prop): Adjust.
14717         (read_subrange_type): Adjust.
14718         (read_unspecified_type): Adjust.
14719         (dwarf2_read_abbrevs): Adjust.
14720         (load_partial_dies): Adjust.
14721         (read_partial_die): Adjust.
14722         (find_partial_die): Adjust.
14723         (guess_partial_die_structure_name): Adjust.
14724         (fixup_partial_die): Adjust.
14725         (read_attribute_value): Adjust.
14726         (read_addr_index): Adjust.
14727         (read_addr_index_from_leb128): Adjust.
14728         (read_str_index): Adjust.
14729         (dwarf2_string_attr): Adjust.
14730         (get_debug_line_section): Adjust.
14731         (dwarf_decode_line_header): Adjust.
14732         (lnp_state_machine::check_line_address): Adjust.
14733         (dwarf_decode_lines_1): Adjust.
14734         (dwarf_decode_lines): Adjust.
14735         (dwarf2_start_symtab): Adjust.
14736         (var_decode_location): Adjust.
14737         (new_symbol_full): Adjust.
14738         (dwarf2_const_value_data): Adjust.
14739         (dwarf2_const_value_attr): Adjust.
14740         (dwarf2_const_value): Adjust.
14741         (die_type): Adjust.
14742         (die_containing_type): Adjust.
14743         (build_error_marker_type): Adjust.
14744         (lookup_die_type): Adjust.
14745         (guess_full_die_structure_name): Adjust.
14746         (anonymous_struct_prefix): Adjust.
14747         (determine_prefix): Adjust.
14748         (dwarf2_name): Adjust.
14749         (follow_die_ref_or_sig): Adjust.
14750         (follow_die_offset): Adjust.
14751         (follow_die_ref): Adjust.
14752         (follow_die_sig_1): Adjust.
14753         (follow_die_sig): Adjust.
14754         (get_signatured_type): Adjust.
14755         (get_DW_AT_signature_type): Adjust.
14756         (decode_locdesc): Adjust.
14757         (dwarf_decode_macros): Adjust.
14758         (cu_debug_loc_section): Adjust.
14759         (fill_in_loclist_baton): Adjust.
14760         (dwarf2_symbol_mark_computed): Adjust.
14761         (init_one_comp_unit): Don't assign
14762         dwarf2_cu::dwarf2_per_objfile.
14763         (set_die_type): Adjust.
14764
14765 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14766
14767         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14768         <dwarf2_per_objfile>: New field.
14769         (dwarf2_per_objfile): Remove global.
14770         (get_dwarf2_per_objfile): New function.
14771         (set_dwarf2_per_objfile): New function.
14772         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14773         dwarf2_per_objfile.
14774         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14775         (read_abbrev_offset): Likewise.
14776         (read_indirect_string): Likewise.
14777         (read_indirect_line_string): Likewise.
14778         (read_indirect_string_at_offset): Likewise.
14779         (read_indirect_string_from_dwz): Likewise.
14780         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14781         dwarf2_per_objfile.
14782         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14783         (create_all_comp_units): Change objfile parameter to
14784         dwarf2_per_objfile.
14785         (create_all_type_units): Likewise.
14786         (process_queue): Add dwarf2_per_objfile parameter.
14787         (read_and_check_comp_unit_head): Likewise.
14788         (lookup_dwo_unit_in_dwp): Likewise.
14789         (get_dwp_file): Likewise.
14790         (process_cu_includes): Likewise.
14791         (struct free_dwo_file_cleanup_data): New struct.
14792         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14793         set_dwarf2_per_objfile.
14794         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14795         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14796         context, adjust calls.
14797         (dw2_instantiate_symtab): Likewise.
14798         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14799         (dw2_get_cu): Likewise.
14800         (create_cu_from_index_list): Change objfile parameter to
14801         dwarf2_per_objfile.
14802         (create_cus_from_index_list): Get dwarf2_per_objfile from
14803         context, adjust calls.
14804         (create_cus_from_index): Likewise.
14805         (create_signatured_type_table_from_index): Change objfile
14806         parameter to dwarf2_per_objfile.
14807         (create_signatured_type_table_from_debug_names): Change objfile
14808         parameter to dwarf2_per_objfile.
14809         (create_addrmap_from_index): Likewise.
14810         (create_addrmap_from_aranges): Likewise.
14811         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14812         (dw2_setup): Remove.
14813         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14814         context.
14815         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14816         get_dwarf2_per_objfile.
14817         (dw2_forget_cached_source_info): Likewise.
14818         (dw2_map_symtabs_matching_filename): Likewise.
14819         (struct dw2_symtab_iterator) <index>: Remove.
14820         <dwarf2_per_objfile>: New field.
14821         (dw2_symtab_iter_init): Replace index parameter with
14822         dwarf2_per_objfile.
14823         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14824         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14825         (dw2_print_stats): Likewise.
14826         (dw2_dump): Likewise.
14827         (dw2_expand_symtabs_for_function): Likewise.
14828         (dw2_expand_all_symtabs): Likewise.
14829         (dw2_expand_symtabs_with_fullname): Likewise.
14830         (dw2_expand_marked_cus): Replace index and objfile parameters
14831         with dwarf2_per_objfile.
14832         (dw_expand_symtabs_matching_file_matcher): Add
14833         dwarf2_per_objfile parameter and adjust calls.
14834         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14835         adjust calls.
14836         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14837         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14838         adjust calls.
14839         (create_cus_from_debug_names_list): Replace objfile parameter
14840         with dwarf2_per_objfile and adjust calls.
14841         (create_cus_from_debug_names): Likewise.
14842         (dwarf2_read_debug_names): Likewise.
14843         (mapped_debug_names::namei_to_name): Adjust call.
14844         (dw2_debug_names_iterator::next): Likewise.
14845         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14846         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14847         (dw2_debug_names_dump): Likewise.
14848         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14849         (dw2_debug_names_expand_symtabs_matching): Likewise.
14850         (dwarf2_initialize_objfile): Likewise.
14851         (dwarf2_build_psymtabs): Likewise.
14852         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14853         this_cu.
14854         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14855         (read_and_check_comp_unit_head): Likewise.
14856         (read_abbrev_offset): Likewise.
14857         (create_debug_type_hash_table): Likewise.
14858         (create_debug_types_hash_table): Likewise.
14859         (create_all_type_units): Replace objfile parameter with
14860         dwarf2_per_objfile.
14861         (add_type_unit): Add dwarf2_per_objfile parameter.
14862         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14863         with dwarf2_per_objfile.
14864         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14865         (lookup_dwp_signatured_type): Likewise.
14866         (lookup_signatured_type): Likewise.
14867         (read_cutu_die_from_dwo): Likewise.
14868         (init_tu_and_read_dwo_dies): Likewise.
14869         (init_cutu_and_read_dies): Likewise.
14870         (init_cutu_and_read_dies_no_follow): Likewise.
14871         (allocate_type_unit_groups_table): Add objfile parameter.
14872         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14873         (get_type_unit_group): Likewise.
14874         (process_psymtab_comp_unit): Update call.
14875         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14876         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14877         (print_tu_stats): Likewise.
14878         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14879         in void* parameter.
14880         (build_type_psymtabs): Change objfile parameter to
14881         dwarf2_per_objfile.
14882         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14883         passed in void* parameter.
14884         (process_skeletonless_type_units): Change objfile parameter to
14885         dwarf2_per_objfile.
14886         (set_partial_user): Likewise.
14887         (dwarf2_build_psymtabs_hard): Likewise.
14888         (read_comp_units_from_section): Likewise.
14889         (create_all_comp_units): Likewise.
14890         (scan_partial_symbols): Update calls.
14891         (add_partial_symbol): Likewise.
14892         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14893         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14894         (process_queue): Add dwarf2_per_objfile parameter.
14895         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14896         (compute_compunit_symtab_includes): Likewise.
14897         (process_cu_includes): Add dwarf2_per_objfile parameter.
14898         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14899         (process_full_type_unit): Likewise.
14900         (process_imported_unit_die): Update call.
14901         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14902         (read_file_scope): Likewise.
14903         (allocate_dwo_file_hash_table): Add objfile parameter.
14904         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14905         (create_cus_hash_table): Likewise.
14906         (create_dwp_hash_table): Likewise.
14907         (create_dwo_unit_in_dwp_v1): Likewise.
14908         (create_dwp_v2_section): Likewise.
14909         (create_dwo_unit_in_dwp_v2): Likewise.
14910         (lookup_dwo_unit_in_dwp): Likewise.
14911         (try_open_dwop_file): Likewise.
14912         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14913         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14914         cleanup to include a reference to dwarf2_per_objfile.
14915         (open_dwp_file): Add dwarf2_per_objfile parameter.
14916         (open_and_init_dwp_file): Likewise.
14917         (get_dwp_file): Likewise.
14918         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14919         (queue_and_load_all_dwo_tus): Update call.
14920         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14921         data.
14922         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14923         (dwarf2_ranges_process): Likewise.
14924         (dwarf2_get_pc_bounds): Likewise.
14925         (mark_common_block_symbol_computed): Likewise.
14926         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14927         (dwarf2_read_abbrevs): Update call.
14928         (read_partial_die): Use dwarf2_per_objfile from cu.
14929         (find_partial_die): Likewise.
14930         (fixup_partial_die): Likewise.
14931         (read_attribute_value): Likewise.
14932         (read_indirect_string_at_offset_from): Add objfile parameter.
14933         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14934         parameter.
14935         (read_indirect_string_from_dwz): Add objfile parameter.
14936         (read_indirect_string): Add objfile parameter.
14937         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14938         (read_addr_index): Use dwarf2_per_objfile from cu.
14939         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14940         call dw2_setup.
14941         (read_str_index): Use dwarf2_per_objfile from cu.
14942         (get_debug_line_section): Likewise.
14943         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14944         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14945         (new_symbol_full): Use dwarf2_per_objfile from cu.
14946         (build_error_marker_type): Likewise.
14947         (lookup_die_type): Likewise.
14948         (determine_prefix): Likewise.
14949         (follow_die_offset): Likewise.
14950         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14951         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14952         (dwarf2_fetch_die_type_sect_off): Likewise.
14953         (dwarf2_get_die_type): Likewise.
14954         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14955         (get_signatured_type): Likewise.
14956         (get_DW_AT_signature_type): Likewise.
14957         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14958         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14959         (cu_debug_loc_section): Likewise.
14960         (fill_in_loclist_baton): Likewise.
14961         (dwarf2_symbol_mark_computed): Likewise.
14962         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14963         dwarf2_per_objfile.
14964         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14965         parameter.
14966         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14967         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14968         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14969         (set_die_type): Use dwarf2_free_objfile from cu.
14970         (get_die_type_at_offset): Likewise.
14971         (dwarf2_per_objfile_free): Don't assign global variable.
14972         (debug_names) <constructor>: Add dwarf2_per_objfile
14973         parameter, update m_debugstrlookup construction.
14974         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14975         parameter.
14976         <m_dwarf2_per_objfile>: New field.
14977         <lookup>: Use m_dwarf2_per_objfile.
14978         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14979         (psyms_seen_size): Likewise.
14980         (write_gdbindex): Replace objfile parameter with
14981         dwarf2_per_objfile.
14982         (write_debug_names): Likewise.
14983         (write_psymtabs_to_index): Likewise.
14984         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14985         calls.
14986
14987 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14988
14989         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14990         <dwarf2_per_objfile>: New field.
14991         (struct dwarf2_per_cu_data) <objfile>: Remove.
14992         <dwarf2_per_objfile>: New field.
14993         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14994         of objfile.
14995         (create_signatured_type_table_from_index): Likewise.
14996         (create_debug_type_hash_table): Likewise.
14997         (fill_in_sig_entry_from_dwo_entry): Likewise.
14998         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14999         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15000         objfile.
15001         (create_partial_symtab): Access objfile through
15002         dwarf2_per_objfile.
15003         (process_psymtab_comp_unit_reader): Likewise.
15004         (read_comp_units_from_section): Likewise.
15005         (scan_partial_symbols): Likewise.
15006         (add_partial_symbol): Likewise.
15007         (add_partial_subprogram): Likewise.
15008         (peek_die_abbrev): Likewise.
15009         (fixup_go_packaging): Likewise.
15010         (process_full_comp_unit): Likewise.
15011         (process_full_type_unit): Likewise.
15012         (process_imported_unit_die): Likewise.
15013         (dwarf2_compute_name): Likewise.
15014         (dwarf2_physname): Likewise.
15015         (read_import_statement): Likewise.
15016         (create_cus_hash_table): Assign dwarf2_physname instead of
15017         objfile.
15018         (read_func_scope): Access objfile through dwarf2_per_objfile.
15019         (read_lexical_block_scope): Likewise.
15020         (read_call_site_scope): Likewise.
15021         (read_variable): Likewise.
15022         (dwarf2_rnglists_process): Likewise.
15023         (dwarf2_ranges_process): Likewise.
15024         (dwarf2_ranges_read): Likewise.
15025         (dwarf2_record_block_ranges): Likewise.
15026         (dwarf2_add_field): Likewise.
15027         (dwarf2_add_member_fn): Likewise.
15028         (read_structure_type): Likewise.
15029         (process_structure_scope): Likewise.
15030         (read_enumeration_type): Likewise.
15031         (read_array_type): Likewise.
15032         (read_common_block): Likewise.
15033         (read_namespace_type): Likewise.
15034         (read_namespace): Likewise.
15035         (read_module_type): Likewise.
15036         (read_tag_pointer_type): Likewise.
15037         (read_tag_ptr_to_member_type): Likewise.
15038         (read_tag_string_type): Likewise.
15039         (read_subroutine_type): Likewise.
15040         (read_typedef): Likewise.
15041         (read_base_type): Likewise.
15042         (attr_to_dynamic_prop): Likewise.
15043         (read_subrange_type): Likewise.
15044         (read_unspecified_type): Likewise.
15045         (load_partial_dies): Likewise.
15046         (read_partial_die): Likewise.
15047         (find_partial_die): Likewise.
15048         (guess_partial_die_structure_name): Likewise.
15049         (fixup_partial_die): Likewise.
15050         (read_attribute_value): Likewise.
15051         (read_addr_index_from_leb128): Likewise.
15052         (dwarf2_read_addr_index): Likewise.
15053         (dwarf2_string_attr): Likewise.
15054         (lnp_state_machine::check_line_address): Likewise.
15055         (dwarf_decode_lines_1): Likewise.
15056         (dwarf_decode_lines): Likewise.
15057         (dwarf2_start_symtab): Likewise.
15058         (var_decode_location): Likewise.
15059         (new_symbol_full): Likewise.
15060         (dwarf2_const_value_data): Likewise.
15061         (dwarf2_const_value_attr): Likewise.
15062         (dwarf2_const_value): Likewise.
15063         (die_type): Likewise.
15064         (die_containing_type): Likewise.
15065         (lookup_die_type): Likewise.
15066         (guess_full_die_structure_name): Likewise.
15067         (anonymous_struct_prefix): Likewise.
15068         (dwarf2_name): Likewise.
15069         (follow_die_ref_or_sig): Likewise.
15070         (follow_die_offset): Likewise.
15071         (follow_die_ref): Likewise.
15072         (dwarf2_fetch_die_loc_sect_off): Likewise.
15073         (dwarf2_fetch_constant_bytes): Likewise.
15074         (dwarf2_fetch_die_type_sect_off): Likewise.
15075         (dwarf2_get_die_type): Likewise.
15076         (follow_die_sig): Likewise.
15077         (decode_locdesc): Likewise.
15078         (dwarf2_per_cu_objfile): Likewise.
15079         (dwarf2_per_cu_text_offset): Likewise.
15080         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15081         objfile.
15082         (set_die_type): Access objfile through
15083         dwarf2_per_objfile.
15084
15085 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15086
15087         * valprint.c (converted_character_d): Remove typedef.
15088         (DEF_VEC_O (converted_character_d)): Remove.
15089         (count_next_character): Use std::vector.
15090         (print_converted_chars_to_obstack): Likewise.
15091         (generic_printstr): Likewise.
15092
15093 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15094
15095         * xml-support.h (struct gdb_xml_value): Add constructor.
15096         <value>: Change type to unique_xmalloc_ptr.
15097         (gdb_xml_value_s): Remove typedef.
15098         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15099         (gdb_xml_element_start_handler): Change parameter type to
15100         std::vector.
15101         (xml_find_attribute): Likewise.
15102         * xml-support.c (xml_find_attribute): Change parameter type to
15103         std::vector and adjust.
15104         (gdb_xml_values_cleanup): Remove.
15105         (gdb_xml_parser::start_element): Adjust to std::vector.
15106         (xinclude_start_include): Change paraeter type to std::vector
15107         and adjust.
15108         * btrace.c (check_xml_btrace_version): Likewise.
15109         (parse_xml_btrace_block): Likewise.
15110         (parse_xml_btrace_pt_config_cpu): Likewise.
15111         (parse_xml_btrace_pt): Likewise.
15112         (parse_xml_btrace_conf_bts): Likewise.
15113         (parse_xml_btrace_conf_pt): Likewise.
15114         * memory-map.c (memory_map_start_memory): Likewise.
15115         (memory_map_start_property): Likewise.
15116         * osdata.c (osdata_start_osdata): Likewise.
15117         (osdata_start_item): Likewise.
15118         (osdata_start_column): Likewise.
15119         * remote.c (start_thread): Likewise.
15120         * solib-aix.c (library_list_start_library): Likewise.
15121         (library_list_start_list): Likewise.
15122         * solib-svr4.c (library_list_start_library): Likewise.
15123         (svr4_library_list_start_list): Likewise.
15124         * solib-target.c (library_list_start_segment): Likewise.
15125         (library_list_start_section): Likewise.
15126         (library_list_start_library): Likewise.
15127         (library_list_start_list): Likewise.
15128         * tracepoint.c (traceframe_info_start_memory): Likewise.
15129         (traceframe_info_start_tvar): Likewise.
15130         * xml-syscall.c (syscall_start_syscall): Likewise.
15131         * xml-tdesc.c (tdesc_start_target): Likewise.
15132         (tdesc_start_feature): Likewise.
15133         (tdesc_start_reg): Likewise.
15134         (tdesc_start_union): Likewise.
15135         (tdesc_start_struct): Likewise.
15136         (tdesc_start_flags): Likewise.
15137         (tdesc_start_enum): Likewise.
15138         (tdesc_start_field): Likewise.
15139         (tdesc_start_enum_value): Likewise.
15140         (tdesc_start_vector): Likewise.
15141
15142 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15143
15144         * extension.h (struct xmethod_worker) <clone>: Remove.
15145         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15146         Remove.
15147         (python_xmethod_worker::clone): Remove.
15148         * valops.c (find_overload_match): Use std::move instead of
15149         clone.
15150
15151 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15152
15153         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15154         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15155         <free_xmethod_worker_data>: Remove.
15156         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15157         <get_xmethod_arg_types>: Remove.
15158         <get_xmethod_result_type>: Remove.
15159         <invoke_xmethod>: Remove.
15160         * extension.c (new_xmethod_worker): Remove.
15161         (clone_xmethod_worker): Remove.
15162         (get_matching_xmethod_workers): Return void, pass std::vector by
15163         pointer.
15164         (get_xmethod_arg_types): Rename to...
15165         (xmethod_worker::get_arg_types): ... this, and adjust.
15166         (get_xmethod_result_type): Rename to...
15167         (xmethod_worker::get_result_type): ... this, and adjust.
15168         (invoke_xmethod): Remove.
15169         (free_xmethod_worker): Remove.
15170         (free_xmethod_worker_vec): Remove.
15171         * extension.h (enum ext_lang_rc): Move here from
15172         extension-priv.h.
15173         (struct xmethod_worker): Add constructor and destructor.
15174         <data>: Remove.
15175         <value>: Remove.
15176         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15177         virtual pure methods.
15178         <get_arg_types, get_result_type>: New methods.
15179         (xmethod_worker_ptr): Remove typedef.
15180         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15181         (xmethod_worker_vec): Remove typedef.
15182         (xmethod_worker_up): New typedef.
15183         (invoke_xmethod): Remove.
15184         (clone_xmethod_worker): Remove.
15185         (free_xmethod_worker): Remove.
15186         (free_xmethod_worker_vec): Remove.
15187         (get_xmethod_arg_types): Remove.
15188         (get_xmethod_result_type): Remove.
15189         * valops.c (find_method_list): Use std::vector, don't use
15190         intermediate vector.
15191         (value_find_oload_method_list): Use std::vector.
15192         (find_overload_match): Use std::vector.
15193         (find_oload_champ): Use std::vector.
15194         * value.c (value_free): Use operator delete.
15195         (value_of_xmethod): Rename to...
15196         (value_from_xmethod): ... this.  Don't assign
15197         xmethod_worker::value, take rvalue-reference.
15198         (result_type_of_xmethod): Adjust.
15199         (call_xmethod): Adjust.
15200         * value.h: Include extension.h.
15201         (struct xmethod_worker): Don't forward-declare.
15202         (value_of_xmethod): Rename to...
15203         (value_from_xmethod): ... this, take rvalue-reference.
15204         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15205         (struct python_xmethod_worker): ... this, add constructor and
15206         destructor.
15207         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15208         (gdbpy_free_xmethod_worker_data): Rename to...
15209         (python_xmethod_worker::~python_xmethod_worker): ... this and
15210         adjust.
15211         (gdbpy_clone_xmethod_worker_data): Rename to...
15212         (python_xmethod_worker::clone): ... this and adjust.
15213         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15214         temporary vector.
15215         (gdbpy_get_xmethod_arg_types): Rename to...
15216         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15217         (gdbpy_get_xmethod_result_type): Rename to...
15218         (python_xmethod_worker::do_get_result_type): ... this and
15219         adjust.
15220         (gdbpy_invoke_xmethod): Rename to...
15221         (python_xmethod_worker::invoke): ... this and adjust.
15222         (new_python_xmethod_worker): Rename to...
15223         (python_xmethod_worker::python_xmethod_worker): ... this and
15224         adjust.
15225         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15226         Remove.
15227         (gdbpy_free_xmethod_worker_data): Remove.
15228         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15229         (gdbpy_get_xmethod_arg_types): Remove.
15230         (gdbpy_get_xmethod_result_type): Remove.
15231         (gdbpy_invoke_xmethod): Remove.
15232         * python/python.c (python_extension_ops): Remove obsolete
15233         callbacks.
15234
15235 2018-01-05  Pedro Alves  <palves@redhat.com>
15236
15237         PR gdb/18653
15238         * common/signals-state-save-restore.c
15239         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15240         find a custom handler preinstalled, instead of internal erroring.
15241         But only warn if !quiet.
15242         * common/signals-state-save-restore.h
15243         (save_original_signals_state): New parameter 'quiet'.
15244         * main.c (captured_main_1): Move save_original_signals_state call
15245         after option handling, and pass QUIET.
15246
15247 2018-01-05  Pedro Alves  <palves@redhat.com>
15248
15249         * spu-tdep.c (spu_catch_start): Pass
15250         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15251
15252 2018-01-05  Pedro Alves  <palves@redhat.com>
15253
15254         PR gdb/22670
15255         * ada-lang.c (literal_symbol_name_matcher): New function.
15256         (ada_get_symbol_name_matcher): Use it for
15257         symbol_name_match_type::SEARCH_NAME.
15258         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15259         it down instead of assuming symbol_name_match_type::FULL.
15260         * block.h (block_lookup_symbol): New parameter 'match_type'.
15261         * c-valprint.c (print_unpacked_pointer): Use
15262         lookup_symbol_search_name instead of lookup_symbol.
15263         * compile/compile-object-load.c (get_out_value_type): Pass down
15264         symbol_name_match_type::SEARCH_NAME.
15265         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15266         symbol_name_match_type::FULL.
15267         * cp-support.c (cp_get_symbol_name_matcher): Handle
15268         symbol_name_match_type::SEARCH_NAME.
15269         * infrun.c (insert_exception_resume_breakpoint): Use
15270         lookup_symbol_search_name.
15271         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15272         * psymtab.c (maintenance_check_psymtabs): Use
15273         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15274         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15275         SYMBOL_SEARCH_NAME.
15276         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15277         if symbol_name_match_type::SEARCH_NAME.
15278         (lookup_symbol_in_language): Pass down
15279         symbol_name_match_type::FULL.
15280         (lookup_symbol_search_name): New.
15281         (lookup_language_this): Pass down
15282         symbol_name_match_type::SEARCH_NAME.
15283         (lookup_symbol_aux, lookup_local_symbol): New parameter
15284         'match_type'.  Pass it down.
15285         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15286         (lookup_symbol_search_name): New declaration.
15287         (lookup_symbol_in_block): New 'match_type' parameter.
15288
15289 2018-01-05  Pedro Alves  <palves@redhat.com>
15290
15291         PR gdb/22670
15292         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15293         ada_lookup_symbol.
15294         (ada_lookup_symbol): Reimplement in terms of
15295         ada_lookup_symbol_list, bits factored out from
15296         ada_lookup_encoded_symbol.
15297
15298 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15299
15300         * ada-exp.y (write_object_renaming): When subscripting an array
15301         using a symbol as the index, pass the block in call to
15302         ada_lookup_encoded_symbol when looking that symbol up.
15303
15304 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15305
15306         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15307         TYPE_INDEX_TYPE.
15308
15309 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15310
15311         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15312         the case where VALUE_LVAL (val0) is not lval_memory.
15313
15314 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15315
15316         * ada-valprint.c (print_optional_low_bound): Handle
15317         character-indexed array printing like boolean-indexed array
15318         printing.
15319
15320 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15321
15322         * NEWS: Create a new section for the next release branch.
15323         Rename the section of the current branch, now that it has
15324         been cut.
15325
15326 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15327
15328         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15329         * version.in: Bump version to 8.1.50.DATE-git.
15330
15331 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15332
15333         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15334         Add field.
15335         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15336         Add field.
15337         (default_exception_support_info) <catch_handlers_sym>: Add field.
15338         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15339         (ada_exception_name_addr_1): Add "catch handlers" handling.
15340         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15341         Update all callers.
15342         (create_excep_cond_exprs) <ex>: Add parameter.
15343         (re_set_exception): Update create_excep_cond_exprs call.
15344         (print_it_exception, print_one_exception, print_mention_exception)
15345         (print_recreate_exception): Add "catch handler" handling.
15346         (allocate_location_catch_handlers, re_set_catch_handlers)
15347         (check_status_catch_handlers, print_it_catch_handlers)
15348         (print_one_catch_handlers, print_mention_catch_handlers)
15349         (print_recreate_catch_handlers): New function.
15350         (catch_handlers_breakpoint_ops): New variable.
15351         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15352         Add parameter.  Add "catch handler" handling.
15353         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15354         Add "catch handler" handling.
15355         (ada_exception_catchpoint_cond_string): Add "catch handler"
15356         handling.
15357         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15358         call.
15359         (catch_ada_handlers_command): New function.
15360         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15361         operations structure.
15362         (_initialize_ada_language): Add "catch handlers" command entry.
15363         * NEWS: Document "catch handlers" feature.
15364
15365 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15366
15367         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15368         account when creating the array type of the slice.
15369         (ada_value_slice): Likewise.
15370
15371 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15372
15373         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15374         New enum value.
15375         (create_array_type_with_stride): Add byte_stride_prop parameter.
15376         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15377         New parameter.  Update all callers in this file.
15378         (array_type_has_dynamic_stride): New function.
15379         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15380         of arrays with dynamic byte strides.
15381         * dwarf2read.c (read_array_type): Add support for dynamic
15382         DW_AT_byte_stride attributes.
15383
15384 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15385
15386         * dwarf2read.c (read_unspecified_type): Treat
15387         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15388
15389 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15390
15391         Update copyright year range in all GDB files.
15392
15393 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15394
15395         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15396         and gdb/testsuite/gdb.base/step-line.c.
15397
15398 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15399
15400         * copyright.py (main): Dump the contents of
15401         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15402         even if BY_HAND is empty.
15403
15404 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15405
15406         * top.c (print_gdb_version): Update Copyright year in version
15407         message.
15408
15409 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15410
15411         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15412
15413 For older changes see ChangeLog-2017.
15414 \f
15415 Local Variables:
15416 mode: change-log
15417 left-margin: 8
15418 fill-column: 74
15419 version-control: never
15420 coding: utf-8
15421 End: