arm-pikeos: software single step
[external/binutils.git] / gdb / ChangeLog
1 2018-11-01  Jerome Guitton  <guitton@adacore.com>
2             Joel Brobecker  <brobecker@adacore.com>
3
4         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
5         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
6         * arm-pikeos-tdep.c: New file.
7         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
8         embedded system.
9         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
10
11 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
12
13         * common/pathstuff.c (get_standard_temp_dir): New.
14         * common/pathstuff.h (get_standard_temp_dir): New.
15         * config.in: Re-generate.
16         * configure: Re-generate.
17         * configure.ac: Don't check for mkdtemp.
18         * gnulib/aclocal-m4-deps.mk: Re-generate.
19         * gnulib/aclocal.m4: Re-generate.
20         * gnulib/config.in: Re-generate.
21         * gnulib/configure: Re-generate.
22         * gnulib/import/Makefile.am: Re-generate.
23         * gnulib/import/Makefile.in: Re-generate.
24         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
25         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
26         * gnulib/import/m4/mkdtemp.m4: New file.
27         * gnulib/import/mkdtemp.c: New file.
28         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
29         Add mkdtemp module.
30         * unittests/mkdir-recursive-selftests.c (test): Use
31         get_standard_temp_dir.
32         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
33         ifdef.
34         * compile/compile.c (get_compile_file_tempdir): Likewise.
35
36 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
37
38         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
39         (SIG_FRAME_LR_OFFSET64): New define.
40         (SIG_FRAME_FP_OFFSET64): New define.
41         (aix_sighandle_frame_cache): New Function.
42         (aix_sighandle_frame_this_id): New Function.
43         (aix_sighandle_frame_prev_register): New Function.
44         (aix_sighandle_frame_sniffer): New Function.
45         (aix_sighandle_frame_unwind): New global variable.
46         (rs6000_aix_init_osabi): Install new frame unwinder.
47
48 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
49
50         PR gdb/23835
51         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
52         already defined.
53
54 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
55
56         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
57
58 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
59
60         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
61         (producer_is_icc): New function.
62         (check_producer): Set producer_is_icc field on dwarf2_cu.
63         (dwarf2_init_integer_type): New function.
64         (read_base_type): Call dwarf2_init_integer_type instead of
65         init_integer_type in all cases.
66         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
67         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
68         LEN is greater than 0.
69
70 2018-10-30  Tom Tromey  <tom@tromey.com>
71
72         * main.c (captured_main_1): Check return value of bfd_init.
73
74 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
75
76         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
77         Adjust comments.
78
79 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
80
81         * procfs.c: Include common/pathstuff.h.
82
83 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
84
85         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
86         Add missing braces.  No functional change.
87
88 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
89
90         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
91         to report a bad option and fix indentation.
92         * demangle.c (demangle_command): Use report_unrecognized_option_error
93         to report a bad option and correctly report the bad option.
94
95 2018-10-27  Tom Tromey  <tom@tromey.com>
96
97         PR cli/23364:
98         * darwin-nat.c (copied_shell): New global.
99         (may_have_sip): Rename from should_disable_startup_with_shell.
100         (copy_shell_to_cache, maybe_cache_shell): New functions.
101         (darwin_nat_target::create_inferior): Update.  Use
102         copied_shell.
103
104 2018-10-27  Tom Tromey  <tom@tromey.com>
105
106         * unittests/scoped_fd-selftests.c (test_to_file): New function.
107         (run_tests): Call test_to_file.
108         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
109         temporary files.
110         * common/scoped_fd.h (scoped_fd::to_file): New method.
111
112 2018-10-27  Tom Tromey  <tom@tromey.com>
113
114         * unittests/scoped_mmap-selftests.c (test_normal): Use
115         gdb_mkostemp_cloexec.
116         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
117         Use gdb_mkostemp_cloexec.
118         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
119         gnulib/config.in, gnulib/configure,
120         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
121         gnulib/import/m4/gnulib-cache.m4,
122         gnulib/import/m4/gnulib-comp.m4: Update.
123         * gnulib/import/m4/mkostemp.m4: New file.
124         * gnulib/import/m4/mkstemp.m4: Remove.
125         * gnulib/import/mkostemp.c: New file.
126         * gnulib/import/mkstemp.m4: Remove.
127         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
128         mkstemp, add mkostemp.  Apply new patch.
129         * gnulib/import/stdlib.in.h: Apply patch.
130         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
131         New file.
132         * dwarf-index-write.c (write_psymtabs_to_index): Use
133         gdb_mkostemp_cloexec.
134         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
135
136 2018-10-27  Tom Tromey  <tom@tromey.com>
137
138         * unittests/mkdir-recursive-selftests.c: New file.
139         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
140         unittests/mkdir-recursive-selftests.c.
141         * dwarf-index-cache.c (mkdir_recursive): Move to
142         common/filestuff.c.
143         (index_cache::store): Check return value of mkdir_recursive.
144         (create_dir_and_check, test_mkdir_recursive): Move to new file.
145         (_initialize_index_cache): Don't register test.
146         * common/filestuff.h (mkdir_recursive): Declare.
147         * common/filestuff.c (mkdir_recursive): Move from
148         dwarf-index-cache.c.  Return bool.
149
150 2018-10-27  Tom Tromey  <tom@tromey.com>
151
152         * dwarf-index-write.c (write_psymtabs_to_index): Move
153         make_temp_filename to common/pathstuff.c.
154         * common/pathstuff.h (make_temp_filename): Declare.
155         * common/pathstuff.c (make_temp_filename): New function, moved
156         from dwarf-index-write.c.
157
158 2018-10-27  Tom Tromey  <tom@tromey.com>
159
160         * procfs.c (procfs_target::create_inferior): Use get_shell.
161         * cli/cli-cmds.c (shell_escape): Use get_shell.
162         * windows-nat.c (windows_nat_target::create_inferior): Use
163         get_shell.
164         * common/pathstuff.c (get_shell): New function.
165         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
166         (fork_inferior): Use get_shell.
167         * common/pathstuff.h (get_shell): Declare.
168
169 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
170
171         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
172
173 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
174
175         * stack.c (print_variable_and_value_data): Add preg and treg.
176         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
177         and update callers.
178         (print_frame_arg_vars): Likewise.
179         (prepare_reg): New function.
180         (info_locals_command): Extract info print args and use them.
181         (info_args_command): Likewise.
182         (_initialize_stack): Modify on-line help.
183         * symtab.c (treg_matches_sym_type_name): New function.
184         (search_symbols): New arg t_regexp.
185         (symtab_symbol_info): New args quiet, regexp, t_regexp.
186         (info_variables_command): Extract info print args and use them.
187         (info_functions_command): Likewise.
188         (info_types_command): Update call to symtab_symbol_info.
189         (_initialize_symtab): Modify on-line help.
190         * symtab.h (treg_matches_sym_type_name): New function.
191         (search_symbols): New t_regexp arg.
192
193 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
194
195         * cli-utils.c (extract_arg_maybe_quoted): New function.
196         (extract_info_print_args): New function.
197         (info_print_args_help): New function.
198         (report_unrecognized_option_error): New function.
199         * cli-utils.h (extract_arg_maybe_quoted): New function.
200         (extract_info_print_args): New function.
201         (info_print_args_help): New function.
202         (report_unrecognized_option_error): New function.
203
204 2018-10-26  Tom Tromey  <tom@tromey.com>
205
206         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
207         (compute_compunit_symtab_includes): Update.
208         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
209         (compunit_symtab_ptr): Likewise.
210
211 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
212
213         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
214         default_print_auxv_entry for specific tag values.
215
216 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
217
218         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
219
220 2018-10-26  Jim Wilson  <jimw@sifive.com>
221
222         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
223         (riscv_linux_sigframe_init): Declare.
224         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
225         (riscv_linux_sigframe): New.
226         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
227         (riscv_linux_sigframe_init): Define.
228         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
229
230         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
231         (riscv_isa_flen): Likewise.  Drop static.
232         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
233         (riscv_isa_flen): Likewise.  Declare.
234
235 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
236             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
237
238         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
239         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
240         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
241         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
242         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
243         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
244         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
245         Define.
246         (struct ppc_linux_features) <htm>: New field.
247         (ppc_linux_no_features): Add initializer for htm field.
248         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
249         new tdescs.
250         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
251         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
252         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
253         Define if not already defined.
254         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
255         and rs6000/powerpc-isa207-htm-vsx64l.
256         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
257         rs6000/powerpc-isa207-htm-vsx64l.xml.
258         * features/rs6000/power-htm-spr.xml: New file.
259         * features/rs6000/power-htm-core.xml: New file.
260         * features/rs6000/power64-htm-core.xml: New file.
261         * features/rs6000/power-htm-fpu.xml: New file.
262         * features/rs6000/power-htm-altivec.xml: New file.
263         * features/rs6000/power-htm-vsx.xml: New file.
264         * features/rs6000/power-htm-ppr.xml: New file.
265         * features/rs6000/power-htm-dscr.xml: New file.
266         * features/rs6000/power-htm-tar.xml: New file.
267         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
268         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
269         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
270         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
271         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
272         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
273         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
274         fetch_regset with HTM regsets.
275         (store_register, store_ppc_registers): Call store_regset with HTM
276         regsets.
277         (ppc_linux_nat_target::read_description): Set htm field in the
278         features struct if needed.
279         * ppc-linux-tdep.c: Include
280         features/rs6000/powerpc-isa207-htm-vsx32l.c and
281         features/rs6000/powerpc-isa207-htm-vsx64l.c.
282         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
283         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
284         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
285         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
286         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
287         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
288         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
289         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
290         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
291         (ppc32_linux_ctarregset): New globals.
292         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
293         (ppc_linux_collect_core_cpgrregset): New function.
294         (ppc_linux_iterate_over_regset_sections): Call back with the htm
295         regsets.
296         (ppc_linux_core_read_description): Check if the tm spr section is
297         present and set htm in the features struct.
298         (_initialize_ppc_linux_tdep): Call
299         initialize_tdesc_powerpc_isa207_htm_vsx32l and
300         initialize_tdesc_powerpc_isa207_htm_vsx64l.
301         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
302         Declare.
303         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
304         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
305         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
306         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
307         New fields.
308         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
309         Likewise.
310         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
311         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
312         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
313         New enum fields.
314         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
315         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
316         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
317         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
318         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
319         <PPC_CTAR_REGNUM>: Likewise.
320         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
321         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
322         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
323         (IS_CEFP_PSEUDOREG): Define.
324         (rs6000_register_name): Hide the upper halves of checkpointed VSX
325         registers.  Return names for the checkpointed DFP, VSX, and EFP
326         pseudo registers.
327         (rs6000_pseudo_register_type): Remove initial assert and raise an
328         internal error in the else clause instead.  Return types for the
329         checkpointed DFP, VSX, and EFP pseudo registers.
330         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
331         checkpointed DFP pseudo registers.
332         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
333         checkpointed VSX pseudo registers.
334         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
335         from efpr_pseudo_register_read and
336         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
337         registers.
338         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
339         Handle checkpointed DFP, VSX, and EFP registers.
340         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
341         (efp_ax_pseudo_register_collect): New functions.
342         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
343         register logic to new functions.  Handle checkpointed DFP, VSX,
344         and EFP pseudo registers.
345         (rs6000_gdbarch_init): Look for and validate the htm features.
346         Include checkpointed DFP, VSX and EFP pseudo-registers.
347         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
348         HTM registers.
349
350 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
351
352         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
353         without altivec or fpu.
354
355 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
356             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
357
358         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
359         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
360         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
361         Define if not already defined.
362         * features/rs6000/power-ebb.xml: New file.
363         * features/rs6000/power-linux-pmu.xml: New file.
364         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
365         features.
366         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
367         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
368         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
369         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
370         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
371         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
372         fetch_regset with ebb and pmu regsets.
373         (store_register, store_ppc_registers): Call store_regset with ebb
374         and pmu regsets.
375         (ppc_linux_nat_target::read_description): Set isa207 field in the
376         features struct if ebb and pmu are avaiable.
377         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
378         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
379         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
380         and pmu regsets.
381         (ppc_linux_core_read_description): Check if the pmu section is
382         present and set isa207 in the features struct.
383         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
384         (ppc32_linux_pmuregset): Declare.
385         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
386         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
387         <ppc_sier_regnum>: New field.
388         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
389         New enum values.
390         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
391         values.
392         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
393         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
394         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
395         ebb and pmu features.
396
397 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
398             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
399
400         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
401         (tdesc_powerpc_isa207_vsx64l): Declare.
402         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
403         (struct ppc_linux_features) <isa207>: New field.
404         (ppc_linux_no_features): Add initializer for isa207 field.
405         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
406         new tdescs.
407         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
408         (NT_PPC_TAR): Define if not already defined.
409         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
410         rs6000/powerpc-isa207-vsx64l.
411         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
412         rs6000/powerpc-isa207-vsx64l.xml.
413         * features/rs6000/power-tar.xml: New file.
414         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
415         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
416         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
417         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
418         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
419         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
420         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
421         fetch_regset with the TAR regset.
422         (store_register, store_ppc_registers): Call store_regset with the
423         TAR regset.
424         (ppc_linux_nat_target::read_description): Set isa207 field in the
425         features struct if needed.
426         * ppc-linux-tdep.c: Include
427         features/rs6000/powerpc-isa207-vsx32l.c and
428         features/rs6000/powerpc-isa207-vsx64l.c.
429         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
430         (ppc_linux_iterate_over_regset_sections): Call back with the tar
431         regset.
432         (ppc_linux_core_read_description): Check if the tar section is
433         present and set isa207 in the features struct.
434         (_initialize_ppc_linux_tdep): Call
435         initialize_tdesc_powerpc_isa207_vsx32l and
436         initialize_tdesc_powerpc_isa207_vsx64l.
437         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
438         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
439         (enum) <PPC_TAR_REGNUM>: New enum value.
440         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
441         feature.
442         (ppc_process_record_op31): Record changes to TAR.
443
444 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
445             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
446
447         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
448         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
449         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
450         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
451         (struct ppc_linux_features) <ppr_dscr>: New field.
452         (ppc_linux_no_features): Add initializer for ppr_dscr field.
453         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
454         new tdescs.
455         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
456         Define if not already defined.
457         * features/Makefile (WHICH): Add
458         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
459         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
460         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
461         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
462         * features/rs6000/power-dscr.xml: New file.
463         * features/rs6000/power-ppr.xml: New file.
464         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
465         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
466         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
467         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
468         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
469         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
470         * ppc-linux-nat.c: Include <sys/uio.h>.
471         (fetch_regset, store_regset, check_regset): New functions.
472         (fetch_register, fetch_ppc_registers): Call fetch_regset with
473         DSCR and PPR regsets.
474         (store_register, store_ppc_registers): Call store_regset with
475         DSCR and PPR regsets.
476         (ppc_linux_get_hwcap2): New function.
477         (ppc_linux_nat_target::read_description): Call
478         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
479         features struct if needed.
480         * ppc-linux-tdep.c: Include
481         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
482         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
483         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
484         (ppc32_linux_dscrregset): New globals.
485         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
486         and dscr regsets.
487         (ppc_linux_core_read_description): Check if the ppr and dscr
488         sections are present and set ppr_dscr in the features struct.
489         (_initialize_ppc_linux_tdep): Call
490         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
491         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
492         * ppc-linux-tdep.h (ppc32_linux_pprregset)
493         (ppc32_linux_dscrregset): Declare.
494         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
495         <ppc_dscr_regnum>: New field.
496         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
497         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
498         and dscr features.
499         (ppc_process_record_op31): Record changes to PPR and DSCR.
500
501 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
502
503         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
504         second initializer line for the have_* variables.  Initialize
505         have_fpu to 0 instead of 1.
506
507 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
508
509         * arch/ppc-linux-common.c (ppc_linux_match_description):
510         Parenthesize tdesc assignements and indent them properly.
511
512 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
513
514         * ppc-linux-nat.c (fetch_register): Change if statement to else
515         if.
516         (store_register): Likewise.
517
518 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
519
520         * rs6000-tdep.c: Remove reggroups.h include.
521         (rs6000_pseudo_register_reggroup_p): Remove.
522         (rs6000_gdbarch_init): Remove call to
523         set_tdesc_pseudo_register_reggroup_p.
524
525 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
526
527         * reggroups.c (default_register_reggroup_p): Return true for
528         decfloat registers and float_reggroup.
529
530 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
531
532         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
533         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
534         ppc_linux_collect_vrregset by regcache_collect_regset.
535
536 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
537
538         * linux-tdep.c (linux_collect_regset_section_cb): Use
539         std::vector<gdb_byte> instead of char * and malloc for buf.
540         Remove xfree.
541
542 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
543
544         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
545         symtab_start instead of always using language_unknown.
546
547 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
548
549         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
550         READ_P parameter, catch and ignore register access errors from
551         either the old or new MISA location.
552         (riscv_has_feature): Update call to riscv_read_misa_reg.
553
554 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
555
556         * python/py-function.c (convert_values_to_python): Return
557         gdbpy_ref<>.  Add header comment.
558         (fnpy_call): Adjust.
559
560 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
561
562         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
563         (cmdpy_completer_handle_brkchars): Adjust.
564         (cmdpy_completer): Adjust.
565
566 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
567
568         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
569         Pass correct regnum to raw_supply_zeroed.
570
571 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
572
573         * regcache.c (cooked_read_test): Add CSKY to the list of
574         architectures with a save_reggroup
575
576 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
577
578         PR gdb/23368
579         * infrun.c (follow_exec): In the follow_exec_mode_new case,
580         transfer terminal state from old new new inferior.
581         * terminal.h (swap_terminal_info): New function.
582         * inflow.c (swap_terminal_info): New function.
583
584 2018-10-23  Tom Tromey  <tom@tromey.com>
585
586         * record-btrace.c (get_thread_current_frame_id): Rename from
587         get_thread_current_frame.  Return a frame_id.
588         (record_btrace_start_replaying): Update.
589
590 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
591
592         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
593         for CSRs.
594
595 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
596
597         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
598         have_nonsteppable_watchpoint attribute to 1.
599
600 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
601
602         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
603         register names.
604         (struct register_alias): Rename to...
605         (struct riscv_register_alias): ...this, and update comment.
606         (riscv_register_aliases): Update type, and alias names.  Remove
607         CSR names from this list.
608         (riscv_register_name): Use riscv_gdb_reg_names for int and float
609         register names.  Add an extra assertion.
610         (riscv_is_regnum_a_named_csr): New function.
611         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
612
613 2018-10-22  Jim Wilson  <jimw@sifive.com>
614
615         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
616         FP reg smaller than FP reg size, and fill with -1 instead of 0.
617
618         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
619         (riscv_register_type): Use them.
620         (riscv_print_one_register_info): Handle union of floats same as float.
621         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
622         riscv_fpreg_q_type fields.
623
624 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
625
626         * gdbarch.sh (gdbarch_num_cooked_regs): New.
627         * gdbarch.h: Re-generate.
628         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
629         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
630         * eval.c (evaluate_subexp_standard): Likewise.
631         * findvar.c (value_of_register): Likewise.
632         (value_of_register_lazy): Likewise.
633         (address_from_register): Likewise.
634         * frame.c (get_frame_register_bytes): Likewise.
635         * gdbarch-selftests.c (register_to_value_test): Likewise.
636         * h8300-tdep.c (h8300_register_type): Likewise.
637         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
638         (i386_svr4_reg_to_regnum): Likewise.
639         * infcmd.c (default_print_registers_info): Likewise.
640         (registers_info): Likewise.
641         (print_vector_info): Likewise.
642         (default_print_float_info): Likewise.
643         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
644         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
645         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
646         (mi_cmd_data_list_changed_registers): Likewise.
647         (mi_cmd_data_list_register_values): Likewise.
648         (mi_cmd_data_write_register_values): Likewise.
649         (mi_cmd_trace_frame_collected): Likewise.
650         * mips-tdep.c (print_gp_register_row): Likewise.
651         (mips_print_registers_info): Likewise.
652         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
653         * regcache.c (init_regcache_descr): Likewise.
654         (register_size): Likewise.
655         (register_dump::dump): Likewise.
656         (cooked_read_test): Likewise.
657         (cooked_write_test): Likewise.
658         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
659         (rs6000_gdbarch_init): Likewise.
660         * stabsread.c (stab_reg_to_regnum): Likewise.
661         * stack.c (info_frame_command): Likewise.
662         * target-descriptions.c (tdesc_register_name): Likewise.
663         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
664         * tui/tui-regs.c (tui_show_register_group): Likewise.
665         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
666         (user_reg_map_regnum_to_name): Likewise.
667         (value_of_user_reg): Likewise.
668         (maintenance_print_user_registers): Likewise.
669         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
670         (xtensa_register_name): Likewise.
671         (xtensa_register_type): Likewise.
672         (xtensa_reg_to_regnum): Likewise.
673         (xtensa_pseudo_register_read): Likewise.
674         (xtensa_pseudo_register_write): Likewise.
675
676 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
677
678         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
679         correctly-sized buffer with raw_read.
680         (amd64_pseudo_register_write): Use correctly-sized buffer for
681         raw_read/raw_write.
682
683 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
684
685         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
686         in add_prefix_cmd of set print type.
687
688 2018-10-19  Tom Tromey  <tom@tromey.com>
689
690         PR tui/18388:
691         * NEWS: Mention tabset deprecation.
692         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
693         (update_tab_width): New function.
694         (tui_set_tab_width, tui_show_tab_width): New functions.
695         (tui_set_tab_width_command): Use update_tab_width.
696         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
697         Add new "set tui tab-width" command.
698         * tui/tui-source.c (tui_set_source_content): Update.
699         * tui/tui-disasm.c (tui_set_disassem_content): Update.
700         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
701         Don't declare.
702         (tui_tab_width): Declare.
703         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
704         (tui_set_default_tab_len): Remove.
705
706 2018-10-19  Tom Tromey  <tom@tromey.com>
707
708         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
709         (key_is_backspace, tui_getc): Don't declare.
710         * tui/tui-io.c (key_is_start_sequence): Now static.
711         (key_is_end_sequence, key_is_backspace): Remove.
712         (tui_getc): Now static.
713
714 2018-10-19  Tom Tromey  <tom@tromey.com>
715
716         * symfile.c (reread_symbols): Clear "static_links".
717
718 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
719
720         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
721         define.
722         (aarch64_linux_sigframe_init): Extra boundary checks.
723
724 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
725
726         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
727         the possibly non-existent tdesc type 'vec128', but the type of raw
728         register v16 instead.
729
730 2018-10-19  Gary Benson <gbenson@redhat.com>
731
732         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
733
734 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
735
736         PR cli/23785
737         * cli/cli-dump.c (restore_binary_file): Check if "file" is
738         NULL.
739
740 2018-10-17  Paul Koning  <paul_koning@dell.com>
741
742         * charset.c (convert_between_encodings): Fix unsigned overflow.
743
744 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
745
746         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
747         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
748         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
749         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
750         New functions.
751         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
752         and fbsd_info_proc_mappings_header.
753         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
754         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
755         New.
756
757 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
758
759         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
760         Solaris Maintainer.
761
762 2018-10-15  Tom Tromey  <tom@tromey.com>
763
764         * tui/tui.c (strcat_to_buf): Remove casts.
765         * tui/tui-winsource.c (tui_show_source_line)
766         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
767         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
768         * tui/tui-windata.c (tui_first_data_item_displayed)
769         (tui_delete_data_content_windows, tui_erase_data_content)
770         (tui_display_all_data, tui_display_data_from)
771         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
772         * tui/tui-win.c (tui_set_win_height)
773         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
774         casts.
775         * tui/tui-win.c (tui_resize_all): Remove casts.
776         (tui_scroll_backward_command, tui_set_focus)
777         (tui_set_tab_width_command): Likewise.
778         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
779         * tui/tui-regs.c (tui_show_register_group): Remove cast.
780         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
781         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
782         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
783         Remove casts.
784
785 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
786
787         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
788         AArch64/ARM maintainer.
789
790 2018-10-11  Gary Benson <gbenson@redhat.com>
791
792         * interps.h (interp::m_name): Make private and mutable.
793         * interps.c (interp::~interp): Free m_name.
794
795 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
796             Simon Marchi <simark@simark.ca>
797
798         * README (`configure' options): Add documentation for new
799         "--enable-unit-tests" option.
800         * acinclude.m4: Include "selftest.m4".
801         * configure: Regenerate.
802         * configure.ac: Use "GDB_AC_SELFTEST".
803         * maint.c (maintenance_selftest): Update message informing
804         that selftests have been disabled.
805         (maintenance_info_selftests): Likewise.
806         * selftest.m4: New file.
807
808 2018-10-10  Gary Benson <gbenson@redhat.com>
809
810         * remote.c (remote_target::remote_send_printf): Add
811         missing va_end found by Coverity.
812
813 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
814
815         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
816
817 2018-10-09  Tom Tromey  <tom@tromey.com>
818
819         * configure: Rebuild.
820         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
821         * NEWS: Update --enable-ubsan documentation.
822
823 2018-10-09  Gary Benson <gbenson@redhat.com>
824
825         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
826         found by Coverity.
827
828 2018-10-08  Tom Tromey  <tom@tromey.com>
829
830         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
831         variable.
832         (riscv_fbsd_init_abi): Likewise.
833
834 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
835         * valops.c (value_struct_elt_for_reference): Rename local variable
836         to work around the shadowing a previous local warning.
837
838 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
839
840         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
841         * NEWS: Mention new FreeBSD/riscv native configuration.
842         * configure.host: Add riscv*-*-freebsd*.
843         * configure.nat: Likewise.
844         * riscv-fbsd-nat.c: New file.
845
846 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
847
848         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
849         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
850         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
851         * NEWS: Mention new FreeBSD/riscv target.
852         * configure.tgt: Add riscv*-*-freebsd*.
853         * riscv-fbsd-tdep.c: New file.
854         * riscv-fbsd-tdep.h: New file.
855
856 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
857
858         * regcache.h (struct regcache_map_entry): Note that this type can
859         be used with traditional frame caches.
860         * trad-frame.c (trad_frame_set_reg_regmap): New.
861         * trad-frame.h (trad_frame_set_reg_regmap): New.
862
863 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
864
865         PR c++/16841
866         * valops.c (get_virtual_base_offset): New function.
867         (value_struct_elt_for_reference): Use it to get virtual base offset
868         and add it in calculating class member address.
869
870 2018-10-08   John Darrington <john@darrington.wattle.id.au>
871
872     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
873       (check_producer): Check if the producer is codewarrior.
874       (producer_is_codewarrior): New function.
875       (lnp_state_machine::record_line): Ignore is_stmt flag for records
876        produced by codewarrior.
877       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
878
879 2018-10-06  Tom Tromey  <tom@tromey.com>
880
881         PR python/19399:
882         * python/py-inferior.c: Add "architecture" entry.
883         (infpy_architecture): New function.
884
885 2018-10-06  Tom Tromey  <tom@tromey.com>
886
887         PR python/21765:
888         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
889         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
890         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
891         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
892
893 2018-10-06  Tom Tromey  <tom@tromey.com>
894
895         PR build/17077:
896         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
897         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
898         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
899         #include.
900
901 2018-10-06  Tom Tromey  <tom@tromey.com>
902
903         * python/py-breakpoint.c (bppy_get_location): Handle a
904         bp_breakpoint without a location.
905
906 2018-10-06  Tom Tromey  <tom@tromey.com>
907
908         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
909         (_RegEx): Reformat help text.
910         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
911         (AnyCallerIs, AnyCallerMatches): Reformat help text.
912         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
913         text.
914         * python/lib/gdb/command/xmethods.py (InfoXMethod)
915         (EnableXMethod, DisableXMethod): Remove help indentation.
916         Capitalize meta-syntactic variables.
917         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
918         (EnableUnwinder, DisableUnwinder): Remove help indentation.
919         Capitalize meta-syntactic variables.
920         * python/lib/gdb/command/explore.py (ExploreCommand)
921         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
922         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
923         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
924         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
925         Remove help indentation.
926         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
927         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
928         (DisableFrameFilter, SetFrameFilterPriority)
929         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
930
931 2018-10-06  Tom Tromey  <tom@tromey.com>
932
933         PR tui/28819:
934         * tui/tui-io.c (gdb_wgetch): New function.
935         (tui_mld_getc, tui_getc): Use it.
936
937 2018-10-05  Tom Tromey  <tom@tromey.com>
938
939         * sol-thread.c (sol_thread_target::wait): Rename inner
940         "save_ptid".
941
942 2018-10-04  Tom Tromey  <tom@tromey.com>
943
944         * configure: Rebuild.
945         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
946
947 2018-10-04  Tom Tromey  <tom@tromey.com>
948
949         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
950         declaration of "block".
951
952 2018-10-04  Tom Tromey  <tom@tromey.com>
953
954         * common/filestuff.c (fdwalk): Remove inner declaration of
955         "result".
956
957 2018-10-04  Tom Tromey  <tom@tromey.com>
958
959         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
960         "structs_addr" and hoist declaration.
961
962 2018-10-04  Tom Tromey  <tom@tromey.com>
963
964         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
965         variable "size".
966
967 2018-10-04  Tom Tromey  <tom@tromey.com>
968
969         * mdebugread.c (parse_partial_symbols): Use std::string.
970
971 2018-10-04  Tom Tromey  <tom@tromey.com>
972
973         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
974         * p-valprint.c (pascal_val_print): Split inner "i" variable.
975         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
976         header.
977         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
978         more inner scope.
979         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
980         * varobj.c (varobj_update): Rename inner "newobj",
981         "type_changed".
982         * valprint.c (generic_emit_char): Rename inner "buf".
983         * valops.c (find_overload_match): Rename inner "temp".
984         (value_struct_elt_for_reference): Declare "v" in more inner
985         scope.
986         * v850-tdep.c (v850_push_dummy_call): Rename "len".
987         * unittests/array-view-selftests.c (run_tests): Rename inner
988         "vec".
989         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
990         header.
991         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
992         "tsv" in more inner scope.
993         (print_one_static_tracepoint_marker): Rename inner
994         "tuple_emitter".
995         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
996         (tic6x_push_dummy_call): Don't redeclare "addr".
997         * target-float.c: Declare "dto" lower.
998         * symtab.c (lookup_local_symbol): Rename inner "sym".
999         (find_pc_sect_line): Rename inner "pc".
1000         * stack.c (print_frame): Don't redeclare "gdbarch".
1001         (return_command): Rename inner "gdbarch".
1002         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1003         "sp".
1004         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1005         header.
1006         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1007         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1008         scope.
1009         * remote.c (remote_target::update_thread_list): Don't redeclare
1010         "tp".
1011         (remote_target::process_initial_stop_replies): Rename inner
1012         "thread".
1013         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1014         (remote_target::wait_as): Don't redeclare "stop_reply".
1015         (remote_target::get_thread_local_address): Rename inner
1016         "result".
1017         (remote_target::get_tib_address): Likewise.
1018
1019         * regcache.c (cooked_read_test): Rename "regnum".
1020         * record-btrace.c (cmd_record_btrace_start): Rename inner
1021         "exception".
1022         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1023         loop header.
1024         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1025         header.
1026         (ppu2spu_sniffer): Rename inner "buf".
1027         * parse.c (operator_check_standard): Rename inner "type",
1028         "objfile".
1029         * p-valprint.c (pascal_val_print): Introduce new scope for
1030         "low_bound", "high_bound".
1031         * p-exp.y (yylex): Declare "i" in loop header.
1032         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1033         Lower declaration of "s".
1034         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1035         header.
1036         (nios2_push_dummy_call): Rename "len".
1037         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1038         "buf".
1039         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1040         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1041         (linux_xfer_osdata_modules): Likewise.
1042         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1043         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1044         (mips_o64_push_dummy_call): Likewise.
1045         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1046         "op".
1047         * mi/mi-main.c (list_available_thread_groups): Rename inner
1048         "tuple_emitter".
1049         (mi_cmd_data_read_memory): Rename inner "opts".
1050         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1051         "tuple_emitter".
1052         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1053         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1054         more inner scope.
1055         (parse_partial_symbols): Rename inner "pst", "p", "name"
1056         * main.c (captured_main_1): Rename inner "i"s.
1057         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1058         "oso2".
1059         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1060         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1061         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1062         (handle_signal_stop): Rename inner "gdbarch".
1063         (handle_command): Declare "signum" in loop header.
1064         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1065         "status".
1066         (examine_prologue): Rename inner "sol" and "sof".
1067         (ia64_extract_return_value): Rename inner "val".  Declare another
1068         "val" in a more inner scope.
1069         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1070         inner scope.
1071         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1072         "except".
1073         * findvar.c (default_read_var_value): Don't redeclare "addr".
1074         * f-exp.y (yylex): Declare "i" in loop header.
1075         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1076         Rename inner "type", "expect_type".
1077         (evaluate_subexp_for_sizeof): Rename inner "pc".
1078         * elfread.c (elf_symfile_read): Rename inner "abfd".
1079         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1080         "bytes_read".
1081         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1082         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1083         (dwarf_decode_line_header): Rename inner "lh".
1084         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1085         "offset".  Declare "i" in loop header.
1086         (disassemble_dwarf_expression): Rename inner "addr_size".
1087         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1088         inner "result".
1089         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1090         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1091         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1092         "inner_list_emitter".
1093         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1094         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1095         declaration in a block.
1096         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1097         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1098         "obstack_final_size".
1099         * cp-support.c (inspect_type): Declare "i" in loop header.
1100         * compile/compile.c (compile_instance::insert_symbol_error):
1101         Rename inner "e".
1102         * common/agent.c (agent_run_command): Remove inner "ret"
1103         declaration.
1104         * coffread.c (coff_symfile_read): Rename inner "name".
1105         (coff_symfile_read): Rename inner "abfd".
1106         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1107         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1108         "high".
1109         * c-exp.y (lex_one_token): Move "len" declaration lower.
1110         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1111         "gdbarch".
1112         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1113         "b".
1114         (watch_command_1): Declare "mark" later.
1115         (clear_command): Don't shadow "a" or "b".
1116         (delete_command): Rename inner "b".
1117         (delete_trace_command): Likewise.
1118         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1119         "op".
1120         (arm_gdbarch_init): Remove inner "e_flags".
1121         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1122         "offset" in inner blocks.
1123
1124 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1125
1126         * dwarf-index-write.c (file_write): Don't write if the vector is
1127         empty.
1128
1129 2018-10-05  Tom de Vries  <tdevries@suse.de>
1130
1131         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1132         PyArg_ParseTuple call.
1133
1134 2018-10-05  Tom de Vries  <tdevries@suse.de>
1135
1136         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1137         PyArg_ParseTuple call.
1138
1139 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1140
1141         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1142         to avoid exceeding 80 characters per line limit.
1143
1144 2018-10-04  Tom Tromey  <tom@tromey.com>
1145
1146         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1147         (reread_symbols): Update.
1148         * complaints.h (clear_complaints): Remove argument.
1149         * complaints.c (enum complaint_series): Remove.
1150         (series): Remove global.
1151         (complaint_internal): Update.
1152         (clear_complaints): Remove argument.
1153
1154 2018-10-04  Tom Tromey  <tom@tromey.com>
1155
1156         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1157         debugging symbols" message if there is a separate debug objfile.
1158
1159 2018-10-04  Tom Tromey  <tom@tromey.com>
1160
1161         PR cli/19551:
1162         * symfile.c (symbol_file_add_with_addrs): Update output.
1163         * psymtab.c (require_partial_symbols): Update output.
1164
1165 2018-10-04  Tom Tromey  <tom@tromey.com>
1166
1167         PR cli/22234:
1168         * complaints.c: Emit \n.
1169
1170 2018-10-04  Tom Tromey  <tom@tromey.com>
1171
1172         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1173         (separate_debug_file_exists, find_separate_debug_file)
1174         (add_symbol_file_command, reread_symbols, allocate_symtab)
1175         (allocate_compunit_symtab): Use filtered printing, not
1176         unfiltered.
1177         * psymtab.c (require_partial_symbols, dump_psymtab)
1178         (allocate_psymtab): Use filtered printing, not unfiltered.
1179
1180 2018-10-04  Tom Tromey  <tom@tromey.com>
1181
1182         * complaints.c (complaint_internal): Correctly check complaint
1183         count.
1184
1185 2018-10-04  Tom Tromey  <tom@tromey.com>
1186
1187         * complaints.h (struct complaints): Remove declaration.
1188         * complaints.c (clear_complaints): Remove an unused variable.
1189
1190 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1191
1192         * MAINTAINERS (Write After Approval): Add self.
1193
1194 2018-10-03  Tom Tromey  <tom@tromey.com>
1195
1196         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1197         "buffer_contents".
1198         * coffread.c (coff_symtab_read): Initialize "newobj".
1199
1200 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1201
1202         * dwarf2read.c (read_func_scope): Remove struct keyword in
1203         range-based for.
1204
1205 2018-10-03  Tom Tromey  <tom@tromey.com>
1206
1207         * README: Mention --enable-ubsan.
1208         * NEWS: Mention --enable-ubsan.
1209         * acinclude.m4: Include sanitize.m4.
1210         * configure: Rebuild.
1211         * configure.ac: Call AM_GDB_UBSAN.
1212         * sanitize.m4: New file.
1213
1214 2018-10-03  Tom Tromey  <tom@tromey.com>
1215
1216         * expression.h (enum exp_opcode): Use uint8_t as base type.
1217         * expprint.c (op_name): Handle invalid opcodes.
1218
1219 2018-10-03  Tom Tromey  <tom@tromey.com>
1220
1221         * parse.c (prefixify_expression): Add assert.
1222         (parse_exp_in_context_1): Throw exception if the expression is
1223         empty.
1224
1225 2018-10-03  Tom Tromey  <tom@tromey.com>
1226
1227         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1228
1229 2018-10-03  Tom Tromey  <tom@tromey.com>
1230
1231         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1232
1233 2018-10-03  Tom Tromey  <tom@tromey.com>
1234
1235         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1236         unsigned.
1237
1238 2018-10-03  Tom Tromey  <tom@tromey.com>
1239
1240         * findvar.c (extract_integer): Do work in an unsigned type.
1241
1242 2018-10-03  Tom Tromey  <tom@tromey.com>
1243
1244         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1245         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1246         base type.
1247         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1248         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1249         type.
1250         * c-lang.h (enum c_string_type_values): Use unsigned as base
1251         type.
1252         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1253
1254 2018-10-03  Tom Tromey  <tom@tromey.com>
1255
1256         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1257         <~dwarf2_frame_state_reg_info>: Update.
1258         <dwarf2_frame_state_reg_info>: Update.
1259         <alloc_regs>: Add assertion.  Update.
1260         <reg>: Now a std::vector.
1261         <num_regs>: Remove.
1262         <swap>: Update.
1263         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1264         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1265
1266 2018-10-03  Tom Tromey  <tom@tromey.com>
1267
1268         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1269
1270 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1271
1272         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1273
1274 2018-10-02  Tom Tromey  <tom@tromey.com>
1275
1276         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1277
1278 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1279
1280         * NEWS: Mention changed commands.
1281         * ser-uds.c: New file.
1282         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1283         * configure: Regenerate.
1284         * Makefile.in: Add new file.
1285         * serial.c (serial_open): Check if filename is a socket
1286           and lookup the appropriate interface accordingly.
1287
1288 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1289
1290         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1291         define.
1292         (AARCH64_EXTRA_MAGIC): Likewise.
1293         (AARCH64_FPSIMD_MAGIC): Likewise.
1294         (AARCH64_SVE_MAGIC): Likewise.
1295         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1296         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1297         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1298         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1299         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1300         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1301         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1302         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1303         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1304         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1305         (read_aarch64_ctx): Add function.
1306         (aarch64_linux_sigframe_init): Detect FP registers.
1307
1308 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1309
1310         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1311         (AARCH64_D0_REGNUM): Likewise.
1312         (AARCH64_S0_REGNUM): Likewise.
1313         (AARCH64_H0_REGNUM): Likewise.
1314         (AARCH64_B0_REGNUM): Likewise.
1315         (AARCH64_SVE_V0_REGNUM): Likewise.
1316         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1317         (AARCH64_D0_REGNUM): Likewise.
1318         (AARCH64_S0_REGNUM): Likewise.
1319         (AARCH64_H0_REGNUM): Likewise.
1320         (AARCH64_B0_REGNUM): Likewise.
1321         (AARCH64_SVE_V0_REGNUM): Likewise.
1322
1323 2018-10-01  Gary Benson <gbenson@redhat.com>
1324
1325         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1326         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1327         prfpregset_t instead of gdb_prfpregset_t.
1328         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1329         * configure, config.in: Rebuild.
1330
1331 2018-10-01  Gary Benson <gbenson@redhat.com>
1332
1333         * common/gdb_proc_service.h: New file, factored out from...
1334         * gdb_proc_service.h: Moved common code to the above file.
1335         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1336
1337 2018-10-01  Gary Benson <gbenson@redhat.com>
1338
1339         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1340         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1341
1342 2018-10-01  Gary Benson <gbenson@redhat.com>
1343
1344         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1345         (AC_CHECK_HEADERS): Check for linux/elf.h.
1346         * configure, config.in: Rebuild.
1347         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1348         doesn't define elf_fpregset_t.
1349
1350 2018-10-01  Gary Benson <gbenson@redhat.com>
1351
1352         * gdb_proc_service.h: Whitespace change.
1353
1354 2018-10-01  Tom Tromey  <tom@tromey.com>
1355
1356         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1357         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1358         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1359
1360 2018-10-01  Tom Tromey  <tom@tromey.com>
1361
1362         * README: Minor change.
1363
1364 2018-09-30  Pedro Alves  <palves@redhat.com>
1365
1366         * darwin-nat-info.c (darwin_debug_regions_recurse)
1367         (info_mach_exceptions_command): Remove unused local variables.
1368         * darwin-nat.c (darwin_decode_notify_message)
1369         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1370         (darwin_stop_inferior, darwin_setup_exceptions)
1371         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1372         (darwin_nat_target::attach, darwin_nat_target::detach)
1373         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1374         local variables.
1375         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1376         variables.
1377
1378 2018-09-29  Tom Tromey  <tom@tromey.com>
1379
1380         * README: Remove some leftover text.
1381
1382 2018-09-29  Tom Tromey  <tom@tromey.com>
1383
1384         * PROBLEMS: Rewrite.
1385         * README: Update.
1386
1387 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1388
1389         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1390         case with explicit breakpoint kind.
1391         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1392         'additional_info' and related logic.
1393         (riscv_debug_breakpoints): New variable.
1394         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1395         instruction to determine the breakpoint kind.
1396         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1397         flag.  Update description of 'set/show riscv
1398         use-compressed-breakpoints' flag.
1399
1400 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1401
1402         (NEWS): Mention changes to frame related commands.
1403         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1404         (add_prefix_cmd_suppress_notification): New function.
1405         (add_com_suppress_notification): Call
1406         add_cmd_suppress_notification.
1407         * command.h (add_cmd_suppress_notification): Declare.
1408         (add_prefix_cmd_suppress_notification): Declare.
1409         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1410         (parse_frame_specification): Moved from stack.c, with
1411         simplification to handle a single argument.
1412         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1413         switch to the selected frame.  Add a header comment.
1414         * stack.c: Remove 'safe-ctype.h' include.
1415         (find_frame_for_function): Add declaration.
1416         (find_frame_for_address): New function.
1417         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1418         (frame_selection_by_function_completer): New function.
1419         (info_frame_command): Rename to...
1420         (info_frame_command_core): ...this, and update parameter types.
1421         (select_frame_command): Rename to...
1422         (select_frame_command_core): ...this, and update parameter types.
1423         (frame_command): Rename to...
1424         (frame_command_core): ...this, and update parameter types.
1425         (class frame_command_helper): New class to wrap implementations of
1426         frame related sub-commands.
1427         (frame_apply_cmd_list): New static global.
1428         (frame_cmd_list): Make static.
1429         (select_frame_cmd_list): New global for sub-commands.
1430         (info_frame_cmd_list): New global for sub-commands.
1431         (_initialize_stack): Register sub-commands for 'frame',
1432         'select-frame', and 'info frame'.  Update 'frame apply' commands
1433         to use frame_apply_cmd_list.  Move function local static
1434         frame_apply_list to file static frame_apply_cmd_list for
1435         consistency.
1436         * stack.h (select_frame_command): Delete declarationn.
1437         (select_frame_for_mi): Declare new function.
1438
1439 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1440
1441         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1442         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1443         and NOP.
1444
1445 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1446
1447         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1448
1449 2018-09-26  Tom Tromey  <tom@tromey.com>
1450
1451         * valops.c (auto_abandon): Remove dead code.
1452
1453 2018-09-26  Tom Tromey  <tom@tromey.com>
1454
1455         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1456
1457 2018-09-24  Tom Tromey  <tom@tromey.com>
1458
1459         * common/pathstuff.c (get_standard_cache_dir): Make
1460         "xdg_cache_home" and "home" const.
1461         * top.c (init_history): Make "tmpenv" const.
1462         * main.c (get_init_files): Make "homedir" const.
1463
1464 2018-09-23  Tom Tromey  <tom@tromey.com>
1465
1466         PR python/18852:
1467         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1468
1469 2018-09-23  Tom Tromey  <tom@tromey.com>
1470
1471         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1472         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1473         * python/python-internal.h (gdbpy_handle_exception): Declare.
1474         * python/py-utils.c (gdbpy_handle_exception): New function.
1475
1476 2018-09-23  Tom Tromey  <tom@tromey.com>
1477
1478         PR python/17284:
1479         * python/py-type.c (typy_template_argument): Check for negative
1480         argument number.
1481
1482 2018-09-23  Tom Tromey  <tom@tromey.com>
1483
1484         PR python/14062:
1485         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1486
1487 2018-09-23  Tom Tromey  <tom@tromey.com>
1488
1489         PR python/18170:
1490         * python/py-value.c (valpy_int): Allow conversion from pointer
1491         type.
1492
1493 2018-09-23  Tom Tromey  <tom@tromey.com>
1494
1495         PR python/20126:
1496         * python/py-value.c (valpy_int): Respect type sign.
1497
1498 2018-09-23  Tom Tromey  <tom@tromey.com>
1499
1500         PR python/18352;
1501         * python/py-value.c (valpy_float): Allow conversions from int or
1502         char.
1503         (valpy_int, valpy_long): Allow conversions from float.
1504
1505 2018-09-23  Tom Tromey  <tom@tromey.com>
1506
1507         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1508         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1509
1510 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1511
1512         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1513         __sighndlr.
1514         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1515
1516 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1517
1518         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1519         target_terminal::ours().
1520
1521 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1522
1523         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1524         of vl to ULONGEST.
1525
1526 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1527
1528         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1529         redundant condition.
1530
1531 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1532
1533         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1534
1535         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1536         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1537         * sol-thread.c (ps_pdmodel): Don't guard definition.
1538
1539         * procfs.c: Fix formatting.
1540
1541         * procfs.c (sysset_t_alloc): Remove.
1542         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1543         (procfs_debug_inferior): Likewise.
1544         (procfs_set_exec_trap): Likewise.
1545         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1546         (proc_set_traced_sysexit): Likewise.
1547
1548         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1549         (dead_procinfo): Likewise.
1550         (proc_warn): Likewise.
1551         (proc_error): Likewise.
1552         (proc_get_LDT_entry): Likewise.
1553         (do_attach): Likewise.
1554         (procfs_target::pid_to_str): Likewise.
1555         (iterate_over_mappings): Likewise.
1556
1557         * procfs.c (create_procinfo): Fix ARI warning.
1558         (proc_get_status): Likewise.
1559         (proc_stop_process): Likewise.
1560         (proc_run_process): Likewise.
1561         (proc_kill): Likewise.
1562         (proc_get_LDT_entry): Likewise.
1563         (procfs_find_LDT_entry): Likewise.
1564         (proc_update_threads): Likewise.
1565         (proc_iterate_over_threads): Likewise.
1566         (do_attach): Likewise.
1567         (procfs_xfer_memory): Likewise.
1568         (invalidate_cache): Likewise.
1569         (procfs_target::resume): Likewise.
1570         (procfs_init_inferior): Likewise.
1571         (procfs_set_exec_trap): Likewise.
1572         (procfs_target::thread_alive): Likewise.
1573         (procfs_target::pid_to_exec_file): Likewise.
1574         (iterate_over_mappings): Likewise.
1575         (procfs_target::make_corefile_notes): Likewise.
1576         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1577
1578         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1579         (procfs_find_LDT_entry): Likewise.
1580         * sol-thread.c (ps_lgetLDT): Likewise.
1581
1582 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1583
1584         PR tdep/17903
1585         * procfs.c (procfs_target): Declare pid_to_exec_file.
1586         (procfs_target::pid_to_exec_file): New.
1587
1588 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1589
1590         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1591         renaming.
1592         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1593         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1594
1595 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1596
1597         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1598         (supply_fpregset, fill_fpregset): Move ...
1599         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1600         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1601         Remove references to ioctl-based procfs.
1602         Include <sys/reg.h>.
1603         Remove PR_MODEL_NATIVE guards.
1604         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1605         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1606
1607 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1608
1609         PR gdb/20981:
1610         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1611         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1612         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1613
1614 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1615
1616         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1617         (fbsd_print_sockaddr_in6): Likewise.
1618
1619 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1620             Chris January  <chris.january@arm.com>
1621
1622         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1623         (evaluate_subexp_standard): Return a dummy type when
1624         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1625         OP_F77_UNDETERMINED_ARGLIST case.
1626         * expression.h (enum noside): Update comment.
1627
1628 2018-09-19  George Vasick <george.vasick@oracle.com>
1629
1630         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1631
1632 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1633             April Chin <april.chin@oracle.com>
1634             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1635
1636         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1637         uint_t lwpid_t.
1638         (create_procinfo): Print pids in /proc without leading zeros.
1639
1640 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1641
1642         * nios2-tdep.c (nios2_gcc_target_options): New.
1643         (nios2_gdb_arch_init): Install new hook.
1644
1645 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1646
1647         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1648         New file.
1649         * update-gnulib.sh: Apply patch.
1650         * configure: Re-generate.
1651
1652 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1653
1654         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1655         description.  Make "info proc" command descriptions more
1656         consistent.
1657
1658 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1659
1660         * NEWS: Mention 'info proc files' command.
1661
1662 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1663
1664         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1665         descriptors for IP_FILES and IP_ALL.
1666
1667 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1668
1669         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1670         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1671         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1672         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1673         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1674         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1675         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1676         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1677         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1678         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1679         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1680         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1681         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1682         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1683         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1684         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1685         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1686         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1687         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1688         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1689         (struct fbsd_sockaddr_un): New types.
1690         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1691         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1692         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1693         (fbsd_core_info_proc_files): New functions.
1694         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1695         IP_ALL.
1696         * fbsd-tdep.h (fbsd_info_proc_files_header)
1697         (fbsd_info_proc_files_entry): New.
1698
1699 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1700
1701         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1702         * infcmd.c (info_proc_cmd_files): New function.
1703         (_initialize_infcmd): Register 'info proc files' command.
1704
1705 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1706
1707         * gnulib/aclocal-m4-deps.mk: Re-generate.
1708         * gnulib/aclocal.m4: Re-generate.
1709         * gnulib/config.in: Re-generate.
1710         * gnulib/configure: Re-generate.
1711         * gnulib/import/Makefile.am: Re-generate.
1712         * gnulib/import/Makefile.in: Re-generate.
1713         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1714         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1715         * gnulib/import/arpa_inet.in.h: New file.
1716         * gnulib/import/inet_ntop.c: New file.
1717         * gnulib/import/m4/arpa_inet_h.m4: New file.
1718         * gnulib/import/m4/inet_ntop.m4: New file.
1719         * gnulib/import/m4/netinet_in_h.m4: New file.
1720         * gnulib/import/m4/socklen.m4: New file.
1721         * gnulib/import/m4/sockpfaf.m4: New file.
1722         * gnulib/import/m4/stdalign.m4: New file.
1723         * gnulib/import/m4/sys_uio_h.m4: New file.
1724         * gnulib/import/netinet_in.in.h: New file.
1725         * gnulib/import/stdalign.in.h: New file.
1726         * gnulib/import/sys_socket.c: New file.
1727         * gnulib/import/sys_socket.in.h: New file.
1728         * gnulib/import/sys_uio.in.h: New file.
1729         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1730         module.
1731
1732 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1733
1734         * gnulib/aclocal-m4-deps.mk: New file.
1735         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1736         deterministically.
1737
1738 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1739
1740         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1741         KVE_PATH.
1742
1743 2018-09-18  Tom Tromey  <tom@tromey.com>
1744
1745         * compile/compile-object-load.c (struct
1746         link_hash_table_cleanup_data): Add constructor and destructor.
1747         Use DISABLE_COPY_AND_ASSIGN.
1748         (~link_hash_table_cleanup_data): Rename from
1749         link_hash_table_free.  Now a destructor.
1750         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1751
1752 2018-09-18  Tom Tromey  <tom@tromey.com>
1753
1754         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1755         * compile/compile-object-load.c (struct munmap_list): Move to
1756         header file.
1757         (munmap_list::add): Rename from munmap_list_add; rewrite.
1758         (munmap_list::~munmap_list): Rename from munmap_list_free.
1759         (munmap_listp_free_cleanup): Remove.
1760         (compile_object_load): Update.
1761         * compile/compile-object-load.h (struct munmap_list): Move from
1762         compile-object-load.c.  Rewrite.
1763
1764 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1765
1766         * aarch64-tdep.c (pass_in_v): Use register size.
1767         (aarch64_extract_return_value): Likewise.
1768         (aarch64_store_return_value): Likewise.
1769
1770 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1771
1772         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1773         rlim_t.
1774
1775 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1776
1777         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1778         Fix short help line.
1779
1780 2018-09-17  Tom Tromey  <tom@tromey.com>
1781
1782         PR python/20445:
1783         * configure: Rebuild.
1784         * configure.ac: Conditionally use -DNDEBUG for Python.
1785
1786 2018-09-17  Tom Tromey  <tom@tromey.com>
1787
1788         * configure: Rebuild.
1789         * configure.ac: Use gmp as a library dependency when checking for
1790         mpfr.
1791
1792 2018-09-17  Pedro Alves  <palves@redhat.com>
1793
1794         * python/py-inferior.c (find_inferior_object): Delete.
1795
1796 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1797
1798         * compile/compile-cplus-types.c
1799         (compile_cplus_instance::enter_scope): Don't use new_scope after
1800         std::move.
1801
1802 2018-09-17  Tom Tromey  <tom@tromey.com>
1803
1804         * common/pathstuff.c (get_standard_cache_dir): Use
1805         ~/Library/Caches on macOS.
1806         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1807
1808 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1809
1810         PR python/23669
1811         * breakpoint.c (commands_cmd_element): New.
1812         (_initialize_breakpoint): Assign commands_cmd_element.
1813         * breakpoint.h (commands_cmd_element): New.
1814         * cli/cli-script.c (while_cmd_element, if_command,
1815         define_cmd_element): New.
1816         (command_name_equals): Remove.
1817         (process_next_line): Compare commands by pointer, not by name.
1818         (_initialize_cli_script): Assign the various cmd_list_element
1819         variables.
1820         * compile/compile.c (compile_cmd_element): New.
1821         (_initialize_compile): Assign compile_cmd_element.
1822         * compile/compile.h (compile_cmd_element): New.
1823         * guile/guile.c (guile_cmd_element): New.
1824         (install_gdb_commands): Assign guile_cmd_element.
1825         * guile/guile.h (guile_cmd_element): New.
1826         * python/python.c (python_cmd_element): New.
1827         (_initialize_python): Assign python_cmd_element.
1828         * python/python.h (python_cmd_element): New.
1829         * tracepoint.c (while_stepping_cmd_element): New.
1830         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1831         * tracepoint.h (while_stepping_cmd_element): New.
1832
1833 2018-09-17  Tom Tromey  <tom@tromey.com>
1834
1835         * infrun.c (save_infcall_suspend_state): Return
1836         infcall_suspend_state_up.
1837         (save_infcall_control_state): Return infcall_control_state_up.
1838         * inferior.h (save_infcall_suspend_state)
1839         (save_infcall_control_state): Declare later.  Return unique
1840         pointers.
1841
1842 2018-09-17  Tom Tromey  <tom@tromey.com>
1843
1844         * infrun.c (struct stop_context): Declare constructor,
1845         destructor, "changed" method.
1846         (stop_context::stop_context): Rename from save_stop_context.
1847         (stop_context::~stop_context): Rename from
1848         release_stop_context_cleanup.
1849         (normal_stop): Update.
1850         (stop_context::changed): Rename from stop_context_changed.  Return
1851         bool.
1852
1853 2018-09-17  Tom Tromey  <tom@tromey.com>
1854
1855         * inferior.h (struct infcall_suspend_state_deleter): New.
1856         (infcall_suspend_state_up): New typedef.
1857         (struct infcall_control_state_deleter): New.
1858         (infcall_control_state_up): New typedef.
1859         (make_cleanup_restore_infcall_suspend_state)
1860         (make_cleanup_restore_infcall_control_state): Don't declare.
1861         * infcall.c (call_function_by_hand_dummy): Update.
1862         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1863         (make_cleanup_restore_infcall_suspend_state): Remove.
1864         (do_restore_infcall_control_state_cleanup)
1865         (make_cleanup_restore_infcall_control_state): Remove.
1866
1867 2018-09-17  Tom Tromey  <tom@tromey.com>
1868
1869         * gdbthread.h (struct thread_control_state): Add initializer.
1870         (class thread_info) <control>: Remove initializer.
1871         * inferior.h (struct inferior_control_state): Add initializer.
1872         (class inferior) <control>: Remove initializer.
1873         (exit_inferior_1): Update.
1874         * infrun.c (struct infcall_control_state): Add constructors.
1875         (save_infcall_control_state): Use new.
1876         (restore_infcall_control_state, discard_infcall_control_state):
1877         Use delete.
1878
1879 2018-09-17  Tom Tromey  <tom@tromey.com>
1880
1881         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1882         unique_ptr.
1883         <siginfo_data>: Now a unique_xmalloc_ptr.
1884         (save_infcall_suspend_state, restore_infcall_suspend_state)
1885         (discard_infcall_suspend_state)
1886         (get_infcall_suspend_state_regcache): Update.
1887
1888 2018-09-17  Tom Tromey  <tom@tromey.com>
1889
1890         * gdbthread.h (struct thread_suspend_state): Add initializers.
1891         (class thread_info) <suspend>: Remove initializer.
1892         * infrun.c (struct infcall_suspend_state): Add initializers.
1893         (save_infcall_suspend_state): Use new.
1894         (discard_infcall_suspend_state): Use delete.
1895
1896 2018-09-16  Tom Tromey  <tom@tromey.com>
1897
1898         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1899         Remove.
1900         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1901         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1902         (py_varobj_iter_new): Likewise.
1903         (py_varobj_get_iterator): Use gdbpy_ref.
1904
1905 2018-09-16  Tom Tromey  <tom@tromey.com>
1906
1907         * python/py-threadevent.c (py_get_event_thread): Simplify.
1908         * python/py-inferior.c (infpy_thread_from_thread_handle):
1909         Return immediately after calling thread_to_thread_object.  Use
1910         Py_RETURN_NONE.
1911         (thread_to_thread_object): Set the exception on a NULL return.
1912
1913 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1914
1915         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1916
1917 2018-09-16  Tom Tromey  <tom@tromey.com>
1918
1919         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1920         Remove.
1921
1922 2018-09-16  Tom Tromey  <tom@tromey.com>
1923
1924         * python/python-internal.h (thread_to_thread_object): Change
1925         return type.
1926         * python/py-inferior.c (thread_to_thread_object): Return a new
1927         reference.
1928         (infpy_thread_from_thread_handle): Update.
1929         * python/py-infthread.c (gdbpy_selected_thread): Update.
1930         * python/py-stopevent.c (create_stop_event_object): Update.
1931         * python/py-threadevent.c (py_get_event_thread): Return a new
1932         reference.
1933         (py_get_event_thread): Update.
1934         * python/py-event.h (py_get_event_thread): Change return type.
1935         * python/py-continueevent.c (create_continue_event_object):
1936         Update.
1937
1938 2018-09-16  Tom Tromey  <tom@tromey.com>
1939
1940         * python/py-progspace.c (pspy_get_objfiles): Update.
1941         * python/python-internal.h (objfile_to_objfile_object): Change
1942         return type.
1943         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1944         Update.
1945         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1946         Update.
1947         * python/python.c (gdbpy_get_current_objfile): Update.
1948         (gdbpy_objfiles): Update.
1949         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1950         Update.
1951         (objfile_to_objfile_object): Return a new reference.
1952         * python/py-symtab.c (stpy_get_objfile): Update.
1953         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1954         Update.
1955
1956 2018-09-16  Tom Tromey  <tom@tromey.com>
1957
1958         * python/py-inferior.c (infpy_get_progspace): Update.
1959         * python/python-internal.h (pspace_to_pspace_object): Change
1960         return type.
1961         * python/py-newobjfileevent.c
1962         (create_clear_objfiles_event_object): Update.
1963         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1964         Update.
1965         * python/python.c (gdbpy_get_current_progspace): Update.
1966         (gdbpy_progspaces): Update.
1967         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1968         reference.
1969         * python/py-objfile.c (objfpy_get_progspace): Update.
1970         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1971         Update.
1972
1973 2018-09-16  Tom Tromey  <tom@tromey.com>
1974
1975         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1976         (solib_name, block_for_pc, find_pc_line): New functions.
1977         (execute_unwinders): Update.
1978         * python/py-block.c (gdbpy_block_for_pc): Remove.
1979         * python/py-inferior.c (infpy_get_progspace): New function.
1980         (inferior_object_getset) <progspace>: Add.
1981         * python/py-progspace.c (pspy_objfiles): Rewrite.
1982         (pspy_solib_name, pspy_block_for_pc)
1983         (pspy_find_pc_line, pspy_is_valid): New functions.
1984         (progspace_object_methods): Add entries for solib_name,
1985         block_for_pc, find_pc_line, is_valid.
1986         * python/python-internal.h (gdbpy_block_for_pc)
1987         (build_objfiles_list): Don't declare.
1988         * python/python.c: Don't include solib.h.
1989         (gdbpy_solib_name, gdbpy_find_pc_line)
1990         (gdbpy_get_current_progspace, build_objfiles_list)
1991         (gdbpy_objfiles): Remove.
1992         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1993         solib_name, find_pc_line>: Remove entries.
1994
1995 2018-09-16  Tom Tromey  <tom@tromey.com>
1996
1997         * top.c (new_ui_command): Use GNU style for metasyntactic
1998         variables.
1999         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2000         variables.
2001         * maint.c (maintenance_translate_address): Remove "<>" around
2002         text.
2003         * interps.c (interpreter_exec_cmd): Use GNU style for
2004         metasyntactic variables.
2005         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2006         metasyntactic variables.
2007         * tracepoint.c (tfind_range_command): Use GNU style for
2008         metasyntactic variables.
2009         (tfind_outside_command): Likewise.
2010         (_initialize_tracepoint): Likewise.
2011         * remote.c (extended_remote_target::create_inferior): Use GNU
2012         style for metasyntactic variables.
2013         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2014         metasyntactic variables.
2015         (adi_assign_command): Likewise.
2016
2017 2018-09-16  Tom Tromey  <tom@tromey.com>
2018
2019         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2020         metasyntactic variables.  Print message if no disassembler options
2021         are available.
2022
2023 2018-09-15  Tom Tromey  <tom@tromey.com>
2024
2025         * infcmd.c (get_inferior_args): Return const char *.
2026         * inferior.h (get_inferior_args): Return type now const.
2027         * linux-tdep.c (linux_fill_prpsinfo): Update.
2028         * procfs.c (procfs_target::make_corefile_notes): Update.
2029
2030 2018-09-07  Tom Tromey  <tom@tromey.com>
2031
2032         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2033         inside the TRY.
2034
2035 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2036
2037         * nios2-tdep.c (nios2_type_align): New.
2038         (nios2_gdb_arch_init): Install type_align hook.
2039
2040 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2041
2042         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2043         type that is neither object file owned, nor gdbarch owned.
2044         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2045         gdbarch is non-NULL.
2046         (alloc_type_instance): Allocate non-objfile owned types on the
2047         gdbarch obstack.
2048         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2049         using TYPE_ALLOC to ensure memory is allocated on the correct
2050         obstack.
2051         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2052         obstack, or the gdbarch obstack.
2053         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2054
2055 2018-09-14  Tom Tromey  <tom@tromey.com>
2056
2057         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2058         block.
2059
2060 2018-09-14  Tom Tromey  <tom@tromey.com>
2061
2062         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2063
2064 2018-09-13  Tom Tromey  <tom@tromey.com>
2065
2066         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2067         static.
2068
2069 2018-09-13  Tom Tromey  <tom@tromey.com>
2070
2071         * exec.c (try_open_exec_file): Use std::string.
2072
2073 2018-09-13  Tom Tromey  <tom@tromey.com>
2074
2075         * utils.h (gdb_bfd_errmsg): Return std::string.
2076         * exec.c (exec_file_attach): Update.
2077         * compile/compile-object-load.c (compile_object_load): Update.
2078         * utils.c (gdb_bfd_errmsg): Return std::string.
2079
2080 2018-09-13  Tom Tromey  <tom@tromey.com>
2081
2082         * procfs.c (struct procinfo_deleter): New.
2083         (procinfo_up): New typedef.
2084         (do_destroy_procinfo_cleanup): Remove.
2085         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2086
2087 2018-09-13  Tom Tromey  <tom@tromey.com>
2088
2089         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2090
2091 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2092 2018-09-13  Tom Tromey  <tom@tromey.com>
2093
2094         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2095         (pspy_get_objfiles): New function.
2096         (progspace_object_methods): New.
2097         (pspace_object_type): Add tp_methods callback.
2098         * python/python-internal.h (build_objfiles_list): New
2099         declaration.
2100         * python/python.c (build_objfiles_list): New function.
2101         (gdbpy_objfiles): Implement using build_objfiles_list.
2102         * NEWS: Mention the Progspace.objfiles method.
2103
2104 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2105
2106         * python/py-inferior.c (infpy_get_progspace): New function.
2107         (inferior_object_getset): Add progspace property.
2108         * NEWS: Mention the new property.
2109
2110 2018-09-13  Tom Tromey  <tom@tromey.com>
2111
2112         PR rust/23650:
2113         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2114
2115 2018-09-13  Tom Tromey  <tom@tromey.com>
2116
2117         PR rust/23626:
2118         * rust-lang.c (rust_enum_variant): Now static.
2119         (rust_empty_enum_p): New function.
2120         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2121         Handle empty enum.
2122
2123 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2124
2125         * python/py-inferior.c (infpy_repr): New.
2126         (inferior_object_type): Register infpy_repr.
2127         * python/py-objfile.c (objfpy_repr): New.
2128         (objfile_object_type): Register objfpy_repr.
2129
2130 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2131
2132         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2133
2134 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2135
2136         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2137         typo.
2138
2139 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2140
2141         * common/common-utils.c: Don't include '<sys/stat.h>'.
2142         (is_regular_file): Move to...
2143         * common/filestuff.c (is_regular_file): ... here.
2144         * common/common-utils.h (is_regular_file): Move to...
2145         * common/filestuff.h (is_regular_file): ... here.
2146
2147 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2148
2149         * skip.c (debug_skip): New variable.
2150         (skiplist_entry::do_skip_file_p): Add debug output.
2151         (skiplist_entry::do_skip_gfile_p): Likewise.
2152         (skiplist_entry::skip_function_p): Likewise.
2153         (_initialize_step_skip): Create debug command.
2154         * NEWS: Mention set/show debug skip.
2155
2156 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2157
2158         * darwin-nat.c (should_disable_startup_with_shell):
2159         New function.
2160         (darwin_nat_target::create_inferior): Add call.
2161
2162 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2163
2164         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2165         inf_port, msg_state>: Initialize.
2166         (struct darwin_thread_info) <signaled, single_step>: Change
2167         type and initialize.
2168         (struct darwin_thread_info) <event>: Initialize.
2169
2170 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2171
2172         PR gdb/23555
2173         PR gdb/23558
2174         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2175         guesses.
2176
2177 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2178
2179         Revert:
2180         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2181
2182         PR gdb/23555
2183         PR gdb/23558
2184         * gnulib/aclocal.m4: Regenerate.
2185         * gnulib/config.in: Regenerate.
2186         * gnulib/configure: Regenerate.
2187         * gnulib/import/Makefile.am: Update.
2188         * gnulib/import/Makefile.in: Update.
2189         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2190         * gnulib/import/_Noreturn.h: ... this.
2191         * gnulib/import/alloca.in.h: Update.
2192         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2193         * gnulib/import/arg-nonnull.h: ... this.
2194         * gnulib/import/assure.h: Update.
2195         * gnulib/import/at-func.c: Update.
2196         * gnulib/import/basename-lgpl.c: Update.
2197         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2198         * gnulib/import/c++defs.h: ... this.
2199         * gnulib/import/canonicalize-lgpl.c: Update.
2200         * gnulib/import/cdefs.h: Update.
2201         * gnulib/import/chdir-long.c: Update.
2202         * gnulib/import/chdir-long.h: Update.
2203         * gnulib/import/cloexec.c: Update.
2204         * gnulib/import/cloexec.h: Update.
2205         * gnulib/import/close.c: Update.
2206         * gnulib/import/closedir.c: Update.
2207         * gnulib/import/config.charset: Update.
2208         * gnulib/import/dirent-private.h: Update.
2209         * gnulib/import/dirent.in.h: Update.
2210         * gnulib/import/dirfd.c: Update.
2211         * gnulib/import/dirname-lgpl.c: Update.
2212         * gnulib/import/dirname.h: Update.
2213         * gnulib/import/dosname.h: Update.
2214         * gnulib/import/dup-safer-flag.c: Update.
2215         * gnulib/import/dup-safer.c: Update.
2216         * gnulib/import/dup.c: Update.
2217         * gnulib/import/dup2.c: Update.
2218         * gnulib/import/errno.in.h: Update.
2219         * gnulib/import/error.c: Update.
2220         * gnulib/import/error.h: Update.
2221         * gnulib/import/exitfail.c: Update.
2222         * gnulib/import/exitfail.h: Update.
2223         * gnulib/import/extra/update-copyright: Update.
2224         * gnulib/import/fchdir.c: Update.
2225         * gnulib/import/fcntl.c: Update.
2226         * gnulib/import/fcntl.in.h: Update.
2227         * gnulib/import/fd-hook.c: Update.
2228         * gnulib/import/fd-hook.h: Update.
2229         * gnulib/import/fd-safer-flag.c: Update.
2230         * gnulib/import/fd-safer.c: Update.
2231         * gnulib/import/fdopendir.c: Update.
2232         * gnulib/import/filename.h: Update.
2233         * gnulib/import/filenamecat-lgpl.c: Update.
2234         * gnulib/import/filenamecat.h: Update.
2235         * gnulib/import/flexmember.h: Update.
2236         * gnulib/import/float+.h: Update.
2237         * gnulib/import/float.c: Update.
2238         * gnulib/import/float.in.h: Update.
2239         * gnulib/import/fnmatch.c: Update.
2240         * gnulib/import/fnmatch.in.h: Update.
2241         * gnulib/import/fnmatch_loop.c: Update.
2242         * gnulib/import/fpucw.h: Update.
2243         * gnulib/import/frexp.c: Update.
2244         * gnulib/import/frexpl.c: Update.
2245         * gnulib/import/fstat.c: Update.
2246         * gnulib/import/fstatat.c: Update.
2247         * gnulib/import/getcwd-lgpl.c: Update.
2248         * gnulib/import/getcwd.c: Update.
2249         * gnulib/import/getdtablesize.c: Update.
2250         * gnulib/import/getlogin_r.c: Update.
2251         * gnulib/import/getprogname.c: Update.
2252         * gnulib/import/getprogname.h: Update.
2253         * gnulib/import/gettext.h: Update.
2254         * gnulib/import/gettimeofday.c: Update.
2255         * gnulib/import/glob-libc.h: Update.
2256         * gnulib/import/glob.c: Update.
2257         * gnulib/import/glob.in.h: Update.
2258         * gnulib/import/glob_internal.h: Update.
2259         * gnulib/import/glob_pattern_p.c: Update.
2260         * gnulib/import/globfree.c: Update.
2261         * gnulib/import/hard-locale.c: Update.
2262         * gnulib/import/hard-locale.h: Update.
2263         * gnulib/import/intprops.h: Update.
2264         * gnulib/import/inttypes.in.h: Update.
2265         * gnulib/import/isnan.c: Update.
2266         * gnulib/import/isnand-nolibm.h: Update.
2267         * gnulib/import/isnand.c: Update.
2268         * gnulib/import/isnanl-nolibm.h: Update.
2269         * gnulib/import/isnanl.c: Update.
2270         * gnulib/import/itold.c: Update.
2271         * gnulib/import/libc-config.h: Update.
2272         * gnulib/import/limits.in.h: Update.
2273         * gnulib/import/localcharset.c: Update.
2274         * gnulib/import/localcharset.h: Update.
2275         * gnulib/import/localtime-buffer.c: Update.
2276         * gnulib/import/localtime-buffer.h: Update.
2277         * gnulib/import/lstat.c: Update.
2278         * gnulib/import/m4/00gnulib.m4: Update.
2279         * gnulib/import/m4/__inline.m4: Update.
2280         * gnulib/import/m4/absolute-header.m4: Update.
2281         * gnulib/import/m4/alloca.m4: Update.
2282         * gnulib/import/m4/builtin-expect.m4: Update.
2283         * gnulib/import/m4/canonicalize.m4: Update.
2284         * gnulib/import/m4/chdir-long.m4: Update.
2285         * gnulib/import/m4/close.m4: Update.
2286         * gnulib/import/m4/closedir.m4: Update.
2287         * gnulib/import/m4/configmake.m4: Update.
2288         * gnulib/import/m4/d-ino.m4: Update.
2289         * gnulib/import/m4/d-type.m4: Update.
2290         * gnulib/import/m4/dirent_h.m4: Update.
2291         * gnulib/import/m4/dirfd.m4: Update.
2292         * gnulib/import/m4/dirname.m4: Update.
2293         * gnulib/import/m4/double-slash-root.m4: Update.
2294         * gnulib/import/m4/dup.m4: Update.
2295         * gnulib/import/m4/dup2.m4: Update.
2296         * gnulib/import/m4/eealloc.m4: Update.
2297         * gnulib/import/m4/environ.m4: Update.
2298         * gnulib/import/m4/errno_h.m4: Update.
2299         * gnulib/import/m4/error.m4: Update.
2300         * gnulib/import/m4/exponentd.m4: Update.
2301         * gnulib/import/m4/exponentl.m4: Update.
2302         * gnulib/import/m4/extensions.m4: Update.
2303         * gnulib/import/m4/extern-inline.m4: Update.
2304         * gnulib/import/m4/fchdir.m4: Update.
2305         * gnulib/import/m4/fcntl-o.m4: Update.
2306         * gnulib/import/m4/fcntl.m4: Update.
2307         * gnulib/import/m4/fcntl_h.m4: Update.
2308         * gnulib/import/m4/fdopendir.m4: Update.
2309         * gnulib/import/m4/filenamecat.m4: Update.
2310         * gnulib/import/m4/flexmember.m4: Update.
2311         * gnulib/import/m4/float_h.m4: Update.
2312         * gnulib/import/m4/fnmatch.m4: Update.
2313         * gnulib/import/m4/fnmatch_h.m4: Update.
2314         * gnulib/import/m4/fpieee.m4: Update.
2315         * gnulib/import/m4/frexp.m4: Update.
2316         * gnulib/import/m4/frexpl.m4: Update.
2317         * gnulib/import/m4/fstat.m4: Update.
2318         * gnulib/import/m4/fstatat.m4: Update.
2319         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2320         * gnulib/import/m4/getcwd-path-max.m4: Update.
2321         * gnulib/import/m4/getcwd.m4: Update.
2322         * gnulib/import/m4/getdtablesize.m4: Update.
2323         * gnulib/import/m4/getlogin.m4: Update.
2324         * gnulib/import/m4/getlogin_r.m4: Update.
2325         * gnulib/import/m4/getpagesize.m4: Update.
2326         * gnulib/import/m4/getprogname.m4: Update.
2327         * gnulib/import/m4/gettimeofday.m4: Update.
2328         * gnulib/import/m4/glibc21.m4: Update.
2329         * gnulib/import/m4/glob.m4: Update.
2330         * gnulib/import/m4/glob_h.m4: Update.
2331         * gnulib/import/m4/gnulib-cache.m4: Update.
2332         * gnulib/import/m4/gnulib-common.m4: Update.
2333         * gnulib/import/m4/gnulib-comp.m4: Update.
2334         * gnulib/import/m4/gnulib-tool.m4: Update.
2335         * gnulib/import/m4/hard-locale.m4: Update.
2336         * gnulib/import/m4/include_next.m4: Update.
2337         * gnulib/import/m4/inttypes-pri.m4: Update.
2338         * gnulib/import/m4/inttypes.m4: Update.
2339         * gnulib/import/m4/isnand.m4: Update.
2340         * gnulib/import/m4/isnanl.m4: Update.
2341         * gnulib/import/m4/largefile.m4: Update.
2342         * gnulib/import/m4/limits-h.m4: Update.
2343         * gnulib/import/m4/localcharset.m4: Update.
2344         * gnulib/import/m4/locale-fr.m4: Update.
2345         * gnulib/import/m4/locale-ja.m4: Update.
2346         * gnulib/import/m4/locale-zh.m4: Update.
2347         * gnulib/import/m4/localtime-buffer.m4: Update.
2348         * gnulib/import/m4/longlong.m4: Update.
2349         * gnulib/import/m4/lstat.m4: Update.
2350         * gnulib/import/m4/malloc.m4: Update.
2351         * gnulib/import/m4/malloca.m4: Update.
2352         * gnulib/import/m4/math_h.m4: Update.
2353         * gnulib/import/m4/mbrtowc.m4: Update.
2354         * gnulib/import/m4/mbsinit.m4: Update.
2355         * gnulib/import/m4/mbsrtowcs.m4: Update.
2356         * gnulib/import/m4/mbstate_t.m4: Update.
2357         * gnulib/import/m4/memchr.m4: Update.
2358         * gnulib/import/m4/memmem.m4: Update.
2359         * gnulib/import/m4/mempcpy.m4: Update.
2360         * gnulib/import/m4/memrchr.m4: Update.
2361         * gnulib/import/m4/mkdir.m4: Update.
2362         * gnulib/import/m4/mkstemp.m4: Update.
2363         * gnulib/import/m4/mmap-anon.m4: Update.
2364         * gnulib/import/m4/mode_t.m4: Update.
2365         * gnulib/import/m4/msvc-inval.m4: Update.
2366         * gnulib/import/m4/msvc-nothrow.m4: Update.
2367         * gnulib/import/m4/multiarch.m4: Update.
2368         * gnulib/import/m4/nocrash.m4: Update.
2369         * gnulib/import/m4/off_t.m4: Update.
2370         * gnulib/import/m4/onceonly.m4: Update.
2371         * gnulib/import/m4/open-cloexec.m4: Update.
2372         * gnulib/import/m4/open.m4: Update.
2373         * gnulib/import/m4/openat.m4: Update.
2374         * gnulib/import/m4/opendir.m4: Update.
2375         * gnulib/import/m4/pathmax.m4: Update.
2376         * gnulib/import/m4/rawmemchr.m4: Update.
2377         * gnulib/import/m4/readdir.m4: Update.
2378         * gnulib/import/m4/readlink.m4: Update.
2379         * gnulib/import/m4/realloc.m4: Update.
2380         * gnulib/import/m4/rename.m4: Update.
2381         * gnulib/import/m4/rewinddir.m4: Update.
2382         * gnulib/import/m4/rmdir.m4: Update.
2383         * gnulib/import/m4/save-cwd.m4: Update.
2384         * gnulib/import/m4/secure_getenv.m4: Update.
2385         * gnulib/import/m4/setenv.m4: Update.
2386         * gnulib/import/m4/signal_h.m4: Update.
2387         * gnulib/import/m4/ssize_t.m4: Update.
2388         * gnulib/import/m4/stat-time.m4: Update.
2389         * gnulib/import/m4/stat.m4: Update.
2390         * gnulib/import/m4/std-gnu11.m4: Update.
2391         * gnulib/import/m4/stdbool.m4: Update.
2392         * gnulib/import/m4/stddef_h.m4: Update.
2393         * gnulib/import/m4/stdint.m4: Update.
2394         * gnulib/import/m4/stdio_h.m4: Update.
2395         * gnulib/import/m4/stdlib_h.m4: Update.
2396         * gnulib/import/m4/strchrnul.m4: Update.
2397         * gnulib/import/m4/strdup.m4: Update.
2398         * gnulib/import/m4/strerror.m4: Update.
2399         * gnulib/import/m4/string_h.m4: Update.
2400         * gnulib/import/m4/strstr.m4: Update.
2401         * gnulib/import/m4/strtok_r.m4: Update.
2402         * gnulib/import/m4/sys_socket_h.m4: Update.
2403         * gnulib/import/m4/sys_stat_h.m4: Update.
2404         * gnulib/import/m4/sys_time_h.m4: Update.
2405         * gnulib/import/m4/sys_types_h.m4: Update.
2406         * gnulib/import/m4/tempname.m4: Update.
2407         * gnulib/import/m4/time_h.m4: Update.
2408         * gnulib/import/m4/unistd-safer.m4: Update.
2409         * gnulib/import/m4/unistd_h.m4: Update.
2410         * gnulib/import/m4/warn-on-use.m4: Update.
2411         * gnulib/import/m4/wchar_h.m4: Update.
2412         * gnulib/import/m4/wchar_t.m4: Update.
2413         * gnulib/import/m4/wctype_h.m4: Update.
2414         * gnulib/import/m4/wint_t.m4: Update.
2415         * gnulib/import/malloc.c: Update.
2416         * gnulib/import/malloc/scratch_buffer.h: Update.
2417         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2418         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2419         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2420         * gnulib/import/malloca.c: Update.
2421         * gnulib/import/malloca.h: Update.
2422         * gnulib/import/malloca.valgrind: Update.
2423         * gnulib/import/math.in.h: Update.
2424         * gnulib/import/mbrtowc.c: Update.
2425         * gnulib/import/mbsinit.c: Update.
2426         * gnulib/import/mbsrtowcs-impl.h: Update.
2427         * gnulib/import/mbsrtowcs-state.c: Update.
2428         * gnulib/import/mbsrtowcs.c: Update.
2429         * gnulib/import/memchr.c: Update.
2430         * gnulib/import/memmem.c: Update.
2431         * gnulib/import/mempcpy.c: Update.
2432         * gnulib/import/memrchr.c: Update.
2433         * gnulib/import/mkdir.c: Update.
2434         * gnulib/import/mkstemp.c: Update.
2435         * gnulib/import/msvc-inval.c: Update.
2436         * gnulib/import/msvc-inval.h: Update.
2437         * gnulib/import/msvc-nothrow.c: Update.
2438         * gnulib/import/msvc-nothrow.h: Update.
2439         * gnulib/import/open.c: Update.
2440         * gnulib/import/openat-die.c: Update.
2441         * gnulib/import/openat-priv.h: Update.
2442         * gnulib/import/openat-proc.c: Update.
2443         * gnulib/import/openat.c: Update.
2444         * gnulib/import/openat.h: Update.
2445         * gnulib/import/opendir.c: Update.
2446         * gnulib/import/pathmax.h: Update.
2447         * gnulib/import/pipe-safer.c: Update.
2448         * gnulib/import/rawmemchr.c: Update.
2449         * gnulib/import/readdir.c: Update.
2450         * gnulib/import/readlink.c: Update.
2451         * gnulib/import/realloc.c: Update.
2452         * gnulib/import/ref-add.sin: Update.
2453         * gnulib/import/ref-del.sin: Update.
2454         * gnulib/import/rename.c: Update.
2455         * gnulib/import/rewinddir.c: Update.
2456         * gnulib/import/rmdir.c: Update.
2457         * gnulib/import/same-inode.h: Update.
2458         * gnulib/import/save-cwd.c: Update.
2459         * gnulib/import/save-cwd.h: Update.
2460         * gnulib/import/scratch_buffer.h: Update.
2461         * gnulib/import/secure_getenv.c: Update.
2462         * gnulib/import/setenv.c: Update.
2463         * gnulib/import/signal.in.h: Update.
2464         * gnulib/import/stat-time.c: Update.
2465         * gnulib/import/stat-time.h: Update.
2466         * gnulib/import/stat-w32.c: Update.
2467         * gnulib/import/stat-w32.h: Update.
2468         * gnulib/import/stat.c: Update.
2469         * gnulib/import/stdbool.in.h: Update.
2470         * gnulib/import/stddef.in.h: Update.
2471         * gnulib/import/stdint.in.h: Update.
2472         * gnulib/import/stdio.in.h: Update.
2473         * gnulib/import/stdlib.in.h: Update.
2474         * gnulib/import/str-two-way.h: Update.
2475         * gnulib/import/strchrnul.c: Update.
2476         * gnulib/import/strdup.c: Update.
2477         * gnulib/import/streq.h: Update.
2478         * gnulib/import/strerror-override.c: Update.
2479         * gnulib/import/strerror-override.h: Update.
2480         * gnulib/import/strerror.c: Update.
2481         * gnulib/import/string.in.h: Update.
2482         * gnulib/import/stripslash.c: Update.
2483         * gnulib/import/strnlen1.c: Update.
2484         * gnulib/import/strnlen1.h: Update.
2485         * gnulib/import/strstr.c: Update.
2486         * gnulib/import/strtok_r.c: Update.
2487         * gnulib/import/sys_stat.in.h: Update.
2488         * gnulib/import/sys_time.in.h: Update.
2489         * gnulib/import/sys_types.in.h: Update.
2490         * gnulib/import/tempname.c: Update.
2491         * gnulib/import/tempname.h: Update.
2492         * gnulib/import/time.in.h: Update.
2493         * gnulib/import/unistd--.h: Update.
2494         * gnulib/import/unistd-safer.h: Update.
2495         * gnulib/import/unistd.in.h: Update.
2496         * gnulib/import/unsetenv.c: Update.
2497         * gnulib/import/verify.h: Update.
2498         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2499         * gnulib/import/wchar.in.h: Update.
2500         * gnulib/import/wctype.in.h: Update.
2501         * gnulib/import/xalloc-oversized.h: Update.
2502         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2503         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2504
2505 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2506
2507         * record-btrace.c (get_thread_current_frame): Remove
2508         old_inferior_ptid.
2509
2510 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2511
2512         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2513         with check_tag to 1 if and only if the type is tagged and the
2514         component being searched cannot been found in the current
2515         view. Otherwise, always call ada_to_fixed_type with
2516         check_tag to 0.
2517
2518 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2519
2520         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2521         declaration.
2522         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2523         * ada-varobj.c (ada_varobj_get_number_of_children,
2524         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2525
2526 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2527
2528         * ada-valprint.c (ada_value_print): Use type instead of
2529         enclosing type.
2530
2531 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2532
2533         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2534         an array of access to unconstrained array.
2535
2536 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2537
2538         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2539         (ada_check_typedef): Use it.
2540
2541 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2542
2543         * ada-varobj.c (ada_varobj_describe_struct_child)
2544         (ada_varobj_describe_child): Handle union case like struct one.
2545
2546 2018-09-10  Tom Tromey  <tom@tromey.com>
2547
2548         PR python/18380:
2549         * python/python.c (_initialize_python): Make example in "python"
2550         help work in Python 3.
2551
2552 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2553
2554         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2555         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2556         $(EXEEXT) to the script, as it is not a program.
2557
2558 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2559
2560         * python/py-prettyprint.c (pretty_print_one_value): Return
2561         gdbpy_ref<>.
2562         (print_string_repr): Adjust.
2563         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2564         * python/python-internal.h (apply_varobj_pretty_printer): Return
2565         gdbpy_ref<>.
2566         * varobj.c (varobj_value_get_print_value): Adjust.
2567
2568 2018-09-08  Tom Tromey  <tom@tromey.com>
2569
2570         PR python/16047:
2571         * python/py-prettyprint.c (pretty_print_one_value): Check for
2572         to_string method.
2573
2574 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2575
2576         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2577         replace_operator_with_call.
2578
2579 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2580
2581         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2582
2583 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2584
2585         * ada-typeprint.c (print_range): Print the bounds using TYPE
2586         rather than its TYPE_TARGET_TYPE.
2587
2588 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2589
2590         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2591         call to ada_to_fixed_value_create.
2592
2593 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2594
2595         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2596
2597 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2598
2599         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2600         by calls to error.
2601
2602 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2603
2604         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2605         Move update of loop variable "fi".
2606
2607 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2608
2609         * ada-lang.c (value_assign_to_component): In the case of
2610         big-endian targets, extract the bits of the given VAL
2611         using an src_offset of zero if container is not a scalar.
2612
2613 2018-09-06  Simon Ser  <contact@emersion.fr>
2614
2615         PR gdb/23105
2616         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2617         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2618         * fbsd-tdep.c (fbsd_make_note_desc): New.
2619         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2620         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2621         * target.h (enum target_object) Add FreeBSD-specific
2622         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2623
2624 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2625
2626         * compile/compile-c.h (generate_c_for_variable_locations):
2627         Change reference to pointer.
2628         * compile/compile-c-support.c (compile_program) <compute>:
2629         Likewise.
2630         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2631         (generate_c_for_for_one_variable): Likewise
2632         (generate_c_for_variable_locations): Likewise
2633         * compile/compile-c-types.c (compile_c_instance::convert_type):
2634         Likewise
2635         * compile/compile-cplus-symbols.c (convert_one_symbol):
2636         std::move the scope passed to enter_scope.
2637         * compile/compile-cplus-types.c
2638         (compile_cplus_instance::enter_scope): Make parameter
2639         rvalue-reference.
2640         (compile_cplus_instance::new_scope): Change reference to
2641         pointer.
2642         (compile_cplus_instance::convert_type): Likewise
2643         (compile_cplus_convert_typedef): std::move the scope passed to
2644         enter_scope.
2645         (compile_cplus_convert_struct_or_union): Likewise.
2646         (compile_cplus_convert_enum): Likewise.
2647         (compile_cplus_convert_namespace): Likewise.
2648         * compile/compile-cplus.h (compile_cplus_instance)
2649         <enter_scope>: Make parameter rvalue-reference.
2650         * compile/compile-internal.h (compile_instance)
2651         <get_cached_type>: Likewise
2652         * compile/compile-loc2c.c (push): Likewise
2653         (pushf): Likewise
2654         (unary): Likewise
2655         (binary): Likewise
2656         (print_label): Likewise
2657         (pushf_register_address): Likewise
2658         (pushf_register): Likewise
2659         (do_compile_dwarf_expr_to_c): Likewise
2660         (compile_dwarf_expr_to_c): Likewise
2661         (compile_dwarf_bounds_to_c): Likewise
2662         * compile/compile.c (compile_instance::get_cached_type):
2663         Likewise
2664         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2665         (compile_dwarf_bounds_to_c): Likewise
2666         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2667         (dwarf2_compile_property_to_c): Likewise
2668         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2669         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2670         Likewise
2671
2672 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2673
2674         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2675         * tui/tui-data.c (init_content_element): Don't initialize it.
2676
2677 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2678
2679         * tui/tui-data.h (struct tui_win_info)
2680         <detail::opaque>: Remove.
2681         * tui/tui-data.c (init_win_info): Remove assignment.
2682
2683 2018-09-05  Tom Tromey  <tom@tromey.com>
2684
2685         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2686         -Wformat-nonliteral.
2687         * target-float.c (host_float_ops<T>::to_string)
2688         (host_float_ops<T>::from_string): Use
2689         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2690         * configure: Rebuild.
2691
2692 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2693
2694         * printcmd.c (printf_c_string): Use
2695         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2696         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2697
2698 2018-09-05  Tom Tromey  <tom@tromey.com>
2699
2700         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2701
2702 2018-09-05  Tom de Vries  <tdevries@suse.de>
2703
2704         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2705         with resolve_abstract_p == true.
2706         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2707         defaulting to false. Propagate resolve_abstract_p to
2708         dwarf2_fetch_die_loc_sect_off.
2709         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2710         parameter, defaulting to false.
2711         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2712         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2713         parameter.
2714         * dwarf2read.h (struct die_info): Forward-declare.
2715         (die_info_ptr): New typedef.
2716         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2717
2718 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2719
2720         GDB 8.2 released.
2721
2722 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2723             Pedro Alves  <palves@redhat.com>
2724
2725         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2726         "aclocal-m4-deps.mk".  Include file here.
2727         $(srcdir)/aclocal.m4: Add "configure.ac".
2728         * gnulib/aclocal-m4-deps.mk: New file.
2729         * gnulib/update-gnulib.sh: Automatically update
2730         "aclocal-m4-deps.mk".
2731
2732 2018-09-04  Tom Tromey  <tom@tromey.com>
2733
2734         * configure: Rebuild.
2735         * configure.ac: Remove multi-ice code.
2736
2737 2018-09-04  Tom Tromey  <tom@tromey.com>
2738
2739         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2740         (ada-exp.o): Update.
2741
2742 2018-09-04  Tom Tromey  <tom@tromey.com>
2743
2744         * Makefile.in (printcmd.o, target-float.o): Remove.
2745         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2746
2747 2018-09-04  Tom Tromey  <tom@tromey.com>
2748
2749         * gnulib/Makefile.in: Remove obsolete comment.
2750         * Makefile.in: Remove obsolete comment.
2751
2752 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2753
2754         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2755         line with '+'.
2756
2757 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2758
2759         * riscv-tdep.c: Add 'prologue-value.h' include.
2760         (struct riscv_unwind_cache): New struct.
2761         (riscv_debug_unwinder): New global.
2762         (riscv_scan_prologue): Update arguments, capture register details
2763         from prologue scan.
2764         (riscv_skip_prologue): Reformat arguments line, move end of
2765         prologue calculation into riscv_scan_prologue.
2766         (riscv_frame_cache): Update return type, create
2767         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2768         details.
2769         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2770         (riscv_frame_prev_register): Use the trad_frame within the
2771         riscv_unwind_cache.
2772         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2773         flag.
2774
2775 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2776
2777         * trad-frame.h (trad_frame_set_realreg): Declare.
2778         (trad_frame_set_addr): Declare.
2779         * trad-frame.c (trad_frame_set_realreg): Define new function.
2780         (trad_frame_set_addr): Define new function.
2781         (trad_frame_set_reg_realreg): Use new function.
2782         (trad_frame_set_reg_addr): Use new function.
2783
2784 2018-09-01  Keith Seitz  <keiths@redhat.com>
2785
2786         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2787         pulongest instead of "%lld".
2788         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2789         ATTRIBUTE_UNUSED.
2790
2791 2018-08-31  Tom Tromey  <tom@tromey.com>
2792
2793         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2794         variant part type.
2795
2796 2018-08-31  Pedro Alves  <palves@redhat.com>
2797
2798         * gdbarch.h: Regenerate.
2799
2800 2018-08-31  Pedro Alves  <palves@redhat.com>
2801
2802         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2803         * target.h (Hardware watchpoint interfaces): Describe
2804         continuable/steppable/non-steppable watchpoints.
2805         * gdbarch.h, gdbarch.c: Regenerate.
2806
2807 2018-08-31  Pedro Alves  <palves@redhat.com>
2808
2809         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2810         Delete.
2811         * s390-linux-nat.c
2812         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2813         * target.h (target_ops::have_continuable_watchpoint): Delete.
2814         (target_have_continuable_watchpoint): Delete.
2815         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2816         * target-delegates.c: Regenerate.
2817
2818 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2819
2820         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2821         the files present in "gnulib/import/m4/".
2822
2823 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2824
2825         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2826         c.sw, c.swsp, and c.sdsp.
2827
2828 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2829
2830         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2831         (riscv_read_misa_reg): Don't cache value read into inferior data.
2832         (riscv_new_inferior_data): Delete.
2833         (riscv_inferior_data_cleanup): Delete.
2834         (riscv_inferior_data): Delete.
2835         (riscv_invalidate_inferior_data): Delete.
2836         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2837
2838 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2839
2840         * compile/compile-cplus-types.c
2841         (compile_cplus_instance::leave_scope): Take the address of scope
2842         object.
2843         (compile_cplus_instance::convert_qualified_base): Compare quals
2844         to 0.
2845
2846 2018-08-30  Keith Seitz  <keiths@redhat.com>
2847
2848         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2849         Use "%s" and host_address_to_string instead of "%p" in printf.
2850
2851 2018-08-29  Keith Seitz  <keiths@redhat.com>
2852
2853         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2854         and compile-cplus-types.c.
2855         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2856         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2857         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2858         Declare.
2859         * compile/compile-c-support.c: Include compile-cplus.h.
2860         (load_libcompile): Templatize.
2861         (get_compile_context): "New" function.
2862         (c_get_compile_context): Use get_compile_context.
2863         (cplus_get_compile_context): New function.
2864         (cplus_push_user_expression, cplus_pop_user_expression)
2865         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2866         (cplus_compute_program): Define new structs/functions.
2867         * compile/compile-cplus-symmbols.c: New file.
2868         * compile/compile-cplus-types.c: New file.
2869         * compile/compile-cplus.h: New file.
2870         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2871         Declare.
2872         * compile/compile-object-load.c (get_out_value_type): Use
2873         strncmp_iw when comparing symbol names.
2874         (compile_object_load): Add mst_bss and mst_data.
2875         * compile/compile.c (_initialize_compile): Remove
2876         -Wno-implicit-function-declaration from `compile_args'.
2877         * compile/gcc-cp-plugin.h: New file.
2878         * NEWS: Mention C++ compile support and new debug options.
2879
2880 2018-08-29  Keith Seitz  <keiths@redhat.com>
2881
2882         * linespec.c (collect_info::add_symbol): Make virtual.
2883         (struct symbol_searcher_collect_info): New struct.
2884         (symbol_searcher::find_all_symbols): New method.
2885         * symtab.h (class symbol_searcher): New class.
2886
2887 2018-08-29  Keith Seitz  <keiths@redhat.com>
2888
2889         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2890         Change to vector of block_symbol.  Update all users.
2891         (struct collect_info) <symbols>: Likewise.
2892         (collect_info::add_symbol): Take block_symbol as argument.
2893         Update all callers.
2894         (decode_compound_collector) <m_symbols>: Change type to vector
2895         of block_symbol.  Update all users.
2896         (decode_compound_collector::operator ()): Change parameter type
2897         to block_symbol.
2898         (find_method, find_function_symbols, find_linespec_symbols)
2899         (find_label_symbols_in_block, find_label_symbols): Change symbol
2900         vectors to block_symbol vectors.
2901         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2902         block_symbol.
2903
2904 2018-08-29  Keith Seitz  <keiths@redhat.com>
2905
2906         * linespec.c (symbolp): Remove typedef and VEC definitions.
2907         (bound_minimal_symbol_d): Likewise.
2908
2909 2018-08-29  Keith Seitz  <keiths@redhat.com>
2910
2911         * linespec.c (decode_compound_collector::decode_compound_collector):
2912         Remove initialization for `m_symtabs'.
2913         (decode_compound_collector::release_symbols): Change return type
2914         to std::vector.  Update all callers.
2915         (class decode_compound_collector) <m_symbols>: Change type to
2916         std::vector.
2917         (lookup_prefix_sym): Change return type to std::vector.  Update all
2918         callers.
2919         (compare_symbols): Remove.
2920         (std_compare_symbols): Rename to `compare_symbols'.
2921         (find_method): Change `sym_classes' parameter to std::vector.
2922         Update all callers.  Use std::sort to sort sym_classes.
2923         (find_linespec_symbols): Remove cleanup.
2924
2925 2018-08-29  Keith Seitz  <keiths@redhat.com>
2926
2927         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2928         std::vector.  Update all users.
2929         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2930         (struct collect_info) <minimal_symbols>: Likewise.
2931         (compare_msymbols): Return bool.  Change parameters to const
2932         bound_minimal_symbol references.
2933         (find_method, find_function_symbols, find_linespec_symbols): Change
2934         `minsyms' parameter to std::vector.  Update all callers.
2935
2936 2018-08-29  Keith Seitz  <keiths@redhat.com>
2937
2938         * linespec.c (struct linespec) <label_symbols>: Change type to
2939         std::vector.  Update all users.
2940         (find_label_symbols_in_block): Change `result' parameter to
2941         std::vector.  Update all callers.
2942         (find_label_symbols): Return std::vector.  Update all callers.
2943
2944 2018-08-29  Keith Seitz  <keiths@redhat.com>
2945
2946         * linespec.c (struct linespec) <function_symbols>: Change type to
2947         std::vector.  Update all users.
2948         (struct collect_info) <function_symbols>: Likewise.
2949         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2950         (std_compare_symbols): New function.
2951         (find_method, find_function_symbols, find_linespec_symbols)
2952         (find_label_symbols_in_block): Change `symbols' parameter to
2953         std::vector.  Update all callers.
2954         (find_label_symbols): Likewise for `function_symbols' and
2955         `label_funcs_ret'.
2956
2957 2018-08-29  Keith Seitz  <keiths@redhat.com>
2958
2959         * linespec.c (symtab_vector_up): Define.
2960         (struct linespec) <file_symtabs>: Change type to std::vector *.
2961         Update all uses.
2962         (struct collect_info) <file_symtabs>: Likewise.
2963         (collect_symtabs_from_filename): Return symtab_vector_up.
2964         Update all callers.
2965         (decode_objc): Remove cleanup.
2966         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2967         (symtab_collector::release_symtabs): Return symtab_vector_up.
2968         Update all callers.
2969         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2970         Update all users.
2971         (collect_symtabs_from_filename, symtabs_from_filename): Return
2972         symtab_vector_up.  Update all callers.
2973
2974 2018-08-29  Tom Tromey  <tom@tromey.com>
2975
2976         * csky-tdep.c (csky_analyze_prologue): Use
2977         core_addr_to_string_nz.
2978
2979 2018-08-29  Tom Tromey  <tom@tromey.com>
2980
2981         * windows-nat.c (struct xlate_exception) <them>: Change type to
2982         DWORD.
2983         (xlate): Fix formatting.  Remove last entry.
2984         (struct xlate_exception, xlate): Comment out.
2985         (windows_nat_target::resume): Use ranged for.
2986
2987 2018-08-29  Jim Wilson  <jimw@sifive.com>
2988
2989         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2990         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2991         of NT_PRFPREG.
2992         (riscv_linux_nat_target::store_registers): Likewise.
2993
2994 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2995
2996         PR gdb/23555
2997         PR gdb/23558
2998         * gnulib/aclocal.m4: Regenerate.
2999         * gnulib/config.in: Regenerate.
3000         * gnulib/configure: Regenerate.
3001         * gnulib/import/Makefile.am: Update.
3002         * gnulib/import/Makefile.in: Update.
3003         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3004         * gnulib/import/_Noreturn.h: ... this.
3005         * gnulib/import/alloca.in.h: Update.
3006         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3007         * gnulib/import/arg-nonnull.h: ... this.
3008         * gnulib/import/assure.h: Update.
3009         * gnulib/import/at-func.c: Update.
3010         * gnulib/import/basename-lgpl.c: Update.
3011         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3012         * gnulib/import/c++defs.h: ... this.
3013         * gnulib/import/canonicalize-lgpl.c: Update.
3014         * gnulib/import/cdefs.h: Update.
3015         * gnulib/import/chdir-long.c: Update.
3016         * gnulib/import/chdir-long.h: Update.
3017         * gnulib/import/cloexec.c: Update.
3018         * gnulib/import/cloexec.h: Update.
3019         * gnulib/import/close.c: Update.
3020         * gnulib/import/closedir.c: Update.
3021         * gnulib/import/config.charset: Update.
3022         * gnulib/import/dirent-private.h: Update.
3023         * gnulib/import/dirent.in.h: Update.
3024         * gnulib/import/dirfd.c: Update.
3025         * gnulib/import/dirname-lgpl.c: Update.
3026         * gnulib/import/dirname.h: Update.
3027         * gnulib/import/dosname.h: Update.
3028         * gnulib/import/dup-safer-flag.c: Update.
3029         * gnulib/import/dup-safer.c: Update.
3030         * gnulib/import/dup.c: Update.
3031         * gnulib/import/dup2.c: Update.
3032         * gnulib/import/errno.in.h: Update.
3033         * gnulib/import/error.c: Update.
3034         * gnulib/import/error.h: Update.
3035         * gnulib/import/exitfail.c: Update.
3036         * gnulib/import/exitfail.h: Update.
3037         * gnulib/import/extra/update-copyright: Update.
3038         * gnulib/import/fchdir.c: Update.
3039         * gnulib/import/fcntl.c: Update.
3040         * gnulib/import/fcntl.in.h: Update.
3041         * gnulib/import/fd-hook.c: Update.
3042         * gnulib/import/fd-hook.h: Update.
3043         * gnulib/import/fd-safer-flag.c: Update.
3044         * gnulib/import/fd-safer.c: Update.
3045         * gnulib/import/fdopendir.c: Update.
3046         * gnulib/import/filename.h: Update.
3047         * gnulib/import/filenamecat-lgpl.c: Update.
3048         * gnulib/import/filenamecat.h: Update.
3049         * gnulib/import/flexmember.h: Update.
3050         * gnulib/import/float+.h: Update.
3051         * gnulib/import/float.c: Update.
3052         * gnulib/import/float.in.h: Update.
3053         * gnulib/import/fnmatch.c: Update.
3054         * gnulib/import/fnmatch.in.h: Update.
3055         * gnulib/import/fnmatch_loop.c: Update.
3056         * gnulib/import/fpucw.h: Update.
3057         * gnulib/import/frexp.c: Update.
3058         * gnulib/import/frexpl.c: Update.
3059         * gnulib/import/fstat.c: Update.
3060         * gnulib/import/fstatat.c: Update.
3061         * gnulib/import/getcwd-lgpl.c: Update.
3062         * gnulib/import/getcwd.c: Update.
3063         * gnulib/import/getdtablesize.c: Update.
3064         * gnulib/import/getlogin_r.c: Update.
3065         * gnulib/import/getprogname.c: Update.
3066         * gnulib/import/getprogname.h: Update.
3067         * gnulib/import/gettext.h: Update.
3068         * gnulib/import/gettimeofday.c: Update.
3069         * gnulib/import/glob-libc.h: Update.
3070         * gnulib/import/glob.c: Update.
3071         * gnulib/import/glob.in.h: Update.
3072         * gnulib/import/glob_internal.h: Update.
3073         * gnulib/import/glob_pattern_p.c: Update.
3074         * gnulib/import/globfree.c: Update.
3075         * gnulib/import/hard-locale.c: Update.
3076         * gnulib/import/hard-locale.h: Update.
3077         * gnulib/import/intprops.h: Update.
3078         * gnulib/import/inttypes.in.h: Update.
3079         * gnulib/import/isnan.c: Update.
3080         * gnulib/import/isnand-nolibm.h: Update.
3081         * gnulib/import/isnand.c: Update.
3082         * gnulib/import/isnanl-nolibm.h: Update.
3083         * gnulib/import/isnanl.c: Update.
3084         * gnulib/import/itold.c: Update.
3085         * gnulib/import/libc-config.h: Update.
3086         * gnulib/import/limits.in.h: Update.
3087         * gnulib/import/localcharset.c: Update.
3088         * gnulib/import/localcharset.h: Update.
3089         * gnulib/import/localtime-buffer.c: Update.
3090         * gnulib/import/localtime-buffer.h: Update.
3091         * gnulib/import/lstat.c: Update.
3092         * gnulib/import/m4/00gnulib.m4: Update.
3093         * gnulib/import/m4/__inline.m4: Update.
3094         * gnulib/import/m4/absolute-header.m4: Update.
3095         * gnulib/import/m4/alloca.m4: Update.
3096         * gnulib/import/m4/builtin-expect.m4: Update.
3097         * gnulib/import/m4/canonicalize.m4: Update.
3098         * gnulib/import/m4/chdir-long.m4: Update.
3099         * gnulib/import/m4/close.m4: Update.
3100         * gnulib/import/m4/closedir.m4: Update.
3101         * gnulib/import/m4/configmake.m4: Update.
3102         * gnulib/import/m4/d-ino.m4: Update.
3103         * gnulib/import/m4/d-type.m4: Update.
3104         * gnulib/import/m4/dirent_h.m4: Update.
3105         * gnulib/import/m4/dirfd.m4: Update.
3106         * gnulib/import/m4/dirname.m4: Update.
3107         * gnulib/import/m4/double-slash-root.m4: Update.
3108         * gnulib/import/m4/dup.m4: Update.
3109         * gnulib/import/m4/dup2.m4: Update.
3110         * gnulib/import/m4/eealloc.m4: Update.
3111         * gnulib/import/m4/environ.m4: Update.
3112         * gnulib/import/m4/errno_h.m4: Update.
3113         * gnulib/import/m4/error.m4: Update.
3114         * gnulib/import/m4/exponentd.m4: Update.
3115         * gnulib/import/m4/exponentl.m4: Update.
3116         * gnulib/import/m4/extensions.m4: Update.
3117         * gnulib/import/m4/extern-inline.m4: Update.
3118         * gnulib/import/m4/fchdir.m4: Update.
3119         * gnulib/import/m4/fcntl-o.m4: Update.
3120         * gnulib/import/m4/fcntl.m4: Update.
3121         * gnulib/import/m4/fcntl_h.m4: Update.
3122         * gnulib/import/m4/fdopendir.m4: Update.
3123         * gnulib/import/m4/filenamecat.m4: Update.
3124         * gnulib/import/m4/flexmember.m4: Update.
3125         * gnulib/import/m4/float_h.m4: Update.
3126         * gnulib/import/m4/fnmatch.m4: Update.
3127         * gnulib/import/m4/fnmatch_h.m4: Update.
3128         * gnulib/import/m4/fpieee.m4: Update.
3129         * gnulib/import/m4/frexp.m4: Update.
3130         * gnulib/import/m4/frexpl.m4: Update.
3131         * gnulib/import/m4/fstat.m4: Update.
3132         * gnulib/import/m4/fstatat.m4: Update.
3133         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3134         * gnulib/import/m4/getcwd-path-max.m4: Update.
3135         * gnulib/import/m4/getcwd.m4: Update.
3136         * gnulib/import/m4/getdtablesize.m4: Update.
3137         * gnulib/import/m4/getlogin.m4: Update.
3138         * gnulib/import/m4/getlogin_r.m4: Update.
3139         * gnulib/import/m4/getpagesize.m4: Update.
3140         * gnulib/import/m4/getprogname.m4: Update.
3141         * gnulib/import/m4/gettimeofday.m4: Update.
3142         * gnulib/import/m4/glibc21.m4: Update.
3143         * gnulib/import/m4/glob.m4: Update.
3144         * gnulib/import/m4/glob_h.m4: Update.
3145         * gnulib/import/m4/gnulib-cache.m4: Update.
3146         * gnulib/import/m4/gnulib-common.m4: Update.
3147         * gnulib/import/m4/gnulib-comp.m4: Update.
3148         * gnulib/import/m4/gnulib-tool.m4: Update.
3149         * gnulib/import/m4/hard-locale.m4: Update.
3150         * gnulib/import/m4/include_next.m4: Update.
3151         * gnulib/import/m4/inttypes-pri.m4: Update.
3152         * gnulib/import/m4/inttypes.m4: Update.
3153         * gnulib/import/m4/isnand.m4: Update.
3154         * gnulib/import/m4/isnanl.m4: Update.
3155         * gnulib/import/m4/largefile.m4: Update.
3156         * gnulib/import/m4/limits-h.m4: Update.
3157         * gnulib/import/m4/localcharset.m4: Update.
3158         * gnulib/import/m4/locale-fr.m4: Update.
3159         * gnulib/import/m4/locale-ja.m4: Update.
3160         * gnulib/import/m4/locale-zh.m4: Update.
3161         * gnulib/import/m4/localtime-buffer.m4: Update.
3162         * gnulib/import/m4/longlong.m4: Update.
3163         * gnulib/import/m4/lstat.m4: Update.
3164         * gnulib/import/m4/malloc.m4: Update.
3165         * gnulib/import/m4/malloca.m4: Update.
3166         * gnulib/import/m4/math_h.m4: Update.
3167         * gnulib/import/m4/mbrtowc.m4: Update.
3168         * gnulib/import/m4/mbsinit.m4: Update.
3169         * gnulib/import/m4/mbsrtowcs.m4: Update.
3170         * gnulib/import/m4/mbstate_t.m4: Update.
3171         * gnulib/import/m4/memchr.m4: Update.
3172         * gnulib/import/m4/memmem.m4: Update.
3173         * gnulib/import/m4/mempcpy.m4: Update.
3174         * gnulib/import/m4/memrchr.m4: Update.
3175         * gnulib/import/m4/mkdir.m4: Update.
3176         * gnulib/import/m4/mkstemp.m4: Update.
3177         * gnulib/import/m4/mmap-anon.m4: Update.
3178         * gnulib/import/m4/mode_t.m4: Update.
3179         * gnulib/import/m4/msvc-inval.m4: Update.
3180         * gnulib/import/m4/msvc-nothrow.m4: Update.
3181         * gnulib/import/m4/multiarch.m4: Update.
3182         * gnulib/import/m4/nocrash.m4: Update.
3183         * gnulib/import/m4/off_t.m4: Update.
3184         * gnulib/import/m4/onceonly.m4: Update.
3185         * gnulib/import/m4/open-cloexec.m4: Update.
3186         * gnulib/import/m4/open.m4: Update.
3187         * gnulib/import/m4/openat.m4: Update.
3188         * gnulib/import/m4/opendir.m4: Update.
3189         * gnulib/import/m4/pathmax.m4: Update.
3190         * gnulib/import/m4/rawmemchr.m4: Update.
3191         * gnulib/import/m4/readdir.m4: Update.
3192         * gnulib/import/m4/readlink.m4: Update.
3193         * gnulib/import/m4/realloc.m4: Update.
3194         * gnulib/import/m4/rename.m4: Update.
3195         * gnulib/import/m4/rewinddir.m4: Update.
3196         * gnulib/import/m4/rmdir.m4: Update.
3197         * gnulib/import/m4/save-cwd.m4: Update.
3198         * gnulib/import/m4/secure_getenv.m4: Update.
3199         * gnulib/import/m4/setenv.m4: Update.
3200         * gnulib/import/m4/signal_h.m4: Update.
3201         * gnulib/import/m4/ssize_t.m4: Update.
3202         * gnulib/import/m4/stat-time.m4: Update.
3203         * gnulib/import/m4/stat.m4: Update.
3204         * gnulib/import/m4/std-gnu11.m4: Update.
3205         * gnulib/import/m4/stdbool.m4: Update.
3206         * gnulib/import/m4/stddef_h.m4: Update.
3207         * gnulib/import/m4/stdint.m4: Update.
3208         * gnulib/import/m4/stdio_h.m4: Update.
3209         * gnulib/import/m4/stdlib_h.m4: Update.
3210         * gnulib/import/m4/strchrnul.m4: Update.
3211         * gnulib/import/m4/strdup.m4: Update.
3212         * gnulib/import/m4/strerror.m4: Update.
3213         * gnulib/import/m4/string_h.m4: Update.
3214         * gnulib/import/m4/strstr.m4: Update.
3215         * gnulib/import/m4/strtok_r.m4: Update.
3216         * gnulib/import/m4/sys_socket_h.m4: Update.
3217         * gnulib/import/m4/sys_stat_h.m4: Update.
3218         * gnulib/import/m4/sys_time_h.m4: Update.
3219         * gnulib/import/m4/sys_types_h.m4: Update.
3220         * gnulib/import/m4/tempname.m4: Update.
3221         * gnulib/import/m4/time_h.m4: Update.
3222         * gnulib/import/m4/unistd-safer.m4: Update.
3223         * gnulib/import/m4/unistd_h.m4: Update.
3224         * gnulib/import/m4/warn-on-use.m4: Update.
3225         * gnulib/import/m4/wchar_h.m4: Update.
3226         * gnulib/import/m4/wchar_t.m4: Update.
3227         * gnulib/import/m4/wctype_h.m4: Update.
3228         * gnulib/import/m4/wint_t.m4: Update.
3229         * gnulib/import/malloc.c: Update.
3230         * gnulib/import/malloc/scratch_buffer.h: Update.
3231         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3232         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3233         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3234         * gnulib/import/malloca.c: Update.
3235         * gnulib/import/malloca.h: Update.
3236         * gnulib/import/malloca.valgrind: Update.
3237         * gnulib/import/math.in.h: Update.
3238         * gnulib/import/mbrtowc.c: Update.
3239         * gnulib/import/mbsinit.c: Update.
3240         * gnulib/import/mbsrtowcs-impl.h: Update.
3241         * gnulib/import/mbsrtowcs-state.c: Update.
3242         * gnulib/import/mbsrtowcs.c: Update.
3243         * gnulib/import/memchr.c: Update.
3244         * gnulib/import/memmem.c: Update.
3245         * gnulib/import/mempcpy.c: Update.
3246         * gnulib/import/memrchr.c: Update.
3247         * gnulib/import/mkdir.c: Update.
3248         * gnulib/import/mkstemp.c: Update.
3249         * gnulib/import/msvc-inval.c: Update.
3250         * gnulib/import/msvc-inval.h: Update.
3251         * gnulib/import/msvc-nothrow.c: Update.
3252         * gnulib/import/msvc-nothrow.h: Update.
3253         * gnulib/import/open.c: Update.
3254         * gnulib/import/openat-die.c: Update.
3255         * gnulib/import/openat-priv.h: Update.
3256         * gnulib/import/openat-proc.c: Update.
3257         * gnulib/import/openat.c: Update.
3258         * gnulib/import/openat.h: Update.
3259         * gnulib/import/opendir.c: Update.
3260         * gnulib/import/pathmax.h: Update.
3261         * gnulib/import/pipe-safer.c: Update.
3262         * gnulib/import/rawmemchr.c: Update.
3263         * gnulib/import/readdir.c: Update.
3264         * gnulib/import/readlink.c: Update.
3265         * gnulib/import/realloc.c: Update.
3266         * gnulib/import/ref-add.sin: Update.
3267         * gnulib/import/ref-del.sin: Update.
3268         * gnulib/import/rename.c: Update.
3269         * gnulib/import/rewinddir.c: Update.
3270         * gnulib/import/rmdir.c: Update.
3271         * gnulib/import/same-inode.h: Update.
3272         * gnulib/import/save-cwd.c: Update.
3273         * gnulib/import/save-cwd.h: Update.
3274         * gnulib/import/scratch_buffer.h: Update.
3275         * gnulib/import/secure_getenv.c: Update.
3276         * gnulib/import/setenv.c: Update.
3277         * gnulib/import/signal.in.h: Update.
3278         * gnulib/import/stat-time.c: Update.
3279         * gnulib/import/stat-time.h: Update.
3280         * gnulib/import/stat-w32.c: Update.
3281         * gnulib/import/stat-w32.h: Update.
3282         * gnulib/import/stat.c: Update.
3283         * gnulib/import/stdbool.in.h: Update.
3284         * gnulib/import/stddef.in.h: Update.
3285         * gnulib/import/stdint.in.h: Update.
3286         * gnulib/import/stdio.in.h: Update.
3287         * gnulib/import/stdlib.in.h: Update.
3288         * gnulib/import/str-two-way.h: Update.
3289         * gnulib/import/strchrnul.c: Update.
3290         * gnulib/import/strdup.c: Update.
3291         * gnulib/import/streq.h: Update.
3292         * gnulib/import/strerror-override.c: Update.
3293         * gnulib/import/strerror-override.h: Update.
3294         * gnulib/import/strerror.c: Update.
3295         * gnulib/import/string.in.h: Update.
3296         * gnulib/import/stripslash.c: Update.
3297         * gnulib/import/strnlen1.c: Update.
3298         * gnulib/import/strnlen1.h: Update.
3299         * gnulib/import/strstr.c: Update.
3300         * gnulib/import/strtok_r.c: Update.
3301         * gnulib/import/sys_stat.in.h: Update.
3302         * gnulib/import/sys_time.in.h: Update.
3303         * gnulib/import/sys_types.in.h: Update.
3304         * gnulib/import/tempname.c: Update.
3305         * gnulib/import/tempname.h: Update.
3306         * gnulib/import/time.in.h: Update.
3307         * gnulib/import/unistd--.h: Update.
3308         * gnulib/import/unistd-safer.h: Update.
3309         * gnulib/import/unistd.in.h: Update.
3310         * gnulib/import/unsetenv.c: Update.
3311         * gnulib/import/verify.h: Update.
3312         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3313         * gnulib/import/wchar.in.h: Update.
3314         * gnulib/import/wctype.in.h: Update.
3315         * gnulib/import/xalloc-oversized.h: Update.
3316         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3317         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3318
3319 2018-08-16  Gary Benson <gbenson@redhat.com>
3320
3321         PR gdb/13000:
3322         * gdb/main.c (captured_main_1): Exit with nonzero status
3323         in batch mode if the last command to be executed failed.
3324         * NEWS: Mention the above.
3325
3326 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3327
3328         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3329         end of warning message.
3330
3331 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3332
3333         PR gdb/22943:
3334         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3335         (aarch64_extract_return_value): Use
3336         aapcs_is_vfp_call_or_return_candidate.
3337         (aarch64_return_in_memory): Likewise.
3338         (aarch64_store_return_value): Likewise.
3339
3340 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3341
3342         * aarch64-tdep.c
3343         (aapcs_is_vfp_call_or_return_candidate): Make static
3344         (pass_in_v_or_stack): Remove function.
3345         (pass_in_v_vfp_candidate): New function.
3346         (aarch64_push_dummy_call): Check for float register candidates.
3347
3348 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3349
3350         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3351         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3352         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3353
3354 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3355
3356         PR build/23399
3357         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3358         (struct ipa_sym_addresses): Rename to...
3359         (struct ipa_sym_addresses_common): ... this.
3360         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3361
3362 2018-08-28  Tom Tromey  <tom@tromey.com>
3363
3364         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3365         (token_fifo): Now a std::vector.
3366         (yylex, c_parse): Update.
3367         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3368         (token_fifo): Now a std::vector.
3369         (yylex, d_parse): Update.
3370         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3371         (token_fifo): Now a std::vector.
3372         (yylex, go_parse): Update.
3373
3374 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3375
3376         * parser-defs.h (struct type_stack) <elements>: Change type to
3377         std::vector<union type_stack_elt>.
3378         <depth, size>: Remove.
3379         * parse.c (parse_exp_in_context_1): Adjust.
3380         (type_stack_reserve): Remove.
3381         (check_type_stack_depth): Remove.
3382         (insert_into_type_stack): Adjust to std::vector.
3383         (insert_type): Likewise.
3384         (push_type): Likewise.
3385         (push_type_int): Likewise.
3386         (insert_type_address_space): Likewise.
3387         (pop_type): Likewise.
3388         (pop_type_int): Likewise.
3389         (pop_typelist): Likewise.
3390         (pop_type_stack): Likewise.
3391         (append_type_stack): Likewise.
3392         (push_type_stack): Likewise.
3393         (get_type_stack): Likewise.
3394         (type_stack_cleanup): Likewise.
3395         (push_typelist): Likewise.
3396         (follow_types): Likewise.
3397         (_initialize_parse): Likewise.
3398
3399 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3400
3401         * NEWS: Mention csky target.
3402
3403 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3404             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3405             Don Breazeal  <donb@codesourcery.com>
3406
3407         * csky-linux-tdep.c: New file.
3408         * csky-tdep.c: Likewise.
3409         * csky-tdep.h: Likewise.
3410         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3411         csky-tdep.o.
3412         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3413         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3414         * configure.tgt: Add csky support.
3415
3416 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3417
3418         * python/py-framefilter.c (py_print_frame): Print frame architecture
3419         when printing on an MI output.
3420
3421 2018-08-27  Tom Tromey  <tom@tromey.com>
3422
3423         PR build/23087:
3424         * configure: Rebuild.
3425         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3426
3427 2018-08-27  Tom Tromey  <tom@tromey.com>
3428
3429         * aarch64-linux-tdep.c
3430         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3431         casts to int.
3432
3433 2018-08-27  Tom Tromey  <tom@tromey.com>
3434
3435         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3436         unsigned.
3437         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3438         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3439         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3440         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3441         unsigned.
3442
3443 2018-08-27  Tom Tromey  <tom@tromey.com>
3444
3445         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3446         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3447
3448 2018-08-27  Tom Tromey  <tom@tromey.com>
3449
3450         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3451         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3452         ULONGEST_MAX.
3453         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3454         ULONGEST_MAX.
3455         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3456         ULONGEST_MAX.
3457         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3458         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3459         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3460         ULONGEST_MAX.
3461         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3462         (ppc64_linux_sigaction_tramp_frame)
3463         (ppc32_linux_sighandler_tramp_frame)
3464         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3465         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3466         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3467         * mn10300-linux-tdep.c (am33_linux_sigframe)
3468         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3469         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3470         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3471         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3472         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3473         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3474         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3475         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3476         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3477         * microblaze-linux-tdep.c
3478         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3479         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3480         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3481         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3482         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3483         * common/common-types.h (ULONGEST_MAX): New define.
3484         (CORE_ADDR_MAX): Fix formatting.
3485         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3486         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3487         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3488         (arm_linux_rt_sigreturn_tramp_frame)
3489         (arm_eabi_linux_sigreturn_tramp_frame)
3490         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3491         (thumb2_eabi_linux_sigreturn_tramp_frame)
3492         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3493         (arm_linux_restart_syscall_tramp_frame)
3494         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3495         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3496         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3497         ULONGEST_MAX.
3498         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3499
3500 2018-08-27  Tom Tromey  <tom@tromey.com>
3501
3502         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3503         CORE_ADDR_MAX.
3504         * mips-tdep.c (mips_deal_with_atomic_sequence)
3505         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3506         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3507         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3508         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3509         CORE_ADDR_MAX.
3510         * aarch64-tdep.c (aarch64_software_single_step): Use
3511         CORE_ADDR_MAX.
3512
3513 2018-08-27  Tom Tromey  <tom@tromey.com>
3514
3515         * linespec.c (complete_linespec_component): Add cast to "char".
3516         * completer.c (completion_tracker::build_completion_result): Add
3517         cast to "char".
3518
3519 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3520
3521         * solist.h (struct solist, struct target_so_ops): Fix
3522         indentation.
3523
3524 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3525
3526         * ada-tasks.c (ada_task_info_s): Remove typedef.
3527         (DEF_VEC_O(ada_task_info_s)): Remove.
3528         (struct ada_tasks_inferior_data): Initialize fields.
3529         <task_list>: Make an std::vector.
3530         (get_ada_tasks_inferior_data): Allocate with new.
3531         (ada_get_task_number): Adjust.
3532         (get_task_number_from_id): Likewise.
3533         (valid_task_id): Likewise.
3534         (ada_get_task_info_from_ptid): Likewise.
3535         (iterate_over_live_ada_tasks): Likewise.
3536         (add_ada_task): Likewise.
3537         (read_known_tasks): Likewise.
3538         (ada_build_task_list): Likewise.
3539         (print_ada_task_info): Likewise.
3540         (info_task): Likewise.
3541         (task_command_1): Likewise.
3542
3543 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3544
3545         * ada-lang.c (add_angle_brackets): Return std::string.
3546
3547 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3548
3549         * python/py-threadevent.c (py_get_event_thread): Initialize
3550         pythread.
3551
3552 2018-08-24  Pedro Alves  <palves@redhat.com>
3553
3554         * python/py-bpevent.c (create_breakpoint_event_object): Use
3555         copy-initialization.
3556         * python/py-continueevent.c (emit_continue_event): Use
3557         copy-initialization.
3558         * python/py-exitedevent.c (create_exited_event_object): Return a
3559         gdbpy_ref<>.
3560         (emit_exited_event): Use copy-initialization.
3561         * python/py-inferior.c (python_new_inferior)
3562         (python_inferior_deleted, add_thread_object): Use
3563         copy-initialization.
3564         * python/py-infevents.c (create_inferior_call_event_object)
3565         (create_register_changed_event_object)
3566         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3567         (emit_inferior_call_event, emit_memory_changed_event)
3568         (emit_register_changed_event): Use copy-initialization.
3569         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3570         Return a gdbpy_ref<>.
3571         (emit_new_objfile_event): Use copy-initialization.
3572         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3573         (emit_clear_objfiles_event): Use copy-initialization.
3574         * python/py-signalevent.c (create_signal_event_object): Use
3575         copy-initialization.
3576         * python/py-threadevent.c (create_thread_event_object): Use
3577         copy-initialization.
3578
3579 2018-08-24  Pedro Alves  <palves@redhat.com>
3580             Simon Marchi  <simon.marchi@ericsson.com>
3581
3582         PR gdb/23379
3583         * python/py-continueevent.c: Include "gdbthread.h".
3584         (create_continue_event_object): Add intro comment.  Add 'ptid'
3585         parameter.  Use it to find thread to pass to
3586         create_thread_event_object.
3587         (emit_continue_event): Pass PTID down to
3588         create_continue_event_object.
3589         * python/py-event.h (py_get_event_thread): Declare.
3590         (create_thread_event_object): Remove default from 'thread'
3591         parameter.
3592         * python/py-stopevent.c (create_stop_event_object): Use
3593         py_get_event_thread.
3594         * python/py-threadevent.c (get_event_thread): Rename to ...
3595         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3596         and use it to find the thread.
3597         (create_thread_event_object): Assert that THREAD isn't null.
3598         Don't find the event thread here.
3599
3600 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3601
3602         * block.h (blockrange, blockranges): New struct declarations.
3603         (struct block): Add new field named `ranges'.
3604         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3605         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3606         macros for accessing ranges in struct block.
3607         (make_blockranges): New declaration.
3608         block.c (make_blockranges): New function.
3609         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3610         for block.
3611         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3612         * blockframe.c (cache_pc_function_block): New static global.
3613         (clear_pc_function_cache): Clear cache_pc_function_block.
3614         (find_pc_partial_function): Move comment to symtab.h.  Add
3615         support for non-contiguous blocks.
3616         * cli/cli-cmds.c (block.h): Include.
3617         (print_disassembly): Handle printing of non-contiguous blocks.
3618         (disassemble_current_function): Likewise.
3619         (disassemble_command): Likewise.
3620
3621         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3622         BLOCK_START.
3623         * blockframe.c (get_pc_function_start): Likewise.
3624         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3625         (gcc_symbol_address): Likewise.
3626         * compile/compile-object-run.c (compile_object_run): Likewise.
3627         * compile/compile.c (get_expr_block_and_pc): Likewise.
3628         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3629         (func_addr_to_tail_call_list): Likewise.
3630         * findvar.c (default_read_var_value): Likewise.
3631         * inline-frame.c (inline_frame_this_id): Likewise.
3632         (skip-inline_frames): Likewise.
3633         * infcmd.c (until_next_command): Likewise.
3634         * linespec.c (convert_linespec_to_sals): Likewise.
3635         * parse.c (parse_exp_in_context_1): Likewise.
3636         * printcmd.c (build_address_symbolic): likewise.
3637         (info_address_command): Likewise.
3638         symtab.c (find_function_start_sal): Likewise.
3639         (skip_prologue_sal): Likewise.
3640         (find_function_alias_target): Likewise.
3641         (find_gnu_ifunc): Likewise.
3642         * stack.c (find_frame_funname): Likewise.
3643         * symtab.c (fixup_symbol_section): Likewise.
3644         (find_function_start_sal): Likewise.
3645         (skip_prologue_sal): Likewsie.
3646         (find_function_alias_target): Likewise.
3647         (find_gnu_ifunc): Likewise.
3648         * tracepoint.c (info_scope_command): Likewise.
3649         * value.c (value_fn_field): Likewise.
3650
3651         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3652         in place of find_pc_partial_function.
3653         * blockframe.c (find_function_entry_range_from_pc): New function.
3654         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3655         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3656         for each range in a block.
3657
3658
3659 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3660
3661         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3662         incrementation.
3663
3664 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3665
3666         * solib-svr4.c (read_program_headers_from_bfd): Return
3667         gdb::optional<gdb::byte_vector>.
3668         (svr4_exec_displacement): Adjust.
3669
3670 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3671
3672         * solib-svr4.c (read_program_header): Return
3673         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3674         (find_program_interpreter): Return
3675         gdb::optional<gdb::byte_vector>.
3676         (scan_dyntag_auxv): Adjust.
3677         (enable_break): Adjust.
3678         (svr4_exec_displacement): Adjust.
3679
3680 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3681
3682         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3683         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3684
3685 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3686
3687         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3688         string_vprintf.
3689         * guile/scm-utils.c (gdbscm_printf): Likewise.
3690         * serial.c (serial_printf): Likewise.
3691         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3692
3693 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3694
3695         * stack.c (print_frame): Print frame architecture when printing on
3696         an MI output.
3697         * NEWS: Mention new "arch" attribute in frame output.
3698
3699 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3700
3701         * arch/aarch64.h (aarch64_regnum): Update comment.
3702
3703 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3704
3705         * NEWS: Add SVE to 8.2 section.
3706
3707 2018-08-21  Pedro Alves  <palves@redhat.com>
3708
3709         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3710         out from gdbscm_parse_function_args.
3711         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3712         gdbscm_parse_function_args_1.
3713
3714 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3715
3716         PR gdb/17816
3717         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3718         operator.
3719
3720 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3721
3722         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3723
3724 2018-08-19  Michael Spang  <spang@google.com>
3725
3726         PR gdb/11786
3727         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3728         for PT_TLS segments.
3729
3730 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3731
3732         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3733         dwarf_variable_value.
3734         * dwarf2-frame.c (class dwarf_expr_executor):
3735         Add override for dwarf_variable_value.
3736         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3737         (class symbol_needs_eval_context): Likewise.
3738         (indirect_synthetic_pointer): Add forward declaration.
3739         (sect_variable_value): New function.
3740         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3741         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3742         for DW_OP_GNU_variable_value.
3743
3744 2018-08-16  Tom Tromey  <tom@tromey.com>
3745
3746         * top.c (read_command_file): Update.
3747         (command_line_input): Remove "repeat" argument.
3748         * ada-lang.c (get_selections): Update.
3749         * linespec.c (decode_line_2): Update.
3750         * defs.h (command_line_input): Remove argument.
3751         * cli/cli-script.c (read_next_line): Update.
3752         * python/py-gdb-readline.c: Update.
3753
3754 2018-08-17  Tom Tromey  <tom@tromey.com>
3755
3756         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3757         command_line_input.
3758
3759 2018-08-15  Tom Tromey  <tom@tromey.com>
3760
3761         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3762
3763 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3764
3765         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3766         If used, use find_pc_partial_function to find address range
3767         to disassemble.
3768         * mi/mi-main.c (mi_cmd_list_features): Report
3769         "data-disassemble-a-option" feature.
3770         * NEWS: Mention new -data-disassemble option -a.
3771
3772 2018-08-13  Tom Tromey  <tom@tromey.com>
3773
3774         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3775
3776 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3777
3778         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3779         (aarch64_linux_collect_sve_regset): Likewise.
3780         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3781         * regcache.h (regcache_map_entry_size): New function.
3782
3783 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3784
3785         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3786         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3787         (SVE_HEADER_VL_LENGTH): Likewise.
3788         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3789         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3790         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3791         (SVE_HEADER_SIZE_OFFSET): Likewise.
3792         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3793         (SVE_HEADER_VL_OFFSET): Likewise.
3794         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3795         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3796         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3797         (SVE_HEADER_SIZE): Likewise.
3798         (aarch64_linux_core_read_vq): Add function.
3799         (aarch64_linux_core_read_description): Check for SVE section.
3800
3801 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3802
3803         * aarch64-fbsd-tdep.c
3804         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3805         collect_size.
3806         * aarch64-linux-tdep.c
3807         (aarch64_linux_iterate_over_regset_sections): Likewise.
3808         * alpha-linux-tdep.c
3809         (alpha_linux_iterate_over_regset_sections):
3810         * alpha-nbsd-tdep.c
3811         (alphanbsd_iterate_over_regset_sections): Likewise.
3812         * amd64-fbsd-tdep.c
3813         (amd64fbsd_iterate_over_regset_sections): Likewise.
3814         * amd64-linux-tdep.c
3815         (amd64_linux_iterate_over_regset_sections): Likewise.
3816         * arm-bsd-tdep.c
3817         (armbsd_iterate_over_regset_sections): Likewise.
3818         * arm-fbsd-tdep.c
3819         (arm_fbsd_iterate_over_regset_sections): Likewise.
3820         * arm-linux-tdep.c
3821         (arm_linux_iterate_over_regset_sections): Likewise.
3822         * corelow.c (get_core_registers_cb): Likewise.
3823         (core_target::fetch_registers): Likewise.
3824         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3825         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3826         * gdbarch.h (void): Regenerate.
3827         * gdbarch.sh: Add supply_size and collect_size.
3828         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3829         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3830         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3831         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3832         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3833         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3834         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3835         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3836         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3837         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3838         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3839         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3840         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3841         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3842         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3843         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3844         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3845         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3846         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3847         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3848         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3849         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3850         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3851         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3852         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3853         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3854         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3855         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3856         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3857         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3858
3859 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3860
3861         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3862         with string_printf.
3863
3864 2018-08-10  Keith Seitz  <keiths@redhat.com>
3865
3866         * compile/compile-c-support.c (add_code_header, add_code_footer):
3867         Move into policy class.
3868         (c_push_user_expression, pop_user_expression_nop)
3869         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3870         (compile_program): New host class.
3871         (c_compile_program): New typedef.
3872         (c_compute_porgram): Use c_compile_program.
3873
3874 2018-08-10  Keith Seitz  <keiths@redhat.com>
3875
3876         * compile/compile-internal.h (compile_instance::~compile_instance):
3877         Remove calls to htab_delete.
3878         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3879         * compile.c (compile_instance::compile_instance): Initialize
3880         htab unique pointers.
3881         (compile_instance::get_cached_type, compile_instance::insert_type)
3882         (compile_instance::error_symbol_once): Update for unique_ptr.
3883
3884 2018-08-10  Keith Seitz  <keiths@redhat.com>
3885
3886         * compile/compile-c-symbols.c (struct symbol_error)
3887         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3888         (compile_instance::insert_symbol_error)
3889         (compile_instance::error_symbol_once): Move to ...
3890         * compile/compile.c: ... here.
3891
3892 2018-08-10  Keith Seitz  <keiths@redhat.com>
3893
3894         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3895         instead of `new_compile_instance'.
3896         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3897         Update description.
3898         If the symbol error map is not initialized, create it.
3899         (generate_c_for_for_one_symbol): Do not check/initialize
3900         the symbol error map.
3901         * compile/compile-c-types.c (compile_c_instance): Make a class.
3902         Update all callers.
3903         (compile_instance::compile_instance): Initialize the type cache.
3904         (get_cached_type): New function.
3905         (insert_type): Update description.
3906         (compile_c_instance::m_default_cflags): Define.
3907         (convert_type): Update description.  Use get_cached_type.
3908         (delete_instance): Moved to destructor.
3909         (new_compile_instance): Moved to constructor.
3910         * compile/compile-c.h (compile_c_instance): Make class inheriting
3911         from compile_instance.
3912         <base>: Remove field.
3913         <type_map, symbol_err_map>: Move to base class.
3914         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3915         * compile/compile-internal.h (compile_instance): Make class.
3916         <type_map_t, symbol_err_map_t>: Define.
3917         <fe>: Rename to `m_gcc_fe'.
3918         <scope, block, gcc_target_options>: Add `m_' prefix.
3919         <m_type_map, m_symbol_err_map>: New fields, moved from
3920         compile_c_instance.
3921         <destroy>: Remove.
3922         (convert_type, new_compile_instance): Remove.
3923         * compile/compile.c (cleanup_compile_instance): Remove.
3924         (compile_to_object): Use unique_ptr to eliminate cleanups.
3925         (compile_instance::set_print_callback, compile_instance::version)
3926         (compile_instance::set_verbose)
3927         (compile_instance::set_driver_filename)
3928         (compile_instance::set_triplet_regexp)
3929         (compile_instance::set_arguments)
3930         (compile_instance::set_source_file)
3931         (compile_instance::compile): Define.
3932
3933 2018-08-10  Keith Seitz  <keiths@redhat.com>
3934
3935         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3936         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3937         gcc-c-fe.def to define C plugin.
3938         (delete_instance): Delete `c_plugin'.
3939         (new_compile_instance): Initialize `c_plugin'.
3940         * compile/compile-c.h: Include gcc_c_plugin.h.
3941         (struct compile_c_instance) <c_plugin>: New member.
3942         * gcc-c-plugin.h: New file.
3943         Update all callers with API change.
3944
3945 2018-08-10  Keith Seitz  <keiths@redhat.com>
3946
3947         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3948         (HFILES_NO_SRCDIR): ... to here.
3949         Add compile-internal.h and compile-c.h.
3950         * compile/compile-c-support.c: Include compile-c.h.
3951         * compile/compile-c-symbols.c: Include compile-c.h.
3952         (generate_c_for_variable_locations): Update comment.
3953         * compile/compile-c-types.c: Include compile-c.h.
3954         * compile/compile-c.h: New file -- moved C language declarations
3955         from other files here.
3956         * compile/compile-internal.h: Do not include hashtab.h or
3957         common/enum-flags.h.
3958         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3959         (gcc_convert_symbol, gcc_symbol_address)
3960         (generate_c_for_variable_locations, c_get_mode_for_size)
3961         (c_get_range_decl_name): Definitions moved to compile-c.h.
3962         * compile/compile-loc2c.c: Include compile-c.h.
3963
3964 2018-08-10  Keith Seitz  <keiths@redhat.com>
3965
3966         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3967         (c_symbol_substitution_name): ... this.
3968         Update all callers.
3969
3970 2018-08-10  Keith Seitz  <keiths@redhat.com>
3971
3972         * compile/compile-c-support.c (c_compute_program): Use
3973         unique_xmalloc_ptr to eliminate cleanup.
3974         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3975         Return a unique_xmalloc_ptr and eliminate cleanup.
3976         * compile/compile-internal.h (generate_c_for_variable_locations):
3977         Return unique_xmalloc_ptr and update description.
3978
3979 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3980
3981         * corelow.c (core_target::get_core_register_section): Rename
3982         min_size to section_min_size.
3983
3984 2018-08-09  Jim Wilson  <jimw@sifive.com>
3985
3986         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3987         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3988         * NEWS: Mention new GNU/Linux RISC-V target.
3989         * configure.host: Add riscv*-*-linux*.
3990         * configure.nat: Add riscv*.
3991         * configure.tgt: Add riscv*-*-linux*.
3992         * riscv-linux-nat.c: New file.
3993         * riscv-linux-tdep.c: New file.
3994
3995 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3996
3997         * infrun.c (resume): Make static, add forward declaration.
3998         (proceed): Update header comment.
3999         * infrun.h (resume): Delete declaration.
4000
4001 2018-08-09  Tom Tromey  <tom@tromey.com>
4002
4003         * riscv-tdep.h: Minor formatting fixes.
4004
4005 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4006
4007         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4008         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4009         (test_mkdir_recursive): Likewise.
4010         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4011
4012 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4013
4014         * valarith.c (value_subscripted_rvalue): If an array is not in
4015         memory, and we don't know the upper bound, then we can't know that
4016         the requested element exists or not.
4017
4018 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4019
4020         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4021         (target_options_to_string): Add comment.
4022
4023 2018-08-08  Tom Tromey  <tom@tromey.com>
4024
4025         * unittests/scoped_mmap-selftests.c: Check result of "write".
4026
4027 2018-08-08  Jim Wilson  <jimw@sifive.com>
4028
4029         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4030         (decode_register_index_short): New.
4031         (decode_j_type_insn, decode_cj_type_insn): New.
4032         (decode_b_type_insn, decode_cb_type_insn): New.
4033         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4034         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4035         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4036         is_c_sw_insn instead of is_sw_insn.
4037         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4038         (riscv_software_single_step): New.
4039         * riscv-tdep.h (riscv_software_single_step): Declare.
4040
4041         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4042         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4043
4044 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4045
4046         PR gdb/18050:
4047         * target.c (dispose_inferior): Don't dispose of inferiors that are
4048         already killed.
4049
4050 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4051
4052         * remote.c (remote_target::download_tracepoint): Change char* to
4053         const char*.
4054
4055 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4056
4057         * target.h (target_options_to_string): Return an std::string.
4058         * target.c (str_comma_list_concat_elem): Return void, use
4059         std::string.
4060         (do_option): Likewise.
4061         (target_options_to_string): Return an std::string.
4062         * linux-nat.c (linux_nat_target::wait): Adjust.
4063         * target-debug.h (target_debug_print_options): Adjust.
4064
4065 2018-08-07  Tom Tromey  <tom@tromey.com>
4066
4067         * Makefile.in (CPPFLAGS): New variable.
4068         (INTERNAL_CPPFLAGS): Use it.
4069
4070 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4071
4072         * NEWS: Mention the index cache.
4073
4074 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4075
4076         * common/pathstuff.h (get_standard_cache_dir): New.
4077         * common/pathstuff.c (get_standard_cache_dir): New.
4078         * build-id.h (build_id_to_string): New.
4079         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4080         DEBUG_STR_SUFFIX): Move to here.
4081         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4082         DEBUG_STR_SUFFIX): Move from there.
4083         (write_psymtabs_to_index): Make non-static, add basename
4084         parameter.  Write to temporary files, rename when done.
4085         (save_gdb_index_command): Adjust call to
4086         write_psymtabs_to_index.
4087         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4088         field.
4089         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4090         (get_gdb_index_contents_from_cache): New.
4091         (get_gdb_index_contents_from_cache_dwz): New.
4092         (dwarf2_initialize_objfile): Read index from cache.
4093         (dwarf2_build_psymtabs): Save to index.
4094         * dwarf-index-cache.h: New file.
4095         * dwarf-index-cache.c: New file.
4096         * dwarf-index-write.h: New file.
4097
4098 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4099
4100         * gnulib/aclocal.m4: Re-generate.
4101         * gnulib/config.in: Re-generate.
4102         * gnulib/configure: Re-generate.
4103         * gnulib/import/Makefile.am: Re-generate.
4104         * gnulib/import/Makefile.in: Re-generate.
4105         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4106         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4107         * gnulib/import/m4/mkdir.m4: New file.
4108         * gnulib/import/mkdir.c: New file.
4109         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4110         module.
4111
4112 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4113
4114         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4115         * common/scoped_mmap.c: New file.
4116         * common/scoped_mmap.h (destroy): New method.
4117         (~scoped_mmap, reset): Use destroy.
4118         (scoped_mmap): New move constructor.
4119         (mmap_file): New declaration.
4120         * unittests/scoped_mmap-selftests.c (test_normal,
4121         test_invalid_filename, run_tests): New functions.
4122         (_initialize_scoped_mmap_selftests): Register selftest.
4123
4124 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4125
4126         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4127         (read_gdb_index_from_buffer): ... this.  Remove section
4128         parameter, add buffer parameter.
4129         (get_gdb_index_contents_ftype,
4130         get_gdb_index_contents_dwz_ftype): New typedefs.
4131         (dwarf2_read_gdb_index): Add callback parameters to get the
4132         index contents.
4133         (get_gdb_index_contents_from_section): New.
4134         (dwarf2_initialize_objfile): Update call to
4135         dwarf2_read_gdb_index.
4136
4137 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4138
4139         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4140         (gdb_open_cloexec): Likewise.
4141         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4142         (commandline_from_pid): Likewise.
4143         (linux_xfer_osdata_threads): Likewise.
4144         (linux_xfer_osdata_fds): Likewise.
4145         * ada-lang.c (is_package_name): Likewise.
4146         * auxv.c (procfs_xfer_auxv): Likewise.
4147         * breakpoint.c (print_one_breakpoint_location): Use
4148         uiout::field_fmt.
4149         (print_one_catch_solib): Use string_printf.
4150         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4151         (add_pe_forwarded_sym): Likewise.
4152         * dwarf2read.c (create_type_unit_group): Likewise.
4153         (build_error_marker_type): Likewise.
4154         * infcall.c (get_function_name): Likewise.
4155         * valprint.c (print_converted_chars_to_obstack): Likewise.
4156         * xtensa-tdep.c (xtensa_register_type): Likewise.
4157
4158 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4159
4160         * remote.c (remote_target::download_tracepoint): Fix format
4161         string errors.
4162
4163 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4164
4165         * tracefile.c: Include common/byte-vector.h.
4166         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4167         with trace_regblock_size if needed.  Update uses of buf.
4168
4169 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4170
4171         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4172         std::vector<unsigned char>.
4173         * tracepoint.c (collection_list::collection_list): Remove
4174         m_regs_mask initializer from initializer list.  Resize
4175         m_regs_mask using the largest remote register number.
4176         (collection_list::add_remote_register): Remove size check on
4177         m_regs_mask.  Use at to access element.
4178         (collection_list::stringify): Change type of temp_buf to
4179         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4180         stringify the register mask.  Use pack_hex_byte for the register
4181         mask.
4182
4183 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4184
4185         * tracepoint.h (class collection_list) <add_register>: Remove.
4186         <add_remote_register, add_ax_registers, add_local_register>:
4187         Declare.
4188         <add_memrange>: Add scope parameter.
4189         * tracepoint.c (encode_actions_1): Likewise.
4190         (collection_list::add_register): Rename to ...
4191         (collection_list::add_remote_register): ... this.  Update
4192         comment.
4193         (collection_list::add_ax_registers, add_local_register): New
4194         methods.
4195         (collection_list::add_memrange): Add scope parameter.  Call
4196         add_local_register instead of add_register.
4197         (finalize_tracepoint_aexpr): New function.
4198         (collection_list::collect_symbol): Update calls to add_memrange.
4199         Call add_local_register instead of add_register.  Call
4200         add_ax_registers.  Call finalize_tracepoint_aexpr.
4201         (encode_actions_1): Get remote regnos for $reg action.  Call
4202         add_remote_register, add_ax_registers, and add_local_register.
4203         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4204         (validate_actionline): Call finalize_tracepoint_aexpr.
4205
4206 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4207
4208         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4209         Replace array buf with gdb::char_vector buf, of size
4210         get_remote_packet_size ().  Replace references to buf and
4211         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4212         and xsnprintf with snprintf.  Raise errors if the buffer is too
4213         small.
4214
4215 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4216
4217         * remote.c (remote_target::download_tracepoint): Fix the has_more
4218         predicate in the QTDP action list iteration.
4219
4220 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4221
4222         * remote.c (remote_target::download_tracepoint): Fix indentation
4223         in for block.
4224
4225 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4226
4227         * proc-api.c (_initialize_proc_api): Remove c, unused.
4228         * procfs.c (procfs_init_inferior): Remove signals, unused.
4229         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4230         unused.
4231
4232 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4233             Andrew Burgess  <andrew.burgess@embecosm.com>
4234
4235         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4236         'W_STOPCODE (0)' as this could be ambiguous.
4237
4238 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4239
4240         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4241         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4242         "ai_socktype").
4243
4244 2018-08-02  Tom Tromey  <tom@tromey.com>
4245
4246         PR symtab/16842.
4247         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4248         symbols.
4249         (process_structure_scope): Likewise.
4250
4251 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4252
4253         PR gdb/22629:
4254         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4255         kill inferior.
4256
4257 2018-08-02  Tom Tromey  <tom@tromey.com>
4258
4259         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4260         (darwin_suspend_inferior, darwin_resume_inferior)
4261         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4262         (darwin_check_new_threads): Check result of get_darwin_inferior.
4263
4264 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4265
4266         GDB 8.1.1 released.
4267
4268 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4269
4270         * varobj.c (varobj_get_path_expr_parent): Report an error if
4271         parent is a dynamic varobj.
4272
4273 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4274
4275         * gnulib/aclocal.m4: Re-generate.
4276         * gnulib/config.in: Re-generate.
4277         * gnulib/configure: Re-generate.
4278         * gnulib/import/Makefile.in: Re-generate.
4279         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4280         * gnulib/import/m4/onceonly.m4: Re-generate.
4281
4282 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4283
4284         * target-descriptions.c (struct xml_test_tdesc): New.
4285         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4286         (record_xml_tdesc): Update.
4287         (maintenance_check_xml_descriptions): Update.
4288         * target-descriptions.h (record_xml_tdesc): Update comment.
4289
4290 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4291
4292         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4293         checking array bounds are defined.
4294
4295 2018-07-30  Tom Tromey  <tom@tromey.com>
4296
4297         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4298         irreflexivity violation.
4299
4300 2018-07-30  Tom Tromey  <tom@tromey.com>
4301
4302         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4303         * value.c (unpack_long): Remove lint code.
4304         * valops.c (value_ind): Remove lint code.
4305         * valarith.c (value_x_binop, value_x_unop, value_equal)
4306         (value_pos): Remove lint code.
4307
4308 2018-07-28  Tom de Vries  <tdevries@suse.de>
4309
4310         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4311         with undefined upper bound as <optimized out>.
4312
4313 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4314
4315         * gcore.in: Rename variable "name" to "prefix".  Expand
4316         "usage" text.
4317
4318 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4319
4320         * windows-nat.c (windows_nat_target::create_inferior): Update to
4321         call close() in global namespace.
4322
4323 2018-07-26  Tom Tromey  <tom@tromey.com>
4324
4325         * dwarf-index-write.c (add_address_entry): Don't add objfile
4326         offsets.
4327         * dbxread.c (find_stab_function): Rename from
4328         find_stab_function_addr.  Return a bound_minimal_symbol.
4329         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4330         Don't add objfile offsets.
4331         (end_psymtab): Use raw_text_low, raw_text_high,
4332         MSYMBOL_VALUE_RAW_ADDRESS.
4333         (read_ofile_symtab): Update.
4334         (process_one_symbol): Update.
4335         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4336         offsets.
4337         (dw2_relocate): Remove.
4338         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4339         searching addrmap.
4340         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4341         Update.
4342         (process_psymtab_comp_unit_reader, add_partial_symbol)
4343         (add_partial_subprogram, dwarf2_ranges_read): Update.
4344         (load_partial_dies): Update.
4345         (add_address_entry): Don't add objfile offsets.
4346         (dwarf2_build_include_psymtabs): Update.
4347         (create_addrmap_from_aranges): Don't add objfile offsets.
4348         (dw2_find_pc_sect_compunit_symtab): Update.
4349         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4350         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4351         Update.
4352         (parse_partial_symbols): Don't add objfile offsets.  Use
4353         raw_text_low, raw_text_high.  Update.
4354         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4355         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4356         or call 'relocate' quick function.  Clear psymbol_map.
4357         * psympriv.h (struct partial_symbol) <address>: Add section
4358         offset.
4359         <set_unrelocated_address>: Rename from set_address.
4360         <raw_text_low, raw_text_high>: New methods.
4361         <text_low, text_high>: Add objfile parameter.
4362         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4363         set_unrelocated_address.
4364         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4365         (find_pc_psymbol): Update.
4366         (fixup_psymbol_section, relocate_psymtabs): Remove.
4367         (dump_psymtab, psym_functions): Update.
4368         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4369         parameter.
4370         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4371         (start_psymtab_common): Update.
4372         * symfile-debug.c (debug_qf_relocate): Remove.
4373         (debug_sym_quick_functions): Update.
4374         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4375         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4376         Update.
4377
4378 2018-07-26  Tom Tromey  <tromey@redhat.com>
4379
4380         * dbxread.c (end_psymtab): Use text_high_valid and
4381         text_low_valid.
4382         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4383         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4384         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4385         Update comment.
4386         <text_low_valid, text_high_valid>: New fields.
4387         <set_text_low, set_text_high>: Update.
4388         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4389
4390 2018-07-26  Tom Tromey  <tom@tromey.com>
4391
4392         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4393         Update.
4394         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4395         textlow and texthigh fields.
4396         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4397         Update.
4398         * mdebugread.c (parse_lines, parse_partial_symbols)
4399         (psymtab_to_symtab_1): Update.
4400         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4401         Rename fields.  Update comment.  Now private.
4402         <text_low, text_high, set_text_low, set_text_high>: New methods.
4403         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4404         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4405         (start_psymtab_common, maintenance_info_psymtabs)
4406         (maintenance_check_psymtabs): Update.
4407         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4408         texthigh fields.
4409         (scan_xcoff_symtab): Update.
4410
4411 2018-07-26  Tom Tromey  <tromey@redhat.com>
4412
4413         * psympriv.h (struct partial_symbol) <unrelocated_address,
4414         address, set_address>: New methods.
4415         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4416         (fixup_psymbol_section, relocate_psymtabs): Update.
4417         (print_partial_symbols): Add 'objfile' parameter.  Update.
4418         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4419         Update.
4420
4421 2018-07-26  Tom Tromey  <tom@tromey.com>
4422
4423         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4424         (debug_names::write_psymbols): Update.
4425         * psympriv.h (struct partial_symbol): Derive from
4426         general_symbol_info.
4427         <obj_section>: New method.
4428         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4429         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4430         (find_pc_sect_psymbol, fixup_psymbol_section)
4431         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4432         (print_partial_symbols, recursively_search_psymtabs)
4433         (compare_psymbols, psymbol_hash, psymbol_compare)
4434         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4435         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4436
4437 2018-07-26  Tom Tromey  <tromey@redhat.com>
4438
4439         * dbxread.c (end_psymtab): Remove dead code.
4440
4441 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4442
4443         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4444         DWARF unwinders are disabled.
4445         * dwarf2-frame.c: Add dwarf2read.h include.
4446         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4447         disabled.
4448         (dwarf2_frame_unwinders_enabled_p): Define.
4449         (show_dwarf_unwinders_enabled_p): New function.
4450         (_initialize_dwarf2_frame): Register switch to control DWARF
4451         unwinder use.
4452         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4453         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4454         (show_dwarf_cmdlist): Remove static keyword.
4455         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4456         (show_dwarf_cmdlist): Declare.
4457         * NEWS: Document new feature.
4458
4459 2018-07-26  Tom de Vries  <tdevries@suse.de>
4460
4461         PR breakpoints/23366
4462         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4463
4464 2018-07-26  Tom de Vries  <tdevries@suse.de>
4465
4466         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4467         DW_AT_count can't be translated to a dynamic prop.
4468
4469 2018-07-25  Tom de Vries  <tdevries@suse.de>
4470
4471         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4472         try/catch.
4473
4474 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4475
4476         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4477
4478 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4479
4480         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4481
4482 2018-07-24  Keith Seitz  <keiths@redhat.comt
4483
4484         PR symtab/23010
4485         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4486         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4487         instead of add_symbol_to_list.
4488         (read_file_scope): Call prepare_one_comp_unit before reading
4489         any other DIEs.
4490
4491 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4492
4493         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4494
4495 2018-07-24  Tom Tromey  <tom@tromey.com>
4496
4497         * utils.c (malloc, realloc, free): Don't declare.
4498         * configure, config.in: Rebuild.
4499         * configure.ac: Don't check for declarations of free, malloc, or
4500         realloc.
4501
4502 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4503
4504         * aarch64-linux-nat.c
4505         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4506         variable.
4507         * arm-linux-nat.c (fetch_regs): Likewise.
4508         (store_regs): Likewise.
4509         (fetch_vfp_regs): Likewise.
4510         (store_vfp_regs): Likewise.
4511         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4512         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4513         (arm_linux_nat_target::insert_watchpoint): Likewise.
4514         (arm_linux_nat_target::remove_watchpoint): Likewise.
4515         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4516         Likewise.
4517         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4518         Likewise.
4519         * ppc-linux-nat.c (fetch_register): Likewise.
4520         (fetch_all_gp_regs): Likewise.
4521         (fetch_ppc_registers): Likewise.
4522         (store_all_gp_regs): Likewise.
4523         (store_ppc_registers): Likewise.
4524         (hwdebug_insert_point): Likewise.
4525         (can_use_watchpoint_cond_accel): Likewise.
4526         * remote-sim.c (gdb_os_write_stdout): Likewise.
4527
4528 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4529             Tom Tromey  <tom@tromey.com>
4530
4531         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4532         test for it.
4533         * configure: Rebuild.
4534
4535 2018-07-22  Tom Tromey  <tom@tromey.com>
4536
4537         * regformats/regdat.sh: Define xmltarget_${name} inside
4538         #ifndef IN_PROCESS_AGENT.
4539
4540 2018-07-22  Tom Tromey  <tom@tromey.com>
4541
4542         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4543
4544 2018-07-22  Tom Tromey  <tom@tromey.com>
4545
4546         * symfile.c (reread_symbols): Notify iter, not objfile.
4547
4548 2018-07-22  Tom Tromey  <tom@tromey.com>
4549
4550         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4551         Use arch_ops.
4552         (ravenscar_thread_target::prepare_to_store): Likewise.
4553
4554 2018-07-22  Tom Tromey  <tom@tromey.com>
4555
4556         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4557         unused variable.  Call value_fetch_lazy when needed.
4558         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4559         Remove unused variable.  Call value_fetch_lazy when needed.
4560
4561 2018-07-22  Tom Tromey  <tom@tromey.com>
4562
4563         * m32c-tdep.c (mark_dma): Return void.
4564         (make_regs): Remove unused declarations.
4565
4566 2018-07-22  Tom Tromey  <tom@tromey.com>
4567
4568         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4569         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4570         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4571         bkscm_get_valid_block_smob_arg_unsafe for effect.
4572
4573 2018-07-22  Tom Tromey  <tom@tromey.com>
4574
4575         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4576         value_type.
4577
4578 2018-07-22  Tom Tromey  <tom@tromey.com>
4579
4580         * windows-nat.c (saved_context): Conditionally define.
4581         * remote.c (remote_target::remote_btrace_maybe_reopen):
4582         Conditionally declare "warned".
4583         * inflow.c (sigquit_ours): Conditionally define.
4584         (new_tty): Move "tty" declaration inside #if.
4585         * guile/guile.c (guile_datadir): Conditionally define.
4586         * charset.c (set_be_le_names): Move some declarations inside #if.
4587         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4588         #if.
4589         (parse_xml_btrace_conf): Likewise.
4590
4591 2018-07-22  Tom Tromey  <tom@tromey.com>
4592
4593         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4594
4595 2018-07-22  Tom Tromey  <tom@tromey.com>
4596
4597         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4598         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4599         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4600         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4601         * stack.c (frame_apply_level_command): Remove unused variable.
4602         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4603         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4604         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4605         unused variable.
4606         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4607         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4608         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4609         variable.
4610         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4611         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4612         variable.
4613         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4614         Remove unused variable.
4615         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4616         variable.
4617         * common/tdesc.c (print_xml_feature::visit): Remove unused
4618         variable.
4619         * compile/compile-object-load.c (store_regs): Remove unused
4620         variables.
4621         * complaints.c (clear_complaints): Remove unused variable.
4622         * corelow.c (core_target_open): Remove unused variable.
4623         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4624         variable.
4625         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4626         variable.
4627         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4628         variable.
4629         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4630         variable.
4631         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4632         variable.
4633         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4634         variable.
4635         * ia64-tdep.c (examine_prologue): Remove unused variable.
4636         * infcall.c (run_inferior_call): Remove unused variable.
4637         * inferior.c (exit_inferior): Remove unused variable.
4638         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4639         * linespec.c (decode_line_2): Remove unused variable.
4640         * linux-nat.c (super_close): Remove.
4641         * linux-tdep.c (linux_info_proc): Remove unused variable.
4642         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4643         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4644         Remove unused variable.
4645         * parse.c (find_minsym_type_and_address): Remove unused variable.
4646         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4647         variable.
4648         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4649         variable.
4650         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4651         variables.
4652         * record-btrace.c (record_btrace_target::store_registers): Remove
4653         unused variable.
4654         (cmd_show_record_btrace_cpu): Remove unused variable.
4655         * riscv-tdep.c (riscv_register_reggroup_p)
4656         (riscv_push_dummy_call, riscv_return_value): Remove unused
4657         variable.
4658         * rust-exp.y (literal): Remove unused variable.
4659         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4660         unused variable.
4661         <STRUCTOP_ANONYMOUS>: Likewise.
4662         * s390-linux-tdep.c (s390_linux_init_abi_31)
4663         (s390_linux_init_abi_64): Remove unused variable.
4664         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4665         (file_select_thread, net_windows_open, _initialize_ser_windows):
4666         Remove unused variables.
4667         * symtab.c (find_pc_sect_line): Remove unused variable.
4668         * target-memory.c (compute_garbled_blocks): Remove unused
4669         variable.
4670         (target_write_memory_blocks): Remove unused variable.
4671         * target.c (target_stack::unpush): Remove unused variables.
4672         * tracepoint.c (start_tracing, all_tracepoint_actions)
4673         (merge_uploaded_trace_state_variables)
4674         (print_one_static_tracepoint_marker): Remove unused variable.
4675         * unittests/basic_string_view/element_access/char/1.cc (test01):
4676         Remove unused variable.
4677         * windows-nat.c (windows_continue, windows_add_all_dlls)
4678         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4679         Remove unused variables.
4680
4681 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4682
4683         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4684         attr_profile in HAVE_ELF.
4685         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4686         HAVE_ELF.
4687
4688 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4689
4690         * frame.c (frame_register_unwind): Change parameter name.
4691         (frame_unwind_register): Likewise.
4692         (frame_unwind_register_value): Likewise.
4693         (frame_unwind_register_signed): Likewise.
4694         (frame_unwind_register_unsigned): Likewise.
4695         * frame.h (frame_register_unwind): Likewise.
4696         (frame_unwind_register): Likewise.
4697         (frame_unwind_register_value): Likewise.
4698         (frame_unwind_register_signed): Likewise.
4699         (frame_unwind_register_unsigned): Likewise.
4700         (frame_unwind_arch): Likewise.
4701
4702 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4703
4704         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4705         ISA maintenance.
4706
4707 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4708
4709         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4710         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4711         hand.
4712
4713 2018-07-20  Keith Seitz  <keiths@redhat.com>
4714
4715         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4716         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4717         m_compunit_symtab, m_language>: Add "m_" prefix.
4718         Update all uses.
4719         * buildsym.c: Update all uses.
4720
4721 2018-07-20  Tom Tromey  <tom@tromey.com>
4722
4723         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4724         * buildsym.h (record_line_ftype): Remove typedef.
4725
4726 2018-07-20  Tom Tromey  <tom@tromey.com>
4727
4728         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4729         (end_expandable_symtab): Likewise.
4730         (end_symtab_get_static_block): Likewise.
4731         (end_symtab_from_static_block): Likewise.
4732         * buildsym-legacy.c (augment_type_symtab): Remove.
4733         (end_expandable_symtab): Remove.
4734         (end_symtab_get_static_block): Remove.
4735         (end_symtab_from_static_block): Remove.
4736
4737 2018-07-20  Tom Tromey  <tom@tromey.com>
4738
4739         * dwarf2read.c: Include buildsym.h.
4740         (struct dwarf2_cu) <builder>: New method.
4741         (fixup_go_packaging): Update.
4742         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4743         use scoped_free_pendings.
4744         (using_directives): Add "cu" parameter, remove "language".
4745         (read_import_statement, setup_type_unit_groups, )
4746         (read_func_scope, read_lexical_block_scope)
4747         (dwarf2_record_block_ranges, read_namespace): Update.
4748         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4749         (lnp_state_machine::handle_end_sequence): Update.
4750         (class lnp_state_machine) <m_cu>: New member.
4751         <m_record_line_callback>: Remove.
4752         <m_currently_recording_lines>: New member.
4753         (lnp_state_machine::handle_set_file): Update.
4754         (noop_record_line): Remove.
4755         (dwarf_record_line_p): Add cu parameter.
4756         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4757         (lnp_state_machine::record_line)
4758         (lnp_state_machine::lnp_state_machine)
4759         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4760         (dwarf_decode_lines): Update.
4761         (dwarf2_start_subfile): Add cu parameter.
4762         (dwarf2_start_symtab, new_symbol): Update.
4763         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4764         Remove dwarf2_per_objfile parameter.
4765         (dwarf_decode_macros): Update.
4766
4767 2018-07-20  Tom Tromey  <tom@tromey.com>
4768
4769         * stabsread.c (define_symbol): Update.
4770         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4771         * dwarf2read.c (new_symbol): Update.
4772         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4773         * cp-namespace.c: Include buildsym.h.
4774         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4775         * buildsym-legacy.c (get_buildsym_compunit): New function.
4776
4777 2018-07-20  Tom Tromey  <tom@tromey.com>
4778
4779         * xcoffread.c: Include buildsym-legacy.h.
4780         * windows-nat.c: Include buildsym-legacy.h.
4781         * stabsread.c: Include buildsym-legacy.h.
4782         * mdebugread.c: Include buildsym-legacy.h.
4783         * buildsym-legacy.h: New file.
4784         * buildsym-legacy.c: New file, from buildsym.c.
4785         * go32-nat.c: Include buildsym-legacy.h.
4786         * dwarf2read.c: Include buildsym-legacy.h.
4787         * dbxread.c: Include buildsym-legacy.h.
4788         * cp-namespace.c: Include buildsym-legacy.h.
4789         * coffread.c: Include buildsym-legacy.h.
4790         * buildsym.h: Move some contents to buildsym-legacy.h.
4791         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4792         buildsym-legacy.c.
4793         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4794
4795 2018-07-20  Tom Tromey  <tom@tromey.com>
4796
4797         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4798         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4799         (buildsym_compunit::buildsym_compunit)
4800         (buildsym_compunit::~buildsym_compunit)
4801         (buildsym_compunit::get_macro_table): Define.
4802
4803 2018-07-20  Tom Tromey  <tom@tromey.com>
4804
4805         * buildsym.c (reset_symtab_globals): Remove.
4806         (buildsym_compunit::end_symtab_from_static_block): Update.
4807         (buildsym_compunit::augment_type_symtab): Update.
4808         (end_symtab_from_static_block): Call free_buildsym_compunit.
4809         (augment_type_symtab, end_symtab, end_expandable_symtab):
4810         Likewise.
4811
4812 2018-07-20  Tom Tromey  <tom@tromey.com>
4813
4814         * arch-utils.c: Do not include buildsym.h.
4815         * mipsread.c: Do not include buildsym.h.
4816         * machoread.c: Do not include buildsym.h.
4817         * elfread.c: Do not include buildsym.h.
4818
4819 2018-07-20  Tom Tromey  <tom@tromey.com>
4820
4821         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4822         initialization.
4823         (buildsym_compunit): Add new constructor.
4824         (struct buildsym_compunit) <get_last_source_file, finish_block,
4825         record_block_range, start_subfile, patch_subfile_names,
4826         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4827         set_last_source_start_addr, get_last_source_start_addr,
4828         get_local_using_directives, set_local_using_directives,
4829         get_global_using_directives, outermost_context_p,
4830         get_current_context_stack, get_context_stack_depth,
4831         get_current_subfile, get_local_symbols, get_file_symbols,
4832         get_global_symbols, record_debugformat, record_producer,
4833         push_context, pop_context, end_symtab_get_static_block,
4834         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4835         New public methods.
4836         <record_pending_block, finish_block_internal, make_blockvector,
4837         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4838         private methods.
4839         Update all users.
4840
4841 2018-05-22  Tom Tromey  <tom@tromey.com>
4842
4843         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4844         parameter.
4845         (finish_block_internal): Update.
4846
4847 2018-07-20  Tom Tromey  <tom@tromey.com>
4848
4849         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4850         parameter.
4851         (finish_block_internal): Update.
4852
4853 2018-07-20  Tom Tromey  <tom@tromey.com>
4854
4855         * buildsym.h (EXTERN): Don't define or undef.
4856         * buildsym.c (EXTERN): Don't define.
4857
4858 2018-07-20  Tom Tromey  <tom@tromey.com>
4859
4860         * buildsym.c: Remove TODO comment.
4861
4862 2018-07-20  Tom Tromey  <tom@tromey.com>
4863
4864         * coffread.c (coff_symtab_read): Update.
4865         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4866         (xcoff_new_init): Update.
4867         * mipsread.c (mipscoff_new_init): Update.
4868         * mdebugread.c (mdebug_build_psymtabs): Update.
4869         * elfread.c (elf_new_init): Update.
4870         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4871         Update.
4872         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4873         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4874         (stabsect_build_psymtabs): Update.
4875         * buildsym.h (buildsym_init): Don't declare.
4876         * buildsym.c: Update comment.
4877         (prepare_for_building): Remove.
4878         (start_symtab, restart_symtab): Update.
4879         (reset_symtab_globals): Update comment.
4880         (buildsym_init): Remove.
4881
4882 2018-07-20  Tom Tromey  <tom@tromey.com>
4883
4884         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4885         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4886         (read_enum_type, common_block_start, common_block_end)
4887         (cleanup_undefined_types_1, finish_global_stabs): Update.
4888         * mdebugread.c (psymtab_to_symtab_1): Update.
4889         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4890         (read_lexical_block_scope, new_symbol): Update.
4891         * dbxread.c (process_one_symbol): Update.
4892         * coffread.c (coff_symtab_read, process_coff_symbol)
4893         (coff_read_enum_type): Update.
4894         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4895         declare.
4896         (get_local_symbols, get_file_symbols, get_global_symbols): New
4897         functions.
4898         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4899         m_global_symbols.
4900         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4901         (~scoped_free_pendings): Update.
4902         (finish_block, prepare_for_building, reset_symtab_globals)
4903         (end_symtab_get_static_block, end_symtab_with_blockvector)
4904         (augment_type_symtab, push_context): Update.
4905         (get_local_symbols, get_file_symbols, get_global_symbols): New
4906         functions.
4907         (buildsym_init): Update.
4908
4909 2018-07-20  Tom Tromey  <tom@tromey.com>
4910
4911         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4912         (process_full_type_unit): Likewise.
4913         (dwarf2_start_symtab): Set list_in_scope.
4914
4915 2018-07-20  Tom Tromey  <tom@tromey.com>
4916
4917         * dwarf2read.c (process_psymtab_comp_unit_reader)
4918         (build_type_psymtabs_reader): Do not set list_in_scope.
4919
4920 2018-07-20  Tom Tromey  <tom@tromey.com>
4921
4922         * buildsym.c (free_pendings): Remove.
4923         (add_symbol_to_list, scoped_free_pendings)
4924         (finish_block_internal, buildsym_init): Update.
4925
4926 2018-07-20  Tom Tromey  <tom@tromey.com>
4927
4928         * xcoffread.c (read_xcoff_symtab): Update.
4929         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4930         Update.
4931         * dbxread.c (process_one_symbol): Update.
4932         * coffread.c (coff_symtab_read): Update.
4933         * buildsym.h (finish_block): Update.
4934         * buildsym.c (finish_block): Remove "listhead" argument.
4935         (end_symtab_get_static_block): Update.
4936
4937 2018-07-20  Tom Tromey  <tom@tromey.com>
4938
4939         * buildsym.h (class scoped_free_pendings): Remove constructor.
4940         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4941         method.
4942         <m_pending_block_obstack, m_pending_blocks>: New members.
4943         (pending_block_obstack, pending_blocks): Remove.
4944         (scoped_free_pendings::scoped_free_pendings): Default.
4945         (~scoped_free_pendings): Update.
4946         (free_pending_blocks): Remove.
4947         (finish_block_internal, record_pending_block, make_blockvector)
4948         (end_symtab_get_static_block, augment_type_symtab, push_context)
4949         (buildsym_init): Update.
4950
4951 2018-07-20  Tom Tromey  <tom@tromey.com>
4952
4953         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4954         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4955         members.
4956         (pending_addrmap, pending_addrmap_obstack)
4957         (pending_addrmap_interesting): Remove.
4958         (scoped_free_pendings, record_block_range, make_blockvector)
4959         (prepare_for_building, reset_symtab_globals, buildsym_init):
4960         Update.
4961
4962 2018-07-20  Tom Tromey  <tom@tromey.com>
4963
4964         * xcoffread.c (process_linenos): Update.
4965         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4966         * mdebugread.c (psymtab_to_symtab_1): Update.
4967         * dwarf2read.c (setup_type_unit_groups)
4968         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4969         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4970         * dbxread.c (process_one_symbol): Update.
4971         * coffread.c (coff_symtab_read, enter_linenos)
4972         (process_coff_symbol): Update.
4973         * buildsym.h (current_subfile): Don't declare.
4974         (get_current_subfile): Declare.
4975         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4976         member.
4977         (start_subfile, free_buildsym_compunit, push_subfile)
4978         (prepare_for_building, start_symtab): Update.
4979         (get_current_subfile): New function.
4980
4981 2018-07-20  Tom Tromey  <tom@tromey.com>
4982
4983         * coffread.c (coff_symtab_read): Update.
4984         * xcoffread.c (read_xcoff_symtab): Update.
4985         * dwarf2read.c (new_symbol): Update.
4986         (read_func_scope, read_lexical_block_scope): Update.
4987         * dbxread.c (process_one_symbol): Update.
4988         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4989         (outermost_context_p): Remove macro.
4990         (outermost_context_p, get_current_context_stack)
4991         (get_context_stack_depth): Declare.
4992         (pop_context): Return struct context_stack.
4993         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4994         member.
4995         (context_stack_size): Remove.
4996         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4997         (prepare_for_building, end_symtab_get_static_block)
4998         (augment_type_symtab, push_context): Update.
4999         (pop_context): Return struct context_stack.
5000         (outermost_context_p, get_current_context_stack)
5001         (get_context_stack_depth): New functions.
5002         (buildsym_init): Update.
5003
5004 2018-07-20  Tom Tromey  <tom@tromey.com>
5005
5006         * rust-exp.y: Now a pure parser.  Update all rules.
5007         (%union): Move earlier.
5008         (current_parser, work_obstack): Remove globals.
5009         (rust_parser, ~rust_parser): Update.
5010         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5011         lex_character, lex_number, lex_string, lex_identifier,
5012         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5013         convert_name, convert_params_to_expression,
5014         convert_ast_to_expression, ast_basic_type, ast_operation,
5015         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5016         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5017         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5018         ast_array_type, ast_slice_type, ast_reference_type,
5019         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5020         (rust_parse): Update.
5021         (rustyyerror, rustyylex): Add parser parameter.
5022         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5023         (rust_lex_stringish_test, rust_lex_test_sequence)
5024         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5025         (rust_lex_test_push_back, rust_lex_tests): Update.
5026
5027 2018-07-19  Pedro Alves  <palves@redhat.com>
5028
5029         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5030         gdb::unique_xmalloc_ptr.
5031         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5032         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5033         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5034         copy-initialization.
5035         * guile/scm-pretty-print.c (ppscm_print_children): Use
5036         gdb::unique_xmalloc_ptr instead of cleanups.
5037         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5038         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5039         gdb::unique_xmalloc_ptr.
5040         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5041         Adjust to use gdb::unique_xmalloc_ptr.
5042         * guile/scm-utils.c (extract_arg): Adjust.
5043         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5044         gdb::unique_xmalloc_ptr instead of a cleanup.
5045
5046 2018-07-19  Tom Tromey  <tom@tromey.com>
5047
5048         * utils.c (do_value_free_to_mark)
5049         (make_cleanup_value_free_to_mark): Remove.
5050         * utils.h (make_cleanup_value_free_to_mark): Remove.
5051
5052 2018-07-19  Pedro Alves  <palves@redhat.com>
5053
5054         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5055         forwarding reference.
5056
5057 2018-07-18  Pedro Alves  <palves@redhat.com>
5058
5059         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5060         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5061         cleanup.
5062
5063 2018-07-18  Pedro Alves  <palves@redhat.com>
5064
5065         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5066         exceptions.
5067         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5068         (gdbscm_wrap): New.
5069         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5070         directly instead of a cleanup.
5071         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5072         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5073         (vlscm_binop_gdbthrow): New, factored out from ...
5074         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5075         (vlscm_rich_compare): Use gdbscm_wrap.
5076         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5077         instead of a cleanup.
5078         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5079         cleanup.
5080         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5081         Use xfree directly instead of a cleanup.
5082         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5083         Adjust to use gdbscm_wrap and scoped_value_mark.
5084         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5085         (gdbscm_value_address, gdbscm_value_dereference)
5086         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5087         scoped_value_mark.
5088         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5089         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5090         scoped_value_mark.
5091         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5092         gdbscm_wrap and scoped_value_mark.
5093         (gdbscm_value_to_string): Use xfree directly instead of a
5094         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5095         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5096         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5097         scoped_value_mark.
5098         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5099         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5100         scoped_value_mark.
5101         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5102         gdbscm_wrap.
5103
5104 2018-07-18  Tom de Vries  <tdevries@suse.de>
5105
5106         * findvar.c (default_read_var_value): Also resolve dynamic type for
5107         LOC_OPTIMIZED_OUT vars.
5108
5109 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5110
5111         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5112         decoding.
5113
5114 2018-07-17  Tom Tromey  <tom@tromey.com>
5115
5116         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5117         (compute_enum_list, pascm_set_param_value_x)
5118         (gdbscm_parameter_value): Update.
5119         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5120         (gdbscm_scm_to_host_string): Update.
5121         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5122         Update.
5123         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5124         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5125         * guile/scm-string.c (gdbscm_scm_to_string): Return
5126         unique_xmalloc_ptr.
5127         (gdbscm_scm_to_host_string): Likewise.
5128
5129 2018-07-17  Tom Tromey  <tom@tromey.com>
5130
5131         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5132         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5133         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5134         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5135         unique_xmalloc_ptr.
5136
5137 2018-07-17  Tom Tromey  <tom@tromey.com>
5138
5139         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5140         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5141         Update.
5142         * guile/scm-cmd.c (cmdscm_function): Update.
5143         * guile/scm-pretty-print.c
5144         (ppscm_print_exception_unless_memory_error): Update.
5145         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5146         Return unique_xmalloc_ptr.
5147
5148 2018-07-17  Tom Tromey  <tom@tromey.com>
5149
5150         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5151         Use string_printf.
5152
5153 2018-07-17  Jim Wilson  <jimw@sifive.com>
5154
5155         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5156         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5157         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5158         unecessary braces after EF_RISCV_RVC test.  Delete call to
5159         set_gdbarch_decr_pc_after_break.
5160
5161         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5162         RISCV_LAST_FP_REGNUM + 1.
5163         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5164
5165 2018-07-17  Tom Tromey  <tom@tromey.com>
5166
5167         * configure.ac: Remove --disable-gdbcli.
5168         * configure: Rebuild.
5169         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5170         (SUBDIR_CLI_CFLAGS): Remove.
5171         (SFILES): Use SUBDIR_CLI_SRCS.
5172         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5173
5174 2018-07-17  Tom Tromey  <tom@tromey.com>
5175
5176         PR gdb/18624:
5177         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5178
5179 2018-07-16  Jim Wilson  <jimw@sifive.com>
5180
5181         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5182
5183 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5184
5185         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5186         variable.
5187         (libunwind_frame_sniffer): Likewise.
5188         (libunwind_frame_prev_register): Likewise.
5189         (libunwind_sigtramp_frame_sniffer): Likewise.
5190         * ia64-tdep.c (ia64_access_reg): Likewise.
5191         (ia64_access_rse_reg): Likewise.
5192         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5193         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5194
5195 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5196
5197         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5198
5199 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5200
5201         * remote-sim.c (gdbsim_target::close,
5202         gdbsim_target::mourn_inferior): Remove unused variables.
5203
5204 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5205
5206         * ia64-tdep.c (ktab_buf): New global.
5207         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5208         (get_kernel_table): Adjust.
5209
5210 2018-07-16  Tom Tromey  <tom@tromey.com>
5211
5212         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5213         * dwarf2read.c (using_directives, new_symbol): Use
5214         outermost_context_p.
5215         * dbxread.c (process_one_symbol): Use outermost_context_p.
5216         * coffread.c (coff_symtab_read): Use outermost_context_p.
5217
5218 2018-07-16  Tom Tromey  <tom@tromey.com>
5219
5220         * dwarf2read.c (using_directives, read_func_scope)
5221         (read_lexical_block_scope): Update.
5222         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5223         * buildsym.h (local_using_directives, global_using_directives):
5224         Don't declare.
5225         (get_local_using_directives, set_local_using_directives)
5226         (get_global_using_directives): Declare.
5227         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5228         m_global_using_directives>: New members.
5229         (finish_block_internal, prepare_for_building)
5230         (reset_symtab_globals, end_symtab_get_static_block)
5231         (push_context): Update.
5232         (get_local_using_directives, set_local_using_directives)
5233         (get_global_using_directives): New functions.
5234         (buildsym_init): Update.
5235
5236 2018-07-16  Tom Tromey  <tom@tromey.com>
5237
5238         * xcoffread.c (xcoff_initial_scan): Don't call
5239         free_pending_blocks.
5240         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5241         * buildsym.h (class scoped_free_pendings): Add constructor.
5242         (free_pending_blocks): Don't declare.
5243         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5244         (free_pending_blocks): Now static.
5245
5246 2018-07-16  Tom Tromey  <tom@tromey.com>
5247
5248         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5249         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5250         member.
5251         (struct subfile_stack): Remove.
5252         (subfile_stack): Remove.
5253         (push_subfile, pop_subfile, buildsym_init): Update.
5254
5255 2018-07-16  Tom Tromey  <tom@tromey.com>
5256
5257         * buildsym.c (push_subfile): Use gdb_assert.
5258         (pop_subfile): Use gdb_assert.
5259
5260 2018-07-16  Tom Tromey  <tom@tromey.com>
5261
5262         * buildsym.h (merge_symbol_lists): Remove.
5263         * buildsym.c (merge_symbol_lists): Remove.
5264
5265 2018-07-16  Tom Tromey  <tom@tromey.com>
5266
5267         * stabsread.c (scan_file_globals): Update comment.
5268         * stabsread.h (scan_file_globals): Move from buildsym.h.
5269         * buildsym.h (scan_file_globals): Move to stabsread.h.
5270
5271 2018-07-16  Tom Tromey  <tom@tromey.com>
5272
5273         * xcoffread.c (xcoff_new_init): Update.
5274         * mipsread.c (mipscoff_new_init): Update.
5275         * mdebugread.c (mdebug_build_psymtabs): Update.
5276         * elfread.c (elf_new_init): Update.
5277         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5278         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5279         * buildsym.h (buildsym_new_init): Don't declare.
5280         * buildsym.c (buildsym_new_init): Remove.
5281
5282 2018-07-16  Tom Tromey  <tom@tromey.com>
5283
5284         * stabsread.h (within_function): Move from buildsym.h.
5285         * stabsread.c (start_stabs): Clear within_function.
5286         * coffread.c (coff_start_symtab): Clear within_function.
5287         * buildsym.h (within_function): Move to stabsread.h.
5288         * buildsym.c (prepare_for_building): Update.
5289
5290 2018-07-16  Tom Tromey  <tom@tromey.com>
5291
5292         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5293         * dwarf2read.c (dwarf2_start_symtab): Don't set
5294         processing_gcc_compilation.
5295         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5296
5297 2018-07-16  Tom Tromey  <tom@tromey.com>
5298
5299         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5300         (next_symbol_text_func): Move from buildsym.h.
5301         * stabsread.c (hashname): Move from buildsym.c.
5302         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5303         (next_symbol_text_func, hashname): Move to stabsread.h.
5304         * buildsym.c: Don't include bcache.h
5305         (hashname): Move to stasbread.c.
5306
5307 2018-07-16  Tom Tromey  <tom@tromey.com>
5308
5309         * buildsym.h (context_stack_size): Don't declare.
5310         * buildsym.c (context_stack_size): New global.
5311
5312 2018-07-16  Tom Tromey  <tom@tromey.com>
5313
5314         * dbxread.c (processing_acc_compilation): New global.
5315         * buildsym.h (processing_acc_compilation): Don't declare.
5316
5317 2018-07-16  Tom Tromey  <tom@tromey.com>
5318
5319         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5320         * dbxread.c (read_ofile_symtab): Update.
5321         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5322         * buildsym.h (last_source_start_addr): Remove.
5323         (set_last_source_start_addr, get_last_source_start_addr):
5324         Declare.
5325         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5326         parameter.
5327         (struct buildsym_compunit) <m_last_source_start_addr>: New
5328         member.
5329         (prepare_for_building): Remove start_addr parameter.
5330         (start_symtab, restart_symtab, end_symtab_get_static_block)
5331         (end_symtab_with_blockvector): Update.
5332         (set_last_source_start_addr, get_last_source_start_addr): New
5333         functions.
5334
5335 2018-07-16  Tom Tromey  <tom@tromey.com>
5336
5337         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5338         member.
5339         (have_line_numbers): Remove.
5340         (record_line, prepare_for_building, end_symtab_get_static_block)
5341         (augment_type_symtab): Update.
5342
5343 2018-07-16  Tom Tromey  <tom@tromey.com>
5344
5345         * buildsym.c (~buildsym_compunit): Free the macro table.
5346         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5347         methods.
5348         <m_pending_macros>: New member.
5349         (pending_macros): Remove.
5350         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5351         (reset_symtab_globals, end_symtab_get_static_block)
5352         (end_symtab_with_blockvector, augment_type_symtab)
5353         (buildsym_init): Update.
5354
5355 2018-07-16  Tom Tromey  <tom@tromey.com>
5356
5357         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5358         parameter.
5359         (buildsym_compunit::set_last_source_file): New method.
5360         <m_last_source_file>: New member.
5361         (prepare_for_building): Remove "name" parameter.
5362         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5363         (last_source_file): Remove.
5364         (set_last_source_file, get_last_source_file): Update.
5365
5366 2018-07-16  Tom Tromey  <tom@tromey.com>
5367
5368         * buildsym.c (prepare_for_building): Add assert.
5369
5370 2018-07-16  Tom Tromey  <tom@tromey.com>
5371
5372         * buildsym.c (~buildsym_compunit): Update.
5373         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5374         (start_subfile, patch_subfile_names)
5375         (end_symtab_with_blockvector): Update.
5376
5377 2018-07-16  Tom Tromey  <tom@tromey.com>
5378
5379         * buildsym.c (struct buildsym_compunit): Add constructor,
5380         destructor, initializers.
5381         (start_buildsym_compunit): Remove.
5382         (free_buildsym_compunit): Use "delete".
5383         (start_symtab, restart_symtab): Use "new".
5384
5385 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5386
5387         * symfile.c (set_objfile_default_section_offset): Remove struct
5388         keyword.
5389
5390 2018-07-14  Stafford Horne  <shorne@gmail.com>
5391
5392         * (Responsible Maintainers): Add myself as or1k maintainer.
5393
5394 2018-07-13  Tom Tromey  <tom@tromey.com>
5395
5396         * symfile.c (set_objfile_default_section_offset): Use extra braces
5397         around initializer.
5398
5399 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5400
5401         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5402         non-branching basr.
5403
5404 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5405
5406         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5407         unittests/cli-utils-selftests.c
5408         * unittests/cli-utils-selftests.c: New file.
5409
5410 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5411
5412         * NEWS: Mention new commands. Mention change to 'thread apply'.
5413
5414 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5415
5416         * thread.c (thr_try_catch_cmd): New function.
5417         (thread_apply_all_command): Handle qcs flags.
5418         (thread_apply_command): Handle qcs flags.
5419         (taas_command): New function.
5420         (tfaas_command): New function.
5421         (_initialize_thread): Update to setup the new commands 'taas
5422         and 'tfaas'. Change doc string for 'thread apply'.
5423
5424 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5425
5426         * stack.c: (trailing_outermost_frame): New function, mostly
5427         extracted from backtrace_command_1.
5428         (leading_innermost_frame): New function.
5429         (backtrace_command_1): Update to call trailing_outermost_frame.
5430         (frame_apply_command_count): New function.
5431         (frame_apply_level_command): New function.
5432         (frame_apply_all_command): New function.
5433         (frame_apply_command): New function.
5434         (faas_command): New function.
5435         (frame_cmd_list): New variable.
5436         (_initialize_stack): Update to setup the new commands 'frame apply'
5437         and 'faas'.
5438
5439 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5440
5441         * cli-utils.c (number_or_range_parser::get_number): Only handle
5442         numbers or convenience var as numbers.
5443         (parse_flags): New function.
5444         (parse_flags_qcs): New function.
5445         (number_or_range_parser::finished): Ensure parsing end is detected
5446         before end of string.
5447         * cli-utils.h (parse_flags): New function.
5448         (parse_flags_qcs): New function.
5449         (number_or_range_parser): Remove m_finished bool.
5450         (number_or_range_parser::skip_range): Set m_in_range to false.
5451
5452 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5453
5454         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5455         on Windows.
5456
5457 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5458             Jan Kratochvil  <jan.kratochvil@redhat.com>
5459             Paul Fertser  <fercerpav@gmail.com>
5460             Tsutomu Seki  <sekiriki@gmail.com>
5461             Pedro Alves  <palves@redhat.com>
5462
5463         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5464         'unittests/parse-connection-spec-selftests.c'.
5465         (COMMON_SFILES): Add 'common/netstuff.c'.
5466         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5467         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5468         * common/netstuff.c: New file.
5469         * common/netstuff.h: New file.
5470         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5471         (wait_for_connect): Update comment.  New parameter
5472         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5473         Use 'sock' directly instead of 'scb->fd'.
5474         (try_connect): New function, with code from 'net_open'.
5475         (net_open): Rewrite main loop to deal with multiple
5476         sockets/addresses.  Handle IPv6-style hostnames; implement
5477         support for IPv6 connections.
5478         * unittests/parse-connection-spec-selftests.c: New file.
5479
5480 2018-07-11  Pedro Alves  <palves@redhat.com>
5481
5482         PR gdb/23377
5483         * remote.c (remote_target::remote_detach_pid): Call
5484         set_current_process.
5485
5486 2018-07-11  Pedro Alves  <palves@redhat.com>
5487
5488         * h8300-tdep.c (h8300_gdbarch_init): Remove
5489         set_gdbarch_ecoff_reg_to_regnum calls.
5490
5491 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5492
5493         PR c++/23373
5494         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5495         offsets/sizes for static members of a class/struct.
5496
5497 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5498
5499         * target-descriptions.c (tdesc_register_bitsize): Rename.
5500         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5501         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5502         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5503
5504 2018-07-10  Tom Tromey  <tom@tromey.com>
5505
5506         * breakpoint.c (moribund_locations): Now static and a
5507         std::vector.
5508         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5509         (build_bpstat_chain, update_global_location_list)
5510         (breakpoint_retire_moribund): Update.
5511         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5512         VEC.
5513
5514 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5515
5516         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5517         (riscv_register_reggroup_p): Use new function, remove unneeded
5518         parenthesis.
5519         (riscv_push_dummy_call): Extend assert to compare against xlen or
5520         flen based on register type.
5521
5522 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5523
5524         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5525
5526 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5527
5528         * remote.c (show_hardware_watchpoint_limit): New function.
5529         (show_hardware_watchpoint_length_limit): New function.
5530         (show_hardware_breakpoint_limit): New function.
5531         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5532         where appropriate, update help text.
5533
5534 2018-07-09  Tom Tromey  <tom@tromey.com>
5535
5536         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5537         (CLIBS): Don't mention NAT_CLIBS.
5538
5539 2018-07-09  Tom Tromey  <tom@tromey.com>
5540
5541         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5542         (LIBGDB_OBS, clean mostlyclean): Update.
5543         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5544
5545 2018-07-09  Tom Tromey  <tom@tromey.com>
5546
5547         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5548         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5549         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5550
5551 2018-07-09  Tom Tromey  <tom@tromey.com>
5552
5553         * Makefile.in (ALLDEPFILES): Remove exec.c.
5554         (COMMON_OBS): Remove exec.o.
5555         (COMMON_SFILES): Add exec.c.
5556
5557 2018-07-09  Tom Tromey  <tom@tromey.com>
5558
5559         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5560
5561 2018-07-09  Tom Tromey  <tom@tromey.com>
5562
5563         * Makefile.in (clean mostlyclean): Remove stamp-version.
5564         (version.c): Depend on stamp-version.
5565         (stamp-version): New rule, from version.c rule.
5566
5567 2018-07-09  Tom Tromey  <tom@tromey.com>
5568
5569         * Makefile.in (init.c): Depend on stamp-init.
5570         (stamp-init): New rule, from init.c rule.
5571         (clean mostlyclean): Remove stamp-init.
5572
5573 2018-07-09  Tom Tromey  <tom@tromey.com>
5574
5575         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5576         SUBDIR_GCC_COMPILE_SRCS.
5577
5578 2018-07-09  Tom Tromey  <tom@tromey.com>
5579
5580         * Makefile.in (init.c): Remove some unused sed rules.
5581
5582 2018-07-09  Tom Tromey  <tom@tromey.com>
5583
5584         * Makefile.in (TSOBS): Remove.
5585         (INIT_FILES): Update.
5586         (LIBGDB_OBS): Update.
5587         (COMMON_SFILES): Add inflow.c.
5588         (SFILES): Remove inflow.c.
5589
5590 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5591
5592         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5593
5594 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5595
5596         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5597         get_saveloc_name, is_signal_frame_name, step_name,
5598         init_remote_name, create_addr_space_name,
5599         destroy_addr_space_name, search_unwind_table_name,
5600         find_dyn_list_name): Constify.
5601
5602 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5603
5604         * darwin-nat.c (darwin_pthread_kill): New function.
5605         (darwin_resume_thread): Use darwin_pthread_kill.
5606
5607 2018-07-05  Tom de Vries  <tdevries@suse.de>
5608
5609         * macroexp.c (macro_buffer) <operator=>: New member function.
5610
5611 2018-07-04  Tom Tromey  <tom@tromey.com>
5612
5613         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5614
5615 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5616
5617         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5618         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5619         * maint.c: Likewise.
5620         * top.c: Likewise.
5621
5622 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5623
5624         * NEWS: Create a new section for the next release branch.
5625         Rename the section of the current branch, now that it has
5626         been cut.
5627
5628 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5629
5630         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5631         * version.in: Bump version to 8.2.50.DATE-git.
5632
5633 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5634             Pedro Alves  <palves@redhat.com>
5635
5636         * linux-nat.c (linux_init_ptrace): Rename to ...
5637         (linux_init_ptrace_procfs): ... this.  Call
5638         linux_proc_init_warnings.
5639         (linux_nat_target::post_attach)
5640         (linux_nat_target::post_startup_inferior): Adjust.
5641         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5642         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5643
5644 2018-07-04  Tom de Vries  <tdevries@suse.de>
5645
5646         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5647         check ...
5648         (read_comp_unit_head): ... here.
5649
5650 2018-07-03  Tom Tromey  <tom@tromey.com>
5651
5652         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5653         (stop_tracing, tstatus_command)
5654         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5655         (print_one_static_tracepoint_marker): Update.
5656         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5657         std::vector.
5658         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5659         VEC.
5660         (all_tracepoints, static_tracepoints_here): Return std::vector.
5661
5662 2018-07-03  Tom Tromey  <tom@tromey.com>
5663
5664         * common/ptid.c (ptid_equal): Remove.
5665         * common/ptid.h (ptid_equal): Don't declare.
5666         * ada-tasks.c: Update.
5667         * breakpoint.c: Update.
5668         * common/agent.c: Update.
5669         * corelow.c: Update.
5670         * darwin-nat-info.c: Update.
5671         * darwin-nat.c: Update.
5672         * dcache.c: Update.
5673         * dtrace-probe.c: Update.
5674         * dummy-frame.c: Update.
5675         * fbsd-nat.c: Update.
5676         * frame.c: Update.
5677         * gdbthread.h: Update.
5678         * gnu-nat.c: Update.
5679         * go32-nat.c: Update.
5680         * inf-loop.c: Update.
5681         * inf-ptrace.c: Update.
5682         * infcall.c: Update.
5683         * infcmd.c: Update.
5684         * inflow.c: Update.
5685         * infrun.c: Update.
5686         * linux-fork.c: Update.
5687         * linux-nat.c: Update.
5688         * linux-thread-db.c: Update.
5689         * mi/mi-cmd-var.c: Update.
5690         * mi/mi-interp.c: Update.
5691         * mi/mi-main.c: Update.
5692         * nto-procfs.c: Update.
5693         * ppc-linux-tdep.c: Update.
5694         * procfs.c: Update.
5695         * python/py-inferior.c: Update.
5696         * python/py-record-btrace.c: Update.
5697         * python/py-record.c: Update.
5698         * ravenscar-thread.c: Update.
5699         * regcache.c: Update.
5700         * remote-sim.c: Update.
5701         * remote.c: Update.
5702         * sol-thread.c: Update.
5703         * solib.c: Update.
5704         * target.c: Update.
5705         * tui/tui-stack.c: Update.
5706         * varobj.c: Update.
5707         * windows-nat.c: Update.
5708         * windows-tdep.c: Update.
5709
5710 2018-07-03  Tom Tromey  <tom@tromey.com>
5711
5712         * common/ptid.c (ptid_match): Remove.
5713         * common/ptid.h (ptid_match): Don't declare.
5714         * fbsd-nat.c: Update.
5715         * infcmd.c: Update.
5716         * infrun.c: Update.
5717         * linux-nat.c: Update.
5718         * record-btrace.c: Update.
5719         * regcache.c: Update.
5720         * remote.c: Update.
5721
5722 2018-07-03  Tom Tromey  <tom@tromey.com>
5723
5724         * common/ptid.c (ptid_tid_p): Remove.
5725         * common/ptid.h (ptid_tid_p): Don't declare.
5726         * sol-thread.c: Update.
5727
5728 2018-07-03  Tom Tromey  <tom@tromey.com>
5729
5730         * common/ptid.c (ptid_lwp_p): Remove.
5731         * common/ptid.h (ptid_lwp_p): Don't declare.
5732         * fbsd-nat.c: Update.
5733         * linux-nat.c: Update.
5734         * nat/linux-procfs.c: Update.
5735         * nat/x86-linux-dregs.c: Update.
5736         * sol-thread.c: Update.
5737
5738 2018-07-03  Tom Tromey  <tom@tromey.com>
5739
5740         * common/ptid.c (ptid_is_pid): Remove.
5741         * common/ptid.h (ptid_is_pid): Don't declare.
5742         * infrun.c: Update.
5743         * linux-nat.c: Update.
5744         * mi/mi-interp.c: Update.
5745         * remote.c: Update.
5746         * thread.c: Update.
5747
5748 2018-07-03  Tom Tromey  <tom@tromey.com>
5749
5750         * common/ptid.c (ptid_get_tid): Remove.
5751         * common/ptid.h (ptid_get_tid): Don't declare.
5752         * ada-tasks.c: Update.
5753         * aix-thread.c: Update.
5754         * bsd-uthread.c: Update.
5755         * darwin-nat.c: Update.
5756         * fbsd-nat.c: Update.
5757         * i386-darwin-nat.c: Update.
5758         * infrun.c: Update.
5759         * linux-tdep.c: Update.
5760         * nto-procfs.c: Update.
5761         * ppc-ravenscar-thread.c: Update.
5762         * python/py-infthread.c: Update.
5763         * ravenscar-thread.c: Update.
5764         * sol-thread.c: Update.
5765         * sparc-ravenscar-thread.c: Update.
5766         * windows-nat.c: Update.
5767
5768 2018-07-03  Tom Tromey  <tom@tromey.com>
5769
5770         * common/ptid.c (ptid_get_lwp): Remove.
5771         * common/ptid.h (ptid_get_lwp): Don't declare.
5772         * aarch64-linux-nat.c: Update.
5773         * ada-tasks.c: Update.
5774         * aix-thread.c: Update.
5775         * amd64-linux-nat.c: Update.
5776         * arm-linux-nat.c: Update.
5777         * corelow.c: Update.
5778         * fbsd-nat.c: Update.
5779         * fbsd-tdep.c: Update.
5780         * gnu-nat.c: Update.
5781         * i386-cygwin-tdep.c: Update.
5782         * i386-gnu-nat.c: Update.
5783         * i386-linux-nat.c: Update.
5784         * ia64-linux-nat.c: Update.
5785         * inf-ptrace.c: Update.
5786         * infrun.c: Update.
5787         * linux-fork.c: Update.
5788         * linux-nat.c: Update.
5789         * linux-tdep.c: Update.
5790         * linux-thread-db.c: Update.
5791         * mips-linux-nat.c: Update.
5792         * nat/aarch64-linux-hw-point.c: Update.
5793         * nat/aarch64-linux.c: Update.
5794         * nat/linux-btrace.c: Update.
5795         * nat/linux-osdata.c: Update.
5796         * nat/linux-procfs.c: Update.
5797         * nat/x86-linux-dregs.c: Update.
5798         * obsd-nat.c: Update.
5799         * ppc-fbsd-nat.c: Update.
5800         * ppc-linux-nat.c: Update.
5801         * procfs.c: Update.
5802         * python/py-infthread.c: Update.
5803         * ravenscar-thread.c: Update.
5804         * remote.c: Update.
5805         * s390-linux-nat.c: Update.
5806         * sol-thread.c: Update.
5807         * sol2-tdep.c: Update.
5808         * spu-linux-nat.c: Update.
5809         * x86-linux-nat.c: Update.
5810         * xtensa-linux-nat.c: Update.
5811
5812 2018-07-03  Tom Tromey  <tom@tromey.com>
5813
5814         * common/ptid.c (ptid_get_pid): Remove.
5815         * common/ptid.h (ptid_get_pid): Don't declare.
5816         * aarch64-linux-nat.c: Update.
5817         * ada-lang.c: Update.
5818         * aix-thread.c: Update.
5819         * alpha-bsd-nat.c: Update.
5820         * amd64-fbsd-nat.c: Update.
5821         * amd64-linux-nat.c: Update.
5822         * arm-linux-nat.c: Update.
5823         * arm-nbsd-nat.c: Update.
5824         * auxv.c: Update.
5825         * break-catch-syscall.c: Update.
5826         * breakpoint.c: Update.
5827         * bsd-uthread.c: Update.
5828         * corelow.c: Update.
5829         * ctf.c: Update.
5830         * darwin-nat.c: Update.
5831         * fbsd-nat.c: Update.
5832         * fbsd-tdep.c: Update.
5833         * gcore.c: Update.
5834         * gnu-nat.c: Update.
5835         * hppa-nbsd-nat.c: Update.
5836         * hppa-obsd-nat.c: Update.
5837         * i386-fbsd-nat.c: Update.
5838         * ia64-linux-nat.c: Update.
5839         * inf-ptrace.c: Update.
5840         * infcmd.c: Update.
5841         * inferior.c: Update.
5842         * inferior.h: Update.
5843         * inflow.c: Update.
5844         * infrun.c: Update.
5845         * linux-fork.c: Update.
5846         * linux-nat.c: Update.
5847         * linux-tdep.c: Update.
5848         * linux-thread-db.c: Update.
5849         * m68k-bsd-nat.c: Update.
5850         * mi/mi-interp.c: Update.
5851         * mi/mi-main.c: Update.
5852         * mips-linux-nat.c: Update.
5853         * mips-nbsd-nat.c: Update.
5854         * mips64-obsd-nat.c: Update.
5855         * nat/aarch64-linux-hw-point.c: Update.
5856         * nat/aarch64-linux.c: Update.
5857         * nat/linux-btrace.c: Update.
5858         * nat/linux-osdata.c: Update.
5859         * nat/linux-procfs.c: Update.
5860         * nat/x86-linux-dregs.c: Update.
5861         * nto-procfs.c: Update.
5862         * obsd-nat.c: Update.
5863         * ppc-linux-nat.c: Update.
5864         * ppc-nbsd-nat.c: Update.
5865         * ppc-obsd-nat.c: Update.
5866         * proc-service.c: Update.
5867         * procfs.c: Update.
5868         * python/py-inferior.c: Update.
5869         * python/py-infthread.c: Update.
5870         * ravenscar-thread.c: Update.
5871         * record.c: Update.
5872         * remote-sim.c: Update.
5873         * remote.c: Update.
5874         * rs6000-nat.c: Update.
5875         * s390-linux-nat.c: Update.
5876         * sh-nbsd-nat.c: Update.
5877         * sol-thread.c: Update.
5878         * sparc-nat.c: Update.
5879         * sparc64-tdep.c: Update.
5880         * spu-linux-nat.c: Update.
5881         * spu-tdep.c: Update.
5882         * target-debug.h: Update.
5883         * target.c: Update.
5884         * thread.c: Update.
5885         * tid-parse.c: Update.
5886         * tracefile-tfile.c: Update.
5887         * vax-bsd-nat.c: Update.
5888         * windows-nat.c: Update.
5889         * x86-linux-nat.c: Update.
5890         * x86-nat.c: Update.
5891
5892 2018-07-03  Tom Tromey  <tom@tromey.com>
5893
5894         * common/ptid.c (pid_to_ptid): Remove.
5895         * common/ptid.h (pid_to_ptid): Don't declare.
5896         * aix-thread.c: Update.
5897         * arm-linux-nat.c: Update.
5898         * common/ptid.c: Update.
5899         * common/ptid.h: Update.
5900         * corelow.c: Update.
5901         * ctf.c: Update.
5902         * darwin-nat.c: Update.
5903         * fbsd-nat.c: Update.
5904         * fork-child.c: Update.
5905         * gnu-nat.c: Update.
5906         * go32-nat.c: Update.
5907         * inf-ptrace.c: Update.
5908         * infcmd.c: Update.
5909         * inferior.c: Update.
5910         * infrun.c: Update.
5911         * linux-fork.c: Update.
5912         * linux-nat.c: Update.
5913         * nat/aarch64-linux-hw-point.c: Update.
5914         * nat/fork-inferior.c: Update.
5915         * nat/x86-linux-dregs.c: Update.
5916         * nto-procfs.c: Update.
5917         * obsd-nat.c: Update.
5918         * procfs.c: Update.
5919         * progspace.c: Update.
5920         * remote.c: Update.
5921         * rs6000-nat.c: Update.
5922         * s390-linux-nat.c: Update.
5923         * sol-thread.c: Update.
5924         * spu-linux-nat.c: Update.
5925         * target.c: Update.
5926         * top.c: Update.
5927         * tracefile-tfile.c: Update.
5928         * windows-nat.c: Update.
5929
5930 2018-07-03  Tom Tromey  <tom@tromey.com>
5931
5932         * common/ptid.h (ptid_build): Don't declare.
5933         * common/ptid.c (ptid_build): Remove.
5934         * aix-thread.c: Update.
5935         * bsd-kvm.c: Update.
5936         * bsd-uthread.c: Update.
5937         * common/agent.c: Update.
5938         * common/ptid.c: Update.
5939         * common/ptid.h: Update.
5940         * corelow.c: Update.
5941         * darwin-nat.c: Update.
5942         * fbsd-nat.c: Update.
5943         * gnu-nat.c: Update.
5944         * linux-fork.c: Update.
5945         * linux-nat.c: Update.
5946         * linux-thread-db.c: Update.
5947         * nat/linux-osdata.c: Update.
5948         * nat/linux-procfs.c: Update.
5949         * nto-procfs.c: Update.
5950         * obsd-nat.c: Update.
5951         * proc-service.c: Update.
5952         * procfs.c: Update.
5953         * ravenscar-thread.c: Update.
5954         * remote-sim.c: Update.
5955         * remote.c: Update.
5956         * sol-thread.c: Update.
5957         * target.c: Update.
5958         * windows-nat.c: Update.
5959
5960 2018-07-03  Tom Tromey  <tom@tromey.com>
5961
5962         * infrun.c (follow_exec): Use exit_inferior_silent.
5963         * inferior.c (exit_inferior_num_silent): Remove.
5964         * inferior.h (exit_inferior_num_silent): Don't declare.
5965
5966 2018-07-03  Tom Tromey  <tom@tromey.com>
5967
5968         PR cli/23340:
5969         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5970         inferior_ptid on error.
5971
5972 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5973             Simon Marchi  <simon.marchi@polymtl.ca>
5974
5975         PR tdep/8282
5976         * disasm.h (gdb_disassembler): Add
5977         `m_disassembler_options_holder'. member
5978         * disasm.c (get_all_disassembler_options): New function.
5979         (gdb_disassembler::gdb_disassembler): Use it.
5980         (gdb_buffered_insn_length_init_dis): Likewise.
5981         (gdb_buffered_insn_length): Adjust accordingly.
5982         (set_disassembler_options): Handle options with arguments.
5983         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5984         line if showing options with descriptions.
5985         (disassembler_options_completer): Adapt to using the
5986         `disasm_options_and_args_t' structure.
5987         * mips-tdep.c (mips_disassembler_options): New variable.
5988         (mips_disassembler_options_o32): Likewise.
5989         (mips_disassembler_options_n32): Likewise.
5990         (mips_disassembler_options_n64): Likewise.
5991         (gdb_print_insn_mips): Don't set `disassembler_options'.
5992         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5993         functions.
5994         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5995         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5996         `gdbarch_disassembler_options_implicit' and
5997         `gdbarch_valid_disassembler_options'.
5998         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5999         `disasm_options_and_args_t' structure.
6000         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6001         method.
6002         (valid_disassembler_options): Switch from `disasm_options_t' to
6003         the `disasm_options_and_args_t' structure.
6004         * NEWS: Document `set disassembler-options' support for the MIPS
6005         target.
6006         * gdbarch.h: Regenerate.
6007         * gdbarch.c: Regenerate.
6008
6009 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6010
6011         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6012
6013 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6014
6015         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6016         parameter in call to amd64_target_description.
6017         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6018         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6019         (amd64fbsd_init_abi): Likewise.
6020         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6021         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6022         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6023         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6024
6025 2018-06-29  Pedro Alves  <palves@redhat.com>
6026
6027         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6028         "segments" parameter.
6029         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6030         (_initialize_amd64_tdep): Update call to
6031         amd64_create_target_description.
6032         (amd64_target_description): Add "segments" parameter.  Adjust
6033         the implementation to use it.
6034         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6035         call to amd64_create_target_description.
6036         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6037         * gdb/arch/amd64.h (amd64_create_target_description): Add
6038         "segments" register.
6039         * gdb/arch/amd64.c (amd64_create_target_description): Add
6040         "segments" parameter.  Call create_feature_i386_64bit_segments
6041         only if SEGMENTS is true.
6042         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6043         call to amd64_create_target_description.
6044
6045 2018-06-29  Pedro Alves  <palves@redhat.com>
6046
6047         * thread.c (thread_target_id_str): New, factored out from ...
6048         (print_thread_info_1): ... here.  Use it to compute the max
6049         "Target Id" column width.
6050
6051 2018-06-29  Pedro Alves  <palves@redhat.com>
6052
6053         * remote.c (remote_target::extra_thread_info): Delete
6054         'display_buf' and 'n' locals.  from the cache, regardless of
6055         packet mechanims is in use.  Use cache for qThreadExtra and qP
6056         methods too.
6057
6058 2018-06-29  Pedro Alves  <palves@redhat.com>
6059
6060         * blockframe.c (find_pc_sect_containing_function): New function.
6061         * breakpoint.c (print_breakpoint_location): Don't call
6062         find_pc_sect_function.
6063         * linespec.c (create_sals_line_offset): Record the location's
6064         symbol in the sal.
6065         * linespec.c (convert_address_location_to_sals): Fill in sal's
6066         symbol with find_pc_sect_containing_function.
6067         * symtab.c (find_function_start_sal): Rename to ...
6068         (find_function_start_sal_1): ... this.
6069         (find_function_start_sal): Reimplement as wrapper around
6070         find_function_start_sal_1, and use
6071         find_pc_sect_containing_function to fill in the sal's symbol.
6072         (find_function_start_sal(symbol*, bool)): Adjust.
6073         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6074         comments.
6075         (find_pc_sect_containing_function): Declare.
6076
6077 2018-06-29  Pedro Alves  <palves@redhat.com>
6078
6079         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6080         true if the the location has no symbol.
6081
6082 2018-06-28  Tom Tromey  <tom@tromey.com>
6083
6084         * NEWS: Mention --enable-codesign.
6085         * silent-rules.mk (ECHO_SIGN): New variable.
6086         * configure.ac: Add --enable-codesign.
6087         * configure: Rebuild.
6088         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6089         (gdb$(EXEEXT)): Optionally invoke codesign.
6090
6091 2018-06-28  Pedro Alves  <palves@redhat.com>
6092
6093         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6094         comments.
6095         (switch_to_thread_no_regs): Adjust comment.
6096         * infcmd.c (stop_pc): Delete.
6097         (post_create_inferior, info_program_command): Replace references
6098         to stop_pc with references to thread_info->suspend.stop_pc.
6099         * inferior.h (stop_pc): Delete declaration.
6100         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6101         (handle_inferior_event_1, handle_signal_stop)
6102         (process_event_stop_test, keep_going_stepped_thread)
6103         (handle_step_into_function, handle_step_into_function_backward)
6104         (print_stop_location): Replace references to stop_pc with
6105         references to thread_info->suspend.stop_pc.
6106         (struct infcall_suspend_state) <stop_pc>: Delete field.
6107         (save_infcall_suspend_state, restore_infcall_suspend_state):
6108         Remove references to inf_stat->stop_pc.
6109         * linux-fork.c (fork_load_infrun_state): Likewise.
6110         * record-btrace.c (record_btrace_set_replay): Likewise.
6111         * record-full.c (record_full_goto_entry): Likewise.
6112         * remote.c (print_one_stopped_thread): Likewise.
6113         * target.c (target_resume): Extend comment.
6114         * thread.c (set_executing_thread): New.
6115         (set_executing): Use it.
6116         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6117         Remove references to stop_pc.
6118
6119 2018-06-28  Pedro Alves  <palves@redhat.com>
6120
6121         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6122         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6123
6124 2018-06-28  Tom Tromey  <tom@tromey.com>
6125
6126         * coffread.c (coff_symfile_finish): Update.
6127         * xcoffread.c (xcoff_symfile_finish): Update.
6128         * elfread.c (elf_symfile_finish): Update.
6129         * symfile.h (dwarf2_free_objfile): Don't declare.
6130         * dwarf2read.c (_initialize_dwarf2_read): Use
6131         register_objfile_data_with_cleanup.
6132         (dwarf2_free_objfile): Now static.  Change signature.
6133
6134 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6135
6136         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6137         option "-o" to add-symbol-file-load to add an offset to each
6138         section's load address.
6139         * symfile.c (set_objfile_default_section_offset): New function.
6140
6141 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6142
6143         * symfile.c (add_symbol_file_command): Make sure that sections
6144         with the same name are sorted in the same order.
6145
6146 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6147
6148         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6149         require the second argument.  If omitted, load sections at the
6150         addresses specified in the file.
6151
6152 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6153
6154         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6155         (_initialize_symfile): Add option "-o" to symbol-file to add an
6156         offset to each section of the symbol file.
6157
6158 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6159
6160         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6161
6162 2018-06-27  Tom Tromey  <tom@tromey.com>
6163
6164         * stack.c (_initialize_stack): Update "func" help text.
6165
6166 2018-06-27  Tom Tromey  <tom@tromey.com>
6167
6168         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6169         std::vector.
6170         (unwind_infopy_str, pyuw_create_unwind_info)
6171         (unwind_infopy_add_saved_register, pyuw_sniffer)
6172         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6173         Update.
6174         (struct saved_reg): Add constructor.
6175         <value>: Now a gdbpy_ref<>.
6176
6177 2018-06-27  Tom Tromey  <tom@tromey.com>
6178
6179         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6180
6181 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6182
6183         * gdb-gdb.py.in: Format using autopep8.
6184
6185 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6186
6187         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6188         (type_lookup_function): Recognize CORE_ADDR values.
6189
6190 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6191
6192         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6193         print tag_name.
6194
6195 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6196
6197         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6198         <__lt__>: Add.
6199
6200 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6201
6202         * gdb-gdb.py: Move to...
6203         * gdb-gdb.py.in: ... here.
6204         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6205         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6206         dependencies.
6207         (distclean): Remove gdb-gdb.py when cleaning.
6208         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6209         * configure: Re-generate.
6210
6211 2018-06-27  Pedro Alves  <palves@redhat.com>
6212
6213         * proc-service.c (get_ps_regcache): New.
6214         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6215         (ps_lsetfpregs): Use it.
6216
6217 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6218
6219         PR gdb/21695
6220         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6221         (dwarf_decode_lines_1): Adjust.
6222
6223 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6224
6225         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6226         override.
6227         <info_proc>: Likewise.
6228
6229 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6230
6231         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6232         to windows_fetch_one_register, and only handle the case of
6233         fetching one register.  Move the code that reloads the context
6234         and iterates over all registers if R is negative to...
6235         (windows_nat_target::fetch_registers): ... here.
6236         (do_windows_store_inferior_registers): Rename to
6237         windows_store_one_register, and only handle the case of storing
6238         one register.  Move the code that handles the case where r is
6239         negative to...
6240         (windows_nat_target::store_registers) ... here.
6241
6242 2018-06-26  Tom Tromey  <tom@tromey.com>
6243
6244         PR rust/22574:
6245         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6246         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6247         Update.
6248         (rust_internal_print_type): Add podata parameter.
6249         (rust_print_type): Update.
6250
6251 2018-06-26  Tom Tromey  <tom@tromey.com>
6252
6253         * typeprint.h (struct print_offset_data) <update, finish,
6254         maybe_print_hole>: New methods.
6255         <indentation>: New constant.
6256         * typeprint.c (print_offset_data::indentation): Define.
6257         (print_offset_data::maybe_print_hole, print_offset_data::update)
6258         (print_offset_data::finish): Move from c-typeprint.c and rename.
6259         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6260         (print_spaces_filtered_with_print_options): Update.
6261         (c_print_type_union_field_offset, maybe_print_hole)
6262         (c_print_type_struct_field_offset): Move to typeprint.c and
6263         rename.
6264         (c_type_print_base_struct_union): Update.
6265
6266 2018-06-25  Pedro Alves  <palves@redhat.com>
6267
6268         * gdbthread.h (thread_info_ref, delete_thread)
6269         (delete_thread_silent, first_thread_of_inferior)
6270         (any_thread_of_inferior, switch_to_thread)
6271         (enable_thread_stack_temporaries)
6272         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6273         (get_last_thread_stack_temporary)
6274         (value_in_thread_stack_temporaries, can_access_registers_thread):
6275         Spell out "struct thread_info" instead of just "thread_info".
6276         * inferior.h (notice_new_inferior): Likewise.
6277
6278 2018-06-25  Pedro Alves  <palves@redhat.com>
6279
6280         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6281         pass thread_info pointer to delete_thread.
6282         (windows_nat_target::detach): Pass inferior pointer to
6283         detach_inferior.
6284         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6285         delete_thread.
6286         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6287         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6288         and pass a thread_info pointer to delete_thread.
6289         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6290         pass thread_info pointer to delete_thread.
6291         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6292         delete_thread_silent call.
6293         * procfs.c (procfs_target::detach): Pass inferior pointer to
6294         detach_inferior.
6295         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6296         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6297         delete_thread_silent call.
6298         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6299         pass thread_info pointer to delete_thread.
6300         (windows_nat_target::detach): Pass inferior pointer to
6301         delete_inferior.
6302
6303 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6304
6305         * regcache.c (readable_regcache::read_part): Fix asserts.
6306         (reg_buffer::raw_collect_part): New function.
6307         (regcache::write_part): Fix asserts.
6308         (reg_buffer::raw_supply_part): New function.
6309         (regcache::transfer_regset_register): New helper function.
6310         (regcache::transfer_regset): Call new functions.
6311         (regcache_supply_regset): Use gdb_byte*.
6312         (regcache::supply_regset): Likewise.
6313         (regcache_collect_regset): Likewise.
6314         (regcache::collect_regset): Likewise.
6315         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6316         (reg_buffer::raw_supply_part): Likewise.
6317         (regcache::transfer_regset_register): Likewise.
6318         (regcache::transfer_regset): Use gdb_byte*.
6319
6320 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6321
6322         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6323
6324 2018-06-21  Pedro Alves  <palves@redhat.com>
6325
6326         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6327         instead of a ptid_t.  All callers adjusted.
6328         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6329         adjusted.
6330         (print_ada_task_info, display_current_task_id, task_command_1):
6331         Adjust.
6332         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6333         inferior_thread.
6334         (breakpoint_kind): Adjust.
6335         (remove_breakpoints_pid): Rename to ...
6336         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6337         pointer.  All callers adjusted.
6338         (bpstat_clear_actions): Use inferior_thread.
6339         (get_bpstat_thread): New.
6340         (bpstat_do_actions): Use it.
6341         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6342         to take a thread_info pointer.  All callers adjusted.
6343         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6344         (breakpoint_re_set_thread): Use inferior_thread.
6345         * breakpoint.h (struct inferior): Forward declare.
6346         (bpstat_stop_status): Update.
6347         (remove_breakpoints_pid): Delete.
6348         (remove_breakpoints_inf): New.
6349         * bsd-uthread.c (bsd_uthread_target::wait)
6350         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6351         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6352         (maint_btrace_packet_history_cmd)
6353         (maint_btrace_clear_packet_history_cmd): Adjust.
6354         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6355         inferior_thread.
6356         * cli/cli-interp.c: Include "inferior.h".
6357         * common/refcounted-object.h (struct
6358         refcounted_object_ref_policy): New.
6359         * compile/compile-object-load.c: Include gdbthread.h.
6360         (store_regs): Use inferior_thread.
6361         * corelow.c (core_target::close): Use current_inferior.
6362         (core_target_open): Adjust to use first_thread_of_inferior and use
6363         the current inferior.
6364         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6365         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6366         <thread>: ... this new field.  All references adjusted.
6367         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6368         Take a thread_info pointer instead of a ptid_t.
6369         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6370         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6371         thread_info pointer instead of a ptid_t.
6372         * elfread.c: Include "inferior.h".
6373         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6374         Use inferior_thread.
6375         * eval.c (evaluate_subexp): Likewise.
6376         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6377         inferior_thread.
6378         * gdb_proc_service.h (struct thread_info): Forward declare.
6379         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6380         <thread>: ... this new field.  All references adjusted.
6381         * gdbarch.h, gdbarch.c: Regenerate.
6382         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6383         'thread' parameter.  All implementations and callers adjusted.
6384         * gdbthread.h (thread_info) <set_running>: New method.
6385         (delete_thread, delete_thread_silent): Take a thread_info pointer
6386         instead of a ptid.
6387         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6388         (first_thread_of_process): Delete, replaced by ...
6389         (first_thread_of_inferior): ... this new function.  All callers
6390         adjusted.
6391         (any_live_thread_of_process): Delete, replaced by ...
6392         (any_live_thread_of_inferior): ... this new function.  All callers
6393         adjusted.
6394         (switch_to_thread, switch_to_no_thread): Declare.
6395         (is_executing): Delete.
6396         (enable_thread_stack_temporaries): Update comment.
6397         <enable_thread_stack_temporaries>: Take a thread_info pointer
6398         instead of a ptid_t.  Incref the thread.
6399         <~enable_thread_stack_temporaries>: Decref the thread.
6400         <m_ptid>: Delete
6401         <m_thr>: New.
6402         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6403         (get_last_thread_stack_temporary)
6404         (value_in_thread_stack_temporaries, can_access_registers_thread):
6405         Take a thread_info pointer instead of a ptid_t.  All callers
6406         adjusted.
6407         * infcall.c (get_call_return_value): Use inferior_thread.
6408         (run_inferior_call): Work with thread pointers instead of ptid_t.
6409         (call_function_by_hand_dummy): Work with thread pointers instead
6410         of ptid_t.  Use thread_info_ref.
6411         * infcmd.c (proceed_thread_callback): Access thread's state
6412         directly.
6413         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6414         access thread's state directly.
6415         (continue_command): Use inferior_thread.
6416         (info_program_command): Use find_thread_ptid and access thread
6417         state directly.
6418         (proceed_after_attach_callback): Use thread state directly.
6419         (notice_new_inferior): Take a thread_info pointer instead of a
6420         ptid_t.  All callers adjusted.
6421         (exit_inferior): Take an inferior pointer instead of a pid.  All
6422         callers adjusted.
6423         (exit_inferior_silent): New.
6424         (detach_inferior): Delete.
6425         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6426         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6427         (detach_inferior_command, kill_inferior_command): Use
6428         find_inferior_id instead of valid_gdb_inferior_id and
6429         gdb_inferior_id_to_pid.
6430         (inferior_command): Use inferior and thread pointers.
6431         * inferior.h (struct thread_info): Forward declare.
6432         (notice_new_inferior): Take a thread_info pointer instead of a
6433         ptid_t.  All callers adjusted.
6434         (detach_inferior): Delete declaration.
6435         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6436         instead of a pid.  All callers adjusted.
6437         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6438         (valid_gdb_inferior_id): Delete.
6439         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6440         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6441         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6442         ...
6443         <inf>: ... this new field.
6444         <step_ptid>: Delete, replaced by ...
6445         <step_thread>: ... this new field.
6446         (get_displaced_stepping_state): Take an inferior pointer instead
6447         of a pid.  All callers adjusted.
6448         (displaced_step_in_progress_any_inferior): Adjust.
6449         (displaced_step_in_progress_thread): Take a thread pointer instead
6450         of a ptid_t.  All callers adjusted.
6451         (displaced_step_in_progress, add_displaced_stepping_state): Take
6452         an inferior pointer instead of a pid.  All callers adjusted.
6453         (get_displaced_step_closure_by_addr): Adjust.
6454         (remove_displaced_stepping_state): Take an inferior pointer
6455         instead of a pid.  All callers adjusted.
6456         (displaced_step_prepare_throw, displaced_step_prepare)
6457         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6458         All callers adjusted.
6459         (start_step_over): Adjust.
6460         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6461         displaced step queue.
6462         (do_target_resume): Adjust.
6463         (fetch_inferior_event): Use inferior_thread.
6464         (context_switch, get_inferior_stop_soon): Take an
6465         execution_control_state pointer instead of a ptid_t.  All callers
6466         adjusted.
6467         (switch_to_thread_cleanup): Delete.
6468         (stop_all_threads): Use scoped_restore_current_thread.
6469         * inline-frame.c: Include "gdbthread.h".
6470         (inline_state) <inline_state>: Take a thread pointer instead of a
6471         ptid_t.  All callers adjusted.
6472         <ptid>: Delete, replaced by ...
6473         <thread>: ... this new field.
6474         (find_inline_frame_state): Take a thread pointer instead of a
6475         ptid_t.  All callers adjusted.
6476         (skip_inline_frames, step_into_inline_frame)
6477         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6478         pointer instead of a ptid_t.  All callers adjusted.
6479         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6480         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6481         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6482         pointers directly.
6483         * linux-nat.c (get_detach_signal): Likewise.
6484         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6485         (thread_db_notice_clone): Adjust.
6486         (thread_db_find_new_threads_silently)
6487         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6488         a thread pointer instead of a ptid_t.  All callers adjusted.
6489         * mi/mi-cmd-var.c: Include "inferior.h".
6490         (mi_cmd_var_update_iter): Update to use thread pointers.
6491         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6492         inferior directly.
6493         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6494         out to ...
6495         (mi_output_running): ... this new function.
6496         (mi_on_resume_1): Adjust to use it.
6497         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6498         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6499         directly.
6500         (interrupt_thread_callback): : Adjust to use thread and inferior
6501         pointers.
6502         * proc-service.c: Include "gdbthread.h".
6503         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6504         * progspace-and-thread.c: Include "inferior.h".
6505         * progspace.c: Include "inferior.h".
6506         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6507         hold a reference to an inferior_object.
6508         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6509         inferior_thread.
6510         * python/py-inferior.c (struct inferior_object): Give the type a
6511         tag name instead of a typedef.
6512         (python_on_normal_stop): No need to check if the current thread is
6513         listed.
6514         (inferior_to_inferior_object): Change return type to
6515         inferior_object.  All callers adjusted.
6516         (find_thread_object): Delete, bits factored out to ...
6517         (thread_to_thread_object): ... this new function.
6518         * python/py-infthread.c (create_thread_object): Use
6519         inferior_to_inferior_object.
6520         (thpy_is_stopped): Use thread pointer directly.
6521         (gdbpy_selected_thread): Use inferior_thread.
6522         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6523         field, replaced with ...
6524         <thread>: ... this new field.  All users adjusted.
6525         (btpy_insn_or_gap_new): Drop const.
6526         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6527         callers adjusted.
6528         * python/py-record.c: Include "gdbthread.h".
6529         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6530         a ptid_t.  All callers adjusted.
6531         (gdbpy_current_recording): Use inferior_thread.
6532         * python/py-record.h (recpy_record_object) <ptid>: Delete
6533         field, replaced with ...
6534         <thread>: ... this new field.  All users adjusted.
6535         (recpy_element_object) <ptid>: Delete
6536         field, replaced with ...
6537         <thread>: ... this new field.  All users adjusted.
6538         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6539         a ptid_t.  All callers adjusted.
6540         * python/py-threadevent.c: Include "gdbthread.h".
6541         (get_event_thread): Use thread_to_thread_object.
6542         * python/python-internal.h (struct inferior_object): Forward
6543         declare.
6544         (find_thread_object, find_inferior_object): Delete declarations.
6545         (thread_to_thread_object, inferior_to_inferior_object): New
6546         declarations.
6547         * record-btrace.c: Include "inferior.h".
6548         (require_btrace_thread): Use inferior_thread.
6549         (record_btrace_frame_sniffer)
6550         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6551         (get_thread_current_frame): Use scoped_restore_current_thread and
6552         switch_to_thread.
6553         (get_thread_current_frame): Use thread pointer directly.
6554         (record_btrace_replay_at_breakpoint): Use thread's inferior
6555         pointer directly.
6556         * record-full.c: Include "inferior.h".
6557         * regcache.c: Include "gdbthread.h".
6558         (get_thread_arch_regcache): Use the inferior's address space
6559         directly.
6560         (get_thread_regcache, registers_changed_thread): New.
6561         * regcache.h (get_thread_regcache(thread_info *thread)): New
6562         overload.
6563         (registers_changed_thread): New.
6564         (remote_target) <remote_detach_1>: Swap order of parameters.
6565         (remote_add_thread): <remote_add_thread>: Return the new thread.
6566         (get_remote_thread_info(ptid_t)): New overload.
6567         (remote_target::remote_notice_new_inferior): Use thread pointers
6568         directly.
6569         (remote_target::process_initial_stop_replies): Use
6570         thread_info::set_running.
6571         (remote_target::remote_detach_1, remote_target::detach)
6572         (extended_remote_target::detach): Adjust.
6573         * stack.c (frame_show_address): Use inferior_thread.
6574         * target-debug.h (target_debug_print_thread_info_pp): New.
6575         * target-delegates.c: Regenerate.
6576         * target.c (default_thread_address_space): Delete.
6577         (memory_xfer_partial_1): Use current_inferior.
6578         (target_detach): Use current_inferior.
6579         (target_thread_address_space): Delete.
6580         (generic_mourn_inferior): Use current_inferior.
6581         * target.h (struct target_ops) <thread_address_space>: Delete.
6582         (target_thread_address_space): Delete.
6583         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6584         pointers directly.
6585         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6586         thread pointer instead of a ptid_t.  Adjust all callers.
6587         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6588         (first_thread_of_process): Delete, replaced by ...
6589         (first_thread_of_inferior): ... this new function.  All callers
6590         adjusted.
6591         (any_thread_of_process): Rename to ...
6592         (any_thread_of_inferior): ... this, and take an inferior pointer.
6593         (any_live_thread_of_process): Rename to ...
6594         (any_live_thread_of_inferior): ... this, and take an inferior
6595         pointer.
6596         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6597         (value_in_thread_stack_temporaries)
6598         (get_last_thread_stack_temporary): Take a thread pointer instead
6599         of a ptid_t.  Adjust all callers.
6600         (thread_info::set_running): New.
6601         (validate_registers_access): Use inferior_thread.
6602         (can_access_registers_ptid): Rename to ...
6603         (can_access_registers_thread): ... this, and take a thread
6604         pointer.
6605         (print_thread_info_1): Adjust to compare thread pointers instead
6606         of ptids.
6607         (switch_to_no_thread, switch_to_thread): Make extern.
6608         (scoped_restore_current_thread::~scoped_restore_current_thread):
6609         Use m_thread pointer directly.
6610         (scoped_restore_current_thread::scoped_restore_current_thread):
6611         Use inferior_thread.
6612         (thread_command): Use thread pointer directly.
6613         (thread_num_make_value_helper): Use inferior_thread.
6614         * top.c (execute_command): Use inferior_thread.
6615         * tui/tui-interp.c: Include "inferior.h".
6616         * varobj.c (varobj_create): Use inferior_thread.
6617         (value_of_root_1): Use find_thread_global_id instead of
6618         global_thread_id_to_ptid.
6619
6620 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6621
6622         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6623         possible.
6624         (regcache::write_part): Likewise.
6625         (readable_regcache::cooked_read_part): Update comment.
6626         (readable_regcache::cooked_write_part): Likewise.
6627         * regcache.h: (readable_regcache::read_part): Likewise.
6628         (regcache::write_part): Likewise.
6629
6630 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6631             Dirk Schubert  <dirk.schubert@arm.com>
6632
6633         * aarch64-linux-nat.c (post_attach): New.
6634         (aarch64_linux_nat_target::post_attach): Override post_attach to
6635         record the number of hardware debug registers.
6636
6637 2018-06-20  Tom Tromey  <tom@tromey.com>
6638
6639         * python/py-param.c (add_setshow_generic): Make parameters const.
6640         (parmpy_init): Update.
6641
6642 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6643
6644         * regcache.h (regcache_cooked_read_ftype): Rename to...
6645         (register_read_ftype): ...this, change type to function_view.
6646         (class reg_buffer) <save>: Remove src parameter.
6647         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6648         parameter non-const in first overload.  Remove src parameter in
6649         second overload.
6650         * regcache.c (do_cooked_read): Remove.
6651         (readonly_detached_regcache::readonly_detached_regcache): Make
6652         parameter non-const, adjust call to other constructor.
6653         (reg_buffer::save): Remove src parameter.
6654         * frame.c (do_frame_register_read): Remove.
6655         (frame_save_as_regcache): Use lambda function.
6656         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6657         parameter to ppu2spu_data *.
6658         (ppu2spu_sniffer): Use lambda function.
6659
6660 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6661
6662         * record-full.c (record_full_target::insert_breakpoint): Remove
6663         "struct" keyword, add const.
6664
6665 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6666
6667         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6668         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6669         * configure.ac: Remove AC_PREREQ, add missing quoting.
6670         * gnulib/configure.ac: Modernize usage of
6671         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6672         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6673         (AUTOMAKE_VERSION): Bump to 1.15.1.
6674         * configure: Re-generate.
6675         * config.in: Re-generate.
6676         * aclocal.m4: Re-generate.
6677         * gnulib/aclocal.m4: Re-generate.
6678         * gnulib/config.in: Re-generate.
6679         * gnulib/configure: Re-generate.
6680         * gnulib/import/Makefile.in: Re-generate.
6681
6682 2018-06-19  Pedro Alves  <palves@redhat.com>
6683
6684         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6685         (lookup_minimal_symbol_by_pc_section): ... here with
6686         gdb_assert_not_reached added.
6687
6688 2018-06-19  Pedro Alves  <palves@redhat.com>
6689
6690         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6691         parameter with a block parameter.  Compare location's block symbol
6692         with the frame's block instead of addresses.
6693         (skip_inline_frames): Pass the current block instead of the
6694         frame's address.  Break out as soon as we determine the frame
6695         should not be skipped.
6696
6697 2018-06-18  Tom Tromey  <tom@tromey.com>
6698
6699         * solib-aix.c (solib_aix_get_section_offsets): Return
6700         unique_xmalloc_ptr.
6701         (solib_aix_solib_create_inferior_hook): Update.
6702
6703 2018-06-18  Tom Tromey  <tom@tromey.com>
6704
6705         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6706
6707 2018-06-18  Tom Tromey  <tom@tromey.com>
6708
6709         * solib-frv.c (frv_relocate_main_executable): Use
6710         unique_xmalloc_ptr.
6711         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6712         unique_xmalloc_ptr.
6713
6714 2018-06-18  Tom Tromey  <tom@tromey.com>
6715
6716         * objfiles.h (inhibit_section_map_updates): Update.
6717         (resume_section_map_updates, resume_section_map_updates_cleanup):
6718         Remove.
6719         * solib-svr4.c (svr4_handle_solib_event): Update.
6720         * objfiles.c (inhibit_section_map_updates): Return
6721         scoped_restore_tmpl<int>.
6722         (resume_section_map_updates, resume_section_map_updates_cleanup):
6723         Remove.
6724
6725 2018-06-18  Tom Tromey  <tom@tromey.com>
6726
6727         * valprint.h (read_string): Update.
6728         * valprint.c (read_string): Change type of "buffer".
6729         (val_print_string): Update.
6730         * python/py-value.c (valpy_string): Update.
6731         * language.h (struct language_defn) <la_get_string>: Change
6732         type of "buffer".
6733         (default_get_string, c_get_string): Update.
6734         * language.c (default_get_string): Change type of "buffer".
6735         * guile/scm-value.c (gdbscm_value_to_string): Update.
6736         * c-lang.c (c_get_string): Change type of "buffer".
6737
6738 2018-06-18  Tom Tromey  <tom@tromey.com>
6739
6740         * ser-mingw.c (struct pipe_state_destroyer): New.
6741         (pipe_state_up): New typedef.
6742         (cleanup_pipe_state): Remove.
6743         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6744
6745 2018-06-18  Tom Tromey  <tom@tromey.com>
6746
6747         * rust-lang.h (rust_yyerror): Don't declare.
6748         * rust-lang.c (rust_language_defn): Update.
6749         * rust-exp.y (yyerror): Now static.
6750         * parse.c (parse_exp_in_context_1): Update.
6751         * p-lang.h (p_yyerror): Don't declare.
6752         * p-lang.c (p_language_defn): Update.
6753         * p-exp.y (yyerror): Now static.
6754         * opencl-lang.c (opencl_language_defn): Update.
6755         * objc-lang.c (objc_language_defn): Update.
6756         * m2-lang.h (m2_yyerror): Don't declare.
6757         * m2-lang.c (m2_language_defn): Update.
6758         * m2-exp.y (yyerror): Now static.
6759         * language.h (struct language_defn) <la_error>: Remove.
6760         * language.c (unk_lang_error): Remove.
6761         (unknown_language_defn, auto_language_defn): Remove.
6762         * go-lang.h (go_yyerror): Don't declare.
6763         * go-lang.c (go_language_defn): Update.
6764         * go-exp.y (yyerror): Now static.
6765         * f-lang.h (f_yyerror): Don't declare.
6766         * f-lang.c (f_language_defn): Update.
6767         * f-exp.y (yyerror): Now static.
6768         * d-lang.h (d_yyerror): Don't declare.
6769         * d-lang.c (d_language_defn): Update.
6770         * d-exp.y (yyerror): Now static.
6771         * c-lang.h (c_yyerror): Don't declare.
6772         * c-lang.c (c_language_defn, cplus_language_defn)
6773         (asm_language_defn, minimal_language_defn): Update.
6774         * c-exp.y (yyerror): Now static.
6775         * ada-lang.h (ada_yyerror): Don't declare.
6776         * ada-lang.c (ada_language_defn): Update.
6777         * ada-exp.y (yyerror): Now static.
6778
6779 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6780
6781         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6782         (store_sveregs_to_thread): Likewise.
6783         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6784         (aarch64_linux_store_inferior_registers): Likewise.
6785         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6786         function.
6787         (aarch64_sve_regs_copy_to_regcache): Likewise.
6788         (aarch64_sve_regs_copy_from_regcache): Likewise.
6789         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6790         declaration.
6791         (aarch64_sve_regs_copy_to_regcache): Likewise.
6792         (aarch64_sve_regs_copy_from_regcache): Likewise.
6793         (sve_context): Structure from Linux headers.
6794         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6795         (SVE_SIG_ZREG_SIZE): Likewise.
6796         (SVE_SIG_PREG_SIZE): Likewise.
6797         (SVE_SIG_FFR_SIZE): Likewise.
6798         (SVE_SIG_REGS_OFFSET): Likewise.
6799         (SVE_SIG_ZREGS_OFFSET): Likewise.
6800         (SVE_SIG_ZREG_OFFSET): Likewise.
6801         (SVE_SIG_ZREGS_SIZE): Likewise.
6802         (SVE_SIG_PREGS_OFFSET): Likewise.
6803         (SVE_SIG_PREG_OFFSET): Likewise.
6804         (SVE_SIG_PREGS_SIZE): Likewise.
6805         (SVE_SIG_FFR_OFFSET): Likewise.
6806         (SVE_SIG_REGS_SIZE): Likewise.
6807         (SVE_SIG_CONTEXT_SIZE): Likewise.
6808         (SVE_PT_REGS_MASK): Likewise.
6809         (SVE_PT_REGS_FPSIMD): Likewise.
6810         (SVE_PT_REGS_SVE): Likewise.
6811         (SVE_PT_VL_INHERIT): Likewise.
6812         (SVE_PT_VL_ONEXEC): Likewise.
6813         (SVE_PT_REGS_OFFSET): Likewise.
6814         (SVE_PT_FPSIMD_OFFSET): Likewise.
6815         (SVE_PT_FPSIMD_SIZE): Likewise.
6816         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6817         (SVE_PT_SVE_PREG_SIZE): Likewise.
6818         (SVE_PT_SVE_FFR_SIZE): Likewise.
6819         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6820         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6821         (__SVE_SIG_TO_PT): Likewise.
6822         (SVE_PT_SVE_OFFSET): Likewise.
6823         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6824         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6825         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6826         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6827         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6828         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6829         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6830         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6831         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6832         (SVE_PT_SVE_SIZE): Likewise.
6833         (SVE_PT_SIZE): Likewise.
6834         (HAS_SVE_STATE): New define.
6835
6836 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6837
6838         * nat/aarch64-sve-linux-sigcontext.h: New file.
6839         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6840         new files.
6841         (SVE_VQ_MIN): Likewise.
6842         (SVE_VQ_MAX): Likewise.
6843         (SVE_VL_MIN): Likewise.
6844         (SVE_VL_MAX): Likewise.
6845         (SVE_NUM_ZREGS): Likewise.
6846         (SVE_NUM_PREGS): Likewise.
6847         (sve_vl_valid): Likewise.
6848         (struct user_sve_header): Likewise.
6849
6850 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6851             Richard Bunt <Richard.Bunt@arm.com>
6852
6853         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6854         was requested by GDB.
6855
6856 2018-06-15  Tom de Vries  <tdevries@suse.de>
6857
6858         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6859
6860 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6861
6862         * gnulib/update-gnulib.sh: Print expected versions of
6863         autoconf/aclocal.
6864
6865 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6866
6867         * arch-utils.c (default_type_align): Use type_length_units.
6868         * gdbtypes.c (type_align): Use type_length_units.
6869
6870 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6871
6872         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6873         of 'define' command.
6874
6875 2018-06-14  Tom de Vries  <tdevries@suse.de>
6876
6877         PR cli/22573
6878         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6879         get_no_prettyformat_print_options.
6880
6881 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6882
6883         * sparc-nat.h: Include target.h.
6884         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6885         <fetch_registers>: Remove this argument in function call.
6886         <store_registers>: Remove this argument in function call, remove
6887         extra semicolon.
6888         <low_forget_process>: Call sparc64_forget_process instead of
6889         sparc_forget_process.
6890
6891 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6892
6893         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6894         (procfs_target::make_corefile_notes): Adjust to new
6895         target_read_alloc return type.
6896
6897 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6898             Stephen Roberts  <stephen.roberts@arm.com>
6899
6900         PR gdb/22882
6901         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6902         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6903         Move should_notify_stop local into more inner scope.
6904
6905 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6906             Stephen Roberts  <stephen.roberts@arm.com>
6907
6908         PR gdb/22882
6909         * infrun.c (resume_1): Add call to mark_async_event_handler.
6910
6911 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6912
6913         * infrun.c (do_target_wait): Change old version of $pc printed.
6914
6915 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6916
6917         * dwarf2read.c (read_index_from_section): Rename to...
6918         (read_gdb_index_from_section): ... this, update all callers.
6919         (dwarf2_read_index): Rename to...
6920         (dwarf2_read_gdb_index): ... this, update all callers.
6921
6922 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6923
6924         * gdb/hppa-linux-nat.c
6925         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6926         hppa_linux_nat_target::fetch_registers.
6927
6928 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6929
6930         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6931         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6932         (AARCH64_DWARF_SVE_FFR): Likewise.
6933         (AARCH64_DWARF_SVE_P0): Likewise.
6934         (AARCH64_DWARF_SVE_Z0): Likewise.
6935
6936 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6937
6938         * common/common-regcache.h (raw_compare): New function.
6939         * regcache.c (regcache::raw_compare): Likewise.
6940         * regcache.h (regcache::raw_compare): New declaration.
6941
6942 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6943
6944         * common/common-regcache.h (reg_buffer_common): New structure.
6945         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6946         (reg_buffer::raw_supply): Likewise.
6947         (reg_buffer::raw_supply_integer): Likewise.
6948         (reg_buffer::raw_supply_zeroed): Likewise.
6949         (reg_buffer::raw_collect): Likewise.
6950         (reg_buffer::raw_collect_integer): Likewise.
6951         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6952         (reg_buffer::raw_supply): Likewise.
6953         (reg_buffer::raw_supply_integer): Likewise.
6954         (reg_buffer::raw_supply_zeroed): Likewise.
6955         (reg_buffer::raw_collect): Likewise.
6956         (reg_buffer::raw_collect_integer): Likewise.
6957
6958 2018-06-10  Tom Tromey  <tom@tromey.com>
6959
6960         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6961         (class remote_state) <stop_reply_queue>: Now std::vector.
6962         (remote_state::~remote_state)
6963         (remote_target::stop_reply_queue_length): Update.
6964         (struct queue_iter_param, remove_child_of_pending_fork)
6965         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6966         (check_pending_event_prevents_wildcard_vcont_callback)
6967         (remove_stop_reply_for_inferior)
6968         (remove_stop_reply_of_remote_state)
6969         (remote_notif_remove_once_on_match)
6970         (stop_reply_match_ptid_and_ws)
6971         (remote_kill_child_of_pending_fork): Remove.
6972         (remote_target::remove_new_fork_children)
6973         (remote_target::check_pending_events_prevent_wildcard_vcont)
6974         (remote_target::discard_pending_stop_replies)
6975         (remote_target::discard_pending_stop_replies_in_queue)
6976         (remote_target::remote_notif_remove_queued_reply)
6977         (remote_target::queued_stop_reply)
6978         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6979         (remote_target::wait, remote_target::kill_new_fork_children)
6980         (remote_target::async): Update.
6981
6982 2018-06-10  Tom Tromey  <tom@tromey.com>
6983
6984         * record-full.c (record_full_arch_list_cleanups): Remove.
6985         (record_full_message): Use try/catch.
6986         (record_full_wait_cleanups): Remove.
6987         (record_full_wait_1): Use try/catch.
6988         (record_full_restore): Likewise.
6989
6990 2018-06-10  Tom Tromey  <tom@tromey.com>
6991
6992         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6993         declare VEC.  Add constructor.
6994         <in_target_beneath>: Now bool.
6995         (record_full_breakpoints): Now a std::vector, static.
6996         (record_full_sync_record_breakpoints)
6997         (record_full_init_record_breakpoints)
6998         (record_full_target::insert_breakpoint)
6999         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7000
7001 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7002
7003         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7004         * serial.c (serial_interface_lookup): Remove struct keyword.
7005
7006 2018-06-10  Tom Tromey  <tom@tromey.com>
7007
7008         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7009         method.
7010         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7011         a method.
7012         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7013         method.
7014         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7015         "beneath" as a method.
7016         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7017         Use "beneath" as a method.
7018
7019 2018-06-10  Tom Tromey  <tom@tromey.com>
7020
7021         * tracefile.c (struct trace_file_writer_deleter): New.
7022         <operator()>: Rename from trace_file_writer_xfree.
7023         (trace_file_writer_up): New typedef.
7024         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7025
7026 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7027
7028         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7029         <m_registers, m_register_status>: Change type to
7030         std::unique_ptr.
7031         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7032         XCNEWVEC.
7033
7034 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7035
7036         * common/common-regcache.h (enum register_status): Add
7037         underlying type "signed char".
7038         * regcache.h (reg_buffer) <m_register_status>: Change type to
7039         register_status *.
7040         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7041         register_status instead of signed char.
7042         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7043         (reg_buffer::get_register_status): Remove cast.
7044         (readable_regcache::raw_read): Remove cast.
7045         (readable_regcache::cooked_read): Remove cast.
7046
7047 2018-06-09  Tom Tromey  <tom@tromey.com>
7048
7049         * source.c (reverse_search_command, forward_search_command): Use
7050         scoped_fd.
7051
7052 2018-06-09  Tom Tromey  <tom@tromey.com>
7053
7054         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7055         (serial_ops_list): Now static, std::vector.
7056         (serial_interface_lookup, serial_add_interface): Update.
7057
7058 2018-06-09  Tom Tromey  <tom@tromey.com>
7059
7060         * dwarf2read.c (process_cu_includes): Update.
7061         (process_full_comp_unit): Update.
7062         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7063         std::vector.
7064
7065 2018-06-08  Paul Koning  <paul_koning@dell.com>
7066
7067         PR gdb/23252
7068
7069         * python/python.c (do_start_initialization):
7070         Avoid call to internal Python API.
7071         (init__gdb_module): New function.
7072
7073 2018-06-08  Gary Benson <gbenson@redhat.com>
7074
7075         * linux-thread-db.c (valprint.h): New include.
7076         (struct check_thread_db_info): New structure.
7077         (check_thread_db_on_load, tdb_testinfo): New static globals.
7078         (check_thread_db, check_thread_db_callback): New functions.
7079         (try_thread_db_load_1): Run integrity checks if requested.
7080         (maintenance_check_libthread_db): New function.
7081         (_initialize_thread_db): Register "maint check libthread-db"
7082         and "maint set/show check-libthread-db".
7083         * NEWS: Mention the above new commands.
7084
7085 2018-06-08  Tom Tromey  <tom@tromey.com>
7086
7087         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7088         now a method.
7089
7090 2018-06-08  Tom Tromey  <tom@tromey.com>
7091
7092         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7093
7094 2018-06-08  Tom Tromey  <tom@tromey.com>
7095
7096         * common/btrace-common.h (struct btrace_data): Add constructor,
7097         destructor, move assignment operator.
7098         <empty, clear, fini>: New methods.
7099         <format>: Initialize.
7100         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7101         (btrace_data_empty): Don't declare.
7102         * common/btrace-common.c (btrace_data_init): Remove.
7103         (btrace_data::fini): Rename from btrace_data_fini.
7104         (btrace_data::empty): Rename from btrace_data_empty.
7105         (btrace_data::clear): Rename from btrace_data_clear.  Return
7106         bool.
7107         * btrace.h (make_cleanup_btrace_data): Don't declare.
7108         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7109         (parse_xml_btrace): Update.
7110         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7111         (maint_btrace_clear_packet_history_cmd): Update.
7112
7113 2018-06-07  Pedro Alves  <palves@redhat.com>
7114
7115         * target.h (target_ops) <beneath>: Now a method.  All references
7116         updated.
7117         (class target_stack): New.
7118         * target.c (g_target_stack): New.
7119         (g_current_top_target): Delete.
7120         (current_top_target): Get the top target out of g_target_stack.
7121         (target_stack::push, target_stack::unpush): New.
7122         (push_target, unpush_target): Reimplement.
7123         (target_is_pushed): Reimplement in terms of g_target_stack.
7124         (target_ops::beneath, target_stack::find_beneath): New.
7125
7126 2018-06-07  Pedro Alves  <palves@redhat.com>
7127
7128         * target.h (find_target_beneath): Delete declaration.
7129         * target.c (find_target_beneath): Delete definition.
7130         * aix-thread.c: All callers of find_target_beneath adjusted to
7131         call target_ops::beneath instead.
7132         * bsd-uthread.c: Likewise.
7133         * linux-thread-db.c: Likewise.
7134         * ravenscar-thread.c: Likewise.
7135         * sol-thread.c: Likewise.
7136         * spu-multiarch.c: Likewise.
7137
7138 2018-06-07  Pedro Alves  <palves@redhat.com>
7139
7140         * target.h (target_ops) <beneath>: Now a method.  All references
7141         updated.
7142         (target_ops) <m_beneath>: New.
7143         * target.c (target_ops::beneath): New.
7144         * corelow.c: Adjust all references to target_ops::beneath.
7145         * linux-thread-db.c: Likewise.
7146         * make-target-delegates: Likewise.
7147         * record-btrace.c: Likewise.
7148         * record-full.c: Likewise.
7149         * remote.c: Likewise.
7150         * target.c: Likewise.
7151         * target-delegates.c: Regenerate.
7152
7153 2018-06-07  Pedro Alves  <palves@redhat.com>
7154
7155         * target.h (target_stack): Delete.
7156         (current_top_target): Declare function.
7157         * target.c (target_stack): Delete.
7158         (g_current_top_target): New.
7159         (current_top_target): New function.
7160         * auxv.c: Use current_top_target instead of target_stack
7161         throughout.
7162         * avr-tdep.c: Likewise.
7163         * breakpoint.c: Likewise.
7164         * corefile.c: Likewise.
7165         * elfread.c: Likewise.
7166         * eval.c: Likewise.
7167         * exceptions.c: Likewise.
7168         * frame.c: Likewise.
7169         * gdbarch-selftests.c: Likewise.
7170         * gnu-v3-abi.c: Likewise.
7171         * ia64-tdep.c: Likewise.
7172         * ia64-vms-tdep.c: Likewise.
7173         * infcall.c: Likewise.
7174         * infcmd.c: Likewise.
7175         * infrun.c: Likewise.
7176         * linespec.c: Likewise.
7177         * linux-tdep.c: Likewise.
7178         * minsyms.c: Likewise.
7179         * ppc-linux-nat.c: Likewise.
7180         * ppc-linux-tdep.c: Likewise.
7181         * procfs.c: Likewise.
7182         * regcache.c: Likewise.
7183         * remote.c: Likewise.
7184         * rs6000-tdep.c: Likewise.
7185         * s390-linux-nat.c: Likewise.
7186         * s390-tdep.c: Likewise.
7187         * solib-aix.c: Likewise.
7188         * solib-darwin.c: Likewise.
7189         * solib-dsbt.c: Likewise.
7190         * solib-spu.c: Likewise.
7191         * solib-svr4.c: Likewise.
7192         * solib-target.c: Likewise.
7193         * sparc-tdep.c: Likewise.
7194         * sparc64-tdep.c: Likewise.
7195         * spu-tdep.c: Likewise.
7196         * symfile.c: Likewise.
7197         * symtab.c: Likewise.
7198         * target-descriptions.c: Likewise.
7199         * target-memory.c: Likewise.
7200         * target.c: Likewise.
7201         * target.h: Likewise.
7202         * tracefile-tfile.c: Likewise.
7203         * tracepoint.c: Likewise.
7204         * valops.c: Likewise.
7205         * valprint.c: Likewise.
7206         * value.c: Likewise.
7207         * windows-tdep.c: Likewise.
7208         * mi/mi-main.c: Likewise.
7209
7210 2018-06-07  Tom Tromey  <tom@tromey.com>
7211
7212         * valprint.h (build_address_symbolic): Declare.
7213         * printcmd.c (print_address_symbolic): Update.
7214         (build_address_symbolic): Change "name" and "filename" to
7215         std::string.
7216         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7217         Update.
7218         * defs.h (build_address_symbolic): Remove declaration.
7219
7220 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7221
7222         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7223         (aarch64_vnv_type): Add function.
7224         (aarch64_pseudo_register_name): Add V regs for SVE.
7225         (aarch64_pseudo_register_type): Likewise.
7226         (aarch64_pseudo_register_reggroup_p): Likewise.
7227         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7228         (aarch64_pseudo_read_value): Add V regs for SVE.
7229         (aarch64_pseudo_write_2): Use V0 offset for SVE
7230         (aarch64_pseudo_write): Add V regs for SVE.
7231         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7232
7233 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7234
7235         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7236         (sve_vl_from_vq): Likewise.
7237
7238 2018-06-05  Tom Tromey  <tom@tromey.com>
7239
7240         * cli/cli-cmds.c (show_version): Update.
7241         * top.c (print_gdb_version): Add "interactive" parameter.
7242         Update.
7243         * main.c (captured_main_1): Update.
7244         * top.h (print_gdb_version): Add "interactive" parameter and a
7245         comment.
7246
7247 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7248
7249         * common/enum-flags.h: Add trailing semicolon to example in
7250         comment.
7251
7252 2018-06-05  Tom Tromey  <tom@tromey.com>
7253
7254         PR cli/12326:
7255         * NEWS: Add entry about pager.
7256         * utils.c (pagination_disabled_for_command): New global.
7257         (prompt_for_continue): Allow "c" response to prompt.
7258         (reinitialize_more_filter): Clear
7259         pagination_disabled_for_command.
7260         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7261
7262 2018-06-04  Tom Tromey  <tom@tromey.com>
7263
7264         * ada-lang.h (ada_lookup_symbol_list): Update.
7265         * ada-lang.c (resolve_subexp): Update.
7266         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7267         parameter.
7268         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7269         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7270         results parameter to std::vector.
7271         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7272         Update.
7273         * ada-exp.y (block_lookup): Update.
7274         (select_possible_type_sym): Change type of syms.  Remove nsyms
7275         parameter.
7276         (write_var_or_type, write_name_assoc): Update.
7277
7278 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7279
7280         * windows-nat.c (windows_nat_target::xfer_partial): Return
7281         TARGET_XFER_E_IO if we need to delegate to the target beneath
7282         but BENEATH is NULL.
7283
7284 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7285
7286         * Makefile.in (config.status): Add configure.nat as a
7287         dependency.
7288
7289 2018-06-04  Tom Tromey  <tom@tromey.com>
7290
7291         * cp-name-parser.y (cpname_state): Add method declarations.
7292         (HANDLE_QUAL): Update.
7293         (cpname_state::d_grab, cpname_state::fill_comp)
7294         (cpname_state::make_operator, cpname_state::make_dtor)
7295         (cpname_state::make_builtin_type, cpname_state::make_name)
7296         (cpname_state::d_qualify, cpname_state::d_int_type)
7297         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7298         (%union): Move earlier.
7299
7300 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7301
7302         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7303
7304 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7305
7306         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7307         (aarch64_pseudo_write_1): Likewise.
7308         (aarch64_pseudo_read_value): Use helper.
7309         (aarch64_pseudo_write): Likewise.
7310
7311 2018-06-04  Pedro Alves  <palves@redhat.com>
7312
7313         * darwin-nat.c (darwin_ops): Delete.
7314         (darwin_attach_pid): Use get_native_target.
7315
7316 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7317
7318         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7319         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7320
7321 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7322
7323         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7324         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7325         (aarch64_gdbarch_init): Check for SVE.
7326         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7327
7328 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7329
7330         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7331         * aarch64-tdep.h (aarch64_read_description): Likewise.
7332         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7333         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7334         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7335         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7336         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7337
7338 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7339
7340         * value.c (value_fetch_lazy_bitfield): New.
7341         (value_fetch_lazy_memory): New.
7342         (value_fetch_lazy_register): New.
7343         (value_fetch_lazy): Factor out to smaller functions.
7344
7345 2018-06-01  Tom Tromey  <tom@tromey.com>
7346
7347         * cp-name-parser.y (backslashable, represented): Now const.
7348
7349 2018-06-01  Tom Tromey  <tom@tromey.com>
7350
7351         * cp-name-parser.y: Include parser-defs.h.
7352         (parser_fprintf): Remove declaration.
7353
7354 2018-06-01  Tom Tromey  <tom@tromey.com>
7355
7356         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7357         %parse-param.
7358         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7359         (global_result): Remove globals.
7360         (struct cpname_state): New.
7361         (yyparse): Don't declare.
7362         (yylex, yyerror): Move declarations after %union.
7363         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7364         (make_name): Add state parameter.
7365         Update all callers.
7366         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7367         parameter.
7368         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7369         Update.
7370         (yylex): Add lvalp, state parameters.
7371         (yyerror): Add state parameter.
7372         (cp_demangled_name_to_comp): Update.
7373
7374 2018-06-01  Tom Tromey  <tom@tromey.com>
7375
7376         * cp-name-parser.y (parser_fprintf): Declare.
7377         (GDB_YY_REMAP_PREFIX): Define.
7378         Include yy-remap.h.  Don't redefine yy* identifiers.
7379
7380 2018-06-01  Tom Tromey  <tom@tromey.com>
7381
7382         * python/py-type.c (typy_legacy_template_argument): Update.
7383         * cp-support.h (cp_demangled_name_to_comp): Update.
7384         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7385         parameter to be a "std::string *".
7386         (main): Update.
7387
7388 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7389
7390         * ada-lex.l: Include "diagnostics.h" instead of
7391         "common/diagnostics.h".
7392         * unittests/environ-selftests.c: Likewise.
7393         * common/diagnostics.h: Moved to ../include.
7394
7395 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7396
7397         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7398         to language_mode_manual while calling breakpoint_re_set_one.
7399
7400 2018-06-01  Tom Tromey  <tom@tromey.com>
7401
7402         * valops.c (value_cast_structs, destructor_name_p): Update.
7403         * symtab.c (gdb_mangle_name): Update.
7404         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7405         Update.
7406         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7407         (pascal_object_print_value_fields, pascal_object_print_value):
7408         Update.
7409         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7410         * linespec.c (find_methods): Update.
7411         * gdbtypes.h (type_name_no_tag): Remove.
7412         (type_name_or_error): Rename from type_name_no_tag_or_error.
7413         * gdbtypes.c (type_name_no_tag): Remove.
7414         (type_name_or_error): Rename from type_name_no_tag_or_error.
7415         (lookup_struct_elt_type, check_typedef): Update.
7416         * expprint.c (print_subexp_standard): Update.
7417         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7418         * d-namespace.c (d_lookup_nested_symbol): Update.
7419         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7420         (cp_print_class_member): Update.
7421         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7422         * completer.c (add_struct_fields): Update.
7423         * c-typeprint.c (cp_type_print_derivation_info)
7424         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7425         Update.
7426         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7427         (ada_prefer_type, ada_is_exception_sym): Update.
7428
7429 2018-06-01  Tom Tromey  <tom@tromey.com>
7430
7431         * valops.c (enum_constant_from_type, value_namespace_elt)
7432         (value_maybe_namespace_elt): Update.
7433         * valarith.c (find_size_for_pointer_math): Update.
7434         * target-descriptions.c (make_gdb_type): Update.
7435         * symmisc.c (print_symbol): Update.
7436         * stabsread.c (define_symbol, read_type)
7437         (complain_about_struct_wipeout, add_undefined_type)
7438         (cleanup_undefined_types_1): Update.
7439         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7440         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7441         (rust_internal_print_type, rust_composite_type)
7442         (rust_evaluate_funcall, rust_evaluate_subexp)
7443         (rust_inclusive_range_type_p): Update.
7444         * python/py-type.c (typy_get_tag): Update.
7445         * p-typeprint.c (pascal_type_print_base): Update.
7446         * mdebugread.c (parse_symbol, parse_type): Update.
7447         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7448         Update.
7449         * guile/scm-type.c (gdbscm_type_tag): Update.
7450         * go-lang.c (sixg_string_p): Update.
7451         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7452         Update.
7453         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7454         (TYPE_TAG_NAME): Remove.
7455         * gdbtypes.c (type_name_no_tag): Simplify.
7456         (check_typedef, check_types_equal, recursive_dump_type)
7457         (copy_type_recursive, arch_composite_type): Update.
7458         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7459         in summary mode when needed.
7460         * eval.c (evaluate_funcall): Update.
7461         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7462         (process_structure_scope, read_enumeration_type)
7463         (read_namespace_type, read_module_type, determine_prefix): Update.
7464         * cp-support.c (inspect_type): Update.
7465         * coffread.c (process_coff_symbol, decode_base_type): Update.
7466         * c-varobj.c (c_is_path_expr_parent): Update.
7467         * c-typeprint.c (c_type_print_base_struct_union): Update.
7468         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7469         summary when using C language.
7470         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7471         (gen_maybe_namespace_elt): Update.
7472         * ada-lang.c (ada_type_name): Simplify.
7473         (empty_record, ada_template_to_fixed_record_type_1)
7474         (template_to_static_fixed_type)
7475         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7476
7477 2018-06-01  Tom Tromey  <tom@tromey.com>
7478
7479         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7480         c_print_type.
7481         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7482         (c_print_type): Update.
7483         (c_print_type): New overload.
7484         (c_type_print_varspec_prefix, c_type_print_args)
7485         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7486         (c_type_print_base_struct_union, c_type_print_base_1)
7487         (cp_type_print_method_args): Add "language" parameter.
7488         (c_type_print_base): Update.
7489         * c-lang.h (c_print_type): Add new overload.
7490
7491 2018-06-01  Tom Tromey  <tom@tromey.com>
7492
7493         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7494         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7495
7496 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7497
7498         * aarch64-tdep.c (aarch64_sve_register_names): New const
7499         var.
7500         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7501         (AARCH64_SVE_Z_REGS_NUM): New define.
7502         (AARCH64_SVE_P_REGS_NUM): Likewise.
7503         (AARCH64_SVE_NUM_REGS): Likewise.
7504
7505 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7506
7507         * nat/linux-ptrace.h [__alpha__]
7508         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7509         definitions.
7510
7511 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7512
7513         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7514         the endianness selected.
7515         * NEWS: Document `set endian auto' mode operation update.
7516
7517 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7518
7519         * Makefile.in: Add new header.
7520         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7521         (sve_vl_from_vg): Likewise.
7522         (sve_vq_from_vl): Likewise.
7523         (sve_vl_from_vq): Likewise.
7524         (sve_vq_from_vg): Likewise.
7525         (sve_vg_from_vq): Likewise.
7526         * configure.nat: Add new c file.
7527         * nat/aarch64-sve-linux-ptrace.c: New file.
7528         * nat/aarch64-sve-linux-ptrace.h: New file.
7529
7530 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7531
7532         * aarch64-linux-nat.c (aarch64_linux_read_description):
7533         Add parmeter zero.
7534         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7535         Likewise.
7536         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7537         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7538         (aarch64_gdbarch_init): Add parmeter zero.
7539         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7540         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7541         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7542         parmeter.
7543         * doc/gdb.texinfo: Describe SVE feature
7544         * features/aarch64-sve.c: New file.
7545
7546 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7547
7548         PR gdb/23210
7549         * gdbarch.sh (significant_addr_bit): Default to zero when
7550         not set by target architecture.
7551         * gdbarch.c: Re-generated.
7552         * utils.c (address_significant): Update.
7553
7554 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7555
7556         * stack.c (func_command): Remove trailing newline in call to error.
7557
7558 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7559
7560         * regcache.h (regcache_raw_collect): Remove, update callers to
7561         use regcache::raw_collect.
7562         * regcache.c (regcache_raw_collect): Remove.
7563
7564 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7565
7566         * regcache.h (regcache_raw_supply): Remove, update callers to
7567         use detached_regcache::raw_supply.
7568         * regcache.c (regcache_raw_supply): Remove.
7569
7570 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7571
7572         * regcache.h (regcache_cooked_write_part): Remove, update
7573         callers to use regcache::cooked_write_part.
7574         * regcache.c (regcache_cooked_write_part): Remove.
7575
7576 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7577
7578         * regcache.h (regcache_cooked_read_part): Remove, update callers
7579         to use readable_regcache::cooked_read_part.
7580         * regcache.c (regcache_cooked_read_part): Remove.
7581
7582 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7583
7584         * regcache.h (regcache_cooked_read_value): Remove, update
7585         callers to use readable_regcache::cooked_read_value.
7586         * regcache.c (regcache_cooked_read_value): Remove.
7587
7588 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7589
7590         * regcache.h (regcache_cooked_write): Remove, update callers to
7591         use regcache::cooked_write.
7592         * regcache.c (regcache_cooked_write): Remove.
7593
7594 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7595
7596         * regcache.h (regcache_invalidate): Remove, update callers to
7597         use detached_regcache::invalidate instead.
7598         * regcache.c (regcache_invalidate): Remove.
7599
7600 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7601
7602         * regcache.h (regcache_raw_write_part): Remove, update callers
7603         to use regcache::raw_write_part instead.
7604         * regcache.c (regcache_raw_write_part): Remove.
7605
7606 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7607
7608         * regcache.h (regcache_raw_read_part): Remove, update callers to
7609         use readable_regcache::raw_read_part instead.
7610         * regcache.c (regcache_raw_read_part): Remove.
7611
7612 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7613
7614         * regcache.h (regcache_cooked_read): Remove, update callers to
7615         use readable_regcache::cooked_read instead.
7616         * regcache.c (regcache_cooked_read): Remove.
7617
7618 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7619
7620         * regcache.h (regcache_raw_write): Remove, update callers to use
7621         regcache::raw_write instead.
7622         * regcache.c (regcache_raw_write): Remove.
7623
7624 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7625
7626         * regcache.h (regcache_raw_read): Remove, update callers to use
7627         readable_regcache::raw_read instead.
7628         * regcache.c (regcache_raw_read): Remove.
7629
7630 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7631
7632         * regcache.h (regcache_raw_update): Remove, update callers to
7633         use readable_regcache::raw_update instead.
7634         * regcache.c (regcache_raw_update): Remove.
7635
7636 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7637
7638         * regcache.h (regcache_register_status): Remove, update callers
7639         to use reg_buffer::get_register_status directly instead.
7640         * regcache.c (regcache_register_status): Remove.
7641
7642 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7643
7644         * regcache.h (regcache_get_ptid): Remove, update all callers to
7645         call regcache::ptid instead.
7646         * regcache.c (regcache_get_ptid): Remove.
7647
7648 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7649
7650         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7651
7652 2018-05-30  Pedro Alves  <palves@redhat.com>
7653
7654         * common/common-exceptions.h (exception_rethrow): Use
7655         ATTRIBUTE_NORETURN.
7656
7657 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7658
7659         * breakpoint.c (print_solib_event, check_status_catch_solib):
7660         Remove struct keyword in range-based for loops.
7661         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7662         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7663         Likewise.
7664         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7665         Likewise.
7666         * symfile.c (addr_info_make_relative): Likewise.
7667         * thread.c (value_in_thread_stack_temporaries): Likewise.
7668
7669 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7670
7671         PR gdb/16841
7672         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7673         aggregate type to get its real type before accessing it.
7674
7675 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7676
7677         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7678         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7679         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7680         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7681         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7682         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7683         * printcmd.c (info_address_command): Likewise.
7684
7685 2018-05-29  Tom Tromey  <tom@tromey.com>
7686
7687         * windows-nat.c (handle_exception): Update fall-through comment.
7688
7689 2018-05-29  Tom Tromey  <tom@tromey.com>
7690
7691         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7692         (struct program_space) <added_solibs>: Now a std::vector.
7693         * breakpoint.c (print_solib_event): Update.
7694         (check_status_catch_solib): Update.
7695         * progspace.c (clear_program_space_solib_cache): Update.
7696         * solib.c (update_solib_list): Update.
7697
7698 2018-05-29  Tom Tromey  <tom@tromey.com>
7699
7700         * python/py-type.c (typy_richcompare): Update.
7701         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7702         * gdbtypes.h (types_deeply_equal): Return bool.
7703         (types_equal): Likewise.
7704         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7705         declare VEC.
7706         (check_types_equal): Change worklist to std::vector.  Return
7707         bool.
7708         (struct type_equality_entry): Add constructor.
7709         (compare_maybe_null_strings): Return bool.
7710         (check_types_worklist): Return bool.  Change worklist to
7711         std::vector.
7712         (types_deeply_equal): Use std::vector.
7713         (types_equal): Return bool.
7714         (compare_maybe_null_strings): Simplify.
7715
7716 2018-05-29  Tom Tromey  <tom@tromey.com>
7717
7718         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7719
7720 2018-05-29  Tom Tromey  <tom@tromey.com>
7721
7722         * objc-lang.h: Don't include cp-support.h.
7723         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7724         declare VEC.
7725
7726 2018-05-27  Tom Tromey  <tom@tromey.com>
7727
7728         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7729
7730 2018-05-25  Tom Tromey  <tom@tromey.com>
7731
7732         * value.c (value::location): Initialize.
7733
7734 2018-05-25  Tom Tromey  <tom@tromey.com>
7735
7736         * dbxread.c (init_bincl_list): Remove.
7737         (bincl_list): Now a std::vector.
7738         (bincls_allocated, next_bincl): Remove.
7739         (free_bincl_list, do_free_bincl_list_cleanup)
7740         (make_cleanup_free_bincl_list): Remove.
7741         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7742         unique_xmalloc_ptr.
7743         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7744         (struct header_file_location): Add constructor.
7745         (add_bincl_to_list): Remove.
7746
7747 2018-05-25  Tom Tromey  <tom@tromey.com>
7748
7749         * tui/tui.c (tui_enable): Update.
7750         * mi/mi-interp.c (mi_interp::init): Update.
7751         * interps.h (class interp) <name>: New method.
7752         <m_name>: Rename from name.
7753         (~scoped_restore_interp): Update.
7754         * interps.c (interp::interp): Update.
7755         (interp_add, interp_set, interp_lookup_existing)
7756         (current_interp_named_p): Update.
7757
7758 2018-05-25  Tom Tromey  <tom@tromey.com>
7759
7760         * interps.c (interp_name): Remove.
7761         * mi/mi-interp.c (mi_interp::init): Update.
7762         * interps.h (interp_name): Remove.
7763         (~scoped_restore_interp): Update.
7764         * tui/tui.c (tui_enable): Update.
7765
7766 2018-05-25  Tom Tromey  <tom@tromey.com>
7767
7768         * utils.c (fputs_maybe_filtered): Update.
7769         * linespec.c (decode_line_full): Update.
7770         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7771         (mi_print_breakpoint_for_event, mi_solib_loaded)
7772         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7773         (mi_user_selected_context_changed): Update.
7774         * mi/mi-main.c (mi_execute_command): Update.
7775         * cli/cli-script.c (execute_control_command): Update.
7776         * python/python.c (execute_gdb_command): Update.
7777         * solib.c (info_sharedlibrary_command): Update.
7778         * interps.c (interp_ui_out): Remove.
7779         * interps.h (interp_ui_out): Remove.
7780
7781 2018-05-25  Tom Tromey  <tom@tromey.com>
7782
7783         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7784         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7785         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7786
7787 2018-05-25  Tom Tromey  <tom@tromey.com>
7788
7789         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7790         * interps.c (interp_exec): Use scoped_restore.
7791
7792 2018-05-25  Tom Tromey  <tom@tromey.com>
7793
7794         * remote.c (remote_target::remote_file_get): Use
7795         gdb::byte_vector.
7796         (remote_target::remote_file_put): Likewise.
7797
7798 2018-05-25  Tom Tromey  <tom@tromey.com>
7799
7800         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7801         a std::string.
7802         (get_pe_section_index, add_pe_exported_sym): Update.
7803         (read_pe_exported_syms): Use gdb::def_vector.
7804
7805 2018-05-25  Tom Tromey  <tom@tromey.com>
7806
7807         * frame.c (remove_prev_frame): Remove.
7808         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7809
7810 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7811
7812         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7813         Remove prototypes.
7814         * mips-linux-nat.c (supply_fpregset): Always call
7815         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7816         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7817         `mips_fill_fpregset'.
7818         * mips-linux-tdep.c (mips_supply_fpregset)
7819         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7820         (mips_fill_fpregset_wrapper): Remove functions.
7821         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7822         (mips_linux_fpregset): Remove variable.
7823         (mips_linux_iterate_over_regset_sections): Use
7824         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7825         (mips_linux_o32_sigframe_init): Remove comment.
7826
7827 2018-05-25  Pedro Alves  <palves@redhat.com>
7828
7829         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7830         (struct readahead_cache, struct packet_reg, struct
7831         remote_arch_state, class remote_state): Move higher up in the
7832         file.
7833         (remote_target::m_remote_state): Now an object instead of a pointer.
7834         (remote_target::get_remote_state): Adjust.
7835
7836 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7837
7838         * stack.c (select_and_print_frame): Delete.
7839         (struct function_bounds): Move struct within function.
7840         (func_command): Most content moved into new function
7841         find_frame_for_function, use new function, print result, add
7842         function comment.
7843         (find_frame_for_function): New function, now returns a result.
7844
7845 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7846
7847         * stack.c (iterate_over_block_arg_vars): Fix comment.
7848         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7849
7850 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7851
7852         PR gdb/23203
7853         * frame.c
7854         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7855         Define.
7856         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7857         Define.
7858         * frame.h (class scoped_restore_selected_frame): New class.
7859         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7860         of any exception, use scoped_restore_selected_frame to restore the
7861         frame instead.
7862
7863 2018-05-24  Pedro Alves  <palves@redhat.com>
7864
7865         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7866         override.
7867
7868 2018-05-23  Tom Tromey  <tom@tromey.com>
7869
7870         * complaints.c (struct complaints): Remove.
7871         (symfile_complaint_book): Remove.
7872         (series): New global.
7873         (complaint_internal): Update.
7874         (clear_complaints): Update.
7875
7876 2018-05-23  Tom Tromey  <tom@tromey.com>
7877
7878         * complaints.c (counters): New global.
7879         (struct complain): Remove.
7880         (struct complaints) <root>: Remove.
7881         (complaint_sentinel): Remove.
7882         (symfile_complaint_book): Update.
7883         (find_complaint) Remove.
7884         (complaint_internal, clear_complaints): Update.
7885
7886 2018-05-23  Tom Tromey  <tom@tromey.com>
7887
7888         * complaints.c (struct complain) <file, line>: Remove.
7889         (find_complaint): Remove file, line parameters.
7890         (complaint_internal): Update.
7891
7892 2018-05-23  Tom Tromey  <tom@tromey.com>
7893
7894         * complaints.c (vcomplaint): Remove.
7895         (complaint_internal) Merge in contents of vcomplaint.
7896
7897 2018-05-23  Tom Tromey  <tom@tromey.com>
7898
7899         * complaints.c (struct complaints) <explanation>: Remove.
7900         (symfile_explanations): Remove.
7901         (symfile_complaint_book): Update.
7902         (vcomplaint): Update.
7903         (struct explanation): Remove.
7904
7905 2018-05-23  Tom Tromey  <tom@tromey.com>
7906
7907         * complaints.c (symfile_complaints): Remove.
7908         (complaint_internal): Remove "complaints" parameter.
7909         (clear_complaints, vcomplaint): Remove "c" parameter.
7910         (get_complaints): Remove.
7911         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7912         (dwarf2_debug_line_missing_file_complaint)
7913         (dwarf2_debug_line_missing_end_sequence_complaint)
7914         (dwarf2_complex_location_expr_complaint)
7915         (dwarf2_const_value_length_mismatch_complaint)
7916         (dwarf2_section_buffer_overflow_complaint)
7917         (dwarf2_macro_malformed_definition_complaint)
7918         (dwarf2_invalid_attrib_class_complaint)
7919         (create_addrmap_from_index, dw2_symtab_iter_next)
7920         (dw2_expand_marked_cus)
7921         (dw2_debug_names_iterator::find_vec_in_debug_names)
7922         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7923         (create_debug_type_hash_table, init_cutu_and_read_dies)
7924         (partial_die_parent_scope, add_partial_enumeration)
7925         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7926         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7927         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7928         (create_cus_hash_table, create_dwp_hash_table)
7929         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7930         (dwarf2_rnglists_process, dwarf2_ranges_process)
7931         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7932         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7933         (handle_struct_member_die, process_structure_scope)
7934         (read_array_type, read_common_block, read_module_type)
7935         (read_tag_pointer_type, read_typedef, read_base_type)
7936         (read_subrange_type, load_partial_dies, partial_die_info::read)
7937         (partial_die_info::read, partial_die_info::read)
7938         (partial_die_info::read, read_checked_initial_length_and_offset)
7939         (dwarf2_string_attr, read_formatted_entries)
7940         (dwarf_decode_line_header)
7941         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7942         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7943         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7944         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7945         (get_signatured_type, get_DW_AT_signature_type)
7946         (decode_locdesc, file_file_name, consume_improper_spaces)
7947         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7948         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7949         (dwarf2_symbol_mark_computed, set_die_type)
7950         (read_attribute_value): Update.
7951         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7952         Update.
7953         * dbxread.c (unknown_symtype_complaint)
7954         (lbrac_mismatch_complaint, repeated_header_complaint)
7955         (set_namestring, function_outside_compilation_unit_complaint)
7956         (read_dbx_symtab, process_one_symbol): Update.
7957         * gdbtypes.c (stub_noname_complaint): Update.
7958         * windows-nat.c (handle_unload_dll): Update.
7959         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7960         (decode_base_type): Update.
7961         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7962         (eb_complaint, record_include_begin, record_include_end)
7963         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7964         (process_xcoff_symbol, read_symbol)
7965         (function_outside_compilation_unit_complaint)
7966         (scan_xcoff_symtab): Update.
7967         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7968         * buildsym.c (finish_block_internal, make_blockvector)
7969         (end_symtab_get_static_block, augment_type_symtab): Update.
7970         * dtrace-probe.c (dtrace_process_dof)
7971         (dtrace_static_probe_ops::get_probes): Update.
7972         * complaints.h (struct complaint): Don't declare.
7973         (symfile_complaints): Remove.
7974         (complaint_internal): Remove "complaints" parameter.
7975         (complaint): Likewise.
7976         (clear_complaints): Likewise.
7977         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7978         (reread_symbols): Update.
7979         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7980         (dwarf2_frame_cache, decode_frame_entry): Update.
7981         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7982         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7983         (info_selectors_command): Update.
7984         * macrotab.c (macro_include, check_for_redefinition)
7985         (macro_undef): Update.
7986         * objfiles.c (filter_overlapping_sections): Update.
7987         * stabsread.c (invalid_cpp_abbrev_complaint)
7988         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7989         (define_symbol, error_type, read_type, rs6000_builtin_type)
7990         (stabs_method_name_from_physname, read_member_functions)
7991         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7992         (attach_fields_to_type, complain_about_struct_wipeout)
7993         (read_range_type, read_args, common_block_start)
7994         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7995         Update.
7996         * mdebugread.c (index_complaint, unknown_ext_complaint)
7997         (basic_type_complaint, bad_tag_guess_complaint)
7998         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7999         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8000         (parse_procedure, parse_lines)
8001         (function_outside_compilation_unit_complaint)
8002         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8003         (bad_tag_guess_complaint, reg_value_complaint): Update.
8004         * cp-support.c (demangled_name_complaint): Update.
8005         * macroscope.c (sal_macro_scope): Update.
8006         * dwarf-index-write.c (class debug_names): Update.
8007
8008 2018-05-23  Tom Tromey  <tom@tromey.com>
8009
8010         * complaints.c (clear_complaints): Remove "noisy" parameter.
8011         * complaints.h (clear_complaints): Update.
8012         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8013         (reread_symbols): Update.
8014
8015 2018-05-23  Tom Tromey  <tom@tromey.com>
8016
8017         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8018         SUBSEQUENT_MESSAGE.
8019         (vcomplaint, clear_complaints): Update.
8020         (symfile_explanations): Remove some messages.
8021
8022 2018-05-23  Tom Tromey  <tom@tromey.com>
8023
8024         * complaints.c (internal_complaint): Remove.
8025         * complaints.h (internal_complaint): Remove.
8026
8027 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8028
8029         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8030
8031 2018-05-22  Pedro Alves  <palves@redhat.com>
8032
8033         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8034         (remote_fileio_badfd, remote_fileio_return_errno)
8035         (remote_fileio_return_success, remote_fileio_func_open)
8036         (remote_fileio_func_open, remote_fileio_func_close)
8037         (remote_fileio_func_read, remote_fileio_func_write)
8038         (remote_fileio_func_lseek, remote_fileio_func_rename)
8039         (remote_fileio_func_unlink, remote_fileio_func_stat)
8040         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8041         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8042         remote_target parameter.
8043         (remote_fio_func_map) <func>: Add remote_target parameter.
8044         (do_remote_fileio_request, remote_fileio_request):
8045         * remote-fileio.h (remote_fileio_request):
8046         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8047         remote_target parameter.
8048         (remote_notif_process, handle_notification): Adjust to pass down
8049         the remote.
8050         (remote_notif_state_allocate): Add remote_target parameter.  Save
8051         it.
8052         * remote-notif.h (struct remote_target): Forward declare.
8053         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8054         remote_target parameter.
8055         (struct remote_notif_state) <remote>: New field.
8056         (remote_notif_ack, remote_notif_parse): Add remote_target
8057         parameter.
8058         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8059         remote_target parameter.
8060         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8061         (threads_listing_context, rmt_thread_action, protocol_feature)
8062         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8063         (packet_result, struct threads_listing_context, remote_state):
8064         Move definitions and declarations higher up.
8065         (remote_target) <~remote_target>: Declare.
8066         (remote_download_command_source, remote_file_put, remote_file_get)
8067         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8068         (remote_hostio_pread_vFile, remote_hostio_send_command)
8069         (remote_hostio_set_filesystem, remote_hostio_open)
8070         (remote_hostio_close, remote_hostio_unlink, remote_state)
8071         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8072         (get_memory_write_packet_size, get_memory_read_packet_size)
8073         (append_pending_thread_resumptions, remote_detach_1)
8074         (append_resumption, remote_resume_with_vcont)
8075         (add_current_inferior_and_thread, wait_ns, wait_as)
8076         (process_stop_reply, remote_notice_new_inferior)
8077         (process_initial_stop_replies, remote_add_thread)
8078         (btrace_sync_conf, remote_btrace_maybe_reopen)
8079         (remove_new_fork_children, kill_new_fork_children)
8080         (discard_pending_stop_replies, stop_reply_queue_length)
8081         (check_pending_events_prevent_wildcard_vcont)
8082         (discard_pending_stop_replies_in_queue, stop_reply)
8083         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8084         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8085         (remote_interrupt_as, remote_interrupt_ns)
8086         (remote_get_noisy_reply, remote_query_attached)
8087         (remote_add_inferior, remote_current_thread, get_current_thread)
8088         (set_thread, set_general_thread, set_continue_thread)
8089         (set_general_process, write_ptid)
8090         (remote_unpack_thread_info_response, remote_get_threadinfo)
8091         (parse_threadlist_response, remote_get_threadlist)
8092         (remote_threadlist_iterator, remote_get_threads_with_ql)
8093         (remote_get_threads_with_qxfer)
8094         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8095         (get_offsets, remote_check_symbols, remote_supported_packet)
8096         (remote_query_supported, remote_packet_size)
8097         (remote_serial_quit_handler, remote_detach_pid)
8098         (remote_vcont_probe, remote_resume_with_hc)
8099         (send_interrupt_sequence, interrupt_query)
8100         (remote_notif_get_pending_events, fetch_register_using_p)
8101         (send_g_packet, process_g_packet, fetch_registers_using_g)
8102         (store_register_using_P, store_registers_using_G)
8103         (set_remote_traceframe, check_binary_download)
8104         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8105         (remote_xfer_live_readonly_partial, remote_read_bytes)
8106         (remote_send_printf, remote_flash_write, readchar)
8107         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8108         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8109         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8110         (extended_remote_disable_randomization, extended_remote_run)
8111         (send_environment_packet, extended_remote_environment_support)
8112         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8113         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8114         (packet_command): Now methods of ...
8115         (remote_target): ... this class.
8116         (m_remote_state) <remote_target>: New field.
8117         (struct remote_state) <stop_reply_queue,
8118         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8119         fields.
8120         (remote_state::remote_state): Allocate stop_reply_queue.
8121         (remote_state): Delete global.
8122         (get_remote_state_raw): Delete.
8123         (remote_target::get_remote_state): Allocate m_remote_state on
8124         demand.
8125         (get_current_remote_target): New.
8126         (remote_ops, extended_remote_ops): Delete.
8127         (wait_forever_enabled_p, remote_async_inferior_event_token):
8128         Delete, moved to struct remote_state.
8129         (remote_target::close): Delete self.  Destruction bits split to
8130         ...
8131         (remote_target::~remote_target): ... this.
8132         (show_memory_packet_size): Adjust to use
8133         get_current_remote_target.
8134         (struct protocol_feature) <func>: Add remote_target parameter.
8135         All callers adjusted.
8136         (curr_quit_handler_target): New.
8137         (remote_serial_quit_handler): Reimplement.
8138         (remote_target::open_1): Adjust to use get_current_remote_target.
8139         Heap-allocate remote_target/extended_remote_target instances.
8140         (vcont_builder::vcont_builder): Add remote_target parameter, and
8141         save it in m_remote.  All callers adjusted.
8142         (vcont_builder::m_remote): New field.
8143         (vcont_builder::restart, vcont_builder::flush)
8144         (vcont_builder::push_action): Use it.
8145         (remote_target::commit_resume): Use it.
8146         (struct queue_iter_param) <remote>: New field.
8147         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8148         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8149         (check_pending_event_prevents_wildcard_vcont_callback)
8150         (remote_target::check_pending_events_prevent_wildcard_vcont)
8151         (remote_target::discard_pending_stop_replies)
8152         (remote_target::discard_pending_stop_replies_in_queue)
8153         (remote_target::remote_notif_remove_queued_reply): Fill in
8154         'remote' field.
8155         (remote_notif_get_pending_events): New.
8156         (remote_target::readchar, remote_target::remote_serial_write):
8157         Save/restore curr_quit_handler_target.
8158         (putpkt): New.
8159         (kill_new_fork_children): Fill in 'remote' field.
8160         (packet_command): Use get_current_remote_target, defer to
8161         remote_target method of same name.
8162         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8163         parameter, and save it in m_remote.  All callers adjusted.
8164         (scoped_remote_fd::release): Use m_remote.
8165         (scoped_remote_fd::m_remote): New field.
8166         (remote_file_put, remote_file_get, remote_file_delete): Use
8167         get_current_remote_target, defer to remote_target method of same
8168         name.
8169         (remote_btrace_reset): Add remote_state paremeter.  Update all
8170         callers.
8171         (remote_async_inferior_event_handler). Pass down 'data'.
8172         (remote_new_objfile): Use get_current_remote_target.
8173         (remote_target::vcont_r_supported): New.
8174         (set_range_stepping): Use get_current_remote_target and
8175         remote_target::vcont_r_supported.
8176         (_initialize_remote): Don't allocate 'remote_state' and
8177         'stop_reply_queue' globals.
8178         * remote.h (struct remote_target): Forward declare.
8179         (getpkt, putpkt, remote_notif_get_pending_events): Add
8180         'remote_target' parameter.
8181
8182 2018-05-22  Pedro Alves  <palves@redhat.com>
8183
8184         * remote.c (vcont_builder): Now a class.  Make all data members
8185         private.
8186         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8187         Declare methods.
8188         (vcont_builder_restart): Rename to ...
8189         (vcont_builder::restart): ... this.
8190         (vcont_builder_flush): Rename to ...
8191         (vcont_builder::flush): ... this.
8192         (vcont_builder_push_action): Rename to ...
8193         (vcont_builder::push_action): ... this.
8194         (remote_target::commit_resume): Adjust.
8195
8196 2018-05-22  Pedro Alves  <palves@redhat.com>
8197
8198         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8199         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8200         (get_fixed_memory_packet_size): New.
8201         (get_memory_packet_size): Use it.
8202         (set_memory_packet_size): Don't override the config size with
8203         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8204         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8205         Don't refer to get_memory_packet_size if not connected to a remote
8206         target.  Show "(default)" if configured size is 0.
8207
8208 2018-05-22  Pedro Alves  <palves@redhat.com>
8209
8210         * remote.c (remote_target::mourn_inferior): Move
8211         discard_pending_stop_replies call here from ...
8212         (_initialize_remote): ... here.
8213
8214 2018-05-22  Pedro Alves  <palves@redhat.com>
8215
8216         * remote.c (compare_section_command): Remove set_general_process
8217         call.
8218
8219 2018-05-22  Pedro Alves  <palves@redhat.com>
8220
8221         * remote.c (struct packet_reg, struct remote_arch_state):
8222         Move higher up in the file.
8223         (remote_state) <m_arch_states>: Store remote_arch_state values
8224         instead of remote_arch_state pointers.
8225         (remote_state::get_remote_arch_state): Adjust.
8226
8227 2018-05-22  Pedro Alves  <palves@redhat.com>
8228
8229         * remote.c: Include <unordered_map>.
8230         (remote_state): Now a class.
8231         (remote_state) <get_remote_arch_state>: Declare method.
8232         <get_remote_arch_state>: New field.
8233         (remote_arch_state) <remote_arch_state>: Declare ctor.
8234         <regs>: Now a unique_ptr.
8235         (remote_gdbarch_data_handle): Delete.
8236         (get_remote_arch_state): Delete.
8237         (remote_state::get_remote_arch_state): New.
8238         (get_remote_state): Adjust to call remote_state's
8239         get_remote_arch_state method.
8240         (init_remote_state): Delete, bits factored out to ...
8241         (remote_arch_state::remote_arch_state): ... this new method.
8242         (get_remote_packet_size, get_memory_packet_size)
8243         (process_g_packet, remote_target::fetch_registers)
8244         (remote_target::prepare_to_store, store_registers_using_G)
8245         (remote_target::store_registers, remote_target::get_trace_status):
8246         Adjust to call remote_state's method.
8247         (_initialize_remote): Remove reference to
8248         remote_gdbarch_data_handle.
8249
8250 2018-05-22  Pedro Alves  <palves@redhat.com>
8251
8252         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8253         pread>: New method declarations.
8254         (remote_target::open_1): Adjust.
8255         (readahead_cache_invalidate): Rename to ...
8256         (readahead_cache::invalidate): ... this, and adjust to be a class
8257         method.
8258         (readahead_cache_invalidate_fd): Rename to ...
8259         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8260         class method.
8261         (remote_hostio_pwrite): Adjust.
8262         (remote_hostio_pread_from_cache): Rename to ...
8263         (readahead_cache::pread): ... this, and adjust to be a class
8264         method.
8265         (remote_hostio_close): Adjust.
8266
8267 2018-05-22  Pedro Alves  <palves@redhat.com>
8268
8269         * remote.c (remote_hostio_close_cleanup): Delete.
8270         (class scoped_remote_fd): New.
8271         (remote_file_put, remote_file_get): Use it.
8272
8273 2018-05-22  Pedro Alves  <palves@redhat.com>
8274
8275         (struct vCont_action_support): Use bool and initialize all fields.
8276         (struct readahead_cache): Initialize all fields.
8277         (remote_state): Use bool and initialize all fields.
8278         (remote_state::remote_state, remote_state::~remote_state): New.
8279         (new_remote_state): Delete.
8280         (_initialize_remote): Use new to allocate remote_state.
8281
8282 2018-05-22  Pedro Alves  <palves@redhat.com>
8283             張俊芝  <zjz@zjz.name>
8284
8285         PR gdb/22973
8286         * c-exp.y: Include "c-support.h".
8287         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8288         of tolower.  Use c_ident_is_alpha to scan names.
8289         * c-lang.c: Include "c-support.h".
8290         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8291         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8292         * c-support.h: New file, with bits factored out from ...
8293         * cp-name-parser.y: ... this file.
8294         Include "c-support.h".
8295         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8296         c-support.h and renamed.
8297         (symbol_end, yylex): Adjust.
8298
8299 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8300
8301         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8302         parameter type to CORE_ADDR.
8303         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8304         parameter type in declaration to CORE_ADDR.
8305         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8306         target_auxv_search to get AT_HWCAP and use the result to get the
8307         target description.
8308         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8309         to CORE_ADDR. Remove the cast of the return value to unsigned
8310         long. Fix error predicate of target_auxv_search.
8311         (ppc_linux_nat_target::read_description): Change the type of the
8312         hwcap variable to CORE_ADDR.
8313
8314 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8315
8316         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8317         if the size of fpscr is larger than 32 bits.
8318
8319 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8320
8321         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8322         (ppc32_linux_vsxregmap): New global.
8323         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8324         regcache_supply_regset, and regcache_collect_regset.
8325         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8326         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8327         (fetch_vsx_register, store_vsx_register): Remove.
8328         (fetch_vsx_registers): Add regno parameter. Get regset using
8329         ppc_linux_vsxregset. Use regset to supply registers.
8330         (store_vsx_registers): Add regno parameter. Get regset using
8331         ppc_linux_vsxregset. Use regset to collect registers.
8332         (fetch_register): Call fetch_vsx_registers instead of
8333         fetch_vsx_register.
8334         (store_register): Call store_vsx_registers instead of
8335         store_vsx_register.
8336         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8337         new regno parameter.
8338         (store_ppc_registers): Call store_vsx_registers with -1 for the
8339         new regno parameter.
8340         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8341         (ppc_collect_vsxregset): Remove.
8342
8343 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8344
8345         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8346         offset fields.
8347         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8348         for vector register offset fields.
8349         (ppc64_fbsd_reg_offsets): Likewise.
8350         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8351         to vector register offset fields.
8352         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8353         to vector register offset fields.
8354         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8355         vector register offset fields.
8356         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8357         initializers for vector register offset fields.
8358         (rs6000_aix64_reg_offsets): Likewise.
8359         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8360         (ppc_supply_vrregset): Remove.
8361         (ppc_collect_vrregset): Remove.
8362         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8363         (ppc_linux_vrregset) : New function.
8364         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8365         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8366         (ppc32_linux_vrregset): Remove.
8367         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8368         and use result instead of ppc32_linux_vrregset.
8369         (ppc32_linux_reg_offsets): Remove initializers for vector register
8370         offset fields.
8371         (ppc64_linux_reg_offsets): Likewise.
8372         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8373         * ppc-linux-nat.c: Include regset.h.
8374         (gdb_vrregset_t): Adjust comment to account for little-endian
8375         mode.
8376         (supply_vrregset, fill_vrregset): Remove.
8377         (fetch_altivec_register, store_altivec_register): Remove.
8378         (fetch_altivec_registers): Add regno parameter. Get regset using
8379         ppc_linux_vrregset. Use regset to supply registers.
8380         (store_altivec_registers): Add regno parameter. Get regset using
8381         ppc_linux_vrregset. Use regset to collect registers.
8382         (fetch_register): Call fetch_altivec_registers instead of
8383         fetch_altivec_register.
8384         (store_register): Call store_altivec_registers instead of
8385         store_altivec_register.
8386         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8387         the new regno parameter.
8388         (store_ppc_registers): Call store_altivec_registers with -1 for
8389         the new regno parameter.
8390
8391 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8392
8393         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8394         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8395         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8396         (gdb_vrregset_t): Change array type size to
8397         PPC_LINUX_SIZEOF_VRREGSET.
8398         (gdb_vsxregset_t): Change array type size to
8399         PPC_LINUX_SIZEOF_VSXREGSET.
8400         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8401         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8402         PPC_LINUX_SIZEOF_VSXREGSET.
8403
8404 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8405
8406         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8407         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8408         nat/ppc-linux.c.
8409         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8410         ppc_linux_target_wordsize with tid.
8411         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8412         wordsize with tid.
8413         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8414         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8415         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8416         tid parameter. Remove static specifier.
8417         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8418         (ppc_linux_target_wordsize): New declaration.
8419
8420 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8421
8422         * arch/ppc-linux-common.c: New file.
8423         * arch/ppc-linux-common.h: New file.
8424         * arch/ppc-linux-tdesc.h: New file.
8425         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8426         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8427         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8428         arch/ppc-linux-tdesc.h.
8429         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8430         arch/ppc-linux-tdesc.h.
8431         (ppc_linux_nat_target::read_description): Remove target
8432         description matching code. Fill a ppc_linux_features struct and
8433         call ppc_linux_match_description with it. Move comment about ISA
8434         2.05 to ppc-linux-common.c.
8435         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8436         arch/ppc-linux-tdesc.h.
8437         (ppc_linux_core_read_description): Remove target description
8438         matching code. Fill a ppc_linux_features struct and call
8439         ppc_linux_match_description with it.
8440         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8441         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8442         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8443         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8444         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8445         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8446         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8447         (tdesc_powerpc_e500l): Remove.
8448
8449 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8450
8451         * ada-lang.c (catch_assert_command): Pass empty string instead
8452         of NULL for excep_string argument.
8453
8454 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8455
8456         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8457         the width of the requested register exceeds the width of the
8458         `ptrace' data type.
8459
8460 2018-05-21  Tom Tromey  <tom@tromey.com>
8461
8462         * printcmd.c (output_command): Remove.
8463         (output_command_const): Rename to output_command.
8464         * valprint.h (output_command): Rename from output_command_const.
8465         * tracepoint.c (trace_dump_actions): Call output_command.
8466
8467 2018-05-21  Tom Tromey  <tom@tromey.com>
8468
8469         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8470         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8471         * ada-lang.h (create_ada_exception_catchpoint): Update.
8472         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8473         std::string.
8474         (create_excep_cond_exprs, ~ada_catchpoint)
8475         (should_stop_exception, print_one_exception)
8476         (print_mention_exception, print_recreate_exception): Update.
8477         (ada_get_next_arg): Remove.
8478         (catch_ada_exception_command_split): Use std::string.  Change type
8479         of "excep_string", "cond_string".
8480         (catch_ada_exception_command): Update.
8481         (create_ada_exception_catchpoint): Change type of excep_string.
8482         (ada_exception_sal): Remove excep_string parameter.
8483         (~ada_catchpoint): Remove.
8484
8485 2018-05-21  Tom Tromey  <tom@tromey.com>
8486
8487         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8488         cleanup.
8489
8490 2018-05-21  Tom Tromey  <tom@tromey.com>
8491
8492         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8493         Return unique_xmalloc_ptr.
8494         (print_it_exception): Update.
8495
8496 2018-05-21  Tom Tromey  <tom@tromey.com>
8497
8498         * tracepoint.c (trace_dump_actions): Use std::string.
8499
8500 2018-05-21  Tom Tromey  <tom@tromey.com>
8501
8502         * symfile.c (reread_symbols): Use std::string for original_name.
8503
8504 2018-05-21  Tom Tromey  <tom@tromey.com>
8505
8506         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8507         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8508         constructor.
8509
8510 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8511
8512         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8513         instance to...
8514         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8515         * objfiles.c (get_objfile_bfd_data): Allocate
8516         objfile_per_bfd_storage with obstack_new when allocating on
8517         obstack.
8518
8519 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8520
8521         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8522         OBSTACK_ZALLOC.
8523         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8524         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8525         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8526         (add_pending): Likewise.
8527         (parse_symbol): Likewise.
8528         (parse_partial_symbols): Likewise.
8529         (psymtab_to_symtab_1): Likewise.
8530         (new_psymtab): Likewise.
8531         (elfmdebug_build_psymtabs): Likewise.
8532         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8533         * objfiles.c (get_objfile_bfd_data): Likewise.
8534         (objfile_register_static_link): Likewise.
8535         * psymtab.c (allocate_psymtab): Likewise.
8536         * stabsread.c (read_member_functions): Likewise.
8537         * xcoffread.c (xcoff_end_psymtab): Likewise.
8538
8539 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8540
8541         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8542         compiler supports std::is_trivially_constructible.
8543         * common/poison.h: Include obstack.h.
8544         (IsMallocable): Define to is_trivially_constructible if the
8545         compiler supports it, define to true_type otherwise.
8546         (xobnew): New.
8547         (XOBNEW): Redefine.
8548         (xobnewvec): New.
8549         (XOBNEWVEC): Redefine.
8550         * gdb_obstack.h (obstack_zalloc): New.
8551         (OBSTACK_ZALLOC): Redefine.
8552         (obstack_calloc): New.
8553         (OBSTACK_CALLOC): Redefine.
8554         (obstack_new): New.
8555         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8556         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8557         gdbarch.c.
8558         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8559         obstack_calloc/obstack_zalloc.
8560         (gdbarch_obstack_zalloc): Remove.
8561         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8562
8563 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8564
8565         * stack.c (backtrace_command_1): Remove useless variable int i.
8566
8567 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8568
8569         * stack.c (print_frame_info): Fix comment.
8570
8571 2018-05-18  Tom Tromey  <tom@tromey.com>
8572
8573         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8574         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8575         (~dwarf2_per_objfile): Update
8576         (dwarf2_get_dwz_file): Use new.
8577         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8578         unique_ptr.
8579
8580 2018-05-18  Tom Tromey  <tom@tromey.com>
8581
8582         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8583         unique_ptr.
8584         * dwarf2read.c (struct dwp_file): Add constructor and
8585         initializers.
8586         (open_and_init_dwp_file): Return a unique_ptr.
8587         (dwarf2_per_objfile, create_dwp_hash_table)
8588         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8589         (lookup_dwo_unit_in_dwp): Update.
8590         (open_and_init_dwp_file, get_dwp_file): Update.
8591
8592 2018-05-18  Tom Tromey  <tom@tromey.com>
8593
8594         * dwarf2read.c (dwarf2_per_objfile): Update.
8595         (struct mapped_index): Add initializers.
8596         (dwarf2_read_index): Use new.
8597         (dw2_symtab_iter_init): Update.
8598         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8599         unique_ptr.
8600
8601 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8602
8603         * dwarf2read.c (mapped_index) <total_size>: Remove.
8604
8605 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8606
8607         * unittests/format_pieces-selftests.c (test_format_specifier):
8608         Add ARI comments.
8609
8610 2018-05-18  Tom Tromey  <tom@tromey.com>
8611
8612         * c-typeprint.c (maybe_print_hole): New function.
8613         (c_print_type_struct_field_offset): Update.
8614         (c_type_print_base_struct_union): Call maybe_print_hole.
8615
8616 2018-05-17  Keith Seitz  <keiths@redhat.com>
8617
8618         * breakpoint.c (build_bpstat_chain): New function, moved from
8619         bpstat_stop_status.
8620         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8621         If no stop chain is passed, call build_bpstat_chain to build it.
8622         * breakpoint.h (build_bpstat_chain): Declare.
8623         (bpstat_stop_status): Move documentation here from breakpoint.c.
8624         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8625         build the stop chain and pass it to skip_inline_frames.
8626         Pass this stop chain to bpstat_stop_status.
8627         * inline-frame.c: Include breakpoint.h.
8628         (stopped_by_user_bp_inline_frame): New function.
8629         (skip_inline_frames): Add parameter `stop_chain'.
8630         Move documention to inline-frame.h.
8631         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8632         whether the frame should be elided.
8633         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8634         Add moved documentation and update for new parameter.
8635
8636 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8637
8638         PR cli/14975
8639         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8640         unittests/format_pieces-selftests.c.
8641         * common/format.h (format_piece) <operator==>: New.
8642         (format_pieces) <operator[]>: Remove.
8643         * common/format.c (format_pieces::format_pieces): Handle \e.
8644         * unittests/format_pieces-selftests.c: New.
8645
8646 2018-05-17  Tom Tromey  <tom@tromey.com>
8647
8648         PR symtab/23010:
8649         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8650         (dw2_instantiate_symtab): Add skip_partial parameter.
8651         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8652         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8653         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8654         (dw2_expand_symtabs_matching_one)
8655         (dw2_find_pc_sect_compunit_symtab)
8656         (dw2_debug_names_lookup_symbol)
8657         (dw2_debug_names_expand_symtabs_for_function): Update.
8658         (init_cutu_and_read_dies): Add skip_partial parameter.
8659         (process_psymtab_comp_unit, build_type_psymtabs_1)
8660         (process_skeletonless_type_unit, load_partial_comp_unit)
8661         (psymtab_to_symtab_1): Update.
8662         (load_full_comp_unit): Add skip_partial parameter.
8663         (process_imported_unit_die, dwarf2_read_addr_index)
8664         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8665         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8666         (read_signatured_type): Update.
8667
8668 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8669
8670         * value.c (release_value): Remove unused variable.
8671         (record_latest_value): Likewise.
8672         (access_value_history): Likewise.
8673         (preserve_values): Likewise.
8674
8675 2018-05-17  Tom Tromey  <tom@tromey.com>
8676
8677         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8678         Initialize.
8679
8680 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8681
8682         PR gdb/22286
8683         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8684         Also handle registers whose width is not a multiple of
8685         PTRACE_TYPE_RET.
8686         (linux_nat_trad_target::store_register): Likewise.
8687
8688 2018-05-16  Tom Tromey  <tom@tromey.com>
8689
8690         * gdbcore.h (core_bfd): Redefine.
8691         * corelow.c (core_target::close): Update.
8692         (core_target_open): Update.
8693         * progspace.h (struct program_space) <cbfd>: Now a
8694         gdb_bfd_ref_ptr.
8695
8696 2018-05-16  Tom Tromey  <tom@tromey.com>
8697
8698         PR cli/19551:
8699         * symfile-add-flags.h (enum symfile_add_flags)
8700         <SYMFILE_NOT_FILENAME>: New constant.
8701         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8702         objfile name from BFD.
8703         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8704         * minidebug.c (find_separate_debug_file_in_section): Put
8705         ".gnu_debugdata" into BFD's file name.
8706
8707 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8708
8709         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8710         Remove.
8711
8712 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8713
8714         PR binutils/21446
8715         * aarch64-tdep.c (aarch64_analyze_prologue,
8716         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8717         Indicate not interested in errors.
8718
8719 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8720
8721         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8722         Supply the MIPS_ZERO_REGNUM register.
8723
8724 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8725
8726         * mips-tdep.c (mask_address_var): Make variable static.
8727
8728 2018-05-14  Tom Tromey  <tom@tromey.com>
8729
8730         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8731
8732 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8733
8734         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8735         FXSAVE_ADDR for the mxcsr register.
8736
8737 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8738
8739         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8740
8741 2018-05-11  Pedro Alves  <palves@redhat.com>
8742
8743         * corelow.c (core_target) <core_target>: No longer inline.
8744         Initialize m_core_gdbarch, m_core_vec and build the section table
8745         here.
8746         <~core_target>: New.
8747         <core_gdbarch, get_core_register_section>: New methods.
8748         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8749         factored out from ...
8750         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8751         (core_ops): Delete.
8752         (sniff_core_bfd): Add gdbarch parameter.
8753         (core_close): Delete, merged into ...
8754         (core_target::close): ... here.  Delete self.
8755         (core_close_cleanup): Delete.
8756         (core_target_open): Allocate a core_target on the heap.  Use a
8757         unique_ptr instead of a cleanup.  Bits moved into the core_target
8758         ctor.  Adjust to use core_target methods instead of globals.
8759         (get_core_register_section): Rename to ...
8760         (core_target::get_core_register_section): ... this and adjust.
8761         (struct get_core_registers_cb_data): New.
8762         (get_core_registers_cb): Use it.  Use bool.
8763         (core_target::fetch_registers, core_target::files_info)
8764         (core_target::xfer_partial, core_target::read_description)
8765         (core_target::pid_to, core_target::thread_name): Adjust to
8766         reference class fields instead of globals.
8767         * target.h (struct target_ops_deleter, target_ops_up): New.
8768
8769 2018-05-11  Pedro Alves  <palves@redhat.com>
8770
8771         * corefile.c (core_file_command): Move to corelow.c.
8772         * corelow.c (the_core_target): Delete.
8773         (core_file_command): Moved from corefile.c.  Check exec_bfd
8774         instead of the_core_target.  Use target_detach instead of calling
8775         into the_core_target directly.
8776         (maybe_say_no_core_file_now): New.
8777         (core_target::detach): Use it.
8778         (_initialize_corelow): Remove references to the_core_target.
8779         * gdbcore.h (the_core_target): Delete.
8780
8781 2018-05-11  Tom Tromey  <tromey@redhat.com>
8782             Pedro Alves  <palves@redhat.com>
8783
8784         * corefile.c (core_bfd): Remove.
8785         * gdbcore.h (core_bfd): Now a macro.
8786         * progspace.h (struct program_space) <cbfd>: New field.
8787
8788 2018-05-11  Tom Tromey  <tom@tromey.com>
8789
8790         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8791         gdb::def_vector.
8792
8793 2018-05-10  Tom Tromey  <tom@tromey.com>
8794
8795         * configure: Rebuild.
8796         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8797
8798 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8799
8800         PR server/23158:
8801         * regformats/regdat.sh: Adjust script, following the addition
8802         of the new expedite_regs parameter to init_target_desc.
8803
8804 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8805     
8806         PR gdb/23127
8807         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8808         set_gdbarch_significant_addr_bit.
8809         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8810         set_gdbarch_significant_addr_bit.
8811         * utils.c (address_significant): Update to sign extend addr.
8812
8813 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8814
8815         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8816         (xtensa_linux_init_abi): Limit tdep->num_regs by
8817         tdep->num_nopriv_regs.
8818         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8819         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8820         not initialized.
8821
8822 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8823
8824         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8825
8826 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8827
8828         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8829         (I387_MXCSR_INIT_VAL): New constant.
8830         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8831         buffer if it was supplied by the inferior.
8832         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8833         (i387_xsave_get_clear_bv): New function.
8834         (i387_supply_xsave): Only read x87 control registers from the
8835         xsave buffer if the feature is enabled, and the state will have
8836         been written, otherwise, provide a suitable default.
8837         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8838         including x87 control registers.  Update control registers if they
8839         have changed from the default value, and mark features as enabled
8840         as required.
8841         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8842
8843 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8844
8845         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8846
8847 2018-05-07  Tom Tromey  <tom@tromey.com>
8848
8849         * configure: Rebuild.
8850         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8851
8852 2018-05-07  Tom Tromey  <tom@tromey.com>
8853
8854         PR tdep/20362:
8855         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8856         bit.  Use correct value for VDIV.
8857
8858 2018-05-04  Tom Tromey  <tom@tromey.com>
8859
8860         * configure: Rebuild.
8861         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8862
8863 2018-05-04  Tom Tromey  <tom@tromey.com>
8864
8865         * linux-record.c (record_linux_system_call) <case
8866         RECORD_SYS_RECVFROM>: Add "break".
8867
8868 2018-05-04  Tom Tromey  <tom@tromey.com>
8869
8870         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8871         Add missing "break".
8872         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8873         Add missing "break".
8874
8875 2018-05-04  Tom Tromey  <tom@tromey.com>
8876
8877         * rs6000-tdep.c (ppc_process_record_op4)
8878         (ppc_process_record_op63): Add fall-through comment.
8879
8880 2018-05-04  Tom Tromey  <tom@tromey.com>
8881
8882         * i386-tdep.c (i386_process_record): Add fall-through comment.
8883
8884 2018-05-04  Tom Tromey  <tom@tromey.com>
8885
8886         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8887         comment.
8888
8889 2018-05-04  Tom Tromey  <tom@tromey.com>
8890
8891         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8892         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8893         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8894         comment.
8895         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8896         comment.
8897         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8898         comment.
8899
8900 2018-05-04  Tom Tromey  <tom@tromey.com>
8901
8902         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8903
8904 2018-05-04  Tom Tromey  <tom@tromey.com>
8905
8906         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8907         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8908         * symfile.c (section_is_mapped): Fix fall-through comment.
8909         * stabsread.c (define_symbol, read_member_functions): Fix
8910         fall-through comment.
8911         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8912         comment.
8913         * remote.c (remote_wait_as): Fix fall-through comment.
8914         * p-exp.y (yylex): Fix fall-through comment.
8915         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8916         comment.
8917         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8918         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8919         * jv-exp.y (yylex): Fix fall-through comment.
8920         * go-exp.y (lex_one_token): Fix fall-through comment.
8921         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8922         fall-through comment.
8923         * f-exp.y (yylex): Fix fall-through comment.
8924         * dwarf2read.c (process_die): Fix fall-through comments.
8925         * dbxread.c (process_one_symbol): Fix fall-through comment.
8926         * d-exp.y (lex_one_token): Fix fall-through comment.
8927         * cp-name-parser.y (yylex): Fix fall-through comment.
8928         * coffread.c (coff_symtab_read): Fix fall-through comment.
8929         * c-exp.y (lex_one_token): Fix fall-through comment.
8930         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8931         comment.
8932         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8933         comment.
8934
8935 2018-05-04  Tom Tromey  <tom@tromey.com>
8936
8937         PR python/22730:
8938         * NEWS: Mention gdb.execute change.
8939         * gdbcmd.h (execute_control_command): Don't declare.
8940         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8941         execute_control_commands, execute_control_commands_to_string.
8942         * cli/cli-script.h (execute_control_commands)
8943         (execute_control_commands_to_string): Declare.
8944         (execute_control_command): Add from_tty parameter.
8945         * cli/cli-script.c (execute_control_commands)
8946         (execute_control_commands_to_string): New functions.
8947         (execute_user_command): Use execute_control_commands.
8948         (execute_control_command_1): Add "from_tty" parameter.  Update.
8949         (execute_control_command): Likewise.
8950
8951 2018-05-04  Tom Tromey  <tom@tromey.com>
8952
8953         PR python/22731:
8954         * NEWS: Mention that breakpoint commands are writable.
8955         * python/py-breakpoint.c (bppy_set_commands): New function.
8956         (breakpoint_object_getset) <"commands">: Use it.
8957
8958 2018-05-04  Tom Tromey  <tom@tromey.com>
8959
8960         * tracepoint.c (actions_command): Update.
8961         * mi/mi-cmd-break.c (mi_command_line_array)
8962         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8963         (mi_read_next_line): Remove.
8964         (mi_cmd_break_commands): Update.
8965         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8966         function_view.
8967         * cli/cli-script.c (get_command_line): Update.
8968         (process_next_line): Use function_view.  Constify.
8969         (recurse_read_control_structure, read_command_lines)
8970         (read_command_lines_1): Change argument types to function_view.
8971         (do_define_command, document_command): Update.
8972         * breakpoint.h (check_tracepoint_command): Don't declare.
8973         * breakpoint.c (check_tracepoint_command): Remove.
8974         (commands_command_1, create_tracepoint_from_upload): Update.
8975
8976 2018-05-04  Tom Tromey  <tom@tromey.com>
8977
8978         PR gdb/11750:
8979         * cli/cli-script.h (enum command_control_type) <define_control>:
8980         New constant.
8981         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8982         (build_command_line, execute_control_command_1)
8983         (process_next_line): Likewise.
8984         (do_define_command): New function, extracted from define_command.
8985         (define_command): Use it.
8986
8987 2018-05-04  Tom Tromey  <tom@tromey.com>
8988
8989         * tracepoint.c (actions_command): Update.
8990         * cli/cli-script.h (read_command_lines): Update.
8991         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8992         (MAX_TMPBUF): Remove define.
8993         (define_command): Use string_printf.
8994         (document_command): Likewise.
8995         * breakpoint.c (commands_command_1): Update.
8996
8997 2018-05-04  Tom Tromey  <tom@tromey.com>
8998
8999         * top.c (execute_command): Update.
9000         * cli/cli-script.h (print_command_lines): Now varargs.
9001         * cli/cli-script.c (print_command_lines): Now varargs.
9002         (execute_control_command_1) <case while_control, case if_control>:
9003         Update.
9004
9005 2018-05-04  Tom Tromey  <tom@tromey.com>
9006
9007         * tracepoint.c (all_tracepoint_actions): Rename from
9008         all_tracepoint_actions_and_cleanup.  Change return type.
9009         (actions_command, encode_actions_1, encode_actions)
9010         (trace_dump_actions, tdump_command): Update.
9011         * remote.c (remote_download_command_source): Update.
9012         * python/python.c (gdbpy_eval_from_control_command)
9013         (python_command, python_interactive_command): Update.
9014         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9015         * guile/guile.c (guile_command)
9016         (gdbscm_eval_from_control_command, guile_command): Update.
9017         * compile/compile.c (compile_code_command)
9018         (compile_print_command, compile_to_object): Update.
9019         * cli/cli-script.h (struct command_lines_deleter): New.
9020         (counted_command_line): New typedef.
9021         (struct command_line): Add constructor, destructor.
9022         <body_list>: Remove.
9023         <body_list_0, body_list_1>: New members.
9024         (command_line_up): Remove typedef.
9025         (read_command_lines, read_command_lines_1, get_command_line):
9026         Update.
9027         (copy_command_lines): Don't declare.
9028         * cli/cli-script.c (build_command_line): Use "new".
9029         (get_command_line): Return counted_command_line.
9030         (print_command_lines, execute_user_command)
9031         (execute_control_command_1, while_command, if_command): Update.
9032         (realloc_body_list): Remove.
9033         (process_next_line, recurse_read_control_structure): Update.
9034         (read_command_lines, read_command_lines_1): Return counted_command_line.
9035         (free_command_lines): Use "delete".
9036         (copy_command_lines): Remove.
9037         (define_command, document_command, show_user_1): Update.
9038         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9039         a counted_command_line.
9040         * breakpoint.h (counted_command_line): Remove typedef.
9041         (breakpoint_set_commands): Update.
9042         * breakpoint.c (check_no_tracepoint_commands)
9043         (validate_commands_for_breakpoint): Update.
9044         (breakpoint_set_commands): Change commands to be a
9045         counted_command_line.
9046         (commands_command_1, update_dprintf_command_list)
9047         (create_tracepoint_from_upload): Update.
9048
9049 2018-05-04  Tom Tromey  <tom@tromey.com>
9050
9051         * cli/cli-decode.h (cmd_list_element): New constructor.
9052         (~cmd_list_element): New destructor.
9053         (struct cmd_list_element): Add initializers.
9054         * cli/cli-decode.c (do_add_cmd): Use "new".
9055         (delete_cmd): Use "delete".
9056
9057 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9058             Pedro Alves <palves@redhat.com>
9059
9060         PR breakpoints/19806 and support for PR external/20207.
9061         * NEWS: Mention Aarch64 watchpoint improvements.
9062         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9063         watchpoints and PR external/20207 watchpoints.
9064         * nat/aarch64-linux-hw-point.c
9065         (kernel_supports_any_contiguous_range): New.
9066         (aarch64_watchpoint_offset): New.
9067         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9068         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9069         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9070         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9071         next_addr_orig_p.  Support PR external/20207 watchpoints.
9072         (aarch64_downgrade_regs): New.
9073         (aarch64_dr_state_insert_one_point): New parameters offset and
9074         addr_orig.
9075         (aarch64_dr_state_remove_one_point): Likewise.
9076         (aarch64_handle_breakpoint): Update caller.
9077         (aarch64_handle_aligned_watchpoint): Likewise.
9078         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9079         aligned_offset.
9080         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9081         aarch64_downgrade_regs.
9082         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9083         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9084         (DR_CONTROL_MASK): ... this.
9085         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9086         (unsigned int aarch64_watchpoint_offset): New prototype.
9087         (aarch64_linux_set_debug_regs): Remove const from state.
9088         * utils.c (align_up, align_down): Move to ...
9089         * common/common-utils.c (align_up, align_down): ... here.
9090         * utils.h (align_up, align_down): Move to ...
9091         * common/common-utils.h (align_up, align_down): ... here.
9092
9093 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9094
9095         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9096         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9097         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9098         Re-implement to match the ABI as summarized in GCC's
9099         gcc/config/sparc/sparc.c.  All callers updated.
9100         (sparc32_store_arguments): Remove assertion.
9101
9102 2018-05-04  Tom Tromey  <tom@tromey.com>
9103
9104         * printcmd.c: Don't include tui.h.
9105         (decode_format): Use skip_spaces.
9106
9107 2018-05-04  Tom Tromey  <tom@tromey.com>
9108
9109         PR gdb/22619:
9110         * printcmd.c (last_count): New global.
9111         (x_command): Use saved count when repeating.
9112
9113 2018-05-04  Tom Tromey  <tom@tromey.com>
9114
9115         * nto-procfs.c (do_closedir_cleanup): Remove.
9116         (procfs_pidlist): Use gdb_dir_up.
9117         * procfs.c (do_closedir_cleanup): Remove.
9118         (proc_update_threads): Use gdb_dir_up.
9119         * common/filestuff.h (struct gdb_dir_deleter): New.
9120         (gdb_dir_up): New typedef.
9121
9122 2018-05-04  Tom Tromey  <tom@tromey.com>
9123
9124         * ada-lang.c (print_mention_exception): Use std::string.
9125
9126 2018-05-04  Tom Tromey  <tom@tromey.com>
9127
9128         * ada-lang.c (create_excep_cond_exprs): Update.
9129         (ada_exception_catchpoint_cond_string): Use std::string.
9130
9131 2018-05-04  Tom Tromey  <tom@tromey.com>
9132
9133         * ada-lang.c (xget_renaming_scope): Return std::string.
9134         (old_renaming_is_invisible): Update.
9135
9136 2018-05-04  Tom Tromey  <tom@tromey.com>
9137
9138         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9139         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9140
9141 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9142
9143         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9144
9145 2018-05-04  Tom Tromey  <tom@tromey.com>
9146
9147         * remote.c (remote_query_supported_append): Change type.
9148         (remote_check_symbols): Update.
9149
9150 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9151
9152         PR gdb/11420
9153         * configure.ac: Prepend libpython.
9154         * python/python-config.py: Likewise.
9155         * configure: Regenerate.
9156
9157 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9158
9159         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9160
9161 2018-05-03  Pedro Alves  <palves@redhat.com>
9162
9163         * s390-linux-nat.c
9164         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9165         override.  Write 'true' instead of '1'.
9166         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9167         declaration.
9168
9169 2018-05-02  Pedro Alves  <palves@redhat.com>
9170
9171         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9172         add_inf_child_target.
9173         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9174         add_inf_child_target.
9175         * aix-thread.c (aix_thread_target_info): New.
9176         (aix_thread_target) <shortname, longname, doc>: Delete.
9177         <info>: New.
9178         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9179         add_inf_child_target.
9180         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9181         add_inf_child_target.
9182         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9183         add_inf_child_target.
9184         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9185         add_inf_child_target.
9186         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9187         add_inf_child_target.
9188         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9189         add_inf_child_target.
9190         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9191         add_inf_child_target.
9192         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9193         add_inf_child_target.
9194         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9195         add_inf_child_target.
9196         * bfd-target.c (target_bfd_target_info): New.
9197         (target_bfd) <shortname, longname, doc>: Delete.
9198         <info>: New.
9199         * bsd-kvm.c (bsd_kvm_target_info): New.
9200         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9201         <info>: New.
9202         (bsd_kvm_target::open): Rename to ...
9203         (bsd_kvm_target_open): ... this.  Adjust.
9204         * bsd-uthread.c (bsd_uthread_target_info): New.
9205         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9206         <info>: New.
9207         * corefile.c (core_file_command): Adjust.
9208         * corelow.c (core_target_info): New.
9209         (core_target) <shortname, longname, doc>: Delete.
9210         <info>: New.
9211         (core_target::open): Rename to ...
9212         (core_target_open): ... this.  Adjust.
9213         * ctf.c (ctf_target_info): New.
9214         (ctf_target) <shortname, longname, doc>: Delete.
9215         <info>: New.
9216         (ctf_target::open): Rename to ...
9217         (ctf_target_open): ... this.
9218         (_initialize_ctf): Adjust.
9219         * exec.c (exec_target_info): New.
9220         (exec_target) <shortname, longname, doc>: Delete.
9221         <info>: New.
9222         (exec_target::open): Rename to ...
9223         (exec_target_open): ... this.
9224         * gdbcore.h (core_target_open): Declare.
9225         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9226         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9227         add_inf_child_target.
9228         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9229         add_inf_child_target.
9230         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9231         add_inf_child_target.
9232         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9233         add_inf_child_target.
9234         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9235         add_inf_child_target.
9236         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9237         add_inf_child_target.
9238         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9239         add_inf_child_target.
9240         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9241         add_inf_child_target.
9242         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9243         add_inf_child_target.
9244         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9245         add_inf_child_target.
9246         * inf-child.c (inf_child_target_info): New.
9247         (inf_child_target::info): New.
9248         (inf_child_open_target): Remove 'target' parameter.  Use
9249         get_native_target instead.
9250         (inf_child_target::open): Delete.
9251         (add_inf_child_target): New.
9252         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9253         Delete.
9254         <info>: New.
9255         (add_inf_child_target): Declare.
9256         (inf_child_open_target): Declare.
9257         * linux-thread-db.c (thread_db_target_info): New.
9258         (thread_db_target) <shortname, longname, doc>: Delete.
9259         <info>: New.
9260         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9261         add_inf_child_target.
9262         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9263         add_inf_child_target.
9264         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9265         add_inf_child_target.
9266         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9267         add_inf_child_target.
9268         * make-target-delegates (print_class): Adjust.
9269         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9270         add_inf_child_target.
9271         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9272         add_inf_child_target.
9273         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9274         add_inf_child_target.
9275         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9276         add_inf_child_target.
9277         * nto-procfs.c (nto_native_target_info): New.
9278         (nto_procfs_target_native) <shortname, longname, doc>:
9279         Delete.
9280         <info>: New.
9281         (nto_procfs_target_info): New.
9282         (nto_procfs_target_procfs) <shortname, longname, doc>:
9283         Delete.
9284         <info>: New.
9285         (init_procfs_targets): Adjust.
9286         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9287         add_inf_child_target.
9288         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9289         add_inf_child_target.
9290         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9291         add_inf_child_target.
9292         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9293         add_inf_child_target.
9294         * ravenscar-thread.c (ravenscar_target_info): New.
9295         (ravenscar_thread_target) <shortname, longname, doc>:
9296         Delete.
9297         <info>: New.
9298         * record-btrace.c (record_btrace_target_info):
9299         (record_btrace_target) <shortname, longname, doc>: Delete.
9300         <info>: New.
9301         (record_btrace_target::open): Rename to ...
9302         (record_btrace_target_open): ... this.  Adjust.
9303         * record-full.c (record_longname, record_doc): New.
9304         (record_full_base_target) <shortname, longname, doc>: Delete.
9305         <info>: New.
9306         (record_full_target_info): New.
9307         (record_full_target): <shortname>: Delete.
9308         <info>: New.
9309         (record_full_core_open_1, record_full_open_1): Update comments.
9310         (record_full_base_target::open): Rename to ...
9311         (record_full_open): ... this.
9312         (cmd_record_full_restore): Update.
9313         (_initialize_record_full): Update.
9314         * remote-sim.c (remote_sim_target_info): New.
9315         (gdbsim_target) <shortname, longname, doc>: Delete.
9316         <info>: New.
9317         (gdbsim_target::open): Rename to ...
9318         (gdbsim_target_open): ... this.
9319         (_initialize_remote_sim): Adjust.
9320         * remote.c (remote_doc): New.
9321         (remote_target_info): New.
9322         (remote_target) <shortname, longname, doc>: Delete.
9323         <info>: New.
9324         (extended_remote_target_info): New.
9325         (extended_remote_target) <shortname, longname, doc>: Delete.
9326         <info>: New.
9327         (remote_target::open_1): Make static.  Adjust.
9328         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9329         * s390-linux-nat.c (_initialize_s390_nat): Use
9330         add_inf_child_target.
9331         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9332         add_inf_child_target.
9333         * sol-thread.c (thread_db_target_info): New.
9334         (sol_thread_target) <shortname, longname, doc>: Delete.
9335         <info>: New.
9336         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9337         add_inf_child_target.
9338         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9339         add_inf_child_target.
9340         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9341         add_inf_child_target.
9342         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9343         add_inf_child_target.
9344         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9345         add_inf_child_target.
9346         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9347         add_inf_child_target.
9348         * spu-linux-nat.c (_initialize_spu_nat): Use
9349         add_inf_child_target.
9350         * spu-multiarch.c (spu_multiarch_target_info): New.
9351         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9352         <info>: New.
9353         * target-delegates.c: Regenerate.
9354         * target.c: Include <unordered_map>.
9355         (target_ops_p): Delete.
9356         (DEF_VEC_P(target_ops_p)): Delete.
9357         (target_factories): New.
9358         (test_target_info): New.
9359         (test_target_ops::info): New.
9360         (open_target): Adjust to use target_factories.
9361         (add_target_with_completer): Rename to ...
9362         (add_target): ... this.  Change prototype.  Register target_info
9363         and open callback in target_factories.  Register target_info in
9364         command context instead of target_ops.
9365         (add_target): Delete old implementation.
9366         (add_deprecated_target_alias): Change prototype.  Adjust.
9367         (the_native_target): New.
9368         (set_native_target, get_native_target): New.
9369         (find_default_run_target): Use the_native_target.
9370         (find_attach_target, find_run_target): Simplify.
9371         (target_ops::open): Delete.
9372         (dummy_target_info): New.
9373         (dummy_target::shortname, dummy_target::longname)
9374         (dummy_target::doc): Delete.
9375         (dummy_target::info): New.
9376         (debug_target::shortname, debug_target::longname)
9377         (debug_target::doc): Delete.
9378         (debug_target::info): New.
9379         * target.h (struct target_info): New.
9380         (target_ops::~target_ops): Add comment.
9381         (target_ops::info): New.
9382         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9383         longer virtual.  Implement in terms of target_info.
9384         (set_native_target, get_native_target): Declare.
9385         (target_open_ftype): New.
9386         (add_target, add_target_with_completer)
9387         (add_deprecated_target_alias): Change prototype.
9388         (test_target) <shortname, longname, doc>: Delete.
9389         <info>: New.
9390         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9391         add_inf_child_target.
9392         * tracefile-tfile.c (tfile_target_info): New.
9393         (tfile_target) <shortname, longname, doc>: Delete.
9394         <info>: New.
9395         (tfile_target::open): Rename to ...
9396         (tfile_target_open): ... this.
9397         (_initialize_tracefile_tfile): Adjust.
9398         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9399         add_inf_child_target.
9400         * windows-nat.c (_initialize_windows_nat): Use
9401         add_inf_child_target.
9402         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9403         add_inf_child_target.
9404
9405 2018-05-02  Pedro Alves  <palves@redhat.com>
9406
9407         * linux-nat.h (linux_nat_target) <low_new_thread,
9408         low_delete_thread, low_new_fork, low_forget_process,
9409         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9410         New virtual methods.
9411         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9412         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9413         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9414         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9415         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9416         Delete.
9417         * linux-fork.c (delete_fork): Adjust to call low method.
9418         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9419         (linux_nat_new_fork, linux_nat_forget_process_hook)
9420         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9421         (linux_nat_status_is_event):
9422         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9423         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9424         to call low method.
9425         (sigtrap_is_event): Rename to ...
9426         (linux_nat_target::low_status_is_event): ... this.
9427         (linux_nat_set_status_is_event): Delete.
9428         (save_stop_reason, linux_nat_wait_1)
9429         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9430         low methods.
9431         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9432         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9433         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9434         (linux_nat_set_prepare_to_resume): Delete.
9435         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9436         low virtual methods.
9437         * amd64-linux-nat.c: Likewise.
9438         * arm-linux-nat.c: Likewise.
9439         * i386-linux-nat.c: Likewise.
9440         * ia64-linux-nat.c: Likewise.
9441         * mips-linux-nat.c: Likewise.
9442         * ppc-linux-nat.c: Likewise.
9443         * s390-linux-nat.c: Likewise.
9444         * sparc64-linux-nat.c: Likewise.
9445         * x86-linux-nat.c: Likewise.
9446         * x86-linux-nat.h: Include "nat/x86-linux.h".
9447         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9448         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9449         Override methods.
9450
9451 2018-05-02  Pedro Alves  <palves@redhat.com>
9452
9453         * target.h (target_ops)
9454         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9455         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9456         stopped_by_watchpoint, have_continuable_watchpoint,
9457         stopped_data_address, watchpoint_addr_within_range,
9458         can_accel_watchpoint_condition, can_run, thread_alive,
9459         has_all_memory, has_memory, has_stack, has_registers,
9460         has_execution, can_async_p, is_async_p, supports_non_stop,
9461         always_non_stop_p, can_execute_reverse, supports_multi_process,
9462         supports_enable_disable_tracepoint,
9463         supports_disable_randomization, supports_string_tracing,
9464         supports_evaluation_of_breakpoint_conditions,
9465         can_run_breakpoint_commands, filesystem_is_local,
9466         can_download_tracepoint, get_trace_state_variable_value,
9467         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9468         record_is_replaying, record_will_replay,
9469         augmented_libraries_svr4_read>: Adjust to return bool.
9470         * aarch64-linux-nat.c: All implementations adjusted.
9471         * aix-thread.c: All implementations adjusted.
9472         * arm-linux-nat.c: All implementations adjusted.
9473         * breakpoint.c: All implementations adjusted.
9474         * bsd-kvm.c: All implementations adjusted.
9475         * bsd-uthread.c: All implementations adjusted.
9476         * corelow.c: All implementations adjusted.
9477         * ctf.c: All implementations adjusted.
9478         * darwin-nat.c: All implementations adjusted.
9479         * darwin-nat.h: All implementations adjusted.
9480         * exec.c: All implementations adjusted.
9481         * fbsd-nat.c: All implementations adjusted.
9482         * fbsd-nat.h: All implementations adjusted.
9483         * gnu-nat.c: All implementations adjusted.
9484         * gnu-nat.h: All implementations adjusted.
9485         * go32-nat.c: All implementations adjusted.
9486         * ia64-linux-nat.c: All implementations adjusted.
9487         * inf-child.c: All implementations adjusted.
9488         * inf-child.h: All implementations adjusted.
9489         * inf-ptrace.c: All implementations adjusted.
9490         * inf-ptrace.h: All implementations adjusted.
9491         * linux-nat.c: All implementations adjusted.
9492         * linux-nat.h: All implementations adjusted.
9493         * mips-linux-nat.c: All implementations adjusted.
9494         * nto-procfs.c: All implementations adjusted.
9495         * ppc-linux-nat.c: All implementations adjusted.
9496         * procfs.c: All implementations adjusted.
9497         * ravenscar-thread.c: All implementations adjusted.
9498         * record-btrace.c: All implementations adjusted.
9499         * record-full.c: All implementations adjusted.
9500         * remote-sim.c: All implementations adjusted.
9501         * remote.c: All implementations adjusted.
9502         * s390-linux-nat.c: All implementations adjusted.
9503         * sol-thread.c: All implementations adjusted.
9504         * spu-multiarch.c: All implementations adjusted.
9505         * target-delegates.c: All implementations adjusted.
9506         * target.c: All implementations adjusted.
9507         * target.h: All implementations adjusted.
9508         * tracefile-tfile.c: All implementations adjusted.
9509         * tracefile.c: All implementations adjusted.
9510         * tracefile.h: All implementations adjusted.
9511         * windows-nat.c: All implementations adjusted.
9512         * x86-linux-nat.h: All implementations adjusted.
9513         * x86-nat.h: All implementations adjusted.
9514
9515 2018-05-02  Pedro Alves  <palves@redhat.com>
9516
9517         * make-target-delegates (scan_target_h): Don't trim lines here.
9518         Replace sequences of tabs and/or whitespace with a single
9519         whitespace.
9520         (top level, parsing methods): Trim each line before processing it
9521         here.
9522
9523 2018-05-02  Pedro Alves  <palves@redhat.com>
9524             John Baldwin  <jhb@freebsd.org>
9525
9526         * target.h (enum strata) <debug_stratum>: New.
9527         (struct target_ops) <all delegation methods>: Replace by C++
9528         virtual methods, and drop "to_" prefix.  All references updated
9529         throughout.
9530         <to_shortname, to_longname, to_doc, to_data,
9531         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9532         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9533         virtual methods.  All references updated throughout.
9534         <can_attach, supports_terminal_ours, can_create_inferior,
9535         get_thread_control_capabilities, attach_no_wait>: New
9536         virtual methods.
9537         <insert_breakpoint, remove_breakpoint>: Now
9538         TARGET_DEFAULT_NORETURN methods.
9539         <info_proc>: Now returns bool.
9540         <to_magic>: Delete.
9541         (OPS_MAGIC): Delete.
9542         (current_target): Delete.  All references replaced by references
9543         to ...
9544         (target_stack): ... this.  New.
9545         (target_shortname, target_longname): Adjust.
9546         (target_can_run): Now a function declaration.
9547         (default_child_has_all_memory, default_child_has_memory)
9548         (default_child_has_stack, default_child_has_registers)
9549         (default_child_has_execution): Remove target_ops parameter.
9550         (complete_target_initialization): Delete.
9551         (memory_breakpoint_target): New template class.
9552         (test_target_ops): Refactor as a C++ class with virtual methods.
9553         * make-target-delegates (NAME_PART): Tighten.
9554         (POINTER_PART, CP_SYMBOL): New.
9555         (SIMPLE_RETURN_PART): Reimplement.
9556         (VEC_RETURN_PART): Expect less.
9557         (RETURN_PART, VIRTUAL_PART): New.
9558         (METHOD): Adjust to C++ virtual methods.
9559         (scan_target_h): Remove reference to C99.
9560         (dname): Output "target_ops::" prefix.
9561         (write_function_header): Adjust to output a C++ class method.
9562         (write_declaration): New.
9563         (write_delegator): Adjust to output a C++ class method.
9564         (tdname): Output "dummy_target::" prefix.
9565         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9566         method.
9567         (tdefault_names, debug_names): Delete.
9568         (return_types, tdefaults, styles, argtypes_array): New.
9569         (top level): All methods are delegators.
9570         (print_class): New.
9571         (top level): Print dummy_target and debug_target classes.
9572         * target-delegates.c: Regenerate.
9573         * target-debug.h (target_debug_print_enum_info_proc_what)
9574         (target_debug_print_thread_control_capabilities)
9575         (target_debug_print_thread_info_p): New.
9576         * target.c (dummy_target): Delete.
9577         (the_dummy_target, the_debug_target): New.
9578         (target_stack): Now extern.
9579         (set_targetdebug): Push/unpush debug target.
9580         (default_child_has_all_memory, default_child_has_memory)
9581         (default_child_has_stack, default_child_has_registers)
9582         (default_child_has_execution): Remove target_ops parameter.
9583         (complete_target_initialization): Delete.
9584         (add_target_with_completer): No longer call
9585         complete_target_initialization.
9586         (target_supports_terminal_ours): Use regular delegation.
9587         (update_current_target): Delete.
9588         (push_target): No longer check magic number.  Don't call
9589         update_current_target.
9590         (unpush_target): Don't call update_current_target.
9591         (target_is_pushed): No longer check magic number.
9592         (target_require_runnable): Skip for all stratums over
9593         process_stratum.
9594         (target_ops::info_proc): New.
9595         (target_info_proc): Use find_target_at and
9596         find_default_run_target.
9597         (target_supports_disable_randomization): Use regular delegation.
9598         (target_get_osdata): Use find_target_at.
9599         (target_ops::open, target_ops::close, target_ops::can_attach)
9600         (target_ops::attach, target_ops::can_create_inferior)
9601         (target_ops::create_inferior, target_ops::can_run)
9602         (target_can_run): New.
9603         (default_fileio_target): Use regular delegation.
9604         (target_ops::fileio_open, target_ops::fileio_pwrite)
9605         (target_ops::fileio_pread, target_ops::fileio_fstat)
9606         (target_ops::fileio_close, target_ops::fileio_unlink)
9607         (target_ops::fileio_readlink): New.
9608         (target_fileio_open_1, target_fileio_unlink)
9609         (target_fileio_readlink): Always call the target method.  Handle
9610         FILEIO_ENOSYS.
9611         (return_zero, return_zero_has_execution): Delete.
9612         (init_dummy_target): Delete.
9613         (dummy_target::dummy_target, dummy_target::shortname)
9614         (dummy_target::longname, dummy_target::doc)
9615         (debug_target::debug_target, debug_target::shortname)
9616         (debug_target::longname, debug_target::doc): New.
9617         (target_supports_delete_record): Use regular delegation.
9618         (setup_target_debug): Delete.
9619         (maintenance_print_target_stack): Skip debug_stratum.
9620         (initialize_targets): Instantiate the_dummy_target and
9621         the_debug_target.
9622         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9623         use target_stack.
9624         (target_auxv_search, fprint_target_auxv): Adjust.
9625         (info_auxv_command): Adjust to use target_stack.
9626         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9627         * exceptions.c (print_flush): Handle a NULL target_stack.
9628         * regcache.c (target_ops_no_register): Refactor as class with
9629         virtual methods.
9630
9631         * exec.c (exec_target): New class.
9632         (exec_ops): Now an exec_target.
9633         (exec_open, exec_close_1, exec_get_section_table)
9634         (exec_xfer_partial, exec_files_info, exec_has_memory)
9635         (exec_make_note_section): Refactor as exec_target methods.
9636         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9637         Delete.
9638         (exec_target::find_memory_regions): New.
9639         (_initialize_exec): Don't call init_exec_ops.
9640         * gdbcore.h (exec_file_clear): Delete.
9641
9642         * corefile.c (core_target): Delete.
9643         (core_file_command): Adjust.
9644         * corelow.c (core_target): New class.
9645         (the_core_target): New.
9646         (core_close): Remove target_ops parameter.
9647         (core_close_cleanup): Adjust.
9648         (core_target::close): New.
9649         (core_open, core_detach, get_core_registers, core_files_info)
9650         (core_xfer_partial, core_thread_alive, core_read_description)
9651         (core_pid_to_str, core_thread_name, core_has_memory)
9652         (core_has_stack, core_has_registers, core_info_proc): Rework as
9653         core_target methods.
9654         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9655         (_initialize_corelow): Initialize the_core_target.
9656         * gdbcore.h (core_target): Delete.
9657         (the_core_target): New.
9658
9659         * ctf.c: (ctf_target): New class.
9660         (ctf_ops): Now a ctf_target.
9661         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9662         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9663         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9664         methods.
9665         (init_ctf_ops): Delete.
9666         (_initialize_ctf): Don't call it.
9667         * tracefile-tfile.c (tfile_target): New class.
9668         (tfile_ops): Now a tfile_target.
9669         (tfile_open, tfile_close, tfile_files_info)
9670         (tfile_get_tracepoint_status, tfile_trace_find)
9671         (tfile_fetch_registers, tfile_xfer_partial)
9672         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9673         Refactor as tfile_target methods.
9674         (tfile_xfer_partial_features): Remove target_ops parameter.
9675         (init_tfile_ops): Delete.
9676         (_initialize_tracefile_tfile): Don't call it.
9677         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9678         (tracefile_has_stack, tracefile_has_registers)
9679         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9680         tracefile_target methods.
9681         (init_tracefile_ops): Delete.
9682         (tracefile_target::tracefile_target): New.
9683         * tracefile.h: Include "target.h".
9684         (tracefile_target): New class.
9685         (init_tracefile_ops): Delete.
9686
9687         * spu-multiarch.c (spu_multiarch_target): New class.
9688         (spu_ops): Now a spu_multiarch_target.
9689         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9690         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9691         (spu_search_memory, spu_mourn_inferior): Refactor as
9692         spu_multiarch_target methods.
9693         (init_spu_ops): Delete.
9694         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9695         complete_target_initialization.
9696
9697         * ravenscar-thread.c (ravenscar_thread_target): New class.
9698         (ravenscar_ops): Now a ravenscar_thread_target.
9699         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9700         (ravenscar_thread_alive, ravenscar_pid_to_str)
9701         (ravenscar_fetch_registers, ravenscar_store_registers)
9702         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9703         (ravenscar_stopped_by_hw_breakpoint)
9704         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9705         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9706         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9707         methods.
9708         (init_ravenscar_thread_ops): Delete.
9709         (_initialize_ravenscar): Remove references to
9710         init_ravenscar_thread_ops and complete_target_initialization.
9711
9712         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9713         (bsd_uthread_target): New class.
9714         (bsd_uthread_ops): Now a bsd_uthread_target.
9715         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9716         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9717         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9718         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9719         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9720         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9721         (bsd_uthread_target): Delete function.
9722         (_initialize_bsd_uthread): Remove reference to
9723         complete_target_initialization.
9724
9725         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9726         (target_bfd): ... this new class.
9727         (target_bfd_xfer_partial, target_bfd_get_section_table)
9728         (target_bfd_close): Refactor as target_bfd methods.
9729         (target_bfd::~target_bfd): New.
9730         (target_bfd_reopen): Adjust.
9731         (target_bfd::close): New.
9732
9733         * record-btrace.c (record_btrace_target): New class.
9734         (record_btrace_ops): Now a record_btrace_target.
9735         (record_btrace_open, record_btrace_stop_recording)
9736         (record_btrace_disconnect, record_btrace_close)
9737         (record_btrace_async, record_btrace_info)
9738         (record_btrace_insn_history, record_btrace_insn_history_range)
9739         (record_btrace_insn_history_from, record_btrace_call_history)
9740         (record_btrace_call_history_range)
9741         (record_btrace_call_history_from, record_btrace_record_method)
9742         (record_btrace_is_replaying, record_btrace_will_replay)
9743         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9744         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9745         (record_btrace_store_registers, record_btrace_prepare_to_store)
9746         (record_btrace_to_get_unwinder)
9747         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9748         (record_btrace_commit_resume, record_btrace_wait)
9749         (record_btrace_stop, record_btrace_can_execute_reverse)
9750         (record_btrace_stopped_by_sw_breakpoint)
9751         (record_btrace_supports_stopped_by_sw_breakpoint)
9752         (record_btrace_stopped_by_hw_breakpoint)
9753         (record_btrace_supports_stopped_by_hw_breakpoint)
9754         (record_btrace_update_thread_list, record_btrace_thread_alive)
9755         (record_btrace_goto_begin, record_btrace_goto_end)
9756         (record_btrace_goto, record_btrace_stop_replaying_all)
9757         (record_btrace_execution_direction)
9758         (record_btrace_prepare_to_generate_core)
9759         (record_btrace_done_generating_core): Refactor as
9760         record_btrace_target methods.
9761         (init_record_btrace_ops): Delete.
9762         (_initialize_record_btrace): Remove reference to
9763         init_record_btrace_ops.
9764         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9765         the execution_direction global.
9766         (record_full_base_target, record_full_target)
9767         (record_full_core_target): New classes.
9768         (record_full_ops): Now a record_full_target.
9769         (record_full_core_ops): Now a record_full_core_target.
9770         (record_full_target::detach, record_full_target::disconnect)
9771         (record_full_core_target::disconnect)
9772         (record_full_target::mourn_inferior, record_full_target::kill):
9773         New.
9774         (record_full_open, record_full_close, record_full_async): Refactor
9775         as methods of the record_full_base_target class.
9776         (record_full_resume, record_full_commit_resume): Refactor
9777         as methods of the record_full_target class.
9778         (record_full_wait, record_full_stopped_by_watchpoint)
9779         (record_full_stopped_data_address)
9780         (record_full_stopped_by_sw_breakpoint)
9781         (record_full_supports_stopped_by_sw_breakpoint)
9782         (record_full_stopped_by_hw_breakpoint)
9783         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9784         methods of the record_full_base_target class.
9785         (record_full_store_registers, record_full_xfer_partial)
9786         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9787         Refactor as methods of the record_full_target class.
9788         (record_full_can_execute_reverse, record_full_get_bookmark)
9789         (record_full_goto_bookmark, record_full_execution_direction)
9790         (record_full_record_method, record_full_info, record_full_delete)
9791         (record_full_is_replaying, record_full_will_replay)
9792         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9793         (record_full_stop_replaying): Refactor as methods of the
9794         record_full_base_target class.
9795         (record_full_core_resume, record_full_core_kill)
9796         (record_full_core_fetch_registers)
9797         (record_full_core_prepare_to_store)
9798         (record_full_core_store_registers, record_full_core_xfer_partial)
9799         (record_full_core_insert_breakpoint)
9800         (record_full_core_remove_breakpoint)
9801         (record_full_core_has_execution): Refactor
9802         as methods of the record_full_core_target class.
9803         (record_full_base_target::supports_delete_record): New.
9804         (init_record_full_ops): Delete.
9805         (init_record_full_core_ops): Delete.
9806         (record_full_save): Refactor as method of the
9807         record_full_base_target class.
9808         (_initialize_record_full): Remove references to
9809         init_record_full_ops and init_record_full_core_ops.
9810
9811         * remote.c (remote_target, extended_remote_target): New classes.
9812         (remote_ops): Now a remote_target.
9813         (extended_remote_ops): Now an extended_remote_target.
9814         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9815         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9816         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9817         (remote_pass_signals, remote_set_syscall_catchpoint)
9818         (remote_program_signals, )
9819         (remote_thread_always_alive): Remove target_ops parameter.
9820         (remote_thread_alive, remote_thread_name)
9821         (remote_update_thread_list, remote_threads_extra_info)
9822         (remote_static_tracepoint_marker_at)
9823         (remote_static_tracepoint_markers_by_strid)
9824         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9825         (remote_open): Refactor as methods of remote_target.
9826         (extended_remote_open, extended_remote_detach)
9827         (extended_remote_attach, extended_remote_post_attach):
9828         (extended_remote_supports_disable_randomization)
9829         (extended_remote_create_inferior): : Refactor as method of
9830         extended_remote_target.
9831         (remote_set_permissions, remote_open_1, remote_detach)
9832         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9833         (remote_resume, remote_commit_resume, remote_stop)
9834         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9835         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9836         (remote_prepare_to_store, remote_store_registers)
9837         (remote_flash_erase, remote_flash_done, remote_files_info)
9838         (remote_kill, remote_mourn, remote_insert_breakpoint)
9839         (remote_remove_breakpoint, remote_insert_watchpoint)
9840         (remote_watchpoint_addr_within_range)
9841         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9842         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9843         (remote_supports_stopped_by_sw_breakpoint)
9844         (remote_stopped_by_hw_breakpoint)
9845         (remote_supports_stopped_by_hw_breakpoint)
9846         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9847         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9848         (remote_verify_memory): Refactor as methods of remote_target.
9849         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9850         parameter.
9851         (remote_xfer_partial, remote_get_memory_xfer_limit)
9852         (remote_search_memory, remote_rcmd, remote_memory_map)
9853         (remote_pid_to_str, remote_get_thread_local_address)
9854         (remote_get_tib_address, remote_read_description): Refactor as
9855         methods of remote_target.
9856         (remote_target::fileio_open, remote_target::fileio_pwrite)
9857         (remote_target::fileio_pread, remote_target::fileio_close): New.
9858         (remote_hostio_readlink, remote_hostio_fstat)
9859         (remote_filesystem_is_local, remote_can_execute_reverse)
9860         (remote_supports_non_stop, remote_supports_disable_randomization)
9861         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9862         (remote_supports_enable_disable_tracepoint)
9863         (remote_supports_string_tracing)
9864         (remote_can_run_breakpoint_commands, remote_trace_init)
9865         (remote_download_tracepoint, remote_can_download_tracepoint)
9866         (remote_download_trace_state_variable, remote_enable_tracepoint)
9867         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9868         (remote_trace_start, remote_get_trace_status)
9869         (remote_get_tracepoint_status, remote_trace_stop)
9870         (remote_trace_find, remote_get_trace_state_variable_value)
9871         (remote_save_trace_data, remote_get_raw_trace_data)
9872         (remote_set_disconnected_tracing, remote_core_of_thread)
9873         (remote_set_circular_trace_buffer, remote_traceframe_info)
9874         (remote_get_min_fast_tracepoint_insn_len)
9875         (remote_set_trace_buffer_size, remote_set_trace_notes)
9876         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9877         (remote_disable_btrace, remote_teardown_btrace)
9878         (remote_read_btrace, remote_btrace_conf)
9879         (remote_augmented_libraries_svr4_read, remote_load)
9880         (remote_pid_to_exec_file, remote_can_do_single_step)
9881         (remote_execution_direction, remote_thread_handle_to_thread_info):
9882         Refactor as methods of remote_target.
9883         (init_remote_ops, init_extended_remote_ops): Delete.
9884         (remote_can_async_p, remote_is_async_p, remote_async)
9885         (remote_thread_events, remote_upload_tracepoints)
9886         (remote_upload_trace_state_variables): Refactor as methods of
9887         remote_target.
9888         (_initialize_remote): Remove references to init_remote_ops and
9889         init_extended_remote_ops.
9890
9891         * remote-sim.c (gdbsim_target): New class.
9892         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9893         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9894         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9895         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9896         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9897         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9898         Refactor as methods of gdbsim_target.
9899         (gdbsim_ops): Now a gdbsim_target.
9900         (init_gdbsim_ops): Delete.
9901         (gdbsim_cntrl_c): Adjust.
9902         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9903
9904         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9905         (the_amd64_linux_nat_target): New.
9906         (amd64_linux_fetch_inferior_registers)
9907         (amd64_linux_store_inferior_registers): Refactor as methods of
9908         amd64_linux_nat_target.
9909         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9910         * i386-linux-nat.c: Don't include "linux-nat.h".
9911         (i386_linux_nat_target): New class.
9912         (the_i386_linux_nat_target): New.
9913         (i386_linux_fetch_inferior_registers)
9914         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9915         as methods of i386_linux_nat_target.
9916         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9917         * inf-child.c (inf_child_ops): Delete.
9918         (inf_child_fetch_inferior_registers)
9919         (inf_child_store_inferior_registers): Delete.
9920         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9921         methods of inf_child_target.
9922         (inf_child_target::supports_terminal_ours)
9923         (inf_child_target::terminal_init)
9924         (inf_child_target::terminal_inferior)
9925         (inf_child_target::terminal_ours_for_output)
9926         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9927         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9928         New.
9929         (inf_child_open, inf_child_disconnect, inf_child_close)
9930         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9931         (inf_child_post_startup_inferior, inf_child_can_run)
9932         (inf_child_pid_to_exec_file): Refactor as methods of
9933         inf_child_target.
9934         (inf_child_follow_fork): Delete.
9935         (inf_child_target::can_create_inferior)
9936         (inf_child_target::can_attach): New.
9937         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9938         (inf_child_target::has_stack, inf_child_target::has_registers)
9939         (inf_child_target::has_execution): New.
9940         (inf_child_fileio_open, inf_child_fileio_pwrite)
9941         (inf_child_fileio_pread, inf_child_fileio_fstat)
9942         (inf_child_fileio_close, inf_child_fileio_unlink)
9943         (inf_child_fileio_readlink, inf_child_use_agent)
9944         (inf_child_can_use_agent): Refactor as methods of
9945         inf_child_target.
9946         (return_zero, inf_child_target): Delete.
9947         (inf_child_target::inf_child_target): New.
9948         * inf-child.h: Include "target.h".
9949         (inf_child_target): Delete function prototype.
9950         (inf_child_target): New class.
9951         (inf_child_open_target, inf_child_mourn_inferior)
9952         (inf_child_maybe_unpush_target): Delete.
9953         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9954         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9955         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9956         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9957         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9958         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9959         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9960         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9961         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9962         methods of inf_ptrace_target.
9963         (inf_ptrace_target): Delete function.
9964         * inf-ptrace.h: Include "inf-child.h".
9965         (inf_ptrace_target): Delete function declaration.
9966         (inf_ptrace_target): New class.
9967         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9968         * linux-nat.c (linux_target): New.
9969         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9970         (linux_nat_target::~linux_nat_target): New.
9971         (linux_child_post_attach, linux_child_post_startup_inferior)
9972         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9973         (linux_child_remove_fork_catchpoint)
9974         (linux_child_insert_vfork_catchpoint)
9975         (linux_child_remove_vfork_catchpoint)
9976         (linux_child_insert_exec_catchpoint)
9977         (linux_child_remove_exec_catchpoint)
9978         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9979         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9980         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9981         (linux_nat_stopped_data_address)
9982         (linux_nat_stopped_by_sw_breakpoint)
9983         (linux_nat_supports_stopped_by_sw_breakpoint)
9984         (linux_nat_stopped_by_hw_breakpoint)
9985         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9986         (linux_nat_kill, linux_nat_mourn_inferior)
9987         (linux_nat_xfer_partial, linux_nat_thread_alive)
9988         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9989         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9990         (linux_child_static_tracepoint_markers_by_strid)
9991         (linux_nat_is_async_p, linux_nat_can_async_p)
9992         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9993         (linux_nat_supports_multi_process)
9994         (linux_nat_supports_disable_randomization, linux_nat_async)
9995         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9996         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9997         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9998         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9999         methods of linux_nat_target.
10000         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10001         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10002         parameter.
10003         (check_stopped_by_watchpoint): Adjust.
10004         (linux_xfer_partial): Delete.
10005         (linux_target_install_ops, linux_target, linux_nat_add_target):
10006         Delete.
10007         (linux_nat_target::linux_nat_target): New.
10008         * linux-nat.h: Include "inf-ptrace.h".
10009         (linux_nat_target): New.
10010         (linux_target, linux_target_install_ops, linux_nat_add_target):
10011         Delete function declarations.
10012         (linux_target): Declare global.
10013         * linux-thread-db.c (thread_db_target): New.
10014         (thread_db_target::thread_db_target): New.
10015         (thread_db_ops): Delete.
10016         (the_thread_db_target): New.
10017         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10018         (thread_db_update_thread_list, thread_db_pid_to_str)
10019         (thread_db_extra_thread_info)
10020         (thread_db_thread_handle_to_thread_info)
10021         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10022         (thread_db_resume): Refactor as methods of thread_db_target.
10023         (init_thread_db_ops): Delete.
10024         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10025         * x86-linux-nat.c: Don't include "linux-nat.h".
10026         (super_post_startup_inferior): Delete.
10027         (x86_linux_nat_target::~x86_linux_nat_target): New.
10028         (x86_linux_child_post_startup_inferior)
10029         (x86_linux_read_description, x86_linux_enable_btrace)
10030         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10031         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10032         methods of x86_linux_nat_target.
10033         (x86_linux_create_target): Delete.  Bits folded ...
10034         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10035         pointer.
10036         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10037         (x86_linux_nat_target): New class.
10038         (x86_linux_create_target): Delete.
10039         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10040         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10041         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10042         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10043         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10044         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10045         make extern.
10046         (x86_use_watchpoints): Delete.
10047         * x86-nat.h: Include "breakpoint.h" and "target.h".
10048         (x86_use_watchpoints): Delete.
10049         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10050         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10051         (x86_insert_watchpoint, x86_remove_watchpoint)
10052         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10053         (x86_stopped_by_hw_breakpoint): New declarations.
10054         (x86_nat_target): New template class.
10055
10056         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10057         (the_ppc_linux_nat_target): New.
10058         (ppc_linux_fetch_inferior_registers)
10059         (ppc_linux_can_use_hw_breakpoint)
10060         (ppc_linux_region_ok_for_hw_watchpoint)
10061         (ppc_linux_ranged_break_num_registers)
10062         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10063         (ppc_linux_insert_mask_watchpoint)
10064         (ppc_linux_remove_mask_watchpoint)
10065         (ppc_linux_can_accel_watchpoint_condition)
10066         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10067         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10068         (ppc_linux_watchpoint_addr_within_range)
10069         (ppc_linux_masked_watch_num_registers)
10070         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10071         (ppc_linux_read_description): Refactor as methods of
10072         ppc_linux_nat_target.
10073         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10074
10075         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10076         (procfs_target): New class.
10077         (the_procfs_target): New.
10078         (procfs_target): Delete function.
10079         (procfs_auxv_parse, procfs_attach, procfs_detach)
10080         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10081         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10082         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10083         (procfs_create_inferior, procfs_update_thread_list)
10084         (procfs_thread_alive, procfs_pid_to_str)
10085         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10086         (procfs_stopped_data_address, procfs_insert_watchpoint)
10087         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10088         (proc_find_memory_regions, procfs_info_proc)
10089         (procfs_make_note_section): Refactor as methods of procfs_target.
10090         (_initialize_procfs): Adjust.
10091         * sol-thread.c (sol_thread_target): New class.
10092         (sol_thread_ops): Now a sol_thread_target.
10093         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10094         (sol_thread_fetch_registers, sol_thread_store_registers)
10095         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10096         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10097         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10098         (init_sol_thread_ops): Delete.
10099         (_initialize_sol_thread): Adjust.  Remove references to
10100         init_sol_thread_ops and complete_target_initialization.
10101
10102         * windows-nat.c (windows_nat_target): New class.
10103         (windows_fetch_inferior_registers)
10104         (windows_store_inferior_registers, windows_resume, windows_wait)
10105         (windows_attach, windows_detach, windows_pid_to_exec_file)
10106         (windows_files_info, windows_create_inferior)
10107         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10108         (windows_close, windows_pid_to_str, windows_xfer_partial)
10109         (windows_get_tib_address, windows_get_ada_task_ptid)
10110         (windows_thread_name, windows_thread_alive): Refactor as
10111         windows_nat_target methods.
10112         (do_initial_windows_stuff): Adjust.
10113         (windows_target): Delete function.
10114         (_initialize_windows_nat): Adjust.
10115
10116         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10117         (darwin_mourn_inferior, darwin_kill_inferior)
10118         (darwin_create_inferior, darwin_attach, darwin_detach)
10119         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10120         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10121         (darwin_supports_multi_process): Refactor as darwin_nat_target
10122         methods.
10123         (darwin_resume_to, darwin_files_info): Delete.
10124         (_initialize_darwin_inferior): Rename to ...
10125         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10126         * darwin-nat.h: Include "inf-child.h".
10127         (darwin_nat_target): New class.
10128         (darwin_complete_target): Delete.
10129         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10130         (darwin_target): New.
10131         (i386_darwin_fetch_inferior_registers)
10132         (i386_darwin_store_inferior_registers): Refactor as methods of
10133         darwin_nat_target.
10134         (darwin_complete_target): Delete, with ...
10135         (_initialize_i386_darwin_nat): ... bits factored out here.
10136
10137         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10138         (the_alpha_linux_nat_target): New.
10139         (alpha_linux_register_u_offset): Refactor as
10140         alpha_linux_nat_target method.
10141         (_initialize_alpha_linux_nat): Adjust.
10142         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10143         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10144         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10145         methods of linux_nat_trad_target.
10146         (linux_trad_target): Delete.
10147         * linux-nat-trad.h (linux_trad_target): Delete function.
10148         (linux_nat_trad_target): New class.
10149         * mips-linux-nat.c (mips_linux_nat_target): New class.
10150         (super_fetch_registers, super_store_registers, super_close):
10151         Delete.
10152         (the_mips_linux_nat_target): New.
10153         (mips64_linux_regsets_fetch_registers)
10154         (mips64_linux_regsets_store_registers)
10155         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10156         (mips_linux_register_u_offset, mips_linux_read_description)
10157         (mips_linux_can_use_hw_breakpoint)
10158         (mips_linux_stopped_by_watchpoint)
10159         (mips_linux_stopped_data_address)
10160         (mips_linux_region_ok_for_hw_watchpoint)
10161         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10162         (mips_linux_close): Refactor as methods of mips_linux_nat.
10163         (_initialize_mips_linux_nat): Adjust to C++ification.
10164
10165         * aix-thread.c (aix_thread_target): New class.
10166         (aix_thread_ops): Now an aix_thread_target.
10167         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10168         (aix_thread_fetch_registers, aix_thread_store_registers)
10169         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10170         (aix_thread_thread_alive, aix_thread_pid_to_str)
10171         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10172         Refactor as methods of aix_thread_target.
10173         (init_aix_thread_ops): Delete.
10174         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10175         and complete_target_initialization.
10176         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10177         (rs6000_nat_target): New class.
10178         (the_rs6000_nat_target): New.
10179         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10180         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10181         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10182         (super_create_inferior): Delete.
10183         (_initialize_rs6000_nat): Adjust to C++ification.
10184
10185         * arm-linux-nat.c (arm_linux_nat_target): New class.
10186         (the_arm_linux_nat_target): New.
10187         (arm_linux_fetch_inferior_registers)
10188         (arm_linux_store_inferior_registers, arm_linux_read_description)
10189         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10190         (arm_linux_remove_hw_breakpoint)
10191         (arm_linux_region_ok_for_hw_watchpoint)
10192         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10193         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10194         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10195         arm_linux_nat_target.
10196         (_initialize_arm_linux_nat): Adjust to C++ification.
10197
10198         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10199         (the_aarch64_linux_nat_target): New.
10200         (aarch64_linux_fetch_inferior_registers)
10201         (aarch64_linux_store_inferior_registers)
10202         (aarch64_linux_child_post_startup_inferior)
10203         (aarch64_linux_read_description)
10204         (aarch64_linux_can_use_hw_breakpoint)
10205         (aarch64_linux_insert_hw_breakpoint)
10206         (aarch64_linux_remove_hw_breakpoint)
10207         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10208         (aarch64_linux_region_ok_for_hw_watchpoint)
10209         (aarch64_linux_stopped_data_address)
10210         (aarch64_linux_stopped_by_watchpoint)
10211         (aarch64_linux_watchpoint_addr_within_range)
10212         (aarch64_linux_can_do_single_step): Refactor as methods of
10213         aarch64_linux_nat_target.
10214         (super_post_startup_inferior): Delete.
10215         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10216
10217         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10218         (the_hppa_linux_nat_target): New.
10219         (hppa_linux_fetch_inferior_registers)
10220         (hppa_linux_store_inferior_registers): Refactor as methods of
10221         hppa_linux_nat_target.
10222         (_initialize_hppa_linux_nat): Adjust to C++ification.
10223
10224         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10225         (the_ia64_linux_nat_target): New.
10226         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10227         (ia64_linux_stopped_data_address)
10228         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10229         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10230         ia64_linux_nat_target methods.
10231         (super_xfer_partial): Delete.
10232         (_initialize_ia64_linux_nat): Adjust to C++ification.
10233
10234         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10235         (the_m32r_linux_nat_target): New.
10236         (m32r_linux_fetch_inferior_registers)
10237         (m32r_linux_store_inferior_registers): Refactor as
10238         m32r_linux_nat_target methods.
10239         (_initialize_m32r_linux_nat): Adjust to C++ification.
10240
10241         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10242         (the_m68k_linux_nat_target): New.
10243         (m68k_linux_fetch_inferior_registers)
10244         (m68k_linux_store_inferior_registers): Refactor as
10245         m68k_linux_nat_target methods.
10246         (_initialize_m68k_linux_nat): Adjust to C++ification.
10247
10248         * s390-linux-nat.c (s390_linux_nat_target): New class.
10249         (the_s390_linux_nat_target): New.
10250         (s390_linux_fetch_inferior_registers)
10251         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10252         (s390_insert_watchpoint, s390_remove_watchpoint)
10253         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10254         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10255         (s390_auxv_parse, s390_read_description): Refactor as methods of
10256         s390_linux_nat_target.
10257         (_initialize_s390_nat): Adjust to C++ification.
10258
10259         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10260         (the_sparc_linux_nat_target): New.
10261         (_initialize_sparc_linux_nat): Adjust to C++ification.
10262         * sparc-nat.c (sparc_fetch_inferior_registers)
10263         (sparc_store_inferior_registers): Remove target_ops parameter.
10264         * sparc-nat.h (sparc_fetch_inferior_registers)
10265         (sparc_store_inferior_registers): Remove target_ops parameter.
10266         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10267         (the_sparc64_linux_nat_target): New.
10268         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10269
10270         * spu-linux-nat.c (spu_linux_nat_target): New class.
10271         (the_spu_linux_nat_target): New.
10272         (spu_child_post_startup_inferior, spu_child_post_attach)
10273         (spu_child_wait, spu_fetch_inferior_registers)
10274         (spu_store_inferior_registers, spu_xfer_partial)
10275         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10276         methods.
10277         (_initialize_spu_nat): Adjust to C++ification.
10278
10279         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10280         (the_tilegx_linux_nat_target): New.
10281         (fetch_inferior_registers, store_inferior_registers):
10282         Refactor as methods.
10283         (_initialize_tile_linux_nat): Adjust to C++ification.
10284
10285         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10286         (the_xtensa_linux_nat_target): New.
10287         (xtensa_linux_fetch_inferior_registers)
10288         (xtensa_linux_store_inferior_registers): Refactor as
10289         xtensa_linux_nat_target methods.
10290         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10291
10292         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10293         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10294         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10295         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10296         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10297         (fbsd_stopped_by_sw_breakpoint)
10298         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10299         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10300         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10301         (fbsd_post_startup_inferior, fbsd_post_attach)
10302         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10303         (fbsd_set_syscall_catchpoint)
10304         (super_xfer_partial, super_resume, super_wait)
10305         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10306         (fbsd_handle_debug_trap): Remove target_ops parameter.
10307         (fbsd_nat_add_target): Delete.
10308         * fbsd-nat.h: Include "inf-ptrace.h".
10309         (fbsd_nat_add_target): Delete.
10310         (USE_SIGTRAP_SIGINFO): Define.
10311         (fbsd_nat_target): New class.
10312
10313         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10314         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10315         (amd64bsd_target): Delete.
10316         * amd64-bsd-nat.h: New file.
10317         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10318         "x86-bsd-nat.h".
10319         (amd64_fbsd_nat_target): New class.
10320         (the_amd64_fbsd_nat_target): New.
10321         (amd64fbsd_read_description): Refactor as method of
10322         amd64_fbsd_nat_target.
10323         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10324         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10325         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10326         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10327         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10328         (i386bsd_target): Delete.
10329         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10330         (i386bsd_fetch_inferior_registers)
10331         (i386bsd_store_inferior_registers): Declare.
10332         (i386_bsd_nat_target): New class.
10333         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10334         (the_i386_fbsd_nat_target): New.
10335         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10336         i386_fbsd_nat_target methods.
10337         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10338         (_initialize_i386fbsd_nat): Adjust to C++ification.
10339         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10340         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10341         (_initialize_x86_bsd_nat): Adjust to C++ification.
10342         * x86-bsd-nat.h: Include "x86-nat.h".
10343         (x86bsd_target): Delete declaration.
10344         (x86bsd_nat_target): New class.
10345
10346         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10347         (the_aarch64_fbsd_nat_target): New.
10348         (aarch64_fbsd_fetch_inferior_registers)
10349         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10350         aarch64_fbsd_nat_target.
10351         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10352         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10353         (the_alpha_bsd_nat_target): New.
10354         (alphabsd_fetch_inferior_registers)
10355         (alphabsd_store_inferior_registers): Refactor as
10356         alpha_bsd_nat_target methods.
10357         (_initialize_alphabsd_nat): Refactor as methods of
10358         alpha_bsd_nat_target.
10359         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10360         (the_amd64_nbsd_nat_target): New.
10361         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10362         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10363         (the_amd64_obsd_nat_target): New.
10364         (_initialize_amd64obsd_nat): Adjust to C++ification.
10365         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10366         (the_arm_fbsd_nat_target): New.
10367         (arm_fbsd_fetch_inferior_registers)
10368         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10369         (_initialize_arm_fbsd_nat): Refactor as methods of
10370         arm_fbsd_nat_target.
10371         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10372         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10373         (the_arm_netbsd_nat_target): New.
10374         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10375         arm_netbsd_nat_target.
10376         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10377         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10378         (the_hppa_nbsd_nat_target): New.
10379         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10380         hppa_nbsd_nat_target methods.
10381         (_initialize_hppanbsd_nat): Adjust to C++ification.
10382         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10383         (the_hppa_obsd_nat_target): New.
10384         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10385         methods of hppa_obsd_nat_target.
10386         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10387         add_target.
10388         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10389         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10390         add_target.
10391         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10392         (_initialize_i386obsd_nat): Use add_target.
10393         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10394         (the_m68k_bsd_nat_target): New.
10395         (m68kbsd_fetch_inferior_registers)
10396         (m68kbsd_store_inferior_registers): Refactor as methods of
10397         m68k_bsd_nat_target.
10398         (_initialize_m68kbsd_nat): Adjust to C++ification.
10399         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10400         (the_mips_fbsd_nat_target): New.
10401         (mips_fbsd_fetch_inferior_registers)
10402         (mips_fbsd_store_inferior_registers): Refactor as methods of
10403         mips_fbsd_nat_target.
10404         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10405         add_target.
10406         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10407         (the_mips_nbsd_nat_target): New.
10408         (mipsnbsd_fetch_inferior_registers)
10409         (mipsnbsd_store_inferior_registers): Refactor as methods of
10410         mips_nbsd_nat_target.
10411         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10412         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10413         (the_mips64_obsd_nat_target): New.
10414         (mips64obsd_fetch_inferior_registers)
10415         (mips64obsd_store_inferior_registers): Refactor as methods of
10416         mips64_obsd_nat_target.
10417         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10418         add_target.
10419         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10420         nbsd_nat_target.
10421         * nbsd-nat.h: Include "inf-ptrace.h".
10422         (nbsd_nat_target): New class.
10423         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10424         (obsd_wait): Refactor as methods of obsd_nat_target.
10425         (obsd_add_target): Delete.
10426         * obsd-nat.h: Include "inf-ptrace.h".
10427         (obsd_nat_target): New class.
10428         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10429         (the_ppc_fbsd_nat_target): New.
10430         (ppcfbsd_fetch_inferior_registers)
10431         (ppcfbsd_store_inferior_registers): Refactor as methods of
10432         ppc_fbsd_nat_target.
10433         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10434         add_target.
10435         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10436         (the_ppc_nbsd_nat_target): New.
10437         (ppcnbsd_fetch_inferior_registers)
10438         (ppcnbsd_store_inferior_registers): Refactor as methods of
10439         ppc_nbsd_nat_target.
10440         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10441         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10442         (the_ppc_obsd_nat_target): New.
10443         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10444         methods of ppc_obsd_nat_target.
10445         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10446         add_target.
10447         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10448         (the_sh_nbsd_nat_target): New.
10449         (shnbsd_fetch_inferior_registers)
10450         (shnbsd_store_inferior_registers): Refactor as methods of
10451         sh_nbsd_nat_target.
10452         (_initialize_shnbsd_nat): Adjust to C++ification.
10453         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10454         (inf_ptrace_xfer_partial): Delete.
10455         (sparc_xfer_partial, sparc_target): Delete.
10456         * sparc-nat.h (sparc_fetch_inferior_registers)
10457         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10458         (sparc_target): Delete function declaration.
10459         (sparc_target): New template class.
10460         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10461         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10462         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10463         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10464         add_target.
10465         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10466         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10467         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10468         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10469         add_target.
10470         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10471         (the_vax_bsd_nat_target): New.
10472         (vaxbsd_fetch_inferior_registers)
10473         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10474         methods.
10475         (_initialize_vaxbsd_nat): Adjust to C++ification.
10476
10477         * bsd-kvm.c (bsd_kvm_target): New class.
10478         (bsd_kvm_ops): Now a bsd_kvm_target.
10479         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10480         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10481         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10482         bsd_kvm_target.
10483         (bsd_kvm_return_one): Delete.
10484         (bsd_kvm_add_target): Adjust to C++ification.
10485
10486         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10487         (nto_procfs_target_procfs): New classes.
10488         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10489         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10490         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10491         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10492         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10493         (procfs_remove_hw_breakpoint, procfs_resume)
10494         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10495         (procfs_kill_inferior, procfs_store_registers)
10496         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10497         as methods of nto_procfs_target.
10498         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10499         (nto_native_ops): Delete.
10500         (procfs_open, procfs_native_open): Delete.
10501         (nto_native_ops): Now an nto_procfs_target_native.
10502         (init_procfs_targets): Adjust to C++ification.
10503         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10504         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10505         Refactor as methods of nto_procfs_target.
10506
10507         * go32-nat.c (go32_nat_target): New class.
10508         (the_go32_nat_target): New.
10509         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10510         (go32_store_registers, go32_xfer_partial, go32_files_info)
10511         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10512         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10513         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10514         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10515         (go32_target): Delete.
10516         (_initialize_go32_nat): Adjust to C++ification.
10517
10518         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10519         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10520         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10521         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10522         gnu_nat_target.
10523         (gnu_target): Delete.
10524         * gnu-nat.h (gnu_target): Delete.
10525         (gnu_nat_target): New class.
10526         * i386-gnu-nat.c (gnu_base_target): New.
10527         (i386_gnu_nat_target): New class.
10528         (the_i386_gnu_nat_target): New.
10529         (_initialize_i386gnu_nat): Adjust to C++ification.
10530
10531 2018-05-02  Pedro Alves  <palves@redhat.com>
10532
10533         * bfd-target.c (target_bfd_xclose): Rename to ...
10534         (target_bfd_close): ... this.
10535         (target_bfd_reopen): Adjust.
10536         * target.c (target_close): Remove references to to_xclose.
10537         * target.h (target_ops::to_xclose): Delete.
10538         (target_ops::to_close): Update comments.
10539
10540 2018-05-02  Pedro Alves  <palves@redhat.com>
10541
10542         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10543         "linux-nat.h".
10544         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10545         * inf-ptrace.c (inf_ptrace_register_u_offset)
10546         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10547         (inf_ptrace_store_register, inf_ptrace_store_registers)
10548         (inf_ptrace_trad_target): Move to ...
10549         * linux-nat-trad.c: ... this new file.
10550         * linux-nat-trad.h: New file.
10551         * linux-nat.c (linux_target_install_ops): Make extern.
10552         (linux_trad_target): Delete.
10553         * linux-nat.h (linux_trad_target): Delete declaration.
10554         (linux_target_install_ops): Declare.
10555         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10556         "linux-nat.h".
10557
10558 2018-05-02  Pedro Alves  <palves@redhat.com>
10559
10560         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10561         procfs_target/add_target here.
10562         * procfs.c (procfs_target): Make static.
10563         (_initialize_procfs): Call add_target here.
10564         * procfs.h (struct target_ops): Remove forward declaration.
10565         (procfs_target): Remove declaration.
10566         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10567
10568 2018-05-02  Pedro Alves  <palves@redhat.com>
10569
10570         * procfs.c (procfs_stopped_by_watchpoint)
10571         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10572         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10573         Forward declare.
10574         (procfs_use_watchpoints): Delete, move contents...
10575         (procfs_target): ... here.
10576         * procfs.h (procfs_use_watchpoints): Delete declaration.
10577         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10578         procfs_use_watchpoints.
10579         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10580         procfs_use_watchpoints.
10581
10582 2018-05-02  Tom Tromey  <tom@tromey.com>
10583
10584         PR python/20084:
10585         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10586         and var_zuinteger_unlimited.
10587         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10588         and PARAM_ZUINTEGER_UNLIMITED.
10589         (set_parameter_value): Handle var_zuinteger and
10590         var_zuinteger_unlimited.
10591         (add_setshow_generic): Likewise.
10592         (parmpy_init): Likewise.
10593
10594 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10595
10596         PR rust/23124
10597         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10598         pointer is not null before dereferencing it.
10599
10600 2018-04-30  Tom Tromey  <tom@tromey.com>
10601
10602         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10603         is_mi_like_p.
10604
10605 2018-04-30  Tom Tromey  <tom@tromey.com>
10606
10607         * breakpoint.c (mention): Remove use of is_mi_like_p.
10608         (print_mention_ranged_breakpoint): Likewise.
10609         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10610         of is_mi_like_p.
10611
10612 2018-04-30  Tom Tromey  <tom@tromey.com>
10613
10614         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10615
10616 2018-04-30  Tom Tromey  <tom@tromey.com>
10617
10618         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10619         (info_spu_event_command): Remove some uses of is_mi_like_p.
10620
10621 2018-04-30  Tom Tromey  <tom@tromey.com>
10622
10623         * python/py-framefilter.c (py_print_single_arg)
10624         (enumerate_locals, py_print_args, py_print_frame): Remove some
10625         uses of is_mi_like_p.
10626
10627 2018-04-30  Tom Tromey  <tom@tromey.com>
10628
10629         * ui-out.c: Update.
10630         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10631         * ui-out.h (ui_out::is_mi_like_p): Now const.
10632         (ui_out::do_is_mi_like_p): Now const.
10633         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10634
10635 2018-04-30  Tom Tromey  <tom@tromey.com>
10636
10637         * varobj.c (varobj_set_visualizer): Use new_reference.
10638         * python/python.c (gdbpy_decode_line): Use new_reference.
10639         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10640         new_reference.
10641
10642 2018-04-30  Tom Tromey  <tom@tromey.com>
10643
10644         * varobj.c (install_new_value): Use new_reference.
10645         * value.h (value_incref): Return void.  Swap intro comment with
10646         value_decref.
10647         * value.c (set_value_parent): Use new_reference.
10648         (value_incref): Return void.  Update intro comment.
10649         (release_value): Use new_reference.
10650         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10651
10652 2018-04-30  Tom Tromey  <tom@tromey.com>
10653
10654         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10655         * gdb_bfd.h (new_bfd_ref): Remove.
10656         (gdb_bfd_open): Update comment.
10657         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10658         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10659         (gdb_bfd_fdopenr): Use new_reference.
10660         * exec.c (exec_file_attach): Use new_reference.
10661
10662 2018-04-30  Tom Tromey  <tom@tromey.com>
10663
10664         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10665         method.
10666
10667 2018-04-30  Tom Tromey  <tom@tromey.com>
10668
10669         * jit.c (jit_read_code_entry): Use type_align.
10670         * i386-tdep.c (i386_gdbarch_init): Don't call
10671         set_gdbarch_long_long_align_bit.
10672         * gdbarch.sh: Remove long_long_align_bit.
10673         * gdbarch.c, gdbarch.h: Rebuild.
10674         * arc-tdep.c (arc_type_align): New function.
10675         (arc_gdbarch_init): Use arc_type_align.  Don't call
10676         set_gdbarch_long_long_align_bit.
10677
10678 2018-04-30  Tom Tromey  <tom@tromey.com>
10679
10680         * rust-lang.c (rust_type_alignment): Remove.
10681         (rust_composite_type): Use type_align.
10682
10683 2018-04-30  Tom Tromey  <tom@tromey.com>
10684
10685         * NEWS: Mention Type.align.
10686         * python/py-type.c (typy_get_alignof): New function.
10687         (type_object_getset): Add "alignof".
10688
10689 2018-04-30  Tom Tromey  <tom@tromey.com>
10690
10691         PR exp/17095:
10692         * NEWS: Update.
10693         * std-operator.def (UNOP_ALIGNOF): New operator.
10694         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10695         New.
10696         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10697         * c-lang.c (c_op_print_tab): Add alignof.
10698         * c-exp.y (ALIGNOF): New token.
10699         (exp): Add "ALIGNOF" production.
10700         (ident_tokens): Add _Alignof and alignof.
10701
10702 2018-04-30  Tom Tromey  <tom@tromey.com>
10703
10704         * i386-tdep.c (i386_type_align): New function.
10705         (i386_gdbarch_init): Update.
10706         * gdbarch.sh (type_align): New method.
10707         * gdbarch.c, gdbarch.h: Rebuild.
10708         * arch-utils.h (default_type_align): Declare.
10709         * arch-utils.c (default_type_align): New function.
10710         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10711         (struct type) <align_log2>: New field.
10712         <instance_flags>: Now a bitfield.
10713         (TYPE_RAW_ALIGN): New macro.
10714         (type_align, type_raw_align, set_type_align): Declare.
10715         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10716         functions.
10717         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10718         (get_alignment, maybe_set_alignment): New functions.
10719         (read_structure_type, read_enumeration_type, read_array_type)
10720         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10721         (read_subrange_type, read_base_type): Set type alignment.
10722
10723 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10724
10725         * dwarf2read.c (read_index_from_section): Use bool.
10726
10727 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10728
10729         PR gdb/22950
10730         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10731         with #ifdef.
10732
10733 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10734
10735         PR build/22873
10736         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10737         last step, and do it atomically.
10738
10739 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10740
10741         * compile/compile-c-types.c (convert_int, convert_float):
10742         Update for C FE v1.
10743
10744 2018-04-27  Tom Tromey  <tom@tromey.com>
10745
10746         PR rust/22545:
10747         * rust-lang.c (rust_inclusive_range_type_p): New function.
10748         (rust_range): Handle inclusive ranges.
10749         (rust_compute_range): Likewise.
10750         * rust-exp.y (struct rust_op) <inclusive>: New field.
10751         (DOTDOTEQ): New constant.
10752         (range_expr): Add "..=" productions.
10753         (operator_tokens): Add "..=" token.
10754         (ast_range): Add "inclusive" parameter.
10755         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10756         ranges.
10757         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10758         bounds values.
10759         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10760         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10761         Update comments.
10762         * expprint.c (print_subexp_standard): Handle new bounds values.
10763         (dump_subexp_body_standard): Likewise.
10764
10765 2018-04-27  Tom Tromey  <tom@tromey.com>
10766
10767         * configure: Rebuild.
10768         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10769         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10770         "OVERRIDE".
10771         (class symbol_needs_eval_context): Likewise.
10772         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10773         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10774         "virtual".
10775         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10776         "override".
10777         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10778         * aarch64-tdep.c (instruction_reader::read): Use "override".
10779         (instruction_reader_test::read): Likewise.
10780         * arm-tdep.c (instruction_reader::read): Use "override".
10781         (instruction_reader_thumb::read): Likewise.
10782
10783 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10784
10785         PR remote/9665
10786         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10787         instead of remote_send.
10788         (remote_send): Remove.
10789
10790 2018-04-26  Pedro Alves  <palves@redhat.com>
10791
10792         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10793         find_function_start_sal instead of find_pc_line.
10794
10795 2018-04-26  Pedro Alves  <palves@redhat.com>
10796
10797         * breakpoint.c (set_breakpoint_location_function): Handle
10798         mst_data_gnu_ifunc.
10799         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10800         * elfread.c (elf_symtab_read): Give data symbols with
10801         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10802         (elf_rel_plt_read): Update comment.
10803         * linespec.c (convert_linespec_to_sals): Handle
10804         mst_data_gnu_ifunc.
10805         (minsym_found): Handle mst_data_gnu_ifunc.
10806         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10807         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10808         * parse.c (find_minsym_type_and_address): Handle
10809         mst_data_gnu_ifunc.
10810         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10811         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10812         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10813         comment.
10814         <mst_data_gnu_ifunc>: New enumerator.
10815
10816 2018-04-26  Pedro Alves  <palves@redhat.com>
10817
10818         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10819         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10820         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10821         Handle it.
10822         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10823         (lookup_minimal_symbol_by_pc): Adjust.
10824         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10825         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10826         * minsyms.h (lookup_msym_prefer): New enum.
10827         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10828         parameter by a lookup_msym_prefer parameter.
10829
10830 2018-04-26  Pedro Alves  <palves@redhat.com>
10831
10832         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10833         ends in "@plt" instead of looking at the symbol's section.
10834
10835 2018-04-26  Pedro Alves  <palves@redhat.com>
10836
10837         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10838         all references.
10839         (find_pc_partial_function_gnu_ifunc): Rename to ...
10840         (find_pc_partial_function): ... this, and remove references to
10841         'is_gnu_ifunc_p'.
10842         (find_pc_partial_function): Delete old implementation.
10843         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10844
10845 2018-04-26  Pedro Alves  <palves@redhat.com>
10846
10847         * linespec.c (struct bound_minimal_symbol_search_key): New.
10848         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10849         skip first line if we found a GNU ifunc minimal symbol by name.
10850         (compare_msymbols): Change parameters to work with a destructured
10851         lhs minsym.
10852         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10853         functions.
10854
10855 2018-04-26  Pedro Alves  <palves@redhat.com>
10856
10857         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10858         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10859         address/name.
10860         (add_location_to_breakpoint): Store the minsym and the objfile in
10861         the breakpoint location.
10862         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10863         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10864         Record the minsym in the sal.
10865         * symtab.h (symtab_and_line) <msymbol>: New field.
10866
10867 2018-04-26  Pedro Alves  <palves@redhat.com>
10868
10869         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10870         unless we actually resolved the ifunc.
10871
10872 2018-04-26  Pedro Alves  <palves@redhat.com>
10873
10874         * c-exp.y (variable production): Prefer ifunc minsyms over
10875         regular function symbols.
10876         * symtab.c (find_gnu_ifunc): New function.
10877         * minsyms.h (lookup_msym_prefer): New enum.
10878         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10879         parameter by a lookup_msym_prefer parameter.
10880         * symtab.h (find_gnu_ifunc): New declaration.
10881
10882 2018-04-26  Pedro Alves  <palves@redhat.com>
10883
10884         * blockframe.c (find_gnu_ifunc_target_type): New function.
10885         (find_function_type): New.
10886         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10887         return a value with a memory address.
10888         (eval_call): For calls to GNU ifunc functions, try to find the
10889         type of the target function from the type that the resolver
10890         returns.
10891         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10892         symbols.
10893         * infcall.c (find_function_return_type): Delete.
10894         (find_function_addr): Add 'function_type' parameter.  For calls to
10895         GNU ifunc functions, try to find the type of the target function
10896         from the type that the resolver returns, and return it via
10897         FUNCTION_TYPE.
10898         (call_function_by_hand_dummy): Adjust to use the function type
10899         returned by find_function_addr.
10900         (find_function_addr): Add 'function_type' parameter and move
10901         description here.
10902         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10903         declarations.
10904
10905 2018-04-26  Pedro Alves  <palves@redhat.com>
10906
10907         * c-exp.y (variable production): Skip finding an alias for ifunc
10908         symbols.
10909
10910 2018-04-26  Pedro Alves  <palves@redhat.com>
10911
10912         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10913
10914 2018-04-25  Pedro Alves  <palves@redhat.com>
10915
10916         * infcmd.c (kill_command): Print the pid as string, not the whole
10917         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10918         message.
10919         * remote.c (remote_detach_1): Print the pid as string, not the
10920         whole thread's ptid.
10921
10922 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10923             Sergio Durigan Junior  <sergiodj@redhat.com>
10924             Pedro Alves  <palves@redhat.com>
10925
10926         * infcmd.c (kill_command): Print message when inferior has
10927         been killed.
10928         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10929         '1'.
10930         (add_inferior): Improve message printed when
10931         'print_inferior_events' is on.
10932         (exit_inferior): Remove message printed when
10933         'print_inferior_events' is on.
10934         (detach_inferior): Improve message printed when
10935         'print_inferior_events' is on.
10936         (initialize_inferiors): Use 'add_inferior_silent' to set
10937         'current_inferior_'.
10938         * inferior.h (print_inferior_events): Declare here as
10939         'extern'.
10940         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10941         '[Detaching...]' messages when 'print_inferior_events' is on.
10942         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10943         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10944         'Detaching after fork from child...', replace it by '... from
10945         parent...'.
10946         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10947         prefix/suffix when printing 'Detaching...' messages.  Print
10948         them when 'print_inferior_events' is on.
10949         * remote.c (remote_detach_1): Print message when detaching
10950         from inferior and '!is_fork_parent'.
10951
10952 2018-04-24  Tom Tromey  <tom@tromey.com>
10953
10954         * cli-out.h: Reindent.
10955
10956 2018-04-24  Tom Tromey  <tom@tromey.com>
10957
10958         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10959         (cli_ui_out::do_field_string): Use fputs_filtered.
10960         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10961
10962 2018-04-23  Tom Tromey  <tom@tromey.com>
10963
10964         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10965         gdb::unique_xmalloc_ptr.
10966
10967 2018-04-23  Tom Tromey  <tom@tromey.com>
10968
10969         * configure: Rebuild.
10970
10971 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10972
10973         PR gdb/23095
10974         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10975         prepare_for_testing.  Set normal_bp to r_debug_state if target
10976         is bsd.
10977
10978 2018-04-21  Pedro Alves  <palves@redhat.com>
10979             Rajendra SY  <rajendra.sy@gmail.com>
10980
10981         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10982         * remote.c (extended_remote_attach): In all-stop mode, mark the
10983         thread as executing.
10984
10985 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10986
10987         * thread.c (thread_apply_all_command): Fix comment.
10988         (thread_command): Fix comment.
10989
10990 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10991
10992         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10993         parameter.
10994         * features/aarch64-core.c (create_feature_aarch64_core):
10995         Regenerate.
10996         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10997         Likewise.
10998         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10999         Likewise.
11000         * features/i386/32bit-avx512.c
11001         (create_feature_i386_32bit_avx512): Likewise.
11002         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11003         Likewise.
11004         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11005         Likewise.
11006         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11007         Likewise.
11008         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11009         Likewise.
11010         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11011         Likewise.
11012         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11013         Likewise.
11014         * features/i386/64bit-avx512.c
11015         (create_feature_i386_64bit_avx512): Likewise.
11016         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11017         Likewise.
11018         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11019         Likewise.
11020         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11021         Likewise.
11022         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11023         Likewise.
11024         * features/i386/64bit-segments.c
11025         (create_feature_i386_64bit_segments): Likewise.
11026         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11027         Likewise.
11028         * features/i386/x32-core.c
11029         (create_feature_i386_x32_core): Likewise.
11030         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11031         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11032         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11033         * target-descriptions.c: In generated code, don't pass xml
11034         filename.
11035
11036 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11037
11038         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11039         (print_xml_feature::visit_post): Likewise.
11040         (print_xml_feature::visit): Likewise.
11041         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11042         (print_xml_feature): Add new class.
11043         * regformats/regdat.sh: Null xmltarget on feature targets.
11044         * target-descriptions.c (struct target_desc): Add xmltarget.
11045         (maintenance_check_tdesc_xml_convert): Add unittest function.
11046         (tdesc_get_features_xml): Add function to get xml.
11047         (maintenance_check_xml_descriptions): Test xml generation.
11048         * xml-tdesc.c (string_read_description_xml): Add function.
11049         * xml-tdesc.h (string_read_description_xml): Add declaration.
11050
11051 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11052
11053         * features/Makefile: Add feature marker to targets with new style
11054         target descriptions.
11055         * regformats/aarch64.dat: Regenerate.
11056         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11057         * regformats/i386/amd64-avx-linux.dat: Likewise.
11058         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11059         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11060         * regformats/i386/amd64-linux.dat: Likewise.
11061         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11062         * regformats/i386/amd64.dat: Likewise.
11063         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11064         * regformats/i386/i386-avx-linux.dat: Likewise.
11065         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11066         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11067         * regformats/i386/i386-linux.dat: Likewise.
11068         * regformats/i386/i386-mmx-linux.dat: Likewise.
11069         * regformats/i386/i386-mpx-linux.dat: Likewise.
11070         * regformats/i386/i386.dat: Likewise.
11071         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11072         * regformats/i386/x32-avx-linux.dat: Likewise.
11073         * regformats/i386/x32-linux.dat: Likewise.
11074         * regformats/tic6x-c62x-linux.dat: Likewise.
11075         * regformats/tic6x-c64x-linux.dat: Likewise.
11076         * regformats/tic6x-c64xp-linux.dat: Likewise.
11077         * regformats/regdat.sh: Parse feature marker.
11078
11079 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11080
11081         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11082         (tdesc_osabi_name): Likewise.
11083         * target-descriptions.c (tdesc_architecture_name): Add new
11084         function.
11085         (tdesc_osabi_name): Likewise.
11086
11087 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11088
11089         * common/tdesc.c (tdesc_predefined_type): Move to here.
11090         (tdesc_named_type): Likewise.
11091         (tdesc_create_vector): Likewise.
11092         (tdesc_create_struct): Likewise.
11093         (tdesc_set_struct_size): Likewise.
11094         (tdesc_create_union): Likewise.
11095         (tdesc_create_flags): Likewise.
11096         (tdesc_create_enum): Likewise.
11097         (tdesc_add_field): Likewise.
11098         (tdesc_add_typed_bitfield): Likewise.
11099         (tdesc_add_bitfield): Likewise.
11100         (tdesc_add_flag): Likewise.
11101         (tdesc_add_enum_value): Likewise.
11102         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11103         (struct tdesc_type_vector): Likewise.
11104         (struct tdesc_type_field): Likewise.
11105         (struct tdesc_type_with_fields): Likewise.
11106         (tdesc_create_enum): Add declaration.
11107         (tdesc_add_typed_bitfield): Likewise.
11108         (tdesc_add_enum_value): Likewise.
11109         * target-descriptions.c (tdesc_type_field): Move from here.
11110         (tdesc_type_builtin): Likewise.
11111         (tdesc_type_vector): Likewise.
11112         (tdesc_type_with_fields): Likewise.
11113         (tdesc_predefined_types): Likewise.
11114         (tdesc_named_type): Likewise.
11115         (tdesc_create_vector): Likewise.
11116         (tdesc_create_struct): Likewise.
11117         (tdesc_set_struct_size): Likewise.
11118         (tdesc_create_union): Likewise.
11119         (tdesc_create_flags): Likewise.
11120         (tdesc_create_enum): Likewise.
11121         (tdesc_add_field): Likewise.
11122         (tdesc_add_typed_bitfield): Likewise.
11123         (tdesc_add_bitfield): Likewise.
11124         (tdesc_add_flag): Likewise.
11125         (tdesc_add_enum_value): Likewise.
11126         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11127         (tdesc_add_typed_bitfield): Likewise.
11128         (tdesc_add_enum_value): Likewise.
11129
11130 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11131
11132         * common/tdesc.c (tdesc_feature::accept): Move to here.
11133         (tdesc_feature::operator==): Likewise.
11134         (tdesc_create_reg): Likewise.
11135         * common/tdesc.h (tdesc_type_kind): Likewise.
11136         (struct tdesc_type): Likewise.
11137         (struct tdesc_feature): Likewise.
11138         * regformats/regdat.sh: Create a feature.
11139         * target-descriptions.c (tdesc_type_kind): Move from here.
11140         (tdesc_type): Likewise.
11141         (tdesc_type_up): Likewise.
11142         (tdesc_feature): Likewise.
11143         (tdesc_create_reg): Likewise.
11144
11145 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11146
11147         * Makefile.in: Add arch/tdesc.c
11148         * common/tdesc.c: New file.
11149         * common/tdesc.h (tdesc_element_visitor): Move to here.
11150         (tdesc_element): Likewise.
11151         (tdesc_reg): Likewise.
11152         (tdesc_reg_up): Likewise.
11153         * regformats/regdef.h (reg): Add offset to constructors.
11154         * target-descriptions.c (tdesc_element_visitor): Move from here.
11155         (tdesc_element): Likewise.
11156         (tdesc_reg): Likewise.
11157         (tdesc_reg_up): Likewise.
11158
11159 2018-04-17  Tom Tromey  <tom@tromey.com>
11160
11161         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11162         discriminant field.
11163
11164 2018-04-17  Tom Tromey  <tom@tromey.com>
11165
11166         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11167
11168 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11169
11170         * symtab.c (print_symbol_info): Skip printing filename and line
11171         number when `last' is NULL.
11172         (symtab_symbol_info): Use empty string instead of NULL for first
11173         invocation of print_symbol_info.
11174         (rbreak_command): Pass NULL to `last' parameter of
11175         print_symbol_info.
11176
11177 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11178
11179         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11180         instead of nullptr.
11181
11182 2018-04-16  Pedro Alves  <palves@redhat.com>
11183
11184         * MAINTAINERS (sh): Remove.
11185         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11186         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11187         (ALLDEPFILES): Remove sh64-tdep.c.
11188         * NEWS: Mentions that support for SH-5/SH64 is removed.
11189         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11190         (sh*-*-openbsd*): Ditto.
11191         (sh64-*-elf*): Remove.
11192         (sh*): Remove.
11193         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11194         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11195         * sh-tdep.c: No longer include "sh64-tdep.h".
11196         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11197         * sh64-tdep.c, sh64-tdep.h: Remove files.
11198
11199 2018-04-16  Pedro Alves  <palves@redhat.com>
11200
11201         * MAINTAINERS: Remove m88k.
11202         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11203         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11204         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11205         * NEWS: Mention that support for m88k was removed.
11206         * configure.host (m88*-*-*): Remove support.
11207         * configure.nat (m88k-*-*): Remove support.
11208         * configure.tgt (m88*-*-openbsd*): Remove.
11209         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11210
11211 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11212
11213         * configure.tgt (x86_tobjs): New variable.
11214         (amd64_tobjs, i386_tobjs): Use it.
11215
11216 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11217
11218         * symtab.c (print_symbol_info): Precede the symbol definition by
11219         the line number when available.
11220         * NEWS: Advertise this enhancement.
11221
11222 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11223
11224         * NEWS (New options): announce set/show record btrace cpu.
11225         * btrace.c: Include record-btrace.h.
11226         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11227         the vendor is unknown.
11228         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11229         Maybe overwrite the btrace configuration's cpu.
11230         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11231         (btrace_fetch): Add cpu parameter.  Update callers.
11232         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11233         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11234         errata workarounds if the vendor is unknown.
11235         * python/py-record-btrace.c: Include record-btrace.h.
11236         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11237         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11238         * record-btrace.c (record_btrace_cpu_state_kind): New.
11239         (record_btrace_cpu): New.
11240         (set_record_btrace_cpu_cmdlist): New.
11241         (record_btrace_get_cpu): New.
11242         (require_btrace_thread, record_btrace_info)
11243         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11244         (cmd_set_record_btrace_cpu_none): New.
11245         (cmd_set_record_btrace_cpu_auto): New.
11246         (cmd_set_record_btrace_cpu): New.
11247         (cmd_show_record_btrace_cpu): New.
11248         (_initialize_record_btrace): Initialize set/show record btrace cpu
11249         commands.
11250         * record-btrace.h (record_btrace_get_cpu): New.
11251
11252 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11253
11254         * record.c (set_record_command): Fix typo in message.
11255
11256 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11257
11258         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11259
11260 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11261
11262         * infrun.c (process_event_stop_test): Call
11263         gdbarch_in_indirect_branch_thunk.
11264         * gdbarch.sh (in_indirect_branch_thunk): New.
11265         * gdbarch.c: Regenerated.
11266         * gdbarch.h: Regenerated.
11267         * x86-tdep.h: New.
11268         * x86-tdep.c: New.
11269         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11270         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11271         (ALLDEPFILES): Add x86-tdep.c.
11272         * arch-utils.h (default_in_indirect_branch_thunk): New.
11273         * arch-utils.c (default_in_indirect_branch_thunk): New.
11274         * i386-tdep: Include x86-tdep.h.
11275         (i386_in_indirect_branch_thunk): New.
11276         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11277         function.
11278         * amd64-tdep: Include x86-tdep.h.
11279         (amd64_in_indirect_branch_thunk): New.
11280         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11281
11282 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11283
11284         PR gdb/23053
11285         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11286         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11287         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11288         regression.
11289
11290 2018-04-12  Tom Tromey  <tom@tromey.com>
11291
11292         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11293         (rust_evaluate_subexp): Likewise.
11294
11295 2018-04-12  Pedro Alves  <palves@redhat.com>
11296
11297         * procfs.c (procfs_detach): Make forward declaration's prototype
11298         match definition's protototype.
11299         (proc_get_LDT_entry): Remove stale do_cleanups call.
11300
11301 2018-04-12  Pedro Alves  <palves@redhat.com>
11302
11303         * target.h (target_ops::to_has_exited): Delete.
11304         (target_has_exited): Delete.
11305         * target-delegates.c: Regenerate.
11306
11307 2018-04-11  Pedro Alves  <palves@redhat.com>
11308
11309         * target.c (fileio_fh_t::t): Add comment.
11310         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11311         (target_fileio_close): Handle a NULL target.
11312         (invalidate_fileio_fh): New.
11313         (target_close): Call it.
11314         * remote.c (remote_hostio_send_command): No longer check whether
11315         remote_desc is open.
11316
11317 2018-04-11  Pedro Alves  <palves@redhat.com>
11318
11319         * target.c (fileio_fh_t): Make it a named struct instead of a
11320         typedef.
11321         (fileio_fh_t::is_closed): New method.
11322         (DEF_VEC_O (fileio_fh_t)): Remove.
11323         (fileio_fhandles): Now a std::vector.
11324         (is_closed_fileio_fh): Delete.
11325         (acquire_fileio_fd): Adjust.  Rename parameters.
11326         (release_fileio_fd): Adjust.
11327         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11328         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11329         (target_fileio_close): Adjust.
11330
11331 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11332
11333         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11334         index.
11335
11336 2018-04-10  Pedro Alves  <palves@redhat.com>
11337
11338         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11339         (scoped_finish_thread_state): New class.
11340         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11341         cleanup.
11342         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11343         (fetch_inferior_event, normal_stop): Likewise.
11344         * thread.c (finish_thread_state_cleanup): Delete.
11345
11346 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11347             Pedro Alves  <palves@redhat.com>
11348
11349         * value.c: Include "selftest.h" and "common/array-view.h".
11350         (struct range) <operator ==>: New.
11351         (test_ranges_contain): New.
11352         (check_ranges_vector): New.
11353         (test_insert_into_bit_range_vector): New.
11354         (_initialize_values): Register selftests.
11355         * common/array-view.h (operator==, operator!=): New.
11356
11357 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11358
11359         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11360         an iterator.
11361         * inline-frame.c: Include <algorithm>.
11362         (struct inline_state): Add constructor.
11363         (inline_state_s): Remove.
11364         (DEF_VEC_O(inline_state_s)): Remove.
11365         (inline_states): Change type to std::vector.
11366         (find_inline_frame_state): Adjust to std::vector.
11367         (allocate_inline_frame_state): Remove.
11368         (clear_inline_frame_state): Adjust to std::vector.
11369         (skip_inline_frames): Adjust to std::vector.
11370
11371 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11372
11373         * tracepoint.h (struct trace_state_variable): Add constructor.
11374         <name>: Change type to std::string.
11375         * tracepoint.c (tsv_s): Remove.
11376         (DEF_VEC_O(tsv_s)): Remove.
11377         (tvariables): Change to std::vector.
11378         (create_trace_state_variable): Adjust to std::vector.
11379         (find_trace_state_variable): Likewise.
11380         (find_trace_state_variable_by_number): Likewise.
11381         (delete_trace_state_variable): Likewise.
11382         (trace_variable_command): Adjust to std::string.
11383         (delete_trace_variable_command): Likewise.
11384         (tvariables_info_1): Adjust to std::vector.
11385         (save_trace_state_variables): Likewise.
11386         (start_tracing): Likewise.
11387         (merge_uploaded_trace_state_variables): Adjust to std::vector
11388         and std::string.
11389         * target.h (struct target_ops)
11390         <to_download_trace_state_variable>: Pass reference to
11391         trace_state_variable.
11392         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11393         * target-delegates.c: Re-generate.
11394         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11395         (mi_tsv_deleted): Likewise.
11396         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11397         * remote.c (remote_download_trace_state_variable): Change
11398         pointer to reference and adjust.
11399         * make-target-delegates (parse_argtypes): Handle references.
11400         (write_function_header): Likewise.
11401         (munge_type): Likewise.
11402
11403 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11404
11405         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11406         string_view-selftests.c.
11407         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11408         testsuite.
11409         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11410         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11411         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11412         * unittests/basic_string_view/element_access/char/1.cc:
11413         Likewise.
11414         * unittests/basic_string_view/element_access/char/empty.cc:
11415         Likewise.
11416         * unittests/basic_string_view/element_access/char/front_back.cc:
11417         Likewise.
11418         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11419         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11420         Likewise.
11421         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11422         Likewise.
11423         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11424         Likewise.
11425         * unittests/basic_string_view/operations/compare/char/1.cc:
11426         Likewise.
11427         * unittests/basic_string_view/operations/compare/char/13650.cc:
11428         Likewise.
11429         * unittests/basic_string_view/operations/copy/char/1.cc:
11430         Likewise.
11431         * unittests/basic_string_view/operations/data/char/1.cc:
11432         Likewise.
11433         * unittests/basic_string_view/operations/find/char/1.cc:
11434         Likewise.
11435         * unittests/basic_string_view/operations/find/char/2.cc:
11436         Likewise.
11437         * unittests/basic_string_view/operations/find/char/3.cc:
11438         Likewise.
11439         * unittests/basic_string_view/operations/find/char/4.cc:
11440         Likewise.
11441         * unittests/basic_string_view/operations/rfind/char/1.cc:
11442         Likewise.
11443         * unittests/basic_string_view/operations/rfind/char/2.cc:
11444         Likewise.
11445         * unittests/basic_string_view/operations/rfind/char/3.cc:
11446         Likewise.
11447         * unittests/basic_string_view/operations/substr/char/1.cc:
11448         Likewise.
11449         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11450         * unittests/string_view-selftests.c: New file.
11451
11452 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11453
11454         * unittests/basic_string_view/capacity/1.cc: New file.
11455         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11456         * unittests/basic_string_view/cons/char/1.cc: New file.
11457         * unittests/basic_string_view/cons/char/2.cc: New file.
11458         * unittests/basic_string_view/cons/char/3.cc: New file.
11459         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11460         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11461         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11462         * unittests/basic_string_view/element_access/char/1.cc: New file.
11463         * unittests/basic_string_view/element_access/char/2.cc: New file.
11464         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11465         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11466         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11467         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11468         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11469         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11470         * unittests/basic_string_view/include.cc: New file.
11471         * unittests/basic_string_view/inserters/char/1.cc: New file.
11472         * unittests/basic_string_view/inserters/char/2.cc: New file.
11473         * unittests/basic_string_view/inserters/char/3.cc: New file.
11474         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11475         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11476         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11477         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11478         * unittests/basic_string_view/literals/types.cc: New file.
11479         * unittests/basic_string_view/literals/values.cc: New file.
11480         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11481         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11482         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11483         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11484         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11485         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11486         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11487         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11488         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11489         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11490         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11491         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11492         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11493         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11494         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11495         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11496         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11497         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11498         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11499         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11500         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11501         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11502         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11503         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11504         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11505         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11506         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11507         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11508         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11509         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11510         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11511         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11512         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11513         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11514         * unittests/basic_string_view/operators/char/2.cc: New file.
11515         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11516         * unittests/basic_string_view/range_access/char/1.cc: New file.
11517         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11518         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11519         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11520         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11521         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11522         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11523         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11524         * unittests/basic_string_view/typedefs.cc: New file.
11525         * unittests/basic_string_view/types/1.cc: New file.
11526
11527 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11528
11529         * common/gdb_string_view.h: Remove libstdc++ implementation
11530         details, adjust to gdb reality.
11531         * common/gdb_string_view.tcc: Likewise.
11532         * cli/cli-script.c (struct string_view): Remove.
11533         (user_args) <m_args>: Change element type to gdb::string_view.
11534         (user_args::insert_args): Adjust.
11535
11536 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11537
11538         * common/gdb_string_view.h: New file.
11539         * common/gdb_string_view.tcc: New file.
11540
11541 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11542
11543         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11544         * configure: Re-generate.
11545
11546 2018-04-09  Pedro Alves  <palves@redhat.com>
11547
11548         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11549         (set_target_gdbarch): Call
11550         gdb::observers::architecture_changed.notify instead of
11551         observer_notify_architecture_changed.
11552
11553 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11554
11555         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11556         (do_restore_current_traceframe_cleanup): Remove.
11557         (restore_current_traceframe_cleanup_dtor): Remove.
11558         (make_cleanup_restore_current_traceframe): Remove.
11559         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11560         New.
11561         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11562         * infrun.c (fetch_inferior_event): Use
11563         scoped_restore_current_traceframe.
11564
11565 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11566
11567         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11568         Remove.
11569         <n_allocated_type_units>: Remove.
11570         <all_type_units>: Change to std::vector.
11571         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11572         to std::vector change.
11573         (dwarf2_per_objfile::get_cutu): Likewise.
11574         (dwarf2_per_objfile::get_tu): Likewise.
11575         (create_signatured_type_table_from_index): Likewise.
11576         (create_signatured_type_table_from_debug_names): Likewise.
11577         (dw2_symtab_iter_next): Likewise.
11578         (dw2_print_stats): Likewise.
11579         (dw2_expand_all_symtabs): Likewise.
11580         (dw2_expand_marked_cus): Likewise.
11581         (dw2_debug_names_iterator::next): Likewise.
11582         (dwarf2_initialize_objfile): Likewise.
11583         (add_signatured_type_cu_to_table): Likewise.
11584         (create_all_type_units): Likewise.
11585         (add_type_unit): Likewise.
11586         (struct tu_abbrev_offset): Add constructor.
11587         (build_type_psymtabs_1): Adjust to std::vector change.
11588         (print_tu_stats): Likewise.
11589         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11590         (write_debug_names): Likewise.
11591
11592 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11593
11594         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11595         Make an std::vector.
11596         <n_comp_units>: Remove.
11597         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11598         to std::vector change.
11599         (dwarf2_per_objfile::get_cutu): Likewise.
11600         (dwarf2_per_objfile::get_cu): Likewise.
11601         (create_cus_from_index): Likewise.
11602         (create_addrmap_from_index): Likewise.
11603         (create_addrmap_from_aranges): Likewise.
11604         (dwarf2_read_index): Likewise.
11605         (dw2_find_last_source_symtab): Likewise.
11606         (dw2_map_symtabs_matching_filename): Likewise.
11607         (dw2_symtab_iter_next): Likewise.
11608         (dw2_print_stats): Likewise.
11609         (dw2_expand_all_symtabs): Likewise.
11610         (dw2_expand_symtabs_with_fullname): Likewise.
11611         (dw2_expand_marked_cus): Likewise.
11612         (dw2_map_symbol_filenames): Likewise.
11613         (create_cus_from_debug_names): Likewise.
11614         (dwarf2_read_debug_names): Likewise.
11615         (dw2_debug_names_iterator::next): Likewise.
11616         (dwarf2_initialize_objfile): Likewise.
11617         (set_partial_user): Likewise.
11618         (dwarf2_build_psymtabs_hard): Likewise.
11619         (read_comp_units_from_section): Remove arguments, adjust to
11620         std::vector change.
11621         (create_all_comp_units): Adjust to std::vector and
11622         read_comp_units_from_section changes.
11623         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11624         change.
11625         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11626         (psyms_seen_size): Likewise.
11627         (write_gdbindex): Likewise.
11628         (write_debug_names): Likewise.
11629
11630 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11631
11632         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11633         with dwarf2_per_objfile.
11634         (create_cus_from_index): Likewise.
11635         (create_signatured_type_table_from_index): Likewise.
11636         (dwarf2_read_index): Likewise.
11637         (dwarf2_initialize_objfile): Likewise.
11638         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11639         per_cu rather than get_dwarf2_per_objfile.
11640
11641 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11642
11643         * dwarf2read.h (struct signatured_type): Forward declare.
11644         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11645         New methods.
11646         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11647         (dw2_get_cutu): ...this.
11648         (dwarf2_per_objfile::get_cu): Rename from...
11649         (dw2_get_cu): ...this.
11650         (dwarf2_per_objfile::get_tu): New.
11651         (create_addrmap_from_index): Adjust.
11652         (create_addrmap_from_aranges): Adjust.
11653         (dw2_find_last_source_symtab): Adjust.
11654         (dw2_map_symtabs_matching_filename): Adjust.
11655         (dw2_symtab_iter_next): Adjust.
11656         (dw2_print_stats): Adjust.
11657         (dw2_expand_all_symtabs): Adjust.
11658         (dw2_expand_symtabs_with_fullname): Adjust.
11659         (dw2_expand_marked_cus): Adjust.
11660         (dw_expand_symtabs_matching_file_matcher): Adjust.
11661         (dw2_map_symbol_filenames): Adjust.
11662         (dw2_debug_names_iterator::next): Adjust.
11663         (dwarf2_initialize_objfile): Adjust.
11664         (set_partial_user): Adjust.
11665         (dwarf2_build_psymtabs_hard): Adjust.
11666
11667 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11668
11669         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11670         Remove unused variables.
11671         (dw2_map_symtabs_matching_filename): Likewise.
11672         (dwarf2_record_block_ranges): Likewise.
11673         (dwarf2_read_addr_index): Likewise.
11674         (follow_die_offset): Likewise.
11675
11676 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11677
11678         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11679         to symbol_file_add_main.
11680
11681 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11682
11683         PR mi/22299
11684         * mi/mi-console.c (do_fputc_async_safe): New.
11685         (mi_console_file::write_async_safe): New.
11686         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11687         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11688         New.
11689         * ui-file.c (ui_file::putstrn): Adjust call to
11690         fputstrn_unfiltered.
11691         * utils.c (printchar): Replace do_fputs and do_fprintf
11692         parameters by do_fputc.
11693         (fputstr_filtered): Adjust call to printchar.
11694         (fputstr_unfiltered): Likewise.
11695         (fputstrn_filtered): Likewise.
11696         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11697         printchar.
11698         * utils.h (do_fputc_ftype): New typedef.
11699         (fputstrn_unfiltered): Add do_fputc parameter.
11700
11701 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11702
11703         * regformats/i386/i386-avx.dat: Remove.
11704
11705 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11706
11707         PR gdb/22979
11708         * amd64-tdep.c (amd64_none_init_abi): New function.
11709         (amd64_x32_none_init_abi): New function.
11710         (_initialize_amd64_tdep): Register handlers for x86-64 and
11711         x64_32 with GDB_OSABI_NONE.
11712         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11713         GDB_OSABI_NONE osabi.
11714
11715 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11716
11717         PR gdb/22980
11718         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11719         GDB_OSABI_NONE.
11720         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11721         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11722
11723 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11724
11725         * common/byte-vector.h (char_vector): New type.
11726         * target.h (target_read_alloc): Return
11727         gdb::optional<byte_vector>.
11728         (target_read_stralloc): Return gdb::optional<char_vector>.
11729         (target_get_osdata): Return gdb::optional<char_vector>.
11730         * target.c (target_read_alloc_1): Templatize.  Replacement
11731         manual memory management with vector.
11732         (target_read_alloc): Change return type, adjust.
11733         (target_read_stralloc): Change return type, adjust.
11734         (target_get_osdata): Change return type, adjust.
11735         * auxv.c (struct auxv_info) <length>: Remove.
11736         <data>: Change type to gdb::optional<byte_vector>.
11737         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11738         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11739         (target_auxv_search): Adjust.
11740         (fprint_target_auxv): Adjust.
11741         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11742         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11743         (linux_make_corefile_notes): Adjust.
11744         * osdata.c (get_osdata): Adjust.
11745         * remote.c (remote_get_threads_with_qxfer): Adjust.
11746         (remote_memory_map): Adjust.
11747         (remote_traceframe_info): Adjust.
11748         (btrace_read_config): Adjust.
11749         (remote_read_btrace): Adjust.
11750         (remote_pid_to_exec_file): Adjust.
11751         * solib-aix.c (solib_aix_get_library_list): Adjust.
11752         * solib-dsbt.c (decode_loadmap): Don't free buf.
11753         (dsbt_get_initial_loadmaps): Adjust.
11754         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11755         * solib-target.c (solib_target_current_sos): Adjust.
11756         * tracepoint.c (sdata_make_value): Adjust.
11757         * xml-support.c (xinclude_start_include): Adjust.
11758         (xml_fetch_content_from_file): Adjust.
11759         * xml-support.h (xml_fetch_another): Change return type.
11760         (xml_fetch_content_from_file): Change return type.
11761         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11762         * xml-tdesc.c (file_read_description_xml): Adjust.
11763         (fetch_available_features_from_target): Change return type.
11764         (target_fetch_description_xml): Adjust.
11765         (target_read_description_xml): Adjust.
11766
11767 2018-04-06  Tom Tromey  <tom@tromey.com>
11768
11769         * value.c (~value): Update.
11770         (struct value) <contents>: Now unique_xmalloc_ptr.
11771         (value_contents_bits_eq, allocate_value_contents)
11772         (value_contents_raw, value_contents_all_raw)
11773         (value_contents_for_printing, value_contents_for_printing_const)
11774         (set_value_enclosing_type): Update.
11775
11776 2018-04-06  Tom Tromey  <tom@tromey.com>
11777
11778         * value.c (range_s): Remove typedef, VEC.
11779         (struct range): Add operator<.
11780         (range_lessthan): Remove.
11781         (ranges_contain): Change type.
11782         (~value): Update.
11783         (struct value) <unavailable, optimized_out>: Now std::vector.
11784         (value_entirely_available)
11785         (value_entirely_covered_by_range_vector)
11786         (value_entirely_unavailable, value_entirely_optimized_out):
11787         Update.
11788         (insert_into_bit_range_vector): Change argument type.
11789         (find_first_range_overlap): Likewise.
11790         (struct ranges_and_idx, value_contents_bits_eq)
11791         (require_not_optimized_out, require_available): Update.
11792         (ranges_copy_adjusted): Change argument types.
11793         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11794
11795 2018-04-06  Tom Tromey  <tom@tromey.com>
11796
11797         * value.c (~value): Update.
11798         (struct value) <parent>: Now a value_ref_ptr.
11799         (value_parent, set_value_parent, value_address, value_copy):
11800         Update.
11801
11802 2018-04-06  Tom Tromey  <tom@tromey.com>
11803
11804         * value.c (struct value): Add constructor, destructor, and member
11805         initializers.
11806         (allocate_value_lazy, value_decref): Update.
11807
11808 2018-04-06  Tom Tromey  <tom@tromey.com>
11809
11810         * value.c (struct value) <released, next>: Remove.
11811         (all_values): Now a std::vector.
11812         (allocate_value_lazy): Update.
11813         (value_next): Remove.
11814         (value_mark, value_free_to_mark, release_value)
11815         (value_release_to_mark): Update.
11816
11817 2018-04-06  Tom Tromey  <tom@tromey.com>
11818
11819         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11820         (free_value_chain): Remove.
11821         * value.c (free_value_chain): Remove.
11822         (value_release_to_mark): Return a std::vector.
11823         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11824         std::vector.
11825         (check_condition): Update.
11826         * eval.c (fetch_subexp_value): Change "val_chain" to a
11827         std::vector.
11828         * breakpoint.c (update_watchpoint): Update.
11829         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11830
11831 2018-04-06  Tom Tromey  <tom@tromey.com>
11832
11833         * value.h (free_all_values): Remove.
11834         * value.c (free_all_values): Remove.
11835
11836 2018-04-06  Tom Tromey  <tom@tromey.com>
11837
11838         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11839         (value_history_chain, value_history_count): Remove.
11840         (value_history): New global.
11841         (record_latest_value, access_value_history, show_values)
11842         (preserve_values): Update.
11843
11844 2018-04-06  Tom Tromey  <tom@tromey.com>
11845
11846         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11847         * varobj.c (varobj_set_display_format, varobj_set_value)
11848         (install_default_visualizer, construct_visualizer)
11849         (install_new_value, ~varobj, varobj_get_value_type)
11850         (my_value_of_variable, varobj_editable_p): Update.
11851         * c-varobj.c (c_describe_child, c_value_of_variable)
11852         (cplus_number_of_children, cplus_describe_child): Update.
11853         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11854         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11855         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11856
11857 2018-04-06  Tom Tromey  <tom@tromey.com>
11858
11859         * printcmd.c (last_examine_address): Change type to
11860         value_ref_ptr.
11861         (do_examine, x_command): Update.
11862
11863 2018-04-06  Tom Tromey  <tom@tromey.com>
11864
11865         * value.c (release_value): Update.
11866         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11867         (struct bpstats) <val>: Now a value_ref_ptr.
11868         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11869         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11870         (~watchpoint, print_it_watchpoint, watch_command_1)
11871         (invalidate_bp_value_on_memory_change): Update.
11872
11873 2018-04-06  Tom Tromey  <tom@tromey.com>
11874
11875         * varobj.c (varobj_clear_saved_item)
11876         (update_dynamic_varobj_children, install_new_value, ~varobj):
11877         Update.
11878         * value.h (value_incref): Move declaration earlier.
11879         (value_decref): Rename from value_free.
11880         (struct value_ref_policy): New.
11881         (value_ref_ptr): New typedef.
11882         (struct value_deleter): Remove.
11883         (gdb_value_up): Remove typedef.
11884         (release_value): Change return type.
11885         (release_value_or_incref): Remove.
11886         * value.c (set_value_parent): Update.
11887         (value_incref): Change return type.
11888         (value_decref): Rename from value_free.
11889         (value_free_to_mark, free_all_values, free_value_chain): Update.
11890         (release_value): Return value_ref_ptr.
11891         (release_value_or_incref): Remove.
11892         (record_latest_value, set_internalvar, clear_internalvar):
11893         Update.
11894         * stack.c (info_frame_command): Don't call value_free.
11895         * python/py-value.c (valpy_dealloc, valpy_new)
11896         (value_to_value_object): Update.
11897         * printcmd.c (do_examine): Update.
11898         * opencl-lang.c (lval_func_free_closure): Update.
11899         * mi/mi-main.c (register_changed_p): Don't call value_free.
11900         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11901         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11902         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11903         value_free.
11904         * guile/scm-value.c (vlscm_free_value_smob)
11905         (vlscm_scm_from_value): Update.
11906         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11907         (frame_unwind_register_unsigned, get_frame_register_bytes)
11908         (put_frame_register_bytes): Don't call value_free.
11909         * findvar.c (address_from_register): Don't call value_free.
11910         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11911         * dwarf2loc.c (entry_data_value_free_closure)
11912         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11913         (dwarf2_evaluate_loc_desc_full): Update.
11914         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11915         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11916         (~watchpoint, watch_command_1)
11917         (invalidate_bp_value_on_memory_change): Update.
11918         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11919
11920 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11921
11922         PR gdb/23022
11923         * warning.m4: Add -Wno-error=deprecated-register.
11924         * configure: Re-generate.
11925
11926 2018-04-05  Tom Tromey  <tom@tromey.com>
11927
11928         * linespec.h: Remove include of "vec.h".
11929
11930 2018-04-05  Tom Tromey  <tom@tromey.com>
11931
11932         * linespec.c (typep): Remove typedef.
11933         (find_methods, find_superclass_methods): Take a std::vector.
11934         (find_method): Use std::vector.
11935
11936 2018-04-05  Tom Tromey  <tom@tromey.com>
11937
11938         * utils.c (compare_strings): Remove.
11939         * utils.h (compare_strings): Remove.
11940         * objc-lang.h (find_imps): Update.
11941         * objc-lang.c (find_methods): Take a std::vector.
11942         (uniquify_strings, find_imps): Likewise.
11943         * linespec.c (find_methods): Take a std::vector.
11944         (decode_objc): Use std::vector.
11945         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11946         a std::vector.
11947         (find_method, find_function_symbols): Use std::vector.
11948
11949 2018-04-05  Tom Tromey  <tom@tromey.com>
11950
11951         * completer.c (completion_tracker::completion_tracker): Remove
11952         cast.
11953         (completion_tracker::discard_completions): Likewise.
11954         * breakpoint.c (ambiguous_names_p): Remove cast.
11955         * ada-lang.c (_initialize_ada_language): Remove cast.
11956         * utils.h (streq): Update.
11957         (streq_hash): Add new declaration.
11958         * utils.c (streq): Return bool.
11959         (streq_hash): New function.
11960
11961 2018-04-05  Tom Tromey  <tom@tromey.com>
11962
11963         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11964         Remove a string copy.
11965
11966 2018-04-05  Tom Tromey  <tom@tromey.com>
11967
11968         * linespec.c (filter_results): Use std::vector.
11969         (decode_line_2, decode_line_full): Update.
11970
11971 2018-04-05  Tom Tromey  <tom@tromey.com>
11972
11973         * linespec.c (canonical_to_fullform): Return std::string.
11974         (filter_results): Update.
11975         (struct decode_line_2_item): Add constructor.
11976         <fullform, displayform>: Now std::string.
11977         (decode_line_2_compare_items): Now a std::sort comparator.
11978         (decode_line_2): Update.
11979
11980 2018-04-05  Tom Tromey  <tom@tromey.com>
11981
11982         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11983         (unexpected_linespec_error): Update.
11984         (linespec_parse_basic, parse_linespec): Update.
11985
11986 2018-04-05  Tom Tromey  <tom@tromey.com>
11987
11988         * linespec.c (linespec_parse_basic): Reindent.
11989
11990 2018-04-05  Tom Tromey  <tom@tromey.com>
11991
11992         * minsyms.h (iterate_over_minimal_symbols): Update.
11993         * minsyms.c (iterate_over_minimal_symbols): Take a
11994         gdb::function_view.
11995         * linespec.c (struct collect_minsyms): Remove.
11996         (compare_msyms): Now a std::sort comparator.
11997         (add_minsym): Add parameters.
11998         (search_minsyms_for_name): Update.  Use std::vector.
11999
12000 2018-04-03  Tom Tromey  <tom@tromey.com>
12001
12002         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12003         gdb::byte_vector.
12004
12005 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12006
12007         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12008
12009 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12010
12011         PR gdb/16959
12012         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12013         printing static type.
12014
12015 2018-04-01  Tom Tromey  <tom@tromey.com>
12016
12017         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12018         (rs6000_xfer_shared_libraries): Update.
12019
12020 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12021
12022         * common/gdb_vecs.h (char_ptr): Remove.
12023         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12024
12025 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12026
12027         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12028         with std::vector.
12029         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12030
12031 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12032
12033         * tracepoint.h (struct uploaded_tp): Initialize fields.
12034         <actions, step_actions, cmd_strings>: Change type to
12035         std::vector<char *>.
12036         * tracepoint.c (get_uploaded_tp): Allocate with new.
12037         (free_uploaded_tps): Free with delete.
12038         (parse_tracepoint_definition): Adjust to std::vector change.
12039         * breakpoint.c (read_uploaded_action): Likewise.
12040         (create_tracepoint_from_upload): Likewise.
12041         * ctf.c (ctf_write_uploaded_tp): Likewise.
12042         (SET_ARRAY_FIELD): Likewise.
12043         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12044
12045 2018-03-30  Tom Tromey  <tom@tromey.com>
12046
12047         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12048         std::unique_ptr.
12049         (svr4_keep_data_in_core): Update.
12050         (svr4_read_so_list): Update.
12051
12052 2018-03-30  Tom Tromey  <tom@tromey.com>
12053
12054         * windows-nat.c (handle_output_debug_string, handle_exception):
12055         Update.
12056         * target.h (target_read_string): Update.
12057         * target.c (target_read_string): Change "string" to
12058         unique_xmalloc_ptr.
12059         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12060         Update.
12061         * solib-frv.c (frv_current_sos): Update.
12062         * solib-dsbt.c (dsbt_current_sos): Update.
12063         * solib-darwin.c (darwin_current_sos): Update.
12064         * linux-thread-db.c (inferior_has_bug): Update.
12065         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12066         Update.  Remove alloca.
12067         * ada-lang.c (ada_main_name): Update.
12068
12069 2018-03-30  Tom Tromey  <tom@tromey.com>
12070
12071         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12072         (struct dwo_file_deleter): New.
12073         (dwo_file_up): New typedef.
12074         (open_and_init_dwo_file): Use dwo_file_up.
12075         (free_dwo_file_cleanup): Remove.
12076
12077 2018-03-30  Tom Tromey  <tom@tromey.com>
12078
12079         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12080         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12081
12082 2018-03-30  Tom Tromey  <tom@tromey.com>
12083
12084         * dwarf2read.c (class free_cached_comp_units): New class.
12085         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12086         (free_cached_comp_units): Remove function.
12087
12088 2018-03-30  Tom Tromey  <tom@tromey.com>
12089
12090         * utils.h (make_cleanup_unpush_target): Remove.
12091         * inf-ptrace.c (struct target_unpusher): New.
12092         (target_unpush_up) New typedef.
12093         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12094         target_unpush_up.
12095         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12096
12097 2018-03-27  Tom Tromey  <tom@tromey.com>
12098
12099         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12100
12101 2018-03-27  Pedro Alves  <palves@redhat.com>
12102             Tom Tromey  <tom@tromey.com>
12103
12104         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12105         destructor.  Now a class.
12106         (gdb_readline_wrapper_cleanup): Remove function.
12107         (gdb_readline_wrapper): Remove cleanups.
12108
12109 2018-03-27  Tom Tromey  <tom@tromey.com>
12110
12111         * typeprint.h (struct type_print_options) <local_typedefs,
12112         global_typedefs>: Remove "struct" keyword.
12113         (class typedef_hash_table): New class.
12114         (recursively_update_typedef_hash, add_template_parameters)
12115         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12116         (find_typedef_in_hash): Don't declare.
12117         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12118         (typedef_hash_table::recursively_update): Rename from
12119         recursively_update_typedef_hash.  Now a member.
12120         (typedef_hash_table::add_template_parameters): Rename from
12121         add_template_parameters.  Now a member.
12122         (typedef_hash_table::typedef_hash_table): Now a constructor;
12123         rename from create_typedef_hash.
12124         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12125         rename from free_typedef_hash.
12126         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12127         (do_free_global_table): Remove.
12128         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12129         from copy_type_recursive.
12130         (create_global_typedef_table): Remove.
12131         (typedef_hash_table::find_global_typedef): Now a member of
12132         typedef_hash_table.
12133         (typedef_hash_table::find_typedef): Rename from
12134         find_typedef_in_hash; now a member.
12135         (whatis_exp): Update.
12136         * extension.h (struct ext_lang_type_printers): Add constructor and
12137         destructor.
12138         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12139         declare.
12140         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12141         Now a constructor; rename from start_ext_lang_type_printers.
12142         (ext_lang_type_printers): Now a destructor; rename from
12143         free_ext_lang_type_printers.
12144         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12145         Update.
12146         (c_type_print_base_struct_union): Update.  Remove cleanups.
12147
12148 2018-03-27  Tom Tromey  <tom@tromey.com>
12149
12150         * dwarf-index-write.c: Include <cmath>.
12151
12152 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12153
12154         * NEWS: Add entry describing new "set|show varsize-limit" command.
12155         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12156         command.
12157         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12158         "set variable".
12159
12160 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12161
12162         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12163         dwarf-index-write.c
12164         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12165         * dwarf-index-common.c: New file.
12166         * dwarf-index-common.h: New file.
12167         * dwarf-index-write.c: New file.
12168         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12169         (struct dwarf2_section_info): Move from here.
12170         (dwarf2_section_info_def): Likewise.
12171         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12172         (offset_type): Likewise.
12173         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12174         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12175         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12176         (byte_swap): Likewise.
12177         (MAYBE_SWAP): Likewise.
12178         (dwarf2_per_cu_ptr): Likewise.
12179         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12180         (struct tu_stats): Likewise.
12181         (struct dwarf2_per_objfile): Likewise.
12182         (struct dwarf2_per_cu_data): Likewise.
12183         (struct signatured_type): Likewise.
12184         (sig_type_ptr): Likewise.
12185         (DEF_VEC_P (sig_type_ptr)): Likewise.
12186         (INDEX4_SUFFIX): Likewise.
12187         (INDEX5_SUFFIX): Likewise.
12188         (DEBUG_STR_SUFFIX): Likewise.
12189         (dwarf2_read_section): Make non-static.
12190         (mapped_index_string_hash): Move from here.
12191         (dwarf5_djb_hash): Likewise.
12192         (file_write): Likewise.
12193         (class data_buf): Likewise.
12194         (struct symtab_index_entry): Likewise.
12195         (struct mapped_symtab): Likewise.
12196         (find_slot): Likewise.
12197         (hash_expand): Likewise.
12198         (add_index_entry): Likewise.
12199         (uniquify_cu_indices): Likewise.
12200         (class c_str_view): Likewise.
12201         (class c_str_view_hasher): Likewise.
12202         (class vector_hasher): Likewise.
12203         (write_hash_table): Likewise.
12204         (psym_index_map): Likewise.
12205         (struct addrmap_index_data): Likewise.
12206         (add_address_entry): Likewise.
12207         (add_address_entry_worker): Likewise.
12208         (write_address_map): Likewise.
12209         (symbol_kind): Likewise.
12210         (write_psymbols): Likewise.
12211         (struct signatured_type_index_data): Likewise.
12212         (write_one_signatured_type): Likewise.
12213         (recursively_count_psymbols): Likewise.
12214         (recursively_write_psymbols): Likewise.
12215         (class debug_names): Likewise.
12216         (check_dwarf64_offsets): Likewise.
12217         (psyms_seen_size): Likewise.
12218         (write_gdbindex): Likewise.
12219         (write_debug_names): Likewise.
12220         (assert_file_size): Likewise.
12221         (write_psymtabs_to_index): Likewise.
12222         (save_gdb_index_command): Likewise.
12223         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12224         command.
12225         * dwarf2read.h: New file.
12226
12227 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12228
12229         PR gdb/22670
12230         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12231         symbol name if the CU's language stores symbol names in linkage
12232         format.
12233         * language.h (struct language_defn)
12234         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12235         all instances of this struct.
12236
12237 2018-03-26  Tom Tromey  <tom@tromey.com>
12238
12239         * stack.c (backtrace_command_1): Remove verbose code.
12240
12241 2018-03-26  Tom Tromey  <tom@tromey.com>
12242
12243         * python/py-framefilter.c (py_print_type): Don't catch
12244         exceptions.  Return void.
12245         (py_print_value): Likewise.
12246         (py_print_single_arg): Likewise.
12247         (enumerate_args): Don't catch exceptions.
12248         (py_print_args): Likewise.
12249         (py_print_frame): Likewise.
12250         (gdbpy_apply_frame_filter): Catch exceptions here.
12251
12252 2018-03-26  Tom Tromey  <tom@tromey.com>
12253
12254         * stack.c (_initialize_stack): Remove trailing newlines from help
12255         text.  Add "Usage" line to "backtrace" help.
12256
12257 2018-03-26  Tom Tromey  <tom@tromey.com>
12258
12259         PR python/16486:
12260         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12261
12262 2018-03-26  Tom Tromey  <tom@tromey.com>
12263
12264         * python/py-framefilter.c (py_print_single_arg): Return
12265         EXT_LANG_BT_ERROR from catch.
12266
12267 2018-03-26  Tom Tromey  <tom@tromey.com>
12268
12269         PR backtrace/15584:
12270         * stack.c (backtrace_command_1): Move some code into no-filters
12271         "if".
12272
12273 2018-03-26  Tom Tromey  <tom@tromey.com>
12274
12275         * python/py-framefilter.c (throw_quit_or_print_exception): New
12276         function.
12277         (gdbpy_apply_frame_filter): Use it.
12278
12279 2018-03-26  Tom Tromey  <tom@tromey.com>
12280
12281         PR cli/17716:
12282         * python/py-framefilter.c (py_print_type, py_print_value)
12283         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12284         RETURN_MASK_ERROR.
12285
12286 2018-03-26  Tom Tromey  <tom@tromey.com>
12287
12288         * python/py-framefilter.c (enumerate_args): Use
12289         gdb::unique_xmalloc_ptr.
12290
12291 2018-03-26  Tom Tromey  <tom@tromey.com>
12292
12293         * python/py-framefilter.c (py_print_frame): Return
12294         EXT_LANG_BT_OK.
12295         (gdbpy_apply_frame_filter): Update comment.
12296         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12297         Remove.
12298         <EXT_LANG_BT_NO_FILTERS>: Change value.
12299
12300 2018-03-26  Tom Tromey  <tom@tromey.com>
12301
12302         PR backtrace/15582:
12303         * stack.c (backtrace_command): Parse "hide" argument.
12304         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12305         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12306         constant.
12307
12308 2018-03-26  Tom Tromey  <tom@tromey.com>
12309
12310         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12311         add "flags".
12312         (backtrace_command): Remove "fulltrace", add "flags".
12313
12314 2018-03-26  Tom Tromey  <tom@tromey.com>
12315
12316         * stack.c (backtrace_command): Rewrite command line parsing.
12317
12318 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12319
12320         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12321
12322 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12323
12324         * filename-seen-cache.h: Add include guard.
12325
12326 2018-03-26  Keith Seitz  <keiths@redhat.com>
12327
12328         * symfile.c (place_section): Remove "struct" from section_addr_info
12329         in comment.
12330         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12331         "struct" keyword from section_addr_info.
12332
12333 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12334
12335         * regformats/regdef.h (reg): Add constructors.
12336
12337 2018-03-25  Pedro Alves  <palves@redhat.com>
12338
12339         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12340         if then/else bodies in var_func_name extraction.
12341
12342 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12343
12344         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12345         lookup_minimal_symbol() to find symbol entry.
12346         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12347
12348 2018-03-23  Keith Seitz  <keiths@redhat.com>
12349
12350         PR c++/22968
12351         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12352         nested type definitions for C++, too.
12353
12354 2018-03-23  Tom Tromey  <tom@tromey.com>
12355
12356         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12357         a typedef.
12358         (macho_register_oso): Remove.
12359         (macho_symtab_read): Take a std::vector.
12360         (oso_el_compare_name): Now a std::sort comparator.
12361         (macho_symfile_read_all_oso): Take a std::vector.
12362         (macho_symfile_read): Use std::vector.  Remove cleanups.
12363
12364 2018-03-22  Tom Tromey  <tom@tromey.com>
12365
12366         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12367         (record_full_goto_bookmark): Use std::string.
12368
12369 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12370
12371         PR tdep/18295
12372         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12373         a single mask.
12374
12375 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12376
12377         * rs6000-tdep.c (store_insn_p): New function.
12378         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12379         and cr_reg to their unshifted values. Use store_insn_p to
12380         match LR saves using either R1 or fdata->alloca_reg. Use
12381         store_insn_p to match CR saves. Set alloca_reg_offset
12382         when alloca_reg and framep are set. Remove lr_reg shift
12383         when assigning to fdata->lr_register.
12384
12385 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12386
12387         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12388         command line args instead of emitting a warning.
12389
12390 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12391
12392         * tracepoint.h (struct static_tracepoint_marker): Initialize
12393         fields, define default constructor, move constructor and move
12394         assignment, disable the rest.
12395         <str_id, extra>: Make std::string.
12396         (release_static_tracepoint_marker): Remove.
12397         (free_current_marker): Remove.
12398         * tracepoint.c (free_current_marker): Remove.
12399         (parse_static_tracepoint_marker_definition): Adjust to
12400         std::string, use new hex2str overload.
12401         (release_static_tracepoint_marker): Remove.
12402         (print_one_static_tracepoint_marker): Get marker by reference
12403         and adjust to std::string.
12404         (info_static_tracepoint_markers_command): Adjust to std::vector
12405         changes
12406         * target.h (static_tracepoint_marker_p): Remove typedef.
12407         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12408         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12409         bool.
12410         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12411         * target-debug.h
12412         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12413         (target_debug_print_std_vector_static_tracepoint_marker): New.
12414         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12415         to...
12416         (target_debug_print_static_tracepoint_marker_p): ... this.
12417         * target-delegates.c: Re-generate.
12418         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12419         Make std::string.
12420         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12421         (decode_static_tracepoint_spec): Adjust to std::vector.
12422         (tracepoint_print_one_detail): Adjust to std::string.
12423         (strace_marker_decode_location): Adjust to std::string.
12424         (update_static_tracepoint): Adjust to std::string, remove call
12425         to release_static_tracepoint_marker.
12426         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12427         Adjust to std::vector.
12428         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12429         (remote_static_tracepoint_markers_by_strid): Adjust to
12430         std::vector.
12431         * common/rsp-low.h (hex2str): New overload with explicit count
12432         of bytes.
12433         * common/rsp-low.c (hex2str): New overload with explicit count
12434         of bytes.
12435         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12436         (_initialize_rsp_low_selftests): Add test_hex2str test.
12437         * unittests/tracepoint-selftests.c
12438         (test_parse_static_tracepoint_marker_definition): Adjust to
12439         std::string.
12440
12441 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12442
12443         * tracepoint.c (parse_static_tracepoint_marker_definition):
12444         Consider case where the definition is followed by more
12445         definitions.
12446         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12447         tracepoint-selftests.c.
12448         * unittests/tracepoint-selftests.c: New.
12449
12450 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12451
12452         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12453         Carvalho.
12454
12455 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12456
12457         * symtab.c (find_pc_sect_line): fixed indentation.
12458
12459 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12460
12461         * symtab.c (find_pc_sect_line): now uses binary search.
12462
12463 2018-03-19  Tom Tromey  <tom@tromey.com>
12464
12465         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12466         "IDENT" production.
12467
12468 2018-03-19  Pedro Alves  <palves@redhat.com>
12469             Tom Tromey  <tom@tromey.com>
12470
12471         * unittests/observable-selftests.c: New file.
12472         * common/observable.h: New file.
12473         * observable.h: New file.
12474         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12475         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12476         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12477         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12478         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12479         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12480         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12481         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12482         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12483         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12484         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12485         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12486         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12487         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12488         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12489         tui/tui-interp.c, valops.c: Update all users.
12490         * tui/tui-hooks.c (tui_bp_created_observer)
12491         (tui_bp_deleted_observer, tui_bp_modified_observer)
12492         (tui_inferior_exit_observer, tui_before_prompt_observer)
12493         (tui_normal_stop_observer, tui_register_changed_observer):
12494         Remove.
12495         (tui_observers_token): New global.
12496         (attach_or_detach, tui_attach_detach_observers): New functions.
12497         (tui_install_hooks, tui_remove_hooks): Use
12498         tui_attach_detach_observers.
12499         * record-btrace.c (record_btrace_thread_observer): Remove.
12500         (record_btrace_thread_observer_token): New global.
12501         * observer.sh: Remove.
12502         * observer.c: Rename to observable.c.
12503         * observable.c (namespace gdb_observers): Define new objects.
12504         (observer_debug): Move into gdb_observers namespace.
12505         (struct observer, struct observer_list, xalloc_observer_list_node)
12506         (xfree_observer_list_node, generic_observer_attach)
12507         (generic_observer_detach, generic_observer_notify): Remove.
12508         (_initialize_observer): Update.
12509         Don't include observer.inc.
12510         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12511         (clean mostlyclean): Likewise.
12512         (observer.h, observer.inc): Remove targets.
12513         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12514         (COMMON_SFILES): Use observable.c, not observer.c.
12515         * .gitignore: Remove observer.h.
12516
12517 2018-03-18  Tom Tromey  <tom@tromey.com>
12518
12519         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12520         gdb::def_vector.
12521         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12522
12523 2018-03-17  Tom Tromey  <tom@tromey.com>
12524
12525         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12526
12527 2018-03-17  Tom Tromey  <tom@tromey.com>
12528
12529         * target.c (class scoped_target_fd): New.
12530         (target_fileio_close_cleanup): Remove.
12531         (target_fileio_read_alloc_1): Use scoped_target_fd.
12532
12533 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12534
12535         * silent-rules.mk: New.
12536         * Makefile.in: Include silent-rules.mk
12537         (srcdir, VPATH, top_srcdir): Move up.
12538         (COMPILE): Add ECHO_CXX.
12539         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12540         (init.c): Add ECHO_INIT_C.
12541         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12542         (version.c): Add ECHO_GEN.
12543         (printcmd.o): Add ECHO_CXX.
12544         (target-float.o): Add ECHO_CXX.
12545         (ada-exp.o): Add ECHO_CXX.
12546         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12547         (insight$(EXEEXT)): Add ECHO_CXXLD.
12548         * gnulib/configure.ac: Add AM_SILENT_RULES.
12549         * gnulib/aclocal.m4: Re-generate.
12550         * gnulib/configure: Re-generate.
12551         * gnulib/import/Makefile.in: Re-generate.
12552
12553 2018-03-16  Tom Tromey  <tom@tromey.com>
12554
12555         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12556         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12557         * utils.c (do_free_section_addr_info)
12558         (make_cleanup_free_section_addr_info): Remove.
12559         * symfile.h (struct other_sections): Add constructor.
12560         (struct section_addr_info): Remove.
12561         (section_addr_info): New typedef.
12562         (struct sym_fns) <sym_offsets>: Change type of parameter.
12563         (build_section_addr_info_from_objfile)
12564         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12565         (default_symfile_offsets, symbol_file_add)
12566         (symbol_file_add_from_bfd)
12567         (build_section_addr_info_from_section_table): Update.
12568         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12569         * symfile.c (alloc_section_addr_info): Remove.
12570         (build_section_addr_info_from_section_table): Change return type.
12571         Update.
12572         (build_section_addr_info_from_bfd)
12573         (build_section_addr_info_from_objfile): Likewise.
12574         (free_section_addr_info): Remove.
12575         (relative_addr_info_to_section_offsets): Change type of "addrs".
12576         (addrs_section_compar): Now a std::sort comparator.
12577         (addrs_section_sort): Change return type.
12578         (addr_info_make_relative): Change type of "addrs".  Update.
12579         (default_symfile_offsets, syms_from_objfile_1)
12580         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12581         (symbol_file_add_separate): Update.
12582         (symbol_file_add): Change type of "addrs".  Update.
12583         (add_symbol_file_command): Update.  Remove cleanups.
12584         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12585         cleanups.
12586         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12587         * solib.c (solib_read_symbols): Update.
12588         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12589         * machoread.c (macho_symfile_offsets): Update.
12590         * jit.c (jit_bfd_try_read_symtab): Update.
12591
12592 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12593
12594         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12595         unittests/utils-selftests.c.
12596         * unittests/utils-selftests.c: New file.
12597
12598 2018-03-14  Tom Tromey  <tom@tromey.com>
12599
12600         PR cli/14977:
12601         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12602         for NULL.
12603
12604 2018-03-14  Tom Tromey  <tom@tromey.com>
12605
12606         PR cli/19918:
12607         * printcmd.c (printf_pointer): Allow "-" in format.
12608
12609 2018-03-14  Tom Tromey  <tom@tromey.com>
12610
12611         * printcmd.c (_initialize_printcmd): Add usage to printf.
12612
12613 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12614
12615         * MAINTAINERS: Update my email address.
12616
12617 2018-03-13  Tom Tromey  <tom@tromey.com>
12618
12619         * machoread.c (macho_check_dsym): Change filenamep to a
12620         std::string*.
12621         (macho_symfile_read): Update.
12622         * symfile.c (load_command): Use std::string.
12623
12624 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12625
12626         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12627         to error message string.
12628         (riscv_register_name): Use xsnprintf instead of sprintf.
12629         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12630         internal_error.
12631         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12632         error.
12633         (riscv_push_dummy_call): Likewise.
12634
12635 2018-03-12  Tom Tromey  <tom@tromey.com>
12636
12637         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12638         Use gdb::byte_vector.
12639         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12640
12641 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12642
12643         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12644         parameter type to readable_regcache.
12645         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12646         the declaration.
12647
12648 2018-03-11  Tom Tromey  <tom@tromey.com>
12649
12650         * dwarf2read.c (struct nextfield): Add initializers.
12651         (struct nextfnfield): Remove.
12652         (struct fnfieldlist): Add initializers.  Remove "length" and
12653         "head", use std::vector.
12654         (struct decl_field_list): Remove.
12655         (struct field_info): Add initializers.
12656         <fields, baseclasses>: Now std::vector.
12657         <nbaseclasses, nfnfields, typedef_field_list_count,
12658         nested_types_list_count>: Remove.
12659         (dwarf2_add_field, dwarf2_add_type_defn)
12660         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12661         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12662         (process_structure_scope): Update.
12663
12664 2018-03-11  Tom Tromey  <tom@tromey.com>
12665
12666         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12667         for use by std::sort.
12668         (build_type_psymtabs_1): Use std::vector.
12669
12670 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12671
12672         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12673         and LIBMPFR in the printed configuration.
12674
12675 2018-03-08  Tom Tromey  <tom@tromey.com>
12676
12677         * source.c (get_filename_and_charpos): Use scoped_fd.
12678         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12679         (procfs_pidlist): Likewise.
12680         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12681         (iterate_over_mappings): Likewise.
12682
12683 2018-03-08  Tom Tromey  <tom@tromey.com>
12684
12685         * infcall.c (struct call_return_meta_info)
12686         <stack_temporaries_enabled>: Remove.
12687         (get_call_return_value, call_function_by_hand_dummy): Update.
12688         * thread.c (disable_thread_stack_temporaries): Remove.
12689         (enable_thread_stack_temporaries): Remove.
12690         (thread_stack_temporaries_enabled_p): Return bool.
12691         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12692         (get_last_thread_stack_temporary): Update.
12693         * eval.c (evaluate_subexp): Update.
12694         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12695         class, not a function.
12696         (value_ptr, value_vec): Remove typedefs.
12697         (class thread_info) <stack_temporaries_enabled>: Now bool.
12698         <stack_temporaries>: Now a std::vector.
12699         (thread_stack_temporaries_enabled_p)
12700         (value_in_thread_stack_temporaries): Return bool.
12701
12702 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12703
12704         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12705         (getpkt_or_notif_sane_1): Likewise.
12706
12707 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12708
12709         * build-id.c (build_id_to_debug_bfd): Use std::string.
12710
12711 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12712
12713         * build-id.c (find_separate_debug_file_by_buildid): Return
12714         std::string.
12715         * build-id.h (find_separate_debug_file_by_buildid): Return
12716         std::string.
12717         * coffread.c (coff_symfile_read): Adjust to std::string.
12718         * elfread.c (elf_symfile_read): Adjust to std::string.
12719         * symfile.c (separate_debug_file_exists): Change parameter to
12720         std::string.
12721         (find_separate_debug_file): Return std::string.
12722         (find_separate_debug_file_by_debuglink): Return std::string.
12723         * symfile.h (find_separate_debug_file_by_debuglink): Return
12724         std::string.
12725
12726 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12727
12728         * common/xml-utils.c (xml_escape_text): Move code to...
12729         (xml_escape_text_append): ... this new function.
12730         * common/xml-utils.h (xml_escape_text_append): New declaration.
12731         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12732         New function.
12733         (_initialize_xml_utils): register test_xml_escape_text_append as
12734         a selftest.
12735
12736 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12737
12738         * defs.h: Remove MAX_REGISTER_SIZE.
12739         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12740         asserts.
12741         * python/py-unwind.c (pyuw_sniffer): Likewise.
12742
12743 2018-03-07  Tom Tromey  <tom@tromey.com>
12744
12745         * linux-tdep.c (linux_info_proc): Update.
12746         * target.h (struct target_ops) <to_fileio_readlink>: Return
12747         optional<string>.
12748         (target_fileio_readlink): Return optional<string>.
12749         * remote.c (remote_hostio_readlink): Return optional<string>.
12750         * inf-child.c (inf_child_fileio_readlink): Return
12751         optional<string>.
12752         * target.c (target_fileio_readlink): Return optional<string>.
12753
12754 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12755
12756         * regcache.c (cooked_read_test): Add riscv to the list of
12757         architectures that have a save_reggroup.
12758
12759 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12760
12761         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12762         value is not a dynamic class object.
12763
12764 2018-03-06  Tom Tromey  <tom@tromey.com>
12765
12766         * rust-exp.y: Formatting fixes.
12767
12768 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12769
12770         * riscv-tdep.c (riscv_register_name): Remove target description
12771         support.
12772         (riscv_gdbarch_init): Remove target description check.
12773
12774 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12775
12776         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12777         comment.
12778         * riscv-tdep.h: Likewise.
12779
12780 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12781
12782         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12783         (riscv_pseudo_register_write): Delete.
12784         (riscv_gdbarch_init): Remove all use of pseudo registers.
12785
12786 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12787
12788         * record-btrace.c (btrace_print_lines): Replace cleanup
12789         parameter with RAII equivalents.
12790         (btrace_insn_history): Replace cleanup with RAII equivalents.
12791         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12792         make_cleanup_ui_out_tuple_begin_end): Remove.
12793         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12794         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12795         make_cleanup_ui_out_list_begin_end): Remove.
12796
12797 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12798
12799         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12800         parameter types to std::vector.  Use bool.
12801         (record_btrace_wait): Replace VEC(tp_t) with
12802         std::vector<thread_info *>.
12803         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12804
12805 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12806
12807         * record-btrace.c (record_btrace_disable_callback): Remove.
12808         (struct scoped_btrace_disable): New.
12809         (record_btrace_open): Use scoped_btrace_disable.
12810
12811 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12812
12813         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12814         reading values from registers.
12815
12816 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12817
12818         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12819         where appropriate.
12820
12821 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12822
12823         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12824         change parameter type.  Use GDB's print functions, and use
12825         core_addr_to_string where appropriate.
12826         (riscv_push_dummy_call): Use core_addr_to_string where
12827         appropriate, update call to riscv_print_arg_location, and reindent
12828         a few lines.
12829         (riscv_return_value): Update call to riscv_print_arg_location.
12830
12831 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12832             Tim Newsome <tim@sifive.com>
12833             Albert Ou <a0u@eecs.berkeley.edu>
12834             Darius Rad <darius@bluespec.com>
12835
12836         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12837         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12838         (ALLDEPFILES): Add riscv-tdep.c
12839         * configure.tgt: Add riscv support.
12840         * riscv-tdep.c: New file.
12841         * riscv-tdep.h: New file.
12842         * NEWS: Mention new target.
12843         * MAINTAINERS: Add entry for riscv.
12844
12845 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12846
12847         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12848         fields within aggregates.
12849
12850 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12851
12852         * record-btrace.c (btrace_print_lines): Change type of flags to
12853         gdb_disassembly_flags.
12854
12855 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12856
12857         * fbsd-nat.c: Include "inf-ptrace.h".
12858         (USE_SIGTRAP_SIGINFO): Conditionally define.
12859         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12860         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12861         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12862         function.
12863         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12864         Likewise.
12865         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12866         Likewise.
12867         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12868         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12869         "supports_stopped_by_hw_breakpoint" target methods.
12870
12871 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12872
12873         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12874         * fbsd-nat.c (debug_fbsd_nat): New variable.
12875         (show_fbsd_nat_debug): New function.
12876         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12877         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12878
12879 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12880
12881         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12882         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12883         prototype.
12884         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12885         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12886         method.
12887
12888 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12889
12890         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12891         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12892
12893 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12894
12895         * charset.c (struct charset_vector): New.
12896         (charsets): Change type to charset_vector.
12897         (find_charset_names): Adjust.
12898         (add_one): Adjust.
12899         (_initialize_charset): Adjust.
12900
12901 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12902
12903         * progspace.h (struct program_space) <deleted_solibs>: Change
12904         type to std::vector<std::string>.
12905         * progspace.c (clear_program_space_solib_cache): Adjust.
12906         * breakpoint.c (print_solib_event): Adjust.
12907         (check_status_catch_solib): Adjust.
12908         * solib.c (update_solib_list): Adjust.
12909         * ui-out.h (class ui_out) <field_string>: New overload.
12910         * ui-out.c (ui_out::field_string): New overload.
12911
12912 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12913
12914         * progspace.h (struct program_space): Add constructor and
12915         destructor, initialize fields.
12916         (add_program_space): Remove.
12917         * progspace.c (add_program_space): Rename to...
12918         (program_space::program_space): ... this.
12919         (release_program_space): Rename to...
12920         (program_space::~program_space): ... this.
12921         (delete_program_space): Use delete to delete program_space.
12922         (initialize_progspace): Use new to allocate program_space.
12923         * inferior.c (add_inferior_with_spaces): Likewise.
12924         (clone_inferior_command): Likewise.
12925         * infrun.c (follow_fork_inferior): Likewise.
12926         (handle_vfork_child_exec_or_exit): Likewise.
12927
12928 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12929
12930         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12931         (delim_string_to_char_ptr_vec): Return std::vector of
12932         gdb::unique_xmalloc_ptr.
12933         (dirnames_to_char_ptr_vec_append): Take std::vector of
12934         gdb::unique_xmalloc_ptr.
12935         (dirnames_to_char_ptr_vec): Return std::vector of
12936         gdb::unique_xmalloc_ptr.
12937         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12938         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12939         (delim_string_to_char_ptr_vec): Return an std::vector of
12940         gdb::unique_xmalloc_ptr, adjust the code.
12941         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12942         gdb::unique_xmalloc_ptr, adjust the code.
12943         (dirnames_to_char_ptr_vec): Return an std::vector of
12944         gdb::unique_xmalloc_ptr, adjust the code.
12945         * auto-load.c (auto_load_safe_path_vec): Change type to
12946         std::vector of gdb::unique_xmalloc_ptr.
12947         (auto_load_expand_dir_vars): Return an std::vector of
12948         gdb::unique_xmalloc_ptr, adjust the code.
12949         (auto_load_safe_path_vec_update): Adjust.
12950         (filename_is_in_auto_load_safe_path_vec): Adjust.
12951         (auto_load_objfile_script_1): Adjust.
12952         * build-id.c (build_id_to_debug_bfd): Adjust.
12953         * linux-thread-db.c (thread_db_load_search): Adjust.
12954         * source.c (add_path): Adjust.
12955         (openp): Adjust.
12956         * symfile.c (find_separate_debug_file): Adjust.
12957         * utils.c (do_free_char_ptr_vec): Remove.
12958         (make_cleanup_free_char_ptr_vec): Remove.
12959
12960 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12961
12962         PR gdb/22907
12963         * common/pathstuff.c: Conditionally include "<windows.h>".
12964
12965 2018-03-01  Georg Sauthoff  <mail@georg.so>
12966
12967         PR gdb/22888
12968         * gcore.in: Quote variables and switch interpreter to bash.
12969
12970 2018-03-01  Tom Tromey  <tom@tromey.com>
12971
12972         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12973         assertion.  Add assertion for discriminant_index.
12974         (quirk_rust_enum): Use correct base type name in univariant case.
12975
12976 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12977
12978         * record.c (get_call_history_modifiers): Return a
12979         record_print_flags.
12980         (cmd_record_call_history): Adjust.
12981         * record-btrace.c (record_btrace_call_history): Adjust.
12982         (record_btrace_call_history_range): Adjust.
12983         (record_btrace_call_history_from): Adjust.
12984         * target-debug.h (target_debug_print_record_print_flags): New.
12985         * target-delegates.c: Re-generate.
12986         * target.c (target_call_history): Change flags type.
12987         (target_call_history_from): Likewise.
12988         (target_call_history_range): Likewise.
12989         * target.h (struct target_ops) <target_call_history>: Likewise.
12990         (target_call_history_from): Likewise.
12991         (target_call_history_range): Likewise.
12992
12993 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12994             Simon Marchi  <simon.marchi@polymtl.ca>
12995
12996         * common/common-utils.c: Include "sys/stat.h".
12997         (is_regular_file): Move here from "source.c"; change return
12998         type to "bool".
12999         * common/common-utils.h (is_regular_file): New prototype.
13000         * common/pathstuff.c (contains_dir_separator): New function.
13001         * common/pathstuff.h (contains_dir_separator): New prototype.
13002         * source.c: Don't include "sys/stat.h".
13003         (is_regular_file): Move to "common/common-utils.c".
13004
13005 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13006
13007         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13008         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13009         * auto-load.c: Include "common/pathstuff.h".
13010         * common/common-def.h (current_directory): Move here.
13011         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13012         function.
13013         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13014         prototype.
13015         * common/pathstuff.c: New file.
13016         * common/pathstuff.h: New file.
13017         * compile/compile.c: Include "common/pathstuff.h".
13018         * defs.h (current_directory): Move to "common/common-defs.h".
13019         * dwarf2read.c: Include "common/pathstuff.h".
13020         * exec.c: Likewise.
13021         * guile/scm-safe-call.c: Likewise.
13022         * linux-thread-db.c: Likewise.
13023         * main.c: Likewise.
13024         * nto-tdep.c: Likewise.
13025         * objfiles.c: Likewise.
13026         * source.c: Likewise.
13027         * symtab.c: Likewise.
13028         * utils.c: Include "common/pathstuff.h".
13029         (gdb_realpath): Move to "common/pathstuff.c".
13030         (gdb_realpath_keepfile): Likewise.
13031         (gdb_abspath): Likewise.
13032         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13033         (gdb_realpath_keepfile): Likewise.
13034         (gdb_abspath): Likewise.
13035
13036 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13037
13038         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13039         wildcard process pid for super_resume for kernels with a
13040         specific bug.
13041
13042 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13043
13044         * compile/compile.c (get_args): Add additional comments
13045         explaining function.
13046
13047 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13048             Tom Tromey  <tom@tromey.com>
13049
13050         * target.h (memory_write_request_s): Remove typedef.  Don't define
13051         VEC.
13052         (target_write_memory_blocks): Change argument to std::vector.
13053         (struct memory_write_request): Add constructor.
13054         * target-memory.c (compare_block_starting_address): Return bool.
13055         Change argument types.
13056         (claim_memory): Change arguments to use std::vector.
13057         (split_regular_and_flash_blocks, blocks_to_erase)
13058         (compute_garbled_blocks): Likewise.
13059         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13060         (target_write_memory_blocks): Change argument to std::vector.
13061         * symfile.c (struct load_section_data): Add constructor and
13062         destructor.  Use std::vector for "requests".
13063         (struct load_progress_data): Add initializers.
13064         (load_section_callback): Update.  Use "new".
13065         (clear_memory_write_data): Remove.
13066         (generic_load): Update.
13067
13068 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13069
13070         * arch/aarch64.h: Use common/tdesc.h.
13071
13072 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13073
13074         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13075         architecture with a 64-bit ABI.
13076
13077 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13078
13079         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13080         ahead of target description loading.
13081
13082 2018-02-26  Tom Tromey  <tom@tromey.com>
13083
13084         * stack.c (backtrace_command_1): Update.
13085         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13086         of "flags".
13087         * python/py-framefilter.c (py_print_frame)
13088         (gdbpy_apply_frame_filter): Change type of "flags".
13089         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13090         of "flags".
13091         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13092         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13093         * extension.h (enum frame_filter_flag): Rename from
13094         frame_filter_flags.
13095         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13096         (apply_ext_lang_frame_filter): Change type of "flags".
13097         * extension.c (apply_ext_lang_frame_filter): Change type of
13098         "flags".
13099         * extension-priv.h (struct extension_language_ops)
13100         <apply_frame_filter>: Change type of "flags".
13101
13102 2018-02-26  Tom Tromey  <tom@tromey.com>
13103
13104         PR python/16497:
13105         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13106         off-by-one in py_end computation.
13107         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13108         PRINT_MORE_FRAMES.
13109         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13110         constant.
13111
13112 2018-02-26  Tom Tromey  <tom@tromey.com>
13113
13114         * dwarf2read.c (struct variant_field): New.
13115         (struct nextfield) <variant>: New field.
13116         (dwarf2_add_field): Handle DW_TAG_variant_part.
13117         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13118         discriminated union.
13119         (read_structure_type): Handle DW_TAG_variant_part.
13120         (handle_struct_member_die): New function, extracted from
13121         process_structure_scope.  Handle DW_TAG_variant.
13122         (process_structure_scope): Handle discriminated unions.  Call
13123         handle_struct_member_die.
13124
13125 2018-02-26  Tom Tromey  <tom@tromey.com>
13126
13127         * rust-lang.h (rust_last_path_segment): Declare.
13128         * rust-lang.c (rust_last_path_segment): Now public.  Change
13129         contract.
13130         (struct disr_info): Remove.
13131         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13132         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13133         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13134         (rust_enum_p, rust_enum_variant): New function.
13135         (rust_underscore_fields): Remove "offset" parameter.
13136         (rust_print_enum): New function.
13137         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13138         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13139         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13140         enums.
13141         (rust_internal_print_type): New function, from rust_print_type.
13142         Remove enum code.
13143         (rust_print_type): Call rust_internal_print_type.
13144         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13145         Update enum handling.
13146         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13147         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13148         (rust_union_quirks): New functions.
13149         (process_full_comp_unit, process_full_type_unit): Call
13150         rust_union_quirks.
13151         (process_structure_scope): Update rust_unions if necessary.
13152
13153 2018-02-26  Tom Tromey  <tom@tromey.com>
13154
13155         * value.h (value_union_variant): Declare.
13156         * valops.c (value_union_variant): New function.
13157         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13158         (struct discriminant_info): New.
13159         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13160         enumerator.
13161         (struct main_type) <flag_discriminated_union>: New field.
13162
13163 2018-02-26  Tom Tromey  <tom@tromey.com>
13164
13165         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13166         unittests/unpack-selftests.c.
13167         * unittests/unpack-selftests.c: New file.
13168         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13169
13170 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13171
13172         * dwarf2read.c (struct partial_die_info) <read>: New method.
13173         (read_partial_die): Remove the declaration.
13174         (load_partial_dies): Update.
13175         (partial_die_info::partial_die_info):
13176         (read_partial_die): Change it to partial_die_info::read.
13177
13178 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13179
13180         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13181         (fixup_partial_die): Remove declaration.
13182         (scan_partial_symbols): Update.
13183         (partial_die_parent_scope): Likewise.
13184         (partial_die_full_name): Likewise.
13185         (fixup_partial_die): Change it to partial_die_info::fixup.
13186
13187 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13188
13189         * dwarf2read.c (read_partial_die): Update the declaration.
13190         (load_partial_dies): Caller update.
13191         (read_partial_die): Remove one argument abbrev_len.
13192
13193 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13194
13195         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13196         assignment operator.
13197         (load_partial_dies): Use ctor and copy ctor.
13198         (read_partial_die): Update.
13199         (dwarf2_cu::find_partial_die): Use ctor.
13200
13201 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13202
13203         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13204         (find_partial_die_in_comp_unit): Change it to
13205         dwarf2_cu::find_partial_die.
13206         (find_partial_die): Update.
13207
13208 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13209
13210         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13211         is NULL.
13212
13213 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13214
13215         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13216
13217 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13218
13219         * arch/amd64.h: Use common/tdesc.h.
13220         * arch/i386.c: Likewise.
13221         * arch/i386.h: Likewise.
13222         * arch/tic6x.c: Likewise.
13223         * arch/tdesc.h: Move file from here...
13224         * common/tdesc.h: ...to here.
13225         * features/aarch64-core.c: Regenerate.
13226         * features/aarch64-fpu.c: Regenerate.
13227         * features/i386/32bit-avx.c: Regenerate.
13228         * features/i386/32bit-avx512.c: Regenerate.
13229         * features/i386/32bit-core.c: Regenerate.
13230         * features/i386/32bit-linux.c: Regenerate.
13231         * features/i386/32bit-mpx.c: Regenerate.
13232         * features/i386/32bit-pkeys.c: Regenerate.
13233         * features/i386/32bit-sse.c: Regenerate.
13234         * features/i386/64bit-avx.c: Regenerate.
13235         * features/i386/64bit-avx512.c: Regenerate.
13236         * features/i386/64bit-core.c: Regenerate.
13237         * features/i386/64bit-linux.c: Regenerate.
13238         * features/i386/64bit-mpx.c: Regenerate.
13239         * features/i386/64bit-pkeys.c: Regenerate.
13240         * features/i386/64bit-segments.c: Regenerate.
13241         * features/i386/64bit-sse.c: Regenerate.
13242         * features/i386/x32-core.c: Regenerate.
13243         * features/tic6x-c6xp.c: Regenerate.
13244         * features/tic6x-core.c: Regenerate.
13245         * features/tic6x-gp.c: Regenerate.
13246         * target-descriptions.c: Use common/tdesc.h.
13247         * target-descriptions.h: Likewise.
13248
13249 2018-02-24  Tom Tromey  <tom@tromey.com>
13250
13251         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13252         (try_thread_db_load_from_dir, thread_db_load_search): Use
13253         std::string.
13254         (info_auto_load_libthread_db_compare): Return bool.  Change
13255         argument types.
13256         (info_auto_load_libthread_db): Use std::vector, std::string.
13257         Remove cleanups.
13258
13259 2018-02-24  Tom Tromey  <tom@tromey.com>
13260
13261         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13262         std::string.
13263         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13264         std::string*.
13265         * gdbarch.c: Rebuild.
13266         * gdbarch.h: Rebuild.
13267         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13268         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13269         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13270         std::string*.
13271
13272 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13273
13274         * gdbtypes.h (sect_offset): Change type to uint64_t.
13275         (sect_offset_str): New function.
13276         * dwarf2read.c (create_addrmap_from_aranges): Use
13277         sect_offset_str.
13278         (error_check_comp_unit_head): Likewise.
13279         (create_debug_type_hash_table): Likewise.
13280         (read_cutu_die_from_dwo): Likewise.
13281         (init_cutu_and_read_dies): Likewise.
13282         (init_cutu_and_read_dies_no_follow): Likewise.
13283         (process_psymtab_comp_unit_reader): Likewise.
13284         (partial_die_parent_scope): Likewise.
13285         (peek_die_abbrev): Likewise.
13286         (process_queue): Likewise.
13287         (dwarf2_physname): Likewise.
13288         (read_namespace_alias): Likewise.
13289         (read_import_statement): Likewise.
13290         (create_dwo_cu_reader): Likewise.
13291         (create_cus_hash_table): Likewise.
13292         (lookup_dwo_cutu): Likewise.
13293         (inherit_abstract_dies): Likewise.
13294         (read_func_scope): Likewise.
13295         (read_call_site_scope): Likewise.
13296         (dwarf2_add_member_fn): Likewise.
13297         (read_common_block): Likewise.
13298         (read_module_type): Likewise.
13299         (read_typedef): Likewise.
13300         (read_subrange_type): Likewise.
13301         (load_partial_dies): Likewise.
13302         (read_partial_die): Likewise.
13303         (find_partial_die): Likewise.
13304         (read_str_index): Likewise.
13305         (dwarf2_string_attr): Likewise.
13306         (build_error_marker_type): Likewise.
13307         (lookup_die_type): Likewise.
13308         (dump_die_shallow): Likewise.
13309         (follow_die_ref): Likewise.
13310         (dwarf2_fetch_die_loc_sect_off): Likewise.
13311         (dwarf2_fetch_constant_bytes): Likewise.
13312         (follow_die_sig): Likewise.
13313         (get_signatured_type): Likewise.
13314         (get_DW_AT_signature_type): Likewise.
13315         (dwarf2_find_containing_comp_unit): Likewise.
13316         (set_die_type): Likewise.
13317
13318 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13319
13320         * arch/aarch64.c: Include "common-defs.h".
13321         * arch/amd64.c: Likewise.
13322         * arch/i386.c: Likewise.
13323
13324 2018-02-21  Tom Tromey  <tom@tromey.com>
13325
13326         * value.h: (extract_field_op): Update.
13327         * eval.c (extract_field_op): Return a const char *.
13328         * expression.h (parse_expression_for_completion): Update.
13329         * completer.c (complete_expression): Update.
13330         (add_struct_fields): Make fieldname const.
13331         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13332         (mark_completion_tag, parse_exp_in_context_1): Update.
13333         (parse_expression_for_completion): Change "name" to
13334         unique_xmalloc_ptr*.
13335
13336 2018-02-21  Tom Tromey  <tom@tromey.com>
13337
13338         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13339
13340 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13341
13342         * avr-tdep.c (avr_read_pc): Change parameter type to
13343         readable_regcache.
13344         * gdbarch.sh (read_pc): Likewise.
13345         * gdbarch.c: Re-generated.
13346         * gdbarch.h: Re-generated.
13347         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13348         readable_regcache.
13349         * ia64-tdep.c (ia64_read_pc): Likewise.
13350         * mips-tdep.c (mips_read_pc): Likewise.
13351         * spu-tdep.c (spu_read_pc): Likewise.
13352
13353 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13354
13355         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13356         * regcache-dump.c: New file.
13357         * regcache.c: Move register_dump to regcache-dump.c.
13358         (maintenance_print_registers): Likewise.
13359         (maintenance_print_raw_registers): Likewise.
13360         (maintenance_print_cooked_registers): Likewise.
13361         (maintenance_print_register_groups): Likewise.
13362         (maintenance_print_remote_registers): Likewise.
13363         (_initialize_regcache): Likewise.
13364         * regcache.h (register_dump): Moved from regcache.c.
13365
13366 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13367
13368         * regcache.c (regcache::regcache): Update.
13369         (regcache::invalidate): Move it to detached_regcache::invalidate.
13370         (get_thread_arch_aspace_regcache): Update.
13371         (regcache::raw_update): Update.
13372         (regcache::cooked_read): Remove some code.
13373         (regcache::cooked_read_value): Likewise.
13374         (regcache::raw_write): Remove assert on m_readonly_p.
13375         (regcache::raw_supply_integer): Move it to
13376         detached_regcache::raw_supply_integer.
13377         (regcache::raw_supply_zeroed): Likewise.
13378         * regcache.h (detached_regcache) <raw_supply_integer>: New
13379         declaration.
13380         <raw_supply_zeroed, invalidate>: Likewise.
13381         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13382         <invalidate>: Likewise.
13383         <m_readonly_p>: Removed.
13384
13385 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13386
13387         * infcmd.c (get_return_value): Let stop_regs point to
13388         get_current_regcache.
13389         * regcache.c (regcache::regcache): Remove.
13390         (register_dump_reg_buffer): New class.
13391         (regcache_print): Adjust.
13392         * regcache.h (regcache): Remove constructors.
13393
13394 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13395
13396         * regcache.c (class register_dump): New class.
13397         (register_dump_regcache, register_dump_none): New class.
13398         (register_dump_remote, register_dump_groups): New class.
13399         (regcache_print): Update.
13400         * regcache.h (regcache_dump_what): Move it to regcache.c.
13401         (regcache) <dump>: Remove.
13402
13403 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13404
13405         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13406          reg_buffer_rw *.
13407         (jit_unwind_reg_set_impl): Call raw_supply.
13408         (jit_frame_sniffer): Use reg_buffer_rw.
13409         * record-full.c (record_full_core_regbuf): Change its type.
13410         (record_full_core_open_1): Use reg_buffer_rw.
13411         (record_full_close): Likewise.
13412         (record_full_core_fetch_registers): Use regcache->raw_supply.
13413         (record_full_core_store_registers): Likewise.
13414         * regcache.c (regcache::get_register_status): Move it to
13415         reg_buffer.
13416         (regcache_raw_set_cached_value): Remove.
13417         (regcache::raw_set_cached_value): Remove.
13418         (regcache::raw_write): Call raw_supply.
13419         (regcache::raw_supply): Move it to reg_buffer_rw.
13420         * regcache.h (regcache_raw_set_cached_value): Remove.
13421         (reg_buffer_rw): New class.
13422
13423 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13424
13425         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13426         readonly_detached_regcache.
13427         (dummy_frame_prev_register): Use regcache->cooked_read.
13428         * frame.c (frame_save_as_regcache): Change return type.
13429         (frame_pop): Update.
13430         * frame.h (frame_save_as_regcache): Update declaration.
13431         * inferior.h (get_infcall_suspend_state_regcache): Update
13432         declaration.
13433         * infrun.c (infcall_suspend_state) <registers>: use
13434         readonly_detached_regcache.
13435         (save_infcall_suspend_state): Don't use regcache_dup.
13436         (get_infcall_suspend_state_regcache): Change return type.
13437         * linux-fork.c (struct fork_info) <savedregs>: Change to
13438         readonly_detached_regcache.
13439         <pc>: New field.
13440         (fork_save_infrun_state): Don't use regcache_dup.
13441         (info_checkpoints_command): Adjust.
13442         * mi/mi-main.c (register_changed_p): Update declaration.
13443         (mi_cmd_data_list_changed_registers): Use
13444         readonly_detached_regcache.
13445         (register_changed_p): Change parameter type to
13446         readonly_detached_regcache.
13447         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13448         readonly_detached_regcache.
13449         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13450         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13451         New.
13452         (regcache::save): Move it to reg_buffer.
13453         (regcache::restore): Change parameter type.
13454         (regcache_dup): Remove.
13455         * regcache.h (reg_buffer) <save>: New method.
13456         (readonly_detached_regcache): New class.
13457         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13458         readonly_detached_regcache.
13459         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13460
13461 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13462
13463         * frame.c (frame_save_as_regcache): Use regcache method save.
13464         (frame_pop): Use regcache method restore.
13465         * infrun.c (restore_infcall_suspend_state): Likewise.
13466         * linux-fork.c (fork_load_infrun_state): Likewise.
13467         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13468         save.
13469         * regcache.c (regcache_save): Remove.
13470         (regcache::restore): More asserts.
13471         (regcache_cpy): Remove.
13472         * regcache.h (regcache_save): Remove the declaration.
13473         (regcache::restore): Move from private to public.
13474         Remove the friend declaration of regcache_cpy.
13475         (regcache_cpy): Remove declaration.
13476
13477 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13478
13479         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13480         parameter type to 'readable_regcache *'.
13481         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13482         * arm-tdep.c (arm_neon_quad_read): Likewise.
13483         (arm_pseudo_read): Likewise.
13484         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13485         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13486         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13487         * gdbarch.c: Re-generated.
13488         * gdbarch.h: Re-generated.
13489         * gdbarch.sh (pseudo_register_read): Change parameter type to
13490         'readable_regcache *'.
13491         (pseudo_register_read_value): Likewise.
13492         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13493         (h8300_pseudo_register_read): Likewise.
13494         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13495         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13496         (i386_pseudo_register_read_into_value): Likewise.
13497         (i386_pseudo_register_read_value): Likewise.
13498         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13499         declaration.
13500         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13501         * m32c-tdep.c (m32c_raw_read): Likewise.
13502         (m32c_read_flg): Likewise.
13503         (m32c_banked_register): Likewise.
13504         (m32c_banked_read): Likewise.
13505         (m32c_sb_read): Likewise.
13506         (m32c_part_read): Likewise.
13507         (m32c_cat_read): Likewise.
13508         (m32c_r3r2r1r0_read): Likewise.
13509         (m32c_pseudo_register_read): Likewise.
13510         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13511         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13512         (mep_pseudo_cr64_read): Likewise.
13513         (mep_pseudo_register_read): Likewise.
13514         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13515         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13516         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13517         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13518         (regcache::cooked_read): Likewise.
13519         (regcache::cooked_read_value): Likewise.
13520         (regcache_cooked_read_signed):
13521         (regcache::cooked_read): Likewise.
13522         * regcache.h (readable_regcache): New class.
13523         (regcache): Inherit readable_regcache.  Move some methods to
13524         readable_regcache.
13525         * rl78-tdep.c (rl78_pseudo_register_read): Change
13526         parameter type to 'readable_regcache *'.
13527         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13528         (e500_pseudo_register_read): Change parameter type to
13529         'readable_regcache *'.
13530         (dfp_pseudo_register_read): Likewise.
13531         (vsx_pseudo_register_read): Likewise.
13532         (efpr_pseudo_register_read): Likewise.
13533         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13534         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13535         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13536         (sh64_pseudo_register_read): Likewise.
13537         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13538         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13539         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13540         (spu_pseudo_register_read): Likewise.
13541         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13542         (xtensa_pseudo_register_read): Likewise.
13543
13544 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13545
13546         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13547         (regcache::arch): Move it to reg_buffer::arch.
13548         (regcache::register_buffer): Likewise.
13549         (regcache::assert_regnum): Likewise.
13550         (regcache::num_raw_registers): Likewise.
13551         * regcache.h (reg_buffer): New class.
13552         (regcache): Inherit reg_buffer.
13553
13554 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13555
13556         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13557         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13558
13559 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13560
13561         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13562
13563 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13564
13565         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13566         (SFILES): Remove common/*.c files.
13567         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13568         * common/common.host: Add common reference.
13569         * configure.ac: Likewise.
13570         * configure: Regenerate.
13571
13572 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13573
13574         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13575         (block_initialize_namespace): Use new.
13576         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13577         (dwarf2_free_objfile): Use delete.
13578         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13579         (copy_type_recursive): Use new.
13580         * gdb_obstack.h (allocate_on_obstack): New.
13581
13582 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13583
13584         PR gdb/22849
13585         * inferior.c (exit_inferior_1): Reset inf->control.
13586
13587 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13588
13589         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13590         declaration.
13591
13592 2018-02-14  Pedro Alves  <palves@redhat.com>
13593
13594         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13595         frame_cleanup_after_sniffer on exception.
13596
13597 2018-02-14  Tom Tromey  <tom@tromey.com>
13598
13599         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13600         const.
13601         (solib_bfd_open): Make pathname const.
13602         * solib.c (solib_bfd_open): Make pathname const.
13603         * solib-spu.c (spu_bfd_fopen): Make name const.
13604         (spu_bfd_open): Make pathname const.
13605         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13606         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13607
13608 2018-02-14  Tom Tromey  <tom@tromey.com>
13609
13610         * symfile.c (symfile_bfd_open): Update.
13611         * source.h (openp, source_full_path_of, find_and_open_source):
13612         Change argument type to unique_xmalloc_ptr.
13613         * source.c (openp): Take a unique_xmalloc_ptr.
13614         (source_full_path_of, find_and_open_source): Likewise.
13615         (open_source_file, symtab_to_fullname): Update.
13616         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13617         unique_xmalloc_ptr.
13618         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13619         (exec_file_find): Update.
13620         * psymtab.c (psymtab_to_fullname): Update.
13621         * nto-tdep.h (nto_find_and_open_solib): Update.
13622         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13623         unique_xmalloc_ptr.
13624         * exec.c (exec_file_attach): Update.
13625         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13626         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13627
13628 2018-02-14  Tom Tromey  <tom@tromey.com>
13629
13630         * solib.c: Include source.h.
13631         * nto-tdep.c: Include source.h.
13632         * mi/mi-cmd-env.c: Include source.h.
13633         * infcmd.c: Include source.h.
13634         * exec.c: Include source.h.
13635         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13636         (add_path, directory_switch, source_path, init_source_path): Move
13637         declarations...
13638         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13639         (add_path, directory_switch, source_path, init_source_path):
13640         ...here.
13641
13642 2018-02-14  Tom Tromey  <tom@tromey.com>
13643
13644         * solist.h (exec_file_find, solib_find): Return
13645         unique_xmalloc_ptr.
13646         (solib_bfd_fopen): Take a const char *.
13647         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13648         (exec_file_find, solib_find): Likewise.
13649         (solib_bfd_fopen): Do not take ownership of "pathname".
13650         (solib_bfd_open): Use unique_xmalloc_ptr.
13651         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13652         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13653         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13654         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13655
13656 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13657
13658         * ada-lang.c (name_match_type_from_name): Remove reference to
13659         ada_name_for_lookup in function's documentation.
13660         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13661
13662 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13663
13664         * defs.h (enum openp_flags): New enum.
13665         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13666         Move to enum openp_flags.
13667         (openp_flags): New enum flags.
13668         (openp): Change parameter type to openp_flags.
13669         * source.c (openp): Change parameter type to openp_flags.
13670         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13671         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13672
13673 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13674
13675         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13676         per-command.
13677
13678 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13679
13680         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13681         into...
13682         (class dwarf2_queue_guard): ...the destructor of this new class.
13683         (dw2_do_instantiate_symtab): Create instance of the new class
13684         dwarf2_queue_guard, remove cleanup.
13685
13686 2018-02-09  Tom Tromey  <tom@tromey.com>
13687
13688         * source.c (find_source_lines): Don't reference past the end of
13689         the vector.
13690
13691 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13692
13693         * remote.c (remote_btrace_maybe_reopen): Change error message.
13694         * btrace.c (btrace_enable): Likewise.
13695         (parse_xml_btrace): Likewise.
13696         (parse_xml_btrace_conf): Likewise.
13697
13698 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13699
13700         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13701         (linux_enable_pt, linux_enable_bts): Call
13702         diagnose_perf_event_open_fail.
13703
13704 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13705
13706         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13707         Remove parameter and change return type.  Update callers.  Move it.
13708         (linux_enable_bts, linux_enable_pt): Improve error message.
13709         (linux_enable_pt): Remove zero buffer size check.
13710         (linux_enable_btrace): Improve error messages.  Remove NULL return
13711         check.
13712
13713 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13714
13715         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13716         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13717         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13718         (linux_supports_pt, linux_supports_btrace): Remove.
13719         (linux_enable_bts): Call cpu_supports_bts.
13720         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13721         * remote.c (remote_supports_btrace): Remove.
13722         (init_remote_ops): Remove remote_supports_btrace.
13723         * target-delegates.c: Regenerated.
13724         * target.c (target_supports_btrace): Remove.
13725         * target.h (target_ops) <to_supports_btrace>: Remove
13726         (target_supports_btrace): Remove.
13727         * x86-linux-nat.c (x86_linux_create_target): Remove
13728         linux_supports_btrace.
13729
13730 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13731
13732         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13733         btrace failed.
13734         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13735         exception and use message in own exception.
13736
13737 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13738
13739         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13740         (perf_event_pt_event_type): Use gdb_file_up.
13741         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13742         scoped_fd, and scoped_mmap.
13743
13744 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13745
13746         * common/scoped_mmap.h: New.
13747         * unittests/scoped_mmap-selftest.c: New.
13748         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13749         unittests/scoped_mmap-selftest.c.
13750
13751 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13752
13753         * common/scoped_fd.h: New.
13754         * unittests/scoped_fd-selftest.c: New.
13755         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13756         unittests/scoped_fd-selftest.c.
13757
13758 2018-02-09  Tom Tromey  <tom@tromey.com>
13759
13760         * auto-load.c (auto_load_section_scripts): Use
13761         gdb::unique_xmalloc_ptr.
13762
13763 2018-02-09  Tom Tromey  <tom@tromey.com>
13764
13765         * auto-load.c (execute_script_contents): Use std::string.
13766
13767 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13768
13769         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13770         Python function, rather than a new command.
13771
13772 2018-02-08  Tom Tromey  <tom@tromey.com>
13773
13774         * solib.c (solib_find_1): Use std::string.
13775         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13776
13777 2018-02-08  Tom Tromey  <tom@tromey.com>
13778
13779         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13780
13781 2018-02-08  Tom Tromey  <tom@tromey.com>
13782
13783         * source.c (find_source_lines): Use gdb::def_vector.
13784
13785 2018-02-08  Tom Tromey  <tom@tromey.com>
13786
13787         * macrocmd.c (struct temporary_macro_definition): New.
13788         (macro_define_command): Use temporary_macro_definition.  Remove
13789         cleanups.
13790         (free_macro_definition_ptr): Remove.
13791
13792 2018-02-08  Tom Tromey  <tom@tromey.com>
13793
13794         * macroexp.c (maybe_expand): Use std::string.
13795
13796 2018-02-08  Tom Tromey  <tom@tromey.com>
13797
13798         * macroexp.c (struct macro_buffer): Add initializers for some
13799         members.
13800         (init_buffer, init_shared_buffer, free_buffer)
13801         (free_buffer_return_text): Remove.
13802         (macro_buffer): New constructors.
13803         (~macro_buffer): New destructor.
13804         (macro_buffer::set_shared): New method.
13805         (macro_buffer::resize_buffer, macro_buffer::appendc)
13806         (macro_buffer::appendmem): Now methods, not free functions.
13807         (set_token, append_tokens_without_splicing, stringify)
13808         (macro_stringify): Update.
13809         (gather_arguments): Change return type.  Remove argc_p argument,
13810         add args_ptr argument.  Use std::vector.
13811         (substitute_args): Remove argc argument.  Accept std::vector.
13812         (expand): Update.  Use std::vector.
13813         (scan, macro_expand, macro_expand_next): Update.
13814
13815 2018-02-08  Tom Tromey  <tom@tromey.com>
13816
13817         * symtab.c (default_collect_symbol_completion_matches_break_on):
13818         Use unique_xmalloc_ptr.
13819         * macroscope.h: (sal_macro_scope, user_macro_scope)
13820         (default_macro_scope): Return unique_xmalloc_ptr.
13821         * macroscope.c (sal_macro_scope, user_macro_scope)
13822         (default_macro_scope): Return unique_xmalloc_ptr.
13823         * macroexp.h (macro_expand, macro_expand_once): Return
13824         unique_xmalloc_ptr.
13825         * macroexp.c (macro_expand, macro_expand_once): Return
13826         unique_xmalloc_ptr.
13827         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13828         (info_macro_command, info_macros_command): Use
13829         unique_xmalloc_ptr.
13830         * compile/compile-c-support.c (write_macro_definitions): Use
13831         unique_xmalloc_ptr.
13832         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13833
13834 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13835
13836         * value.c (value_static_field): Assign field type instead of
13837         containing type when returning an optimized out value.
13838
13839 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13840
13841         * ft32-tdep.c (ft32_read_pc): Remove.
13842         (ft32_write_pc): Remove.
13843         (ft32_gdbarch_init): Update.
13844         * m32r-tdep.c (m32r_read_pc): Remove.
13845         (m32r_gdbarch_init): Update.
13846         * mep-tdep.c (mep_read_pc): Remove.
13847         (mep_gdbarch_init): Update.
13848         * microblaze-tdep.c (microblaze_write_pc): Remove.
13849         (microblaze_gdbarch_init): Update.
13850         * mn10300-tdep.c (mn10300_read_pc): Remove.
13851         (mn10300_write_pc): Remove.
13852         (mn10300_gdbarch_init): Update.
13853         * moxie-tdep.c (moxie_read_pc): Remove.
13854         (moxie_write_pc): Remove.
13855         (moxie_gdbarch_init): Update.
13856
13857 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13858
13859         * expprint.c (print_subexp_standard): Handle
13860         OP_F77_UNDETERMINED_ARGLIST.
13861         (dump_subexp_body_standard): Likewise.
13862
13863 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13864
13865         * target-descriptions.c (tdesc_element_visitor) Add empty
13866         implementations.
13867         (tdesc_type): Move make_gdb_type from here.
13868         (tdesc_type_builtin): Likewise.
13869         (tdesc_type_vector): Likewise.
13870         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13871         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13872         (make_gdb_type_union): Likewise.
13873         (make_gdb_type_flags): Likewise.
13874         (make_gdb_type_enum): Likewise.
13875         (make_gdb_type): New function.
13876         (tdesc_register_type): Use static make_gdb_type.
13877
13878 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13879
13880         * infcmd.c (default_print_one_register_info): Align natural-format
13881         column values consistently one under another.
13882         (pad_to_column): New function.
13883
13884 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13885
13886         * dwarf2read.c (dwarf2_physname): Move commment.
13887
13888 2018-02-01  Leszek Swirski  <leszeks@google.com>
13889
13890         * varobj.c (varobj_formatted_print_options): Allow recursive
13891         pretty printing if pretty printing is enabled.
13892
13893 2018-02-01  Leszek Swirski  <leszeks@google.com>
13894
13895         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13896         names after a structop as a filename.
13897
13898 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13899
13900         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13901         (arm_record_coproc_data_proc): Likewise.
13902
13903 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13904
13905         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13906
13907 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13908
13909         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13910         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13911
13912 2018-01-31  Pedro Alves  <palves@redhat.com>
13913
13914         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13915         * inflow.c (child_terminal_save_inferior): Wrap reference to
13916         tcgetpgrp in HAVE_TERMIOS_H.
13917         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13918         _WIN32.
13919         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13920         always iterate over all inferiors.
13921         (gdbsim_cntrl_c): Adjust.
13922         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13923
13924 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13925
13926         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13927         index type is objfile-owned if the element type is as well.
13928
13929 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13930
13931         GDB 8.1 released.
13932
13933 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13934
13935         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13936         "features/s390x-linux64.c".
13937         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13938         s390_linux32 and s390x_linux64.
13939         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13940         default tdesc.
13941         * s390-tdep.c: Include "features/s390-linux32.c" and
13942         "features/s390x-linux64.c".
13943         (s390_tdesc_valid): Add check for tdesc_has_registers.
13944         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13945         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13946         tdesc_s390x_linux64.
13947         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13948         tdesc_s390x_linux64 to...
13949         * s390-tdep.h: ...here.
13950
13951 2018-01-30  Pedro Alves  <palves@redhat.com>
13952
13953         PR gdb/13211
13954         * config.in, configure: Regenerate.
13955         * configure.ac: Check for getpgid.
13956         * go32-nat.c (go32_pass_ctrlc): New.
13957         (go32_target): Install it.
13958         * inf-child.c (inf_child_target): Install
13959         child_terminal_save_inferior, child_pass_ctrlc and
13960         child_interrupt.
13961         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13962         (inf_ptrace_target): No longer install it.
13963         * infcmd.c (interrupt_target_1): Adjust.
13964         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13965         (child_interrupt): Declare.
13966         (inferior::terminal_state): New.
13967         * inflow.c (struct terminal_info): Update comments.
13968         (inferior_process_group): Delete.
13969         (terminal_is_ours): Delete.
13970         (gdb_tty_state): New.
13971         (child_terminal_init): Adjust.
13972         (is_gdb_terminal, sharing_input_terminal_1)
13973         (sharing_input_terminal): New functions.
13974         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13975         Set the process's actual process group in the foreground if
13976         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13977         mark terminal as the inferior's if not sharing GDB's terminal.
13978         Don't check attach_flag.
13979         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13980         pass down a target_terminal_state.
13981         (child_terminal_save_inferior): New, factored out from ...
13982         (child_terminal_ours_1): ... this.  Handle
13983         target_terminal_state::is_ours_for_output.
13984         (child_interrupt, child_pass_ctrlc): New.
13985         (inflow_inferior_exit): Clear the inferior's terminal_state.
13986         (copy_terminal_info): Copy the inferior's terminal state.
13987         (_initialize_inflow): Remove reference to terminal_is_ours.
13988         * inflow.h (inferior_process_group): Delete.
13989         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13990         * procfs.c (procfs_target): Don't install procfs_interrupt.
13991         (procfs_interrupt): Delete.
13992         * remote.c (remote_serial_quit_handler): Adjust.
13993         (remote_interrupt): Remove ptid parameter.  Adjust.
13994         * target-delegates.c: Regenerate.
13995         * target.c: Include "terminal.h".
13996         (target_terminal::terminal_state): Rename to ...
13997         (target_terminal::m_terminal_state): ... this.
13998         (target_terminal::init): Adjust.
13999         (target_terminal::inferior): Adjust to per-inferior
14000         terminal_state.
14001         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14002         (target_terminal::ours, target_terminal::ours_for_output): Use
14003         target_terminal_is_ours_kind.
14004         (target_interrupt): Remove ptid parameter.  Adjust.
14005         (default_target_pass_ctrlc): Adjust.
14006         * target.h (target_ops::to_terminal_save_inferior): New field.
14007         (target_ops::to_interrupt): Remove ptid_t parameter.
14008         (target_interrupt): Remove ptid_t parameter.  Update comment.
14009         (target_pass_ctrlc): Update comment.
14010         * target/target.h (target_terminal_state): New scoped enum,
14011         factored out of ...
14012         (target_terminal::terminal_state): ... here.
14013         (target_terminal::inferior): Update comments.
14014         (target_terminal::restore_inferior): New.
14015         (target_terminal::is_inferior, target_terminal::is_ours)
14016         (target_terminal::is_ours_for_output): Adjust.
14017         (target_terminal::scoped_restore_terminal_state): Adjust to
14018         rename, and call restore_inferior() instead of inferior().
14019         (target_terminal::scoped_restore_terminal_state::m_state): Change
14020         type.
14021         (target_terminal::terminal_state): Rename to ...
14022         (target_terminal::m_terminal_state): ... this and change type.
14023
14024 2018-01-30  Pedro Alves  <palves@redhat.com>
14025
14026         * linux-nat.c (wait_for_signal): New function.
14027         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14028         directly.
14029         (async_terminal_is_ours)
14030         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14031         (linux_nat_add_target): Don't override
14032         to_terminal_inferior/to_terminal_ours.
14033
14034 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14035
14036         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14037
14038 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14039
14040         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14041         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14042         dwarf2_per_objfile_free here.
14043         (dwarf2_per_objfile_free): Remove.
14044         (_initialize_dwarf2_read): Don't register
14045         dwarf2_per_objfile_free as a registry cleanup.
14046
14047 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14048
14049         Avoid compilation errors in MinGW native builds
14050
14051         The error is triggered by including python-internal.h, and the
14052         error message is:
14053
14054              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14055                       from build-gnulib/import/math.h:27,
14056                       from d:/usr/Python26/include/pyport.h:235,
14057                       from d:/usr/Python26/include/Python.h:58,
14058                       from python/python-internal.h:94,
14059                       from python/py-arch.c:24:
14060              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14061         using ::hypot;
14062                 ^~~~~
14063
14064         This happens because Python headers define 'hypot' to expand t
14065         '_hypot' in the Windows builds.
14066         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14067         'hypoth'.  This avoids a compilation error.
14068
14069 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14070
14071         * MAINTAINERS (Write After Approval): Fix ordering.
14072
14073 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14074
14075         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14076
14077 2018-01-26  Alan Modra  <amodra@gmail.com>
14078
14079         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14080         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14081         Remove nop.  Make const.  Comment.
14082         (powerpc32_plt_stub_so_2): New.
14083         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14084         Correct count.  Update uses.
14085         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14086         Move common code reading PLT entry word.  Correct
14087         powerpc32_plt_stub PLT address calculation.
14088         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14089         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14090         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14091         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14092         (ppc64_standard_linkage8): Likewise.
14093         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14094         Correct insns description.
14095         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14096
14097 2018-01-24  Pedro Alves  <palves@redhat.com>
14098
14099         GCC PR libstdc++/83906
14100         * gdbtypes.c (operator==(const dynamic_prop &,
14101         const dynamic_prop &)): New.
14102         (operator==(const range_bounds &, const range_bounds &)): New.
14103         (check_types_equal): Use them instead of memcmp.
14104         * gdbtypes.h (operator==(const dynamic_prop &,
14105         const dynamic_prop &)): Declare.
14106         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14107         (operator==(const range_bounds &, const range_bounds &)): Declare.
14108         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14109
14110 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14111
14112         * s390-linux-tdep.c (s390_record_address_mask)
14113         (s390_record_calc_disp_common, s390_record_calc_disp)
14114         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14115         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14116         (s390_process_record): Move to s390-tdep.c.
14117         (s390_linux_init_abi_any): Adjust.
14118         * s390-tdep.c (s390_record_address_mask)
14119         (s390_record_calc_disp_common, s390_record_calc_disp)
14120         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14121         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14122         (s390_process_record): Moved from s390-linux-tdep.c
14123         (s390_gdbarch_init): Adjust.
14124
14125 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14126
14127         * s390-linux-nat.c (s390-tdep.h): New include.
14128         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14129         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14130         (ALLDEPFILES): Add s390-tdep.c.
14131         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14132         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14133         * s390-tdep.h: ...this.  New file.
14134         * s390-linux-tdep.c (s390-tdep.h): New include.
14135         (_initialize_s390_tdep): Rename to...
14136         (_initialize_s390_linux_tdep): ...this and adjust.
14137         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14138         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14139         s390-tdep.h.
14140         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14141         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14142         (s390_is_partial_instruction, s390_software_single_step)
14143         (is_non_branch_ril, s390_displaced_step_copy_insn)
14144         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14145         (s390_prologue_data, s390_addr, s390_store, s390_load)
14146         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14147         (s390_register_call_saved, s390_guess_tracepoint_registers)
14148         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14149         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14150         (s390_pseudo_register_name, s390_pseudo_register_type)
14151         (s390_pseudo_register_read, s390_pseudo_register_write)
14152         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14153         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14154         (s390_addr_bits_remove, s390_address_class_type_flags)
14155         (s390_address_class_type_flags_to_name)
14156         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14157         (s390_function_arg_float, s390_function_arg_vector)
14158         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14159         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14160         (s390_frame_align, s390_register_return_value, s390_return_value)
14161         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14162         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14163         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14164         (s390_trad_frame_prev_register, s390_unwind_cache)
14165         (s390_prologue_frame_unwind_cache)
14166         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14167         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14168         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14169         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14170         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14171         (s390_frame_base_address, s390_local_base_address)
14172         (s390_frame_base, s390_gcc_target_options)
14173         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14174         (s390_validate_reg_range, s390_tdesc_valid)
14175         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14176         * s390-tdep.c: ...this.  New file.
14177
14178 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14179
14180         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14181         (s390_process_record, s390_gdbarch_tdep_alloc)
14182         (s390_linux_init_abi_any): Use/set new hook.
14183
14184 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14185
14186         * s390-linux-tdep.c (osabi.h): New include.
14187         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14188         (s390_linux_init_abi_any): New functions.
14189         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14190
14191 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14192
14193         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14194         tdesc_has_registers check
14195
14196 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14197
14198         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14199         (s390_validate_reg_range): New macro.
14200         (s390_gdbarch_init): Adjust.
14201
14202 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14203
14204         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14205         (s390_gdbarch_tdep_alloc): Adjust.
14206         (s390_gdbarch_init): Adjust.
14207
14208 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14209
14210         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14211         <have_tdb>: Change type to bool.
14212         (s390_gdbarch_tdep_alloc): Adjust.
14213         (s390_gdbarch_init): Adjust.
14214
14215 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14216
14217         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14218         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14219         (s390_gdbarch_tdep_alloc): New function.
14220         (s390_gdbarch_init): Allocate tdep at start and use its fields
14221         instead of separate variables.
14222
14223 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14224
14225         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14226         when looking for cached gdbarch and add comment for remaining.
14227
14228 2018-01-22  Pedro Alves  <palves@redhat.com>
14229             Sergio Durigan Junior  <sergiodj@redhat.com>
14230
14231         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14232         case.
14233
14234 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14235
14236         * MAINTAINERS: Update my company e-mail address.
14237
14238 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14239
14240         * regcache.c (cooked_write_test): New function.
14241         (_initialize_regcache): Register the test.
14242
14243 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14244
14245         * ia64-tdep.c (ia64_pseudo_register_read): Call
14246         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14247         * m32c-tdep.c (m32c_cat_read): Likewise.
14248         (m32c_r3r2r1r0_read): Likewise.
14249         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14250         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14251
14252 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14253
14254         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14255         method raw_read instead of regcache_raw_read.
14256         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14257         * arm-tdep.c (arm_neon_quad_read): Likewise.
14258         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14259         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14260         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14261         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14262         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14263         (i386_pseudo_register_read_into_value): Likewise.
14264         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14265         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14266         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14267         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14268         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14269         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14270         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14271         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14272         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14273
14274 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14275
14276         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14277         * configure.tgt: Remove target mt.
14278         * mt-tdep.c: Remove.
14279         * regcache.c (cooked_read_test): Remove the check for mt.
14280
14281 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14282
14283         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14284         instead of gdbarch_pseudo_register_read_value.
14285
14286 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14287
14288         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14289         language is Ada.
14290
14291 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14292
14293         * linespec.c (create_sals_line_offset): Remove code that preserved
14294         the symtab_and_line's line number.
14295
14296 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14297
14298         * varobj.c (varobj_create): Don't set valid_block when creating a
14299         floating varobj.
14300
14301 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14302
14303         * varobj.c (varobj_create): Remove out of date comment.
14304
14305 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14306
14307         PR mi/20395
14308         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14309         updating innermost block.
14310         * parse.c (innermost_block_tracker::update): Take extra type
14311         parameter, and check types match before updating innermost block.
14312         (write_dollar_variable): Update innermost block for registers.
14313         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14314         (innermost_block_tracker::innermost_block_tracker): Initialise
14315         m_types member.
14316         (innermost_block_tracker::reset): Take type parameter.
14317         (innermost_block_tracker::update): Take type parameter, and pass
14318         type through as needed.
14319         (innermost_block_tracker::m_types): New member.
14320         * varobj.c (varobj_create): Pass type when reseting innermost
14321         block.
14322
14323 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14324
14325         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14326         * ada-lang.c (resolve_subexp): Likewise.
14327         * breakpoint.c (set_breakpoint_condition) Likewise.
14328         (watch_command_1) Likewise.
14329         * c-exp.y (variable): Likewise.
14330         * d-exp.y (PrimaryExpression): Likewise.
14331         * f-exp.y (variable): Likewise.
14332         * go-exp.y (variable): Likewise.
14333         * m2-exp.y (variable): Likewise.
14334         * objfiles.c (objfile::~objfile): Likewise.
14335         * p-exp.y (variable): Likewise.
14336         * parse.c (innermost_block): Change type.
14337         * parser-defs.h (class innermost_block_tracker): New.
14338         (innermost_block): Change to innermost_block_tracker.
14339         * printcmd.c (display_command): Switch to innermost_block API.
14340         (do_one_display): Likewise.
14341         * rust-exp.y (do_one_display): Likewise.
14342         * symfile.c (clear_symtab_users): Likewise.
14343         * varobj.c (varobj_create): Switch to innermost_block API, replace
14344         use of innermost_block with block stored on varobj object.
14345
14346 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14347
14348         * expression.h (innermost_block): Remove declaration.
14349         * varobj.c: Add 'parser-defs.h' include.
14350
14351 2018-01-19  Tom Tromey  <tom@tromey.com>
14352
14353         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14354         symbols in the static and global blocks.
14355
14356 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14357
14358         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14359         gdb_ptrace.h, and move including gdb_wait.h ...
14360         * nat/linux-ptrace.h: ... to here.
14361
14362 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14363
14364         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14365         inf_ptrace_detach_success.
14366         (inf_ptrace_detach_success): Add inferior parameter, use it
14367         instead of inferior_ptid, pass it to detach_inferior.
14368         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14369         parameter.
14370         * inferior.c (detach_inferior): Add overload that takes an
14371         inferior object.
14372         * inferior.h (detach_inferior): Likewise.
14373         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14374         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14375         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14376
14377 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14378
14379         * target.h (struct target_ops) <to_detach>: Add inferior
14380         parameter.
14381         (target_detach): Likewise.
14382         * target.c (dispose_inferior): Pass inferior down.
14383         (target_detach): Pass inferior down.  Assert that it is equal to
14384         the current inferior.
14385         * aix-thread.c (aix_thread_detach): Pass inferior down.
14386         * corefile.c (core_file_command): Pass current_inferior() down.
14387         * corelow.c (core_detach): Add inferior parameter.
14388         * darwin-nat.c (darwin_detach): Likewise.
14389         * gnu-nat.c (gnu_detach): Likewise.
14390         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14391         * infcmd.c (detach_command): Pass current_inferior() down to
14392         target_detach.
14393         * infrun.c (follow_fork_inferior): Pass parent_inf to
14394         target_detach.
14395         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14396         target_detach.
14397         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14398         * linux-thread-db.c (thread_db_detach): Likewise.
14399         * nto-procfs.c (procfs_detach): Likewise.
14400         * procfs.c (procfs_detach): Likewise.
14401         * record.c (record_detach): Likewise.
14402         * record.h (struct inferior): Forward-declare.
14403         (record_detach): Add inferior parameter.
14404         * remote-sim.c (gdbsim_detach): Likewise.
14405         * remote.c (remote_detach_1): Likewise.
14406         (remote_detach): Likewise.
14407         (extended_remote_detach): Likewise.
14408         * sol-thread.c (sol_thread_detach): Likewise.
14409         * target-debug.h (target_debug_print_inferior_p): New macro.
14410         * target-delegates.c: Re-generate.
14411         * top.c (kill_or_detach): Pass inferior down to target_detach.
14412         * windows-nat.c (windows_detach): Add inferior parameter.
14413
14414 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14415
14416         * target.h (struct target_ops) <to_detach>: Remove args
14417         parameter.
14418         (target_detach): Likewise.
14419         * target.c (dispose_inferior): Adjust.
14420         (target_detach): Remove args parameter, adjust.
14421         * aix-thread.c (aix_thread_detach): Adjust.
14422         * corefile.c (core_file_command): Adjust.
14423         * corelow.c (core_detach): Adjust.
14424         * darwin-nat.c (darwin_detach): Adjust.
14425         * gnu-nat.c (gnu_detach): Adjust.
14426         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14427         * infcmd.c (detach_command): Adjust
14428         * infrun.c (follow_fork_inferior): Adjust.
14429         (handle_vfork_child_exec_or_exit): Adjust.
14430         * linux-fork.c (linux_fork_detach): Remove args parameter.
14431         * linux-fork.h (linux_fork_detach): Likewise.
14432         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14433         * linux-thread-db.c (thread_db_detach): Likewise.
14434         * nto-procfs.c (procfs_detach): Likewise.
14435         * procfs.c (procfs_detach): Likewise.
14436         (do_detach): Remove signo parameter.
14437         * record.c (record_detach): Remove args parameter.
14438         * record.h (record_detach): Likewise.
14439         * remote-sim.c (gdbsim_detach): Likewise.
14440         * remote.c (remote_detach_1): Likewise.
14441         (remote_detach): Likewise.
14442         (extended_remote_detach): Likewise.
14443         * sol-thread.c (sol_thread_detach): Likewise.
14444         * target-delegates.c: Re-generate.
14445         * top.c (struct qt_args) <args>: Remove field.
14446         (kill_or_detach): Don't pass args.
14447         (quit_force): Don't set args.
14448         * windows-nat.c (windows_detach): Remove args parameter.
14449
14450 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14451
14452         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14453         (arm_linux_init_abi): Install it.
14454
14455 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14456
14457         * osabi.c (gdb_osabi_names): Extend the regexp for
14458         arm-linux-gnueabihf.
14459
14460 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14461
14462         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14463         m_abbrevs.
14464         (abbrev_table::add_abbrev): Update.
14465         (abbrev_table::lookup_abbrev): Update.
14466
14467 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14468
14469         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14470
14471 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14472
14473         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14474         to "std::string".
14475
14476 2018-01-17  Tom Tromey  <tom@tromey.com>
14477
14478         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14479
14480 2018-01-17  Tom Tromey  <tom@tromey.com>
14481
14482         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14483         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14484         (create_array_type_with_stride): Update.
14485         * dwarf2read.c (set_die_type): Update.
14486
14487 2018-01-17  Tom Tromey  <tom@tromey.com>
14488
14489         * dwarf2read.c (delayed_method_info): Remove typedef.
14490         (dwarf2_cu::method_info): Now a std::vector.
14491         (add_to_method_list): Update.
14492         (free_delayed_list): Remove.
14493         (compute_delayed_physnames): Update.
14494         (process_full_comp_unit, process_full_type_unit): Clear the method
14495         list.  Remove cleanups.
14496         (psymtab_include_file_name): Add name_holder parameter.  Use
14497         unique_xmalloc_ptr.
14498         (dwarf_decode_lines): Update.
14499
14500 2018-01-17  Tom Tromey  <tom@tromey.com>
14501             Simon Marchi  <simon.marchi@ericsson.com>
14502
14503         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14504         (dwarf2_per_objfile::free_cached_comp_units)
14505         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14506         (init_cutu_and_read_dies_no_follow): Update.
14507         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14508         (dwarf2_cu::~dwarf2_cu): New.
14509         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14510         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14511
14512 2018-01-17  Tom Tromey  <tom@tromey.com>
14513             Simon Marchi  <simon.marchi@ericsson.com>
14514
14515         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14516         (struct die_reader_specs) <abbrev_table>: New member.
14517         (struct abbrev_table): Add constructor.
14518         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14519         <abbrev_obstack>: Now an auto_obstack.
14520         (abbrev_table_up): New typedef.
14521         (init_cu_die_reader): Add abbrev_table parameter.
14522         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14523         Add result_dwo_abbrev_table.
14524         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14525         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14526         Update.
14527         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14528         parameter.
14529         (skip_children): Update.
14530         (abbrev_table::alloc_abbrev): Rename from
14531         abbrev_table_alloc_abbrev.
14532         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14533         (abbrev_table::lookup_abbrev): Rename from
14534         abbrev_table_lookup_abbrev.
14535         (abbrev_table_read_table): Return abbrev_table_up.
14536         (abbrev_table_free, abbrev_table_free_cleanup)
14537         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14538         (load_partial_dies): Update.
14539
14540 2018-01-17  Tom Tromey  <tom@tromey.com>
14541
14542         * dwarf2read.c (dwarf2_compute_name): Update comment.
14543         (read_func_scope, read_variable): Update.
14544         (new_symbol): Remove.
14545         (new_symbol_full): Rename to new_symbol.
14546
14547 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14548
14549         PR gdb/16577
14550         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14551         a warning instead of throwing an error, set section size to 0 and return
14552         NULL.
14553         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14554
14555 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14556
14557         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14558         std::string.
14559         (linux_ptrace_attach_fail_reason_string): Likewise.
14560         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14561         Likewise.
14562         (linux_ptrace_attach_fail_reason_string): Likewise.
14563         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14564
14565 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14566
14567         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14568
14569 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14570
14571         PR gdb/21559
14572         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14573         checking for fs_base/gs_base fields in struct user_regs_struct.
14574         * configure: Regenerate.
14575
14576 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14577
14578         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14579         function.
14580         (aarch64_linux_init_abi): Install it to gdbarch hook
14581         gcc_target_options.
14582
14583 2018-01-15  Pedro Alves  <palves@redhat.com>
14584
14585         * common/signals-state-save-restore.c
14586         (save_original_signals_state): Fix typos.
14587
14588 2017-01-12  Tom Tromey  <tom@tromey.com>
14589             Sergio Durigan Junior  <sergiodj@redhat.com>
14590
14591         * Makefile.in (install-only): Install gdb-add-index.
14592
14593 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14594
14595         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14596
14597 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14598
14599         * infrun.c (keep_going_pass_signal): Clear step-over info when
14600         insert_breakpoints fails.
14601
14602 2018-01-11  Pedro Alves  <palves@redhat.com>
14603
14604         PR gdb/22583
14605         * infrun.c (resume): Rename to ...
14606         (resume_1): ... this.
14607         (resume): Reimplement as wrapper around resume_1.
14608
14609 2018-01-11  Pedro Alves  <palves@redhat.com>
14610
14611         PR remote/22597
14612         * remote.c (remote_parse_stop_reply): Default to the last-set
14613         general thread instead of to 'magic_null_ptid'.
14614
14615 2018-01-10  Pedro Alves  <palves@redhat.com>
14616
14617         * language.h (language_get_symbol_name_matcher): Rename ...
14618         (get_symbol_name_matcher): ... this.
14619         * language.c (language_get_symbol_name_matcher): Ditto.
14620         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14621         callers adjusted.
14622
14623 2018-01-10  Pedro Alves  <palves@redhat.com>
14624
14625         PR gdb/22670
14626         * dwarf2read.c
14627         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14628         Adjust to use language_get_symbol_name_matcher instead of
14629         language_defn::la_get_symbol_name_matcher.
14630         * language.c (language_get_symbol_name_matcher): If in Ada mode
14631         and the lookup name is a verbatim match, return Ada's matcher.
14632         * language.h (language_get_symbol_name_matcher): Adjust comment.
14633         (ada_lookup_name_info::verbatim_p):: New method.
14634
14635 2018-01-10  Pedro Alves  <palves@redhat.com>
14636
14637         PR gdb/22670
14638         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14639         minsym's language is language_auto or language_cplus, pass down
14640         language_ada instead.
14641         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14642
14643 2018-01-10  Pedro Alves  <palves@redhat.com>
14644
14645         PR gdb/22670
14646         * minsyms.c (linkage_name_str): New function.
14647         (iterate_over_minimal_symbols): Use it.
14648
14649 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14650
14651         * NEWS: Document that 'info proc' now works on FreeBSD.
14652
14653 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14654
14655         * configure.ac: Check for kinfo_getfile in libutil.
14656         * configure: Regenerate.
14657         * config.in: Regenerate.
14658         * fbsd-nat.c: Include "fbsd-tdep.h".
14659         (fbsd_fetch_cmdline): New.
14660         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14661         rather than calling error.
14662         (fbsd_info_proc): New.
14663         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14664         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14665         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14666
14667 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14668
14669         * fbsd-nat.c (struct free_deleter): Remove.
14670         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14671
14672 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14673
14674         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14675         NULL for an empty pathname.
14676
14677 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14678
14679         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14680         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14681         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14682         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14683         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14684         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14685         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14686         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14687         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14688         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14689         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14690         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14691         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14692         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14693         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14694
14695 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14696
14697         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14698         (gnu_xfer_auxv): New function.
14699         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14700         TARGET_OBJECT_AUXV.
14701
14702 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14703             Simon Marchi  <simon.marchi@ericsson.com>
14704
14705         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14706         common/selftest.c.
14707         (COMMON_OBS): Remove selftest.o.
14708         * configure.ac: Append selftest-arch.c and common/selftest.c to
14709         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14710         * configure: Re-generated.
14711         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14712         GDB_SELF_TEST.
14713         (maintenance_info_selftests): Likewise.
14714
14715 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14716
14717         * ada-valprint.c (val_print_packed_array_elements): Use
14718         proper number of elements when printing an array indexed
14719         by an enumeration type.
14720
14721 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14722
14723         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14724         (dw2_get_file_names_reader): Adjust.
14725         (lookup_dwo_signatured_type): Adjust.
14726         (lookup_dwp_signatured_type): Adjust.
14727         (lookup_signatured_type): Adjust.
14728         (create_type_unit_group): Adjust.
14729         (get_type_unit_group): Adjust.
14730         (process_psymtab_comp_unit_reader): Adjust.
14731         (build_type_psymtabs_reader): Adjust.
14732         (scan_partial_symbols): Adjust.
14733         (add_partial_symbol): Adjust.
14734         (add_partial_subprogram): Adjust.
14735         (peek_die_abbrev): Adjust.
14736         (fixup_go_packaging): Adjust.
14737         (process_imported_unit_die): Adjust.
14738         (dwarf2_compute_name): Adjust.
14739         (dwarf2_physname): Adjust.
14740         (read_import_statement): Adjust.
14741         (handle_DW_AT_stmt_list): Adjust.
14742         (read_file_scope): Adjust.
14743         (read_func_scope): Adjust.
14744         (read_lexical_block_scope): Adjust.
14745         (read_call_site_scope): Adjust.
14746         (read_variable): Adjust.
14747         (dwarf2_rnglists_process): Adjust.
14748         (dwarf2_ranges_process): Adjust.
14749         (dwarf2_ranges_read): Adjust.
14750         (dwarf2_get_pc_bounds): Adjust.
14751         (dwarf2_record_block_ranges): Adjust.
14752         (dwarf2_add_field): Adjust.
14753         (dwarf2_add_member_fn): Adjust.
14754         (read_structure_type): Adjust.
14755         (process_structure_scope): Adjust.
14756         (read_enumeration_type): Adjust.
14757         (read_array_type): Adjust.
14758         (mark_common_block_symbol_computed): Adjust.
14759         (read_common_block): Adjust.
14760         (read_namespace_type): Adjust.
14761         (read_namespace): Adjust.
14762         (read_module_type): Adjust.
14763         (read_tag_pointer_type): Adjust.
14764         (read_tag_ptr_to_member_type): Adjust.
14765         (read_tag_string_type): Adjust.
14766         (read_subroutine_type): Adjust.
14767         (read_typedef): Adjust.
14768         (read_base_type): Adjust.
14769         (attr_to_dynamic_prop): Adjust.
14770         (read_subrange_type): Adjust.
14771         (read_unspecified_type): Adjust.
14772         (dwarf2_read_abbrevs): Adjust.
14773         (load_partial_dies): Adjust.
14774         (read_partial_die): Adjust.
14775         (find_partial_die): Adjust.
14776         (guess_partial_die_structure_name): Adjust.
14777         (fixup_partial_die): Adjust.
14778         (read_attribute_value): Adjust.
14779         (read_addr_index): Adjust.
14780         (read_addr_index_from_leb128): Adjust.
14781         (read_str_index): Adjust.
14782         (dwarf2_string_attr): Adjust.
14783         (get_debug_line_section): Adjust.
14784         (dwarf_decode_line_header): Adjust.
14785         (lnp_state_machine::check_line_address): Adjust.
14786         (dwarf_decode_lines_1): Adjust.
14787         (dwarf_decode_lines): Adjust.
14788         (dwarf2_start_symtab): Adjust.
14789         (var_decode_location): Adjust.
14790         (new_symbol_full): Adjust.
14791         (dwarf2_const_value_data): Adjust.
14792         (dwarf2_const_value_attr): Adjust.
14793         (dwarf2_const_value): Adjust.
14794         (die_type): Adjust.
14795         (die_containing_type): Adjust.
14796         (build_error_marker_type): Adjust.
14797         (lookup_die_type): Adjust.
14798         (guess_full_die_structure_name): Adjust.
14799         (anonymous_struct_prefix): Adjust.
14800         (determine_prefix): Adjust.
14801         (dwarf2_name): Adjust.
14802         (follow_die_ref_or_sig): Adjust.
14803         (follow_die_offset): Adjust.
14804         (follow_die_ref): Adjust.
14805         (follow_die_sig_1): Adjust.
14806         (follow_die_sig): Adjust.
14807         (get_signatured_type): Adjust.
14808         (get_DW_AT_signature_type): Adjust.
14809         (decode_locdesc): Adjust.
14810         (dwarf_decode_macros): Adjust.
14811         (cu_debug_loc_section): Adjust.
14812         (fill_in_loclist_baton): Adjust.
14813         (dwarf2_symbol_mark_computed): Adjust.
14814         (init_one_comp_unit): Don't assign
14815         dwarf2_cu::dwarf2_per_objfile.
14816         (set_die_type): Adjust.
14817
14818 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14819
14820         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14821         <dwarf2_per_objfile>: New field.
14822         (dwarf2_per_objfile): Remove global.
14823         (get_dwarf2_per_objfile): New function.
14824         (set_dwarf2_per_objfile): New function.
14825         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14826         dwarf2_per_objfile.
14827         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14828         (read_abbrev_offset): Likewise.
14829         (read_indirect_string): Likewise.
14830         (read_indirect_line_string): Likewise.
14831         (read_indirect_string_at_offset): Likewise.
14832         (read_indirect_string_from_dwz): Likewise.
14833         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14834         dwarf2_per_objfile.
14835         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14836         (create_all_comp_units): Change objfile parameter to
14837         dwarf2_per_objfile.
14838         (create_all_type_units): Likewise.
14839         (process_queue): Add dwarf2_per_objfile parameter.
14840         (read_and_check_comp_unit_head): Likewise.
14841         (lookup_dwo_unit_in_dwp): Likewise.
14842         (get_dwp_file): Likewise.
14843         (process_cu_includes): Likewise.
14844         (struct free_dwo_file_cleanup_data): New struct.
14845         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14846         set_dwarf2_per_objfile.
14847         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14848         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14849         context, adjust calls.
14850         (dw2_instantiate_symtab): Likewise.
14851         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14852         (dw2_get_cu): Likewise.
14853         (create_cu_from_index_list): Change objfile parameter to
14854         dwarf2_per_objfile.
14855         (create_cus_from_index_list): Get dwarf2_per_objfile from
14856         context, adjust calls.
14857         (create_cus_from_index): Likewise.
14858         (create_signatured_type_table_from_index): Change objfile
14859         parameter to dwarf2_per_objfile.
14860         (create_signatured_type_table_from_debug_names): Change objfile
14861         parameter to dwarf2_per_objfile.
14862         (create_addrmap_from_index): Likewise.
14863         (create_addrmap_from_aranges): Likewise.
14864         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14865         (dw2_setup): Remove.
14866         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14867         context.
14868         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14869         get_dwarf2_per_objfile.
14870         (dw2_forget_cached_source_info): Likewise.
14871         (dw2_map_symtabs_matching_filename): Likewise.
14872         (struct dw2_symtab_iterator) <index>: Remove.
14873         <dwarf2_per_objfile>: New field.
14874         (dw2_symtab_iter_init): Replace index parameter with
14875         dwarf2_per_objfile.
14876         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14877         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14878         (dw2_print_stats): Likewise.
14879         (dw2_dump): Likewise.
14880         (dw2_expand_symtabs_for_function): Likewise.
14881         (dw2_expand_all_symtabs): Likewise.
14882         (dw2_expand_symtabs_with_fullname): Likewise.
14883         (dw2_expand_marked_cus): Replace index and objfile parameters
14884         with dwarf2_per_objfile.
14885         (dw_expand_symtabs_matching_file_matcher): Add
14886         dwarf2_per_objfile parameter and adjust calls.
14887         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14888         adjust calls.
14889         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14890         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14891         adjust calls.
14892         (create_cus_from_debug_names_list): Replace objfile parameter
14893         with dwarf2_per_objfile and adjust calls.
14894         (create_cus_from_debug_names): Likewise.
14895         (dwarf2_read_debug_names): Likewise.
14896         (mapped_debug_names::namei_to_name): Adjust call.
14897         (dw2_debug_names_iterator::next): Likewise.
14898         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14899         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14900         (dw2_debug_names_dump): Likewise.
14901         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14902         (dw2_debug_names_expand_symtabs_matching): Likewise.
14903         (dwarf2_initialize_objfile): Likewise.
14904         (dwarf2_build_psymtabs): Likewise.
14905         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14906         this_cu.
14907         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14908         (read_and_check_comp_unit_head): Likewise.
14909         (read_abbrev_offset): Likewise.
14910         (create_debug_type_hash_table): Likewise.
14911         (create_debug_types_hash_table): Likewise.
14912         (create_all_type_units): Replace objfile parameter with
14913         dwarf2_per_objfile.
14914         (add_type_unit): Add dwarf2_per_objfile parameter.
14915         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14916         with dwarf2_per_objfile.
14917         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14918         (lookup_dwp_signatured_type): Likewise.
14919         (lookup_signatured_type): Likewise.
14920         (read_cutu_die_from_dwo): Likewise.
14921         (init_tu_and_read_dwo_dies): Likewise.
14922         (init_cutu_and_read_dies): Likewise.
14923         (init_cutu_and_read_dies_no_follow): Likewise.
14924         (allocate_type_unit_groups_table): Add objfile parameter.
14925         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14926         (get_type_unit_group): Likewise.
14927         (process_psymtab_comp_unit): Update call.
14928         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14929         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14930         (print_tu_stats): Likewise.
14931         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14932         in void* parameter.
14933         (build_type_psymtabs): Change objfile parameter to
14934         dwarf2_per_objfile.
14935         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14936         passed in void* parameter.
14937         (process_skeletonless_type_units): Change objfile parameter to
14938         dwarf2_per_objfile.
14939         (set_partial_user): Likewise.
14940         (dwarf2_build_psymtabs_hard): Likewise.
14941         (read_comp_units_from_section): Likewise.
14942         (create_all_comp_units): Likewise.
14943         (scan_partial_symbols): Update calls.
14944         (add_partial_symbol): Likewise.
14945         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14946         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14947         (process_queue): Add dwarf2_per_objfile parameter.
14948         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14949         (compute_compunit_symtab_includes): Likewise.
14950         (process_cu_includes): Add dwarf2_per_objfile parameter.
14951         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14952         (process_full_type_unit): Likewise.
14953         (process_imported_unit_die): Update call.
14954         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14955         (read_file_scope): Likewise.
14956         (allocate_dwo_file_hash_table): Add objfile parameter.
14957         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14958         (create_cus_hash_table): Likewise.
14959         (create_dwp_hash_table): Likewise.
14960         (create_dwo_unit_in_dwp_v1): Likewise.
14961         (create_dwp_v2_section): Likewise.
14962         (create_dwo_unit_in_dwp_v2): Likewise.
14963         (lookup_dwo_unit_in_dwp): Likewise.
14964         (try_open_dwop_file): Likewise.
14965         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14966         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14967         cleanup to include a reference to dwarf2_per_objfile.
14968         (open_dwp_file): Add dwarf2_per_objfile parameter.
14969         (open_and_init_dwp_file): Likewise.
14970         (get_dwp_file): Likewise.
14971         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14972         (queue_and_load_all_dwo_tus): Update call.
14973         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14974         data.
14975         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14976         (dwarf2_ranges_process): Likewise.
14977         (dwarf2_get_pc_bounds): Likewise.
14978         (mark_common_block_symbol_computed): Likewise.
14979         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14980         (dwarf2_read_abbrevs): Update call.
14981         (read_partial_die): Use dwarf2_per_objfile from cu.
14982         (find_partial_die): Likewise.
14983         (fixup_partial_die): Likewise.
14984         (read_attribute_value): Likewise.
14985         (read_indirect_string_at_offset_from): Add objfile parameter.
14986         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14987         parameter.
14988         (read_indirect_string_from_dwz): Add objfile parameter.
14989         (read_indirect_string): Add objfile parameter.
14990         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14991         (read_addr_index): Use dwarf2_per_objfile from cu.
14992         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14993         call dw2_setup.
14994         (read_str_index): Use dwarf2_per_objfile from cu.
14995         (get_debug_line_section): Likewise.
14996         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14997         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14998         (new_symbol_full): Use dwarf2_per_objfile from cu.
14999         (build_error_marker_type): Likewise.
15000         (lookup_die_type): Likewise.
15001         (determine_prefix): Likewise.
15002         (follow_die_offset): Likewise.
15003         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15004         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15005         (dwarf2_fetch_die_type_sect_off): Likewise.
15006         (dwarf2_get_die_type): Likewise.
15007         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15008         (get_signatured_type): Likewise.
15009         (get_DW_AT_signature_type): Likewise.
15010         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15011         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15012         (cu_debug_loc_section): Likewise.
15013         (fill_in_loclist_baton): Likewise.
15014         (dwarf2_symbol_mark_computed): Likewise.
15015         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15016         dwarf2_per_objfile.
15017         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15018         parameter.
15019         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15020         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15021         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15022         (set_die_type): Use dwarf2_free_objfile from cu.
15023         (get_die_type_at_offset): Likewise.
15024         (dwarf2_per_objfile_free): Don't assign global variable.
15025         (debug_names) <constructor>: Add dwarf2_per_objfile
15026         parameter, update m_debugstrlookup construction.
15027         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15028         parameter.
15029         <m_dwarf2_per_objfile>: New field.
15030         <lookup>: Use m_dwarf2_per_objfile.
15031         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15032         (psyms_seen_size): Likewise.
15033         (write_gdbindex): Replace objfile parameter with
15034         dwarf2_per_objfile.
15035         (write_debug_names): Likewise.
15036         (write_psymtabs_to_index): Likewise.
15037         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15038         calls.
15039
15040 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15041
15042         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15043         <dwarf2_per_objfile>: New field.
15044         (struct dwarf2_per_cu_data) <objfile>: Remove.
15045         <dwarf2_per_objfile>: New field.
15046         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15047         of objfile.
15048         (create_signatured_type_table_from_index): Likewise.
15049         (create_debug_type_hash_table): Likewise.
15050         (fill_in_sig_entry_from_dwo_entry): Likewise.
15051         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15052         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15053         objfile.
15054         (create_partial_symtab): Access objfile through
15055         dwarf2_per_objfile.
15056         (process_psymtab_comp_unit_reader): Likewise.
15057         (read_comp_units_from_section): Likewise.
15058         (scan_partial_symbols): Likewise.
15059         (add_partial_symbol): Likewise.
15060         (add_partial_subprogram): Likewise.
15061         (peek_die_abbrev): Likewise.
15062         (fixup_go_packaging): Likewise.
15063         (process_full_comp_unit): Likewise.
15064         (process_full_type_unit): Likewise.
15065         (process_imported_unit_die): Likewise.
15066         (dwarf2_compute_name): Likewise.
15067         (dwarf2_physname): Likewise.
15068         (read_import_statement): Likewise.
15069         (create_cus_hash_table): Assign dwarf2_physname instead of
15070         objfile.
15071         (read_func_scope): Access objfile through dwarf2_per_objfile.
15072         (read_lexical_block_scope): Likewise.
15073         (read_call_site_scope): Likewise.
15074         (read_variable): Likewise.
15075         (dwarf2_rnglists_process): Likewise.
15076         (dwarf2_ranges_process): Likewise.
15077         (dwarf2_ranges_read): Likewise.
15078         (dwarf2_record_block_ranges): Likewise.
15079         (dwarf2_add_field): Likewise.
15080         (dwarf2_add_member_fn): Likewise.
15081         (read_structure_type): Likewise.
15082         (process_structure_scope): Likewise.
15083         (read_enumeration_type): Likewise.
15084         (read_array_type): Likewise.
15085         (read_common_block): Likewise.
15086         (read_namespace_type): Likewise.
15087         (read_namespace): Likewise.
15088         (read_module_type): Likewise.
15089         (read_tag_pointer_type): Likewise.
15090         (read_tag_ptr_to_member_type): Likewise.
15091         (read_tag_string_type): Likewise.
15092         (read_subroutine_type): Likewise.
15093         (read_typedef): Likewise.
15094         (read_base_type): Likewise.
15095         (attr_to_dynamic_prop): Likewise.
15096         (read_subrange_type): Likewise.
15097         (read_unspecified_type): Likewise.
15098         (load_partial_dies): Likewise.
15099         (read_partial_die): Likewise.
15100         (find_partial_die): Likewise.
15101         (guess_partial_die_structure_name): Likewise.
15102         (fixup_partial_die): Likewise.
15103         (read_attribute_value): Likewise.
15104         (read_addr_index_from_leb128): Likewise.
15105         (dwarf2_read_addr_index): Likewise.
15106         (dwarf2_string_attr): Likewise.
15107         (lnp_state_machine::check_line_address): Likewise.
15108         (dwarf_decode_lines_1): Likewise.
15109         (dwarf_decode_lines): Likewise.
15110         (dwarf2_start_symtab): Likewise.
15111         (var_decode_location): Likewise.
15112         (new_symbol_full): Likewise.
15113         (dwarf2_const_value_data): Likewise.
15114         (dwarf2_const_value_attr): Likewise.
15115         (dwarf2_const_value): Likewise.
15116         (die_type): Likewise.
15117         (die_containing_type): Likewise.
15118         (lookup_die_type): Likewise.
15119         (guess_full_die_structure_name): Likewise.
15120         (anonymous_struct_prefix): Likewise.
15121         (dwarf2_name): Likewise.
15122         (follow_die_ref_or_sig): Likewise.
15123         (follow_die_offset): Likewise.
15124         (follow_die_ref): Likewise.
15125         (dwarf2_fetch_die_loc_sect_off): Likewise.
15126         (dwarf2_fetch_constant_bytes): Likewise.
15127         (dwarf2_fetch_die_type_sect_off): Likewise.
15128         (dwarf2_get_die_type): Likewise.
15129         (follow_die_sig): Likewise.
15130         (decode_locdesc): Likewise.
15131         (dwarf2_per_cu_objfile): Likewise.
15132         (dwarf2_per_cu_text_offset): Likewise.
15133         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15134         objfile.
15135         (set_die_type): Access objfile through
15136         dwarf2_per_objfile.
15137
15138 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15139
15140         * valprint.c (converted_character_d): Remove typedef.
15141         (DEF_VEC_O (converted_character_d)): Remove.
15142         (count_next_character): Use std::vector.
15143         (print_converted_chars_to_obstack): Likewise.
15144         (generic_printstr): Likewise.
15145
15146 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15147
15148         * xml-support.h (struct gdb_xml_value): Add constructor.
15149         <value>: Change type to unique_xmalloc_ptr.
15150         (gdb_xml_value_s): Remove typedef.
15151         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15152         (gdb_xml_element_start_handler): Change parameter type to
15153         std::vector.
15154         (xml_find_attribute): Likewise.
15155         * xml-support.c (xml_find_attribute): Change parameter type to
15156         std::vector and adjust.
15157         (gdb_xml_values_cleanup): Remove.
15158         (gdb_xml_parser::start_element): Adjust to std::vector.
15159         (xinclude_start_include): Change paraeter type to std::vector
15160         and adjust.
15161         * btrace.c (check_xml_btrace_version): Likewise.
15162         (parse_xml_btrace_block): Likewise.
15163         (parse_xml_btrace_pt_config_cpu): Likewise.
15164         (parse_xml_btrace_pt): Likewise.
15165         (parse_xml_btrace_conf_bts): Likewise.
15166         (parse_xml_btrace_conf_pt): Likewise.
15167         * memory-map.c (memory_map_start_memory): Likewise.
15168         (memory_map_start_property): Likewise.
15169         * osdata.c (osdata_start_osdata): Likewise.
15170         (osdata_start_item): Likewise.
15171         (osdata_start_column): Likewise.
15172         * remote.c (start_thread): Likewise.
15173         * solib-aix.c (library_list_start_library): Likewise.
15174         (library_list_start_list): Likewise.
15175         * solib-svr4.c (library_list_start_library): Likewise.
15176         (svr4_library_list_start_list): Likewise.
15177         * solib-target.c (library_list_start_segment): Likewise.
15178         (library_list_start_section): Likewise.
15179         (library_list_start_library): Likewise.
15180         (library_list_start_list): Likewise.
15181         * tracepoint.c (traceframe_info_start_memory): Likewise.
15182         (traceframe_info_start_tvar): Likewise.
15183         * xml-syscall.c (syscall_start_syscall): Likewise.
15184         * xml-tdesc.c (tdesc_start_target): Likewise.
15185         (tdesc_start_feature): Likewise.
15186         (tdesc_start_reg): Likewise.
15187         (tdesc_start_union): Likewise.
15188         (tdesc_start_struct): Likewise.
15189         (tdesc_start_flags): Likewise.
15190         (tdesc_start_enum): Likewise.
15191         (tdesc_start_field): Likewise.
15192         (tdesc_start_enum_value): Likewise.
15193         (tdesc_start_vector): Likewise.
15194
15195 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15196
15197         * extension.h (struct xmethod_worker) <clone>: Remove.
15198         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15199         Remove.
15200         (python_xmethod_worker::clone): Remove.
15201         * valops.c (find_overload_match): Use std::move instead of
15202         clone.
15203
15204 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15205
15206         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15207         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15208         <free_xmethod_worker_data>: Remove.
15209         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15210         <get_xmethod_arg_types>: Remove.
15211         <get_xmethod_result_type>: Remove.
15212         <invoke_xmethod>: Remove.
15213         * extension.c (new_xmethod_worker): Remove.
15214         (clone_xmethod_worker): Remove.
15215         (get_matching_xmethod_workers): Return void, pass std::vector by
15216         pointer.
15217         (get_xmethod_arg_types): Rename to...
15218         (xmethod_worker::get_arg_types): ... this, and adjust.
15219         (get_xmethod_result_type): Rename to...
15220         (xmethod_worker::get_result_type): ... this, and adjust.
15221         (invoke_xmethod): Remove.
15222         (free_xmethod_worker): Remove.
15223         (free_xmethod_worker_vec): Remove.
15224         * extension.h (enum ext_lang_rc): Move here from
15225         extension-priv.h.
15226         (struct xmethod_worker): Add constructor and destructor.
15227         <data>: Remove.
15228         <value>: Remove.
15229         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15230         virtual pure methods.
15231         <get_arg_types, get_result_type>: New methods.
15232         (xmethod_worker_ptr): Remove typedef.
15233         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15234         (xmethod_worker_vec): Remove typedef.
15235         (xmethod_worker_up): New typedef.
15236         (invoke_xmethod): Remove.
15237         (clone_xmethod_worker): Remove.
15238         (free_xmethod_worker): Remove.
15239         (free_xmethod_worker_vec): Remove.
15240         (get_xmethod_arg_types): Remove.
15241         (get_xmethod_result_type): Remove.
15242         * valops.c (find_method_list): Use std::vector, don't use
15243         intermediate vector.
15244         (value_find_oload_method_list): Use std::vector.
15245         (find_overload_match): Use std::vector.
15246         (find_oload_champ): Use std::vector.
15247         * value.c (value_free): Use operator delete.
15248         (value_of_xmethod): Rename to...
15249         (value_from_xmethod): ... this.  Don't assign
15250         xmethod_worker::value, take rvalue-reference.
15251         (result_type_of_xmethod): Adjust.
15252         (call_xmethod): Adjust.
15253         * value.h: Include extension.h.
15254         (struct xmethod_worker): Don't forward-declare.
15255         (value_of_xmethod): Rename to...
15256         (value_from_xmethod): ... this, take rvalue-reference.
15257         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15258         (struct python_xmethod_worker): ... this, add constructor and
15259         destructor.
15260         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15261         (gdbpy_free_xmethod_worker_data): Rename to...
15262         (python_xmethod_worker::~python_xmethod_worker): ... this and
15263         adjust.
15264         (gdbpy_clone_xmethod_worker_data): Rename to...
15265         (python_xmethod_worker::clone): ... this and adjust.
15266         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15267         temporary vector.
15268         (gdbpy_get_xmethod_arg_types): Rename to...
15269         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15270         (gdbpy_get_xmethod_result_type): Rename to...
15271         (python_xmethod_worker::do_get_result_type): ... this and
15272         adjust.
15273         (gdbpy_invoke_xmethod): Rename to...
15274         (python_xmethod_worker::invoke): ... this and adjust.
15275         (new_python_xmethod_worker): Rename to...
15276         (python_xmethod_worker::python_xmethod_worker): ... this and
15277         adjust.
15278         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15279         Remove.
15280         (gdbpy_free_xmethod_worker_data): Remove.
15281         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15282         (gdbpy_get_xmethod_arg_types): Remove.
15283         (gdbpy_get_xmethod_result_type): Remove.
15284         (gdbpy_invoke_xmethod): Remove.
15285         * python/python.c (python_extension_ops): Remove obsolete
15286         callbacks.
15287
15288 2018-01-05  Pedro Alves  <palves@redhat.com>
15289
15290         PR gdb/18653
15291         * common/signals-state-save-restore.c
15292         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15293         find a custom handler preinstalled, instead of internal erroring.
15294         But only warn if !quiet.
15295         * common/signals-state-save-restore.h
15296         (save_original_signals_state): New parameter 'quiet'.
15297         * main.c (captured_main_1): Move save_original_signals_state call
15298         after option handling, and pass QUIET.
15299
15300 2018-01-05  Pedro Alves  <palves@redhat.com>
15301
15302         * spu-tdep.c (spu_catch_start): Pass
15303         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15304
15305 2018-01-05  Pedro Alves  <palves@redhat.com>
15306
15307         PR gdb/22670
15308         * ada-lang.c (literal_symbol_name_matcher): New function.
15309         (ada_get_symbol_name_matcher): Use it for
15310         symbol_name_match_type::SEARCH_NAME.
15311         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15312         it down instead of assuming symbol_name_match_type::FULL.
15313         * block.h (block_lookup_symbol): New parameter 'match_type'.
15314         * c-valprint.c (print_unpacked_pointer): Use
15315         lookup_symbol_search_name instead of lookup_symbol.
15316         * compile/compile-object-load.c (get_out_value_type): Pass down
15317         symbol_name_match_type::SEARCH_NAME.
15318         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15319         symbol_name_match_type::FULL.
15320         * cp-support.c (cp_get_symbol_name_matcher): Handle
15321         symbol_name_match_type::SEARCH_NAME.
15322         * infrun.c (insert_exception_resume_breakpoint): Use
15323         lookup_symbol_search_name.
15324         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15325         * psymtab.c (maintenance_check_psymtabs): Use
15326         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15327         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15328         SYMBOL_SEARCH_NAME.
15329         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15330         if symbol_name_match_type::SEARCH_NAME.
15331         (lookup_symbol_in_language): Pass down
15332         symbol_name_match_type::FULL.
15333         (lookup_symbol_search_name): New.
15334         (lookup_language_this): Pass down
15335         symbol_name_match_type::SEARCH_NAME.
15336         (lookup_symbol_aux, lookup_local_symbol): New parameter
15337         'match_type'.  Pass it down.
15338         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15339         (lookup_symbol_search_name): New declaration.
15340         (lookup_symbol_in_block): New 'match_type' parameter.
15341
15342 2018-01-05  Pedro Alves  <palves@redhat.com>
15343
15344         PR gdb/22670
15345         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15346         ada_lookup_symbol.
15347         (ada_lookup_symbol): Reimplement in terms of
15348         ada_lookup_symbol_list, bits factored out from
15349         ada_lookup_encoded_symbol.
15350
15351 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15352
15353         * ada-exp.y (write_object_renaming): When subscripting an array
15354         using a symbol as the index, pass the block in call to
15355         ada_lookup_encoded_symbol when looking that symbol up.
15356
15357 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15358
15359         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15360         TYPE_INDEX_TYPE.
15361
15362 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15363
15364         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15365         the case where VALUE_LVAL (val0) is not lval_memory.
15366
15367 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15368
15369         * ada-valprint.c (print_optional_low_bound): Handle
15370         character-indexed array printing like boolean-indexed array
15371         printing.
15372
15373 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15374
15375         * NEWS: Create a new section for the next release branch.
15376         Rename the section of the current branch, now that it has
15377         been cut.
15378
15379 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15380
15381         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15382         * version.in: Bump version to 8.1.50.DATE-git.
15383
15384 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15385
15386         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15387         Add field.
15388         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15389         Add field.
15390         (default_exception_support_info) <catch_handlers_sym>: Add field.
15391         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15392         (ada_exception_name_addr_1): Add "catch handlers" handling.
15393         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15394         Update all callers.
15395         (create_excep_cond_exprs) <ex>: Add parameter.
15396         (re_set_exception): Update create_excep_cond_exprs call.
15397         (print_it_exception, print_one_exception, print_mention_exception)
15398         (print_recreate_exception): Add "catch handler" handling.
15399         (allocate_location_catch_handlers, re_set_catch_handlers)
15400         (check_status_catch_handlers, print_it_catch_handlers)
15401         (print_one_catch_handlers, print_mention_catch_handlers)
15402         (print_recreate_catch_handlers): New function.
15403         (catch_handlers_breakpoint_ops): New variable.
15404         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15405         Add parameter.  Add "catch handler" handling.
15406         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15407         Add "catch handler" handling.
15408         (ada_exception_catchpoint_cond_string): Add "catch handler"
15409         handling.
15410         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15411         call.
15412         (catch_ada_handlers_command): New function.
15413         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15414         operations structure.
15415         (_initialize_ada_language): Add "catch handlers" command entry.
15416         * NEWS: Document "catch handlers" feature.
15417
15418 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15419
15420         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15421         account when creating the array type of the slice.
15422         (ada_value_slice): Likewise.
15423
15424 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15425
15426         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15427         New enum value.
15428         (create_array_type_with_stride): Add byte_stride_prop parameter.
15429         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15430         New parameter.  Update all callers in this file.
15431         (array_type_has_dynamic_stride): New function.
15432         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15433         of arrays with dynamic byte strides.
15434         * dwarf2read.c (read_array_type): Add support for dynamic
15435         DW_AT_byte_stride attributes.
15436
15437 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15438
15439         * dwarf2read.c (read_unspecified_type): Treat
15440         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15441
15442 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15443
15444         Update copyright year range in all GDB files.
15445
15446 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15447
15448         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15449         and gdb/testsuite/gdb.base/step-line.c.
15450
15451 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15452
15453         * copyright.py (main): Dump the contents of
15454         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15455         even if BY_HAND is empty.
15456
15457 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15458
15459         * top.c (print_gdb_version): Update Copyright year in version
15460         message.
15461
15462 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15463
15464         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15465
15466 For older changes see ChangeLog-2017.
15467 \f
15468 Local Variables:
15469 mode: change-log
15470 left-margin: 8
15471 fill-column: 74
15472 version-control: never
15473 coding: utf-8
15474 End: