Reading signal handler frame in AIX
[external/binutils.git] / gdb / ChangeLog
1 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
2
3         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
4         (SIG_FRAME_LR_OFFSET64): New define.
5         (SIG_FRAME_FP_OFFSET64): New define.
6         (aix_sighandle_frame_cache): New Function.
7         (aix_sighandle_frame_this_id): New Function.
8         (aix_sighandle_frame_prev_register): New Function.
9         (aix_sighandle_frame_sniffer): New Function.
10         (aix_sighandle_frame_unwind): New global variable.
11         (rs6000_aix_init_osabi): Install new frame unwinder.
12
13 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
14
15         PR gdb/23835
16         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
17         already defined.
18
19 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
20
21         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
22
23 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
24
25         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
26         (producer_is_icc): New function.
27         (check_producer): Set producer_is_icc field on dwarf2_cu.
28         (dwarf2_init_integer_type): New function.
29         (read_base_type): Call dwarf2_init_integer_type instead of
30         init_integer_type in all cases.
31         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
32         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
33         LEN is greater than 0.
34
35 2018-10-30  Tom Tromey  <tom@tromey.com>
36
37         * main.c (captured_main_1): Check return value of bfd_init.
38
39 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
40
41         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
42         Adjust comments.
43
44 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
45
46         * procfs.c: Include common/pathstuff.h.
47
48 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
49
50         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
51         Add missing braces.  No functional change.
52
53 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
54
55         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
56         to report a bad option and fix indentation.
57         * demangle.c (demangle_command): Use report_unrecognized_option_error
58         to report a bad option and correctly report the bad option.
59
60 2018-10-27  Tom Tromey  <tom@tromey.com>
61
62         PR cli/23364:
63         * darwin-nat.c (copied_shell): New global.
64         (may_have_sip): Rename from should_disable_startup_with_shell.
65         (copy_shell_to_cache, maybe_cache_shell): New functions.
66         (darwin_nat_target::create_inferior): Update.  Use
67         copied_shell.
68
69 2018-10-27  Tom Tromey  <tom@tromey.com>
70
71         * unittests/scoped_fd-selftests.c (test_to_file): New function.
72         (run_tests): Call test_to_file.
73         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
74         temporary files.
75         * common/scoped_fd.h (scoped_fd::to_file): New method.
76
77 2018-10-27  Tom Tromey  <tom@tromey.com>
78
79         * unittests/scoped_mmap-selftests.c (test_normal): Use
80         gdb_mkostemp_cloexec.
81         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
82         Use gdb_mkostemp_cloexec.
83         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
84         gnulib/config.in, gnulib/configure,
85         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
86         gnulib/import/m4/gnulib-cache.m4,
87         gnulib/import/m4/gnulib-comp.m4: Update.
88         * gnulib/import/m4/mkostemp.m4: New file.
89         * gnulib/import/m4/mkstemp.m4: Remove.
90         * gnulib/import/mkostemp.c: New file.
91         * gnulib/import/mkstemp.m4: Remove.
92         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
93         mkstemp, add mkostemp.  Apply new patch.
94         * gnulib/import/stdlib.in.h: Apply patch.
95         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
96         New file.
97         * dwarf-index-write.c (write_psymtabs_to_index): Use
98         gdb_mkostemp_cloexec.
99         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
100
101 2018-10-27  Tom Tromey  <tom@tromey.com>
102
103         * unittests/mkdir-recursive-selftests.c: New file.
104         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
105         unittests/mkdir-recursive-selftests.c.
106         * dwarf-index-cache.c (mkdir_recursive): Move to
107         common/filestuff.c.
108         (index_cache::store): Check return value of mkdir_recursive.
109         (create_dir_and_check, test_mkdir_recursive): Move to new file.
110         (_initialize_index_cache): Don't register test.
111         * common/filestuff.h (mkdir_recursive): Declare.
112         * common/filestuff.c (mkdir_recursive): Move from
113         dwarf-index-cache.c.  Return bool.
114
115 2018-10-27  Tom Tromey  <tom@tromey.com>
116
117         * dwarf-index-write.c (write_psymtabs_to_index): Move
118         make_temp_filename to common/pathstuff.c.
119         * common/pathstuff.h (make_temp_filename): Declare.
120         * common/pathstuff.c (make_temp_filename): New function, moved
121         from dwarf-index-write.c.
122
123 2018-10-27  Tom Tromey  <tom@tromey.com>
124
125         * procfs.c (procfs_target::create_inferior): Use get_shell.
126         * cli/cli-cmds.c (shell_escape): Use get_shell.
127         * windows-nat.c (windows_nat_target::create_inferior): Use
128         get_shell.
129         * common/pathstuff.c (get_shell): New function.
130         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
131         (fork_inferior): Use get_shell.
132         * common/pathstuff.h (get_shell): Declare.
133
134 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
135
136         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
137
138 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
139
140         * stack.c (print_variable_and_value_data): Add preg and treg.
141         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
142         and update callers.
143         (print_frame_arg_vars): Likewise.
144         (prepare_reg): New function.
145         (info_locals_command): Extract info print args and use them.
146         (info_args_command): Likewise.
147         (_initialize_stack): Modify on-line help.
148         * symtab.c (treg_matches_sym_type_name): New function.
149         (search_symbols): New arg t_regexp.
150         (symtab_symbol_info): New args quiet, regexp, t_regexp.
151         (info_variables_command): Extract info print args and use them.
152         (info_functions_command): Likewise.
153         (info_types_command): Update call to symtab_symbol_info.
154         (_initialize_symtab): Modify on-line help.
155         * symtab.h (treg_matches_sym_type_name): New function.
156         (search_symbols): New t_regexp arg.
157
158 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
159
160         * cli-utils.c (extract_arg_maybe_quoted): New function.
161         (extract_info_print_args): New function.
162         (info_print_args_help): New function.
163         (report_unrecognized_option_error): New function.
164         * cli-utils.h (extract_arg_maybe_quoted): New function.
165         (extract_info_print_args): New function.
166         (info_print_args_help): New function.
167         (report_unrecognized_option_error): New function.
168
169 2018-10-26  Tom Tromey  <tom@tromey.com>
170
171         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
172         (compute_compunit_symtab_includes): Update.
173         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
174         (compunit_symtab_ptr): Likewise.
175
176 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
177
178         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
179         default_print_auxv_entry for specific tag values.
180
181 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
182
183         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
184
185 2018-10-26  Jim Wilson  <jimw@sifive.com>
186
187         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
188         (riscv_linux_sigframe_init): Declare.
189         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
190         (riscv_linux_sigframe): New.
191         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
192         (riscv_linux_sigframe_init): Define.
193         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
194
195         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
196         (riscv_isa_flen): Likewise.  Drop static.
197         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
198         (riscv_isa_flen): Likewise.  Declare.
199
200 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
201             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
202
203         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
204         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
205         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
206         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
207         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
208         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
209         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
210         Define.
211         (struct ppc_linux_features) <htm>: New field.
212         (ppc_linux_no_features): Add initializer for htm field.
213         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
214         new tdescs.
215         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
216         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
217         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
218         Define if not already defined.
219         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
220         and rs6000/powerpc-isa207-htm-vsx64l.
221         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
222         rs6000/powerpc-isa207-htm-vsx64l.xml.
223         * features/rs6000/power-htm-spr.xml: New file.
224         * features/rs6000/power-htm-core.xml: New file.
225         * features/rs6000/power64-htm-core.xml: New file.
226         * features/rs6000/power-htm-fpu.xml: New file.
227         * features/rs6000/power-htm-altivec.xml: New file.
228         * features/rs6000/power-htm-vsx.xml: New file.
229         * features/rs6000/power-htm-ppr.xml: New file.
230         * features/rs6000/power-htm-dscr.xml: New file.
231         * features/rs6000/power-htm-tar.xml: New file.
232         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
233         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
234         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
235         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
236         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
237         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
238         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
239         fetch_regset with HTM regsets.
240         (store_register, store_ppc_registers): Call store_regset with HTM
241         regsets.
242         (ppc_linux_nat_target::read_description): Set htm field in the
243         features struct if needed.
244         * ppc-linux-tdep.c: Include
245         features/rs6000/powerpc-isa207-htm-vsx32l.c and
246         features/rs6000/powerpc-isa207-htm-vsx64l.c.
247         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
248         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
249         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
250         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
251         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
252         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
253         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
254         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
255         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
256         (ppc32_linux_ctarregset): New globals.
257         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
258         (ppc_linux_collect_core_cpgrregset): New function.
259         (ppc_linux_iterate_over_regset_sections): Call back with the htm
260         regsets.
261         (ppc_linux_core_read_description): Check if the tm spr section is
262         present and set htm in the features struct.
263         (_initialize_ppc_linux_tdep): Call
264         initialize_tdesc_powerpc_isa207_htm_vsx32l and
265         initialize_tdesc_powerpc_isa207_htm_vsx64l.
266         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
267         Declare.
268         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
269         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
270         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
271         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
272         New fields.
273         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
274         Likewise.
275         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
276         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
277         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
278         New enum fields.
279         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
280         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
281         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
282         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
283         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
284         <PPC_CTAR_REGNUM>: Likewise.
285         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
286         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
287         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
288         (IS_CEFP_PSEUDOREG): Define.
289         (rs6000_register_name): Hide the upper halves of checkpointed VSX
290         registers.  Return names for the checkpointed DFP, VSX, and EFP
291         pseudo registers.
292         (rs6000_pseudo_register_type): Remove initial assert and raise an
293         internal error in the else clause instead.  Return types for the
294         checkpointed DFP, VSX, and EFP pseudo registers.
295         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
296         checkpointed DFP pseudo registers.
297         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
298         checkpointed VSX pseudo registers.
299         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
300         from efpr_pseudo_register_read and
301         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
302         registers.
303         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
304         Handle checkpointed DFP, VSX, and EFP registers.
305         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
306         (efp_ax_pseudo_register_collect): New functions.
307         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
308         register logic to new functions.  Handle checkpointed DFP, VSX,
309         and EFP pseudo registers.
310         (rs6000_gdbarch_init): Look for and validate the htm features.
311         Include checkpointed DFP, VSX and EFP pseudo-registers.
312         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
313         HTM registers.
314
315 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
316
317         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
318         without altivec or fpu.
319
320 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
321             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
322
323         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
324         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
325         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
326         Define if not already defined.
327         * features/rs6000/power-ebb.xml: New file.
328         * features/rs6000/power-linux-pmu.xml: New file.
329         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
330         features.
331         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
332         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
333         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
334         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
335         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
336         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
337         fetch_regset with ebb and pmu regsets.
338         (store_register, store_ppc_registers): Call store_regset with ebb
339         and pmu regsets.
340         (ppc_linux_nat_target::read_description): Set isa207 field in the
341         features struct if ebb and pmu are avaiable.
342         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
343         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
344         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
345         and pmu regsets.
346         (ppc_linux_core_read_description): Check if the pmu section is
347         present and set isa207 in the features struct.
348         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
349         (ppc32_linux_pmuregset): Declare.
350         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
351         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
352         <ppc_sier_regnum>: New field.
353         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
354         New enum values.
355         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
356         values.
357         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
358         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
359         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
360         ebb and pmu features.
361
362 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
363             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
364
365         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
366         (tdesc_powerpc_isa207_vsx64l): Declare.
367         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
368         (struct ppc_linux_features) <isa207>: New field.
369         (ppc_linux_no_features): Add initializer for isa207 field.
370         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
371         new tdescs.
372         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
373         (NT_PPC_TAR): Define if not already defined.
374         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
375         rs6000/powerpc-isa207-vsx64l.
376         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
377         rs6000/powerpc-isa207-vsx64l.xml.
378         * features/rs6000/power-tar.xml: New file.
379         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
380         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
381         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
382         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
383         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
384         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
385         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
386         fetch_regset with the TAR regset.
387         (store_register, store_ppc_registers): Call store_regset with the
388         TAR regset.
389         (ppc_linux_nat_target::read_description): Set isa207 field in the
390         features struct if needed.
391         * ppc-linux-tdep.c: Include
392         features/rs6000/powerpc-isa207-vsx32l.c and
393         features/rs6000/powerpc-isa207-vsx64l.c.
394         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
395         (ppc_linux_iterate_over_regset_sections): Call back with the tar
396         regset.
397         (ppc_linux_core_read_description): Check if the tar section is
398         present and set isa207 in the features struct.
399         (_initialize_ppc_linux_tdep): Call
400         initialize_tdesc_powerpc_isa207_vsx32l and
401         initialize_tdesc_powerpc_isa207_vsx64l.
402         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
403         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
404         (enum) <PPC_TAR_REGNUM>: New enum value.
405         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
406         feature.
407         (ppc_process_record_op31): Record changes to TAR.
408
409 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
410             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
411
412         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
413         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
414         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
415         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
416         (struct ppc_linux_features) <ppr_dscr>: New field.
417         (ppc_linux_no_features): Add initializer for ppr_dscr field.
418         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
419         new tdescs.
420         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
421         Define if not already defined.
422         * features/Makefile (WHICH): Add
423         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
424         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
425         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
426         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
427         * features/rs6000/power-dscr.xml: New file.
428         * features/rs6000/power-ppr.xml: New file.
429         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
430         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
431         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
432         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
433         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
434         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
435         * ppc-linux-nat.c: Include <sys/uio.h>.
436         (fetch_regset, store_regset, check_regset): New functions.
437         (fetch_register, fetch_ppc_registers): Call fetch_regset with
438         DSCR and PPR regsets.
439         (store_register, store_ppc_registers): Call store_regset with
440         DSCR and PPR regsets.
441         (ppc_linux_get_hwcap2): New function.
442         (ppc_linux_nat_target::read_description): Call
443         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
444         features struct if needed.
445         * ppc-linux-tdep.c: Include
446         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
447         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
448         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
449         (ppc32_linux_dscrregset): New globals.
450         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
451         and dscr regsets.
452         (ppc_linux_core_read_description): Check if the ppr and dscr
453         sections are present and set ppr_dscr in the features struct.
454         (_initialize_ppc_linux_tdep): Call
455         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
456         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
457         * ppc-linux-tdep.h (ppc32_linux_pprregset)
458         (ppc32_linux_dscrregset): Declare.
459         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
460         <ppc_dscr_regnum>: New field.
461         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
462         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
463         and dscr features.
464         (ppc_process_record_op31): Record changes to PPR and DSCR.
465
466 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
467
468         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
469         second initializer line for the have_* variables.  Initialize
470         have_fpu to 0 instead of 1.
471
472 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
473
474         * arch/ppc-linux-common.c (ppc_linux_match_description):
475         Parenthesize tdesc assignements and indent them properly.
476
477 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
478
479         * ppc-linux-nat.c (fetch_register): Change if statement to else
480         if.
481         (store_register): Likewise.
482
483 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
484
485         * rs6000-tdep.c: Remove reggroups.h include.
486         (rs6000_pseudo_register_reggroup_p): Remove.
487         (rs6000_gdbarch_init): Remove call to
488         set_tdesc_pseudo_register_reggroup_p.
489
490 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
491
492         * reggroups.c (default_register_reggroup_p): Return true for
493         decfloat registers and float_reggroup.
494
495 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
496
497         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
498         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
499         ppc_linux_collect_vrregset by regcache_collect_regset.
500
501 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
502
503         * linux-tdep.c (linux_collect_regset_section_cb): Use
504         std::vector<gdb_byte> instead of char * and malloc for buf.
505         Remove xfree.
506
507 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
508
509         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
510         symtab_start instead of always using language_unknown.
511
512 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
513
514         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
515         READ_P parameter, catch and ignore register access errors from
516         either the old or new MISA location.
517         (riscv_has_feature): Update call to riscv_read_misa_reg.
518
519 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
520
521         * python/py-function.c (convert_values_to_python): Return
522         gdbpy_ref<>.  Add header comment.
523         (fnpy_call): Adjust.
524
525 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
526
527         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
528         (cmdpy_completer_handle_brkchars): Adjust.
529         (cmdpy_completer): Adjust.
530
531 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
532
533         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
534         Pass correct regnum to raw_supply_zeroed.
535
536 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
537
538         * regcache.c (cooked_read_test): Add CSKY to the list of
539         architectures with a save_reggroup
540
541 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
542
543         PR gdb/23368
544         * infrun.c (follow_exec): In the follow_exec_mode_new case,
545         transfer terminal state from old new new inferior.
546         * terminal.h (swap_terminal_info): New function.
547         * inflow.c (swap_terminal_info): New function.
548
549 2018-10-23  Tom Tromey  <tom@tromey.com>
550
551         * record-btrace.c (get_thread_current_frame_id): Rename from
552         get_thread_current_frame.  Return a frame_id.
553         (record_btrace_start_replaying): Update.
554
555 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
556
557         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
558         for CSRs.
559
560 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
561
562         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
563         have_nonsteppable_watchpoint attribute to 1.
564
565 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
566
567         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
568         register names.
569         (struct register_alias): Rename to...
570         (struct riscv_register_alias): ...this, and update comment.
571         (riscv_register_aliases): Update type, and alias names.  Remove
572         CSR names from this list.
573         (riscv_register_name): Use riscv_gdb_reg_names for int and float
574         register names.  Add an extra assertion.
575         (riscv_is_regnum_a_named_csr): New function.
576         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
577
578 2018-10-22  Jim Wilson  <jimw@sifive.com>
579
580         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
581         FP reg smaller than FP reg size, and fill with -1 instead of 0.
582
583         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
584         (riscv_register_type): Use them.
585         (riscv_print_one_register_info): Handle union of floats same as float.
586         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
587         riscv_fpreg_q_type fields.
588
589 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
590
591         * gdbarch.sh (gdbarch_num_cooked_regs): New.
592         * gdbarch.h: Re-generate.
593         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
594         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
595         * eval.c (evaluate_subexp_standard): Likewise.
596         * findvar.c (value_of_register): Likewise.
597         (value_of_register_lazy): Likewise.
598         (address_from_register): Likewise.
599         * frame.c (get_frame_register_bytes): Likewise.
600         * gdbarch-selftests.c (register_to_value_test): Likewise.
601         * h8300-tdep.c (h8300_register_type): Likewise.
602         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
603         (i386_svr4_reg_to_regnum): Likewise.
604         * infcmd.c (default_print_registers_info): Likewise.
605         (registers_info): Likewise.
606         (print_vector_info): Likewise.
607         (default_print_float_info): Likewise.
608         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
609         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
610         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
611         (mi_cmd_data_list_changed_registers): Likewise.
612         (mi_cmd_data_list_register_values): Likewise.
613         (mi_cmd_data_write_register_values): Likewise.
614         (mi_cmd_trace_frame_collected): Likewise.
615         * mips-tdep.c (print_gp_register_row): Likewise.
616         (mips_print_registers_info): Likewise.
617         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
618         * regcache.c (init_regcache_descr): Likewise.
619         (register_size): Likewise.
620         (register_dump::dump): Likewise.
621         (cooked_read_test): Likewise.
622         (cooked_write_test): Likewise.
623         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
624         (rs6000_gdbarch_init): Likewise.
625         * stabsread.c (stab_reg_to_regnum): Likewise.
626         * stack.c (info_frame_command): Likewise.
627         * target-descriptions.c (tdesc_register_name): Likewise.
628         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
629         * tui/tui-regs.c (tui_show_register_group): Likewise.
630         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
631         (user_reg_map_regnum_to_name): Likewise.
632         (value_of_user_reg): Likewise.
633         (maintenance_print_user_registers): Likewise.
634         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
635         (xtensa_register_name): Likewise.
636         (xtensa_register_type): Likewise.
637         (xtensa_reg_to_regnum): Likewise.
638         (xtensa_pseudo_register_read): Likewise.
639         (xtensa_pseudo_register_write): Likewise.
640
641 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
642
643         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
644         correctly-sized buffer with raw_read.
645         (amd64_pseudo_register_write): Use correctly-sized buffer for
646         raw_read/raw_write.
647
648 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
649
650         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
651         in add_prefix_cmd of set print type.
652
653 2018-10-19  Tom Tromey  <tom@tromey.com>
654
655         PR tui/18388:
656         * NEWS: Mention tabset deprecation.
657         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
658         (update_tab_width): New function.
659         (tui_set_tab_width, tui_show_tab_width): New functions.
660         (tui_set_tab_width_command): Use update_tab_width.
661         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
662         Add new "set tui tab-width" command.
663         * tui/tui-source.c (tui_set_source_content): Update.
664         * tui/tui-disasm.c (tui_set_disassem_content): Update.
665         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
666         Don't declare.
667         (tui_tab_width): Declare.
668         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
669         (tui_set_default_tab_len): Remove.
670
671 2018-10-19  Tom Tromey  <tom@tromey.com>
672
673         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
674         (key_is_backspace, tui_getc): Don't declare.
675         * tui/tui-io.c (key_is_start_sequence): Now static.
676         (key_is_end_sequence, key_is_backspace): Remove.
677         (tui_getc): Now static.
678
679 2018-10-19  Tom Tromey  <tom@tromey.com>
680
681         * symfile.c (reread_symbols): Clear "static_links".
682
683 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
684
685         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
686         define.
687         (aarch64_linux_sigframe_init): Extra boundary checks.
688
689 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
690
691         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
692         the possibly non-existent tdesc type 'vec128', but the type of raw
693         register v16 instead.
694
695 2018-10-19  Gary Benson <gbenson@redhat.com>
696
697         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
698
699 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
700
701         PR cli/23785
702         * cli/cli-dump.c (restore_binary_file): Check if "file" is
703         NULL.
704
705 2018-10-17  Paul Koning  <paul_koning@dell.com>
706
707         * charset.c (convert_between_encodings): Fix unsigned overflow.
708
709 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
710
711         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
712         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
713         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
714         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
715         New functions.
716         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
717         and fbsd_info_proc_mappings_header.
718         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
719         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
720         New.
721
722 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
723
724         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
725         Solaris Maintainer.
726
727 2018-10-15  Tom Tromey  <tom@tromey.com>
728
729         * tui/tui.c (strcat_to_buf): Remove casts.
730         * tui/tui-winsource.c (tui_show_source_line)
731         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
732         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
733         * tui/tui-windata.c (tui_first_data_item_displayed)
734         (tui_delete_data_content_windows, tui_erase_data_content)
735         (tui_display_all_data, tui_display_data_from)
736         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
737         * tui/tui-win.c (tui_set_win_height)
738         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
739         casts.
740         * tui/tui-win.c (tui_resize_all): Remove casts.
741         (tui_scroll_backward_command, tui_set_focus)
742         (tui_set_tab_width_command): Likewise.
743         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
744         * tui/tui-regs.c (tui_show_register_group): Remove cast.
745         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
746         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
747         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
748         Remove casts.
749
750 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
751
752         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
753         AArch64/ARM maintainer.
754
755 2018-10-11  Gary Benson <gbenson@redhat.com>
756
757         * interps.h (interp::m_name): Make private and mutable.
758         * interps.c (interp::~interp): Free m_name.
759
760 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
761             Simon Marchi <simark@simark.ca>
762
763         * README (`configure' options): Add documentation for new
764         "--enable-unit-tests" option.
765         * acinclude.m4: Include "selftest.m4".
766         * configure: Regenerate.
767         * configure.ac: Use "GDB_AC_SELFTEST".
768         * maint.c (maintenance_selftest): Update message informing
769         that selftests have been disabled.
770         (maintenance_info_selftests): Likewise.
771         * selftest.m4: New file.
772
773 2018-10-10  Gary Benson <gbenson@redhat.com>
774
775         * remote.c (remote_target::remote_send_printf): Add
776         missing va_end found by Coverity.
777
778 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
779
780         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
781
782 2018-10-09  Tom Tromey  <tom@tromey.com>
783
784         * configure: Rebuild.
785         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
786         * NEWS: Update --enable-ubsan documentation.
787
788 2018-10-09  Gary Benson <gbenson@redhat.com>
789
790         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
791         found by Coverity.
792
793 2018-10-08  Tom Tromey  <tom@tromey.com>
794
795         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
796         variable.
797         (riscv_fbsd_init_abi): Likewise.
798
799 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
800         * valops.c (value_struct_elt_for_reference): Rename local variable
801         to work around the shadowing a previous local warning.
802
803 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
804
805         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
806         * NEWS: Mention new FreeBSD/riscv native configuration.
807         * configure.host: Add riscv*-*-freebsd*.
808         * configure.nat: Likewise.
809         * riscv-fbsd-nat.c: New file.
810
811 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
812
813         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
814         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
815         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
816         * NEWS: Mention new FreeBSD/riscv target.
817         * configure.tgt: Add riscv*-*-freebsd*.
818         * riscv-fbsd-tdep.c: New file.
819         * riscv-fbsd-tdep.h: New file.
820
821 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
822
823         * regcache.h (struct regcache_map_entry): Note that this type can
824         be used with traditional frame caches.
825         * trad-frame.c (trad_frame_set_reg_regmap): New.
826         * trad-frame.h (trad_frame_set_reg_regmap): New.
827
828 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
829
830         PR c++/16841
831         * valops.c (get_virtual_base_offset): New function.
832         (value_struct_elt_for_reference): Use it to get virtual base offset
833         and add it in calculating class member address.
834
835 2018-10-08   John Darrington <john@darrington.wattle.id.au>
836
837     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
838       (check_producer): Check if the producer is codewarrior.
839       (producer_is_codewarrior): New function.
840       (lnp_state_machine::record_line): Ignore is_stmt flag for records
841        produced by codewarrior.
842       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
843
844 2018-10-06  Tom Tromey  <tom@tromey.com>
845
846         PR python/19399:
847         * python/py-inferior.c: Add "architecture" entry.
848         (infpy_architecture): New function.
849
850 2018-10-06  Tom Tromey  <tom@tromey.com>
851
852         PR python/21765:
853         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
854         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
855         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
856         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
857
858 2018-10-06  Tom Tromey  <tom@tromey.com>
859
860         PR build/17077:
861         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
862         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
863         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
864         #include.
865
866 2018-10-06  Tom Tromey  <tom@tromey.com>
867
868         * python/py-breakpoint.c (bppy_get_location): Handle a
869         bp_breakpoint without a location.
870
871 2018-10-06  Tom Tromey  <tom@tromey.com>
872
873         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
874         (_RegEx): Reformat help text.
875         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
876         (AnyCallerIs, AnyCallerMatches): Reformat help text.
877         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
878         text.
879         * python/lib/gdb/command/xmethods.py (InfoXMethod)
880         (EnableXMethod, DisableXMethod): Remove help indentation.
881         Capitalize meta-syntactic variables.
882         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
883         (EnableUnwinder, DisableUnwinder): Remove help indentation.
884         Capitalize meta-syntactic variables.
885         * python/lib/gdb/command/explore.py (ExploreCommand)
886         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
887         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
888         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
889         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
890         Remove help indentation.
891         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
892         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
893         (DisableFrameFilter, SetFrameFilterPriority)
894         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
895
896 2018-10-06  Tom Tromey  <tom@tromey.com>
897
898         PR tui/28819:
899         * tui/tui-io.c (gdb_wgetch): New function.
900         (tui_mld_getc, tui_getc): Use it.
901
902 2018-10-05  Tom Tromey  <tom@tromey.com>
903
904         * sol-thread.c (sol_thread_target::wait): Rename inner
905         "save_ptid".
906
907 2018-10-04  Tom Tromey  <tom@tromey.com>
908
909         * configure: Rebuild.
910         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
911
912 2018-10-04  Tom Tromey  <tom@tromey.com>
913
914         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
915         declaration of "block".
916
917 2018-10-04  Tom Tromey  <tom@tromey.com>
918
919         * common/filestuff.c (fdwalk): Remove inner declaration of
920         "result".
921
922 2018-10-04  Tom Tromey  <tom@tromey.com>
923
924         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
925         "structs_addr" and hoist declaration.
926
927 2018-10-04  Tom Tromey  <tom@tromey.com>
928
929         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
930         variable "size".
931
932 2018-10-04  Tom Tromey  <tom@tromey.com>
933
934         * mdebugread.c (parse_partial_symbols): Use std::string.
935
936 2018-10-04  Tom Tromey  <tom@tromey.com>
937
938         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
939         * p-valprint.c (pascal_val_print): Split inner "i" variable.
940         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
941         header.
942         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
943         more inner scope.
944         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
945         * varobj.c (varobj_update): Rename inner "newobj",
946         "type_changed".
947         * valprint.c (generic_emit_char): Rename inner "buf".
948         * valops.c (find_overload_match): Rename inner "temp".
949         (value_struct_elt_for_reference): Declare "v" in more inner
950         scope.
951         * v850-tdep.c (v850_push_dummy_call): Rename "len".
952         * unittests/array-view-selftests.c (run_tests): Rename inner
953         "vec".
954         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
955         header.
956         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
957         "tsv" in more inner scope.
958         (print_one_static_tracepoint_marker): Rename inner
959         "tuple_emitter".
960         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
961         (tic6x_push_dummy_call): Don't redeclare "addr".
962         * target-float.c: Declare "dto" lower.
963         * symtab.c (lookup_local_symbol): Rename inner "sym".
964         (find_pc_sect_line): Rename inner "pc".
965         * stack.c (print_frame): Don't redeclare "gdbarch".
966         (return_command): Rename inner "gdbarch".
967         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
968         "sp".
969         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
970         header.
971         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
972         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
973         scope.
974         * remote.c (remote_target::update_thread_list): Don't redeclare
975         "tp".
976         (remote_target::process_initial_stop_replies): Rename inner
977         "thread".
978         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
979         (remote_target::wait_as): Don't redeclare "stop_reply".
980         (remote_target::get_thread_local_address): Rename inner
981         "result".
982         (remote_target::get_tib_address): Likewise.
983
984         * regcache.c (cooked_read_test): Rename "regnum".
985         * record-btrace.c (cmd_record_btrace_start): Rename inner
986         "exception".
987         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
988         loop header.
989         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
990         header.
991         (ppu2spu_sniffer): Rename inner "buf".
992         * parse.c (operator_check_standard): Rename inner "type",
993         "objfile".
994         * p-valprint.c (pascal_val_print): Introduce new scope for
995         "low_bound", "high_bound".
996         * p-exp.y (yylex): Declare "i" in loop header.
997         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
998         Lower declaration of "s".
999         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1000         header.
1001         (nios2_push_dummy_call): Rename "len".
1002         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1003         "buf".
1004         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1005         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1006         (linux_xfer_osdata_modules): Likewise.
1007         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1008         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1009         (mips_o64_push_dummy_call): Likewise.
1010         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1011         "op".
1012         * mi/mi-main.c (list_available_thread_groups): Rename inner
1013         "tuple_emitter".
1014         (mi_cmd_data_read_memory): Rename inner "opts".
1015         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1016         "tuple_emitter".
1017         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1018         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1019         more inner scope.
1020         (parse_partial_symbols): Rename inner "pst", "p", "name"
1021         * main.c (captured_main_1): Rename inner "i"s.
1022         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1023         "oso2".
1024         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1025         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1026         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1027         (handle_signal_stop): Rename inner "gdbarch".
1028         (handle_command): Declare "signum" in loop header.
1029         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1030         "status".
1031         (examine_prologue): Rename inner "sol" and "sof".
1032         (ia64_extract_return_value): Rename inner "val".  Declare another
1033         "val" in a more inner scope.
1034         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1035         inner scope.
1036         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1037         "except".
1038         * findvar.c (default_read_var_value): Don't redeclare "addr".
1039         * f-exp.y (yylex): Declare "i" in loop header.
1040         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1041         Rename inner "type", "expect_type".
1042         (evaluate_subexp_for_sizeof): Rename inner "pc".
1043         * elfread.c (elf_symfile_read): Rename inner "abfd".
1044         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1045         "bytes_read".
1046         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1047         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1048         (dwarf_decode_line_header): Rename inner "lh".
1049         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1050         "offset".  Declare "i" in loop header.
1051         (disassemble_dwarf_expression): Rename inner "addr_size".
1052         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1053         inner "result".
1054         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1055         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1056         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1057         "inner_list_emitter".
1058         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1059         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1060         declaration in a block.
1061         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1062         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1063         "obstack_final_size".
1064         * cp-support.c (inspect_type): Declare "i" in loop header.
1065         * compile/compile.c (compile_instance::insert_symbol_error):
1066         Rename inner "e".
1067         * common/agent.c (agent_run_command): Remove inner "ret"
1068         declaration.
1069         * coffread.c (coff_symfile_read): Rename inner "name".
1070         (coff_symfile_read): Rename inner "abfd".
1071         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1072         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1073         "high".
1074         * c-exp.y (lex_one_token): Move "len" declaration lower.
1075         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1076         "gdbarch".
1077         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1078         "b".
1079         (watch_command_1): Declare "mark" later.
1080         (clear_command): Don't shadow "a" or "b".
1081         (delete_command): Rename inner "b".
1082         (delete_trace_command): Likewise.
1083         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1084         "op".
1085         (arm_gdbarch_init): Remove inner "e_flags".
1086         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1087         "offset" in inner blocks.
1088
1089 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1090
1091         * dwarf-index-write.c (file_write): Don't write if the vector is
1092         empty.
1093
1094 2018-10-05  Tom de Vries  <tdevries@suse.de>
1095
1096         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1097         PyArg_ParseTuple call.
1098
1099 2018-10-05  Tom de Vries  <tdevries@suse.de>
1100
1101         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1102         PyArg_ParseTuple call.
1103
1104 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1105
1106         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1107         to avoid exceeding 80 characters per line limit.
1108
1109 2018-10-04  Tom Tromey  <tom@tromey.com>
1110
1111         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1112         (reread_symbols): Update.
1113         * complaints.h (clear_complaints): Remove argument.
1114         * complaints.c (enum complaint_series): Remove.
1115         (series): Remove global.
1116         (complaint_internal): Update.
1117         (clear_complaints): Remove argument.
1118
1119 2018-10-04  Tom Tromey  <tom@tromey.com>
1120
1121         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1122         debugging symbols" message if there is a separate debug objfile.
1123
1124 2018-10-04  Tom Tromey  <tom@tromey.com>
1125
1126         PR cli/19551:
1127         * symfile.c (symbol_file_add_with_addrs): Update output.
1128         * psymtab.c (require_partial_symbols): Update output.
1129
1130 2018-10-04  Tom Tromey  <tom@tromey.com>
1131
1132         PR cli/22234:
1133         * complaints.c: Emit \n.
1134
1135 2018-10-04  Tom Tromey  <tom@tromey.com>
1136
1137         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1138         (separate_debug_file_exists, find_separate_debug_file)
1139         (add_symbol_file_command, reread_symbols, allocate_symtab)
1140         (allocate_compunit_symtab): Use filtered printing, not
1141         unfiltered.
1142         * psymtab.c (require_partial_symbols, dump_psymtab)
1143         (allocate_psymtab): Use filtered printing, not unfiltered.
1144
1145 2018-10-04  Tom Tromey  <tom@tromey.com>
1146
1147         * complaints.c (complaint_internal): Correctly check complaint
1148         count.
1149
1150 2018-10-04  Tom Tromey  <tom@tromey.com>
1151
1152         * complaints.h (struct complaints): Remove declaration.
1153         * complaints.c (clear_complaints): Remove an unused variable.
1154
1155 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1156
1157         * MAINTAINERS (Write After Approval): Add self.
1158
1159 2018-10-03  Tom Tromey  <tom@tromey.com>
1160
1161         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1162         "buffer_contents".
1163         * coffread.c (coff_symtab_read): Initialize "newobj".
1164
1165 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1166
1167         * dwarf2read.c (read_func_scope): Remove struct keyword in
1168         range-based for.
1169
1170 2018-10-03  Tom Tromey  <tom@tromey.com>
1171
1172         * README: Mention --enable-ubsan.
1173         * NEWS: Mention --enable-ubsan.
1174         * acinclude.m4: Include sanitize.m4.
1175         * configure: Rebuild.
1176         * configure.ac: Call AM_GDB_UBSAN.
1177         * sanitize.m4: New file.
1178
1179 2018-10-03  Tom Tromey  <tom@tromey.com>
1180
1181         * expression.h (enum exp_opcode): Use uint8_t as base type.
1182         * expprint.c (op_name): Handle invalid opcodes.
1183
1184 2018-10-03  Tom Tromey  <tom@tromey.com>
1185
1186         * parse.c (prefixify_expression): Add assert.
1187         (parse_exp_in_context_1): Throw exception if the expression is
1188         empty.
1189
1190 2018-10-03  Tom Tromey  <tom@tromey.com>
1191
1192         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1193
1194 2018-10-03  Tom Tromey  <tom@tromey.com>
1195
1196         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1197
1198 2018-10-03  Tom Tromey  <tom@tromey.com>
1199
1200         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1201         unsigned.
1202
1203 2018-10-03  Tom Tromey  <tom@tromey.com>
1204
1205         * findvar.c (extract_integer): Do work in an unsigned type.
1206
1207 2018-10-03  Tom Tromey  <tom@tromey.com>
1208
1209         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1210         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1211         base type.
1212         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1213         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1214         type.
1215         * c-lang.h (enum c_string_type_values): Use unsigned as base
1216         type.
1217         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1218
1219 2018-10-03  Tom Tromey  <tom@tromey.com>
1220
1221         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1222         <~dwarf2_frame_state_reg_info>: Update.
1223         <dwarf2_frame_state_reg_info>: Update.
1224         <alloc_regs>: Add assertion.  Update.
1225         <reg>: Now a std::vector.
1226         <num_regs>: Remove.
1227         <swap>: Update.
1228         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1229         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1230
1231 2018-10-03  Tom Tromey  <tom@tromey.com>
1232
1233         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1234
1235 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1236
1237         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1238
1239 2018-10-02  Tom Tromey  <tom@tromey.com>
1240
1241         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1242
1243 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1244
1245         * NEWS: Mention changed commands.
1246         * ser-uds.c: New file.
1247         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1248         * configure: Regenerate.
1249         * Makefile.in: Add new file.
1250         * serial.c (serial_open): Check if filename is a socket
1251           and lookup the appropriate interface accordingly.
1252
1253 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1254
1255         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1256         define.
1257         (AARCH64_EXTRA_MAGIC): Likewise.
1258         (AARCH64_FPSIMD_MAGIC): Likewise.
1259         (AARCH64_SVE_MAGIC): Likewise.
1260         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1261         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1262         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1263         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1264         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1265         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1266         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1267         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1268         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1269         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1270         (read_aarch64_ctx): Add function.
1271         (aarch64_linux_sigframe_init): Detect FP registers.
1272
1273 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1274
1275         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1276         (AARCH64_D0_REGNUM): Likewise.
1277         (AARCH64_S0_REGNUM): Likewise.
1278         (AARCH64_H0_REGNUM): Likewise.
1279         (AARCH64_B0_REGNUM): Likewise.
1280         (AARCH64_SVE_V0_REGNUM): Likewise.
1281         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1282         (AARCH64_D0_REGNUM): Likewise.
1283         (AARCH64_S0_REGNUM): Likewise.
1284         (AARCH64_H0_REGNUM): Likewise.
1285         (AARCH64_B0_REGNUM): Likewise.
1286         (AARCH64_SVE_V0_REGNUM): Likewise.
1287
1288 2018-10-01  Gary Benson <gbenson@redhat.com>
1289
1290         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1291         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1292         prfpregset_t instead of gdb_prfpregset_t.
1293         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1294         * configure, config.in: Rebuild.
1295
1296 2018-10-01  Gary Benson <gbenson@redhat.com>
1297
1298         * common/gdb_proc_service.h: New file, factored out from...
1299         * gdb_proc_service.h: Moved common code to the above file.
1300         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1301
1302 2018-10-01  Gary Benson <gbenson@redhat.com>
1303
1304         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1305         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1306
1307 2018-10-01  Gary Benson <gbenson@redhat.com>
1308
1309         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1310         (AC_CHECK_HEADERS): Check for linux/elf.h.
1311         * configure, config.in: Rebuild.
1312         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1313         doesn't define elf_fpregset_t.
1314
1315 2018-10-01  Gary Benson <gbenson@redhat.com>
1316
1317         * gdb_proc_service.h: Whitespace change.
1318
1319 2018-10-01  Tom Tromey  <tom@tromey.com>
1320
1321         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1322         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1323         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1324
1325 2018-10-01  Tom Tromey  <tom@tromey.com>
1326
1327         * README: Minor change.
1328
1329 2018-09-30  Pedro Alves  <palves@redhat.com>
1330
1331         * darwin-nat-info.c (darwin_debug_regions_recurse)
1332         (info_mach_exceptions_command): Remove unused local variables.
1333         * darwin-nat.c (darwin_decode_notify_message)
1334         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1335         (darwin_stop_inferior, darwin_setup_exceptions)
1336         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1337         (darwin_nat_target::attach, darwin_nat_target::detach)
1338         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1339         local variables.
1340         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1341         variables.
1342
1343 2018-09-29  Tom Tromey  <tom@tromey.com>
1344
1345         * README: Remove some leftover text.
1346
1347 2018-09-29  Tom Tromey  <tom@tromey.com>
1348
1349         * PROBLEMS: Rewrite.
1350         * README: Update.
1351
1352 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1353
1354         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1355         case with explicit breakpoint kind.
1356         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1357         'additional_info' and related logic.
1358         (riscv_debug_breakpoints): New variable.
1359         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1360         instruction to determine the breakpoint kind.
1361         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1362         flag.  Update description of 'set/show riscv
1363         use-compressed-breakpoints' flag.
1364
1365 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1366
1367         (NEWS): Mention changes to frame related commands.
1368         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1369         (add_prefix_cmd_suppress_notification): New function.
1370         (add_com_suppress_notification): Call
1371         add_cmd_suppress_notification.
1372         * command.h (add_cmd_suppress_notification): Declare.
1373         (add_prefix_cmd_suppress_notification): Declare.
1374         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1375         (parse_frame_specification): Moved from stack.c, with
1376         simplification to handle a single argument.
1377         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1378         switch to the selected frame.  Add a header comment.
1379         * stack.c: Remove 'safe-ctype.h' include.
1380         (find_frame_for_function): Add declaration.
1381         (find_frame_for_address): New function.
1382         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1383         (frame_selection_by_function_completer): New function.
1384         (info_frame_command): Rename to...
1385         (info_frame_command_core): ...this, and update parameter types.
1386         (select_frame_command): Rename to...
1387         (select_frame_command_core): ...this, and update parameter types.
1388         (frame_command): Rename to...
1389         (frame_command_core): ...this, and update parameter types.
1390         (class frame_command_helper): New class to wrap implementations of
1391         frame related sub-commands.
1392         (frame_apply_cmd_list): New static global.
1393         (frame_cmd_list): Make static.
1394         (select_frame_cmd_list): New global for sub-commands.
1395         (info_frame_cmd_list): New global for sub-commands.
1396         (_initialize_stack): Register sub-commands for 'frame',
1397         'select-frame', and 'info frame'.  Update 'frame apply' commands
1398         to use frame_apply_cmd_list.  Move function local static
1399         frame_apply_list to file static frame_apply_cmd_list for
1400         consistency.
1401         * stack.h (select_frame_command): Delete declarationn.
1402         (select_frame_for_mi): Declare new function.
1403
1404 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1405
1406         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1407         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1408         and NOP.
1409
1410 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1411
1412         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1413
1414 2018-09-26  Tom Tromey  <tom@tromey.com>
1415
1416         * valops.c (auto_abandon): Remove dead code.
1417
1418 2018-09-26  Tom Tromey  <tom@tromey.com>
1419
1420         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1421
1422 2018-09-24  Tom Tromey  <tom@tromey.com>
1423
1424         * common/pathstuff.c (get_standard_cache_dir): Make
1425         "xdg_cache_home" and "home" const.
1426         * top.c (init_history): Make "tmpenv" const.
1427         * main.c (get_init_files): Make "homedir" const.
1428
1429 2018-09-23  Tom Tromey  <tom@tromey.com>
1430
1431         PR python/18852:
1432         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1433
1434 2018-09-23  Tom Tromey  <tom@tromey.com>
1435
1436         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1437         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1438         * python/python-internal.h (gdbpy_handle_exception): Declare.
1439         * python/py-utils.c (gdbpy_handle_exception): New function.
1440
1441 2018-09-23  Tom Tromey  <tom@tromey.com>
1442
1443         PR python/17284:
1444         * python/py-type.c (typy_template_argument): Check for negative
1445         argument number.
1446
1447 2018-09-23  Tom Tromey  <tom@tromey.com>
1448
1449         PR python/14062:
1450         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1451
1452 2018-09-23  Tom Tromey  <tom@tromey.com>
1453
1454         PR python/18170:
1455         * python/py-value.c (valpy_int): Allow conversion from pointer
1456         type.
1457
1458 2018-09-23  Tom Tromey  <tom@tromey.com>
1459
1460         PR python/20126:
1461         * python/py-value.c (valpy_int): Respect type sign.
1462
1463 2018-09-23  Tom Tromey  <tom@tromey.com>
1464
1465         PR python/18352;
1466         * python/py-value.c (valpy_float): Allow conversions from int or
1467         char.
1468         (valpy_int, valpy_long): Allow conversions from float.
1469
1470 2018-09-23  Tom Tromey  <tom@tromey.com>
1471
1472         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1473         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1474
1475 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1476
1477         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1478         __sighndlr.
1479         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1480
1481 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1482
1483         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1484         target_terminal::ours().
1485
1486 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1487
1488         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1489         of vl to ULONGEST.
1490
1491 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1492
1493         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1494         redundant condition.
1495
1496 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1497
1498         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1499
1500         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1501         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1502         * sol-thread.c (ps_pdmodel): Don't guard definition.
1503
1504         * procfs.c: Fix formatting.
1505
1506         * procfs.c (sysset_t_alloc): Remove.
1507         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1508         (procfs_debug_inferior): Likewise.
1509         (procfs_set_exec_trap): Likewise.
1510         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1511         (proc_set_traced_sysexit): Likewise.
1512
1513         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1514         (dead_procinfo): Likewise.
1515         (proc_warn): Likewise.
1516         (proc_error): Likewise.
1517         (proc_get_LDT_entry): Likewise.
1518         (do_attach): Likewise.
1519         (procfs_target::pid_to_str): Likewise.
1520         (iterate_over_mappings): Likewise.
1521
1522         * procfs.c (create_procinfo): Fix ARI warning.
1523         (proc_get_status): Likewise.
1524         (proc_stop_process): Likewise.
1525         (proc_run_process): Likewise.
1526         (proc_kill): Likewise.
1527         (proc_get_LDT_entry): Likewise.
1528         (procfs_find_LDT_entry): Likewise.
1529         (proc_update_threads): Likewise.
1530         (proc_iterate_over_threads): Likewise.
1531         (do_attach): Likewise.
1532         (procfs_xfer_memory): Likewise.
1533         (invalidate_cache): Likewise.
1534         (procfs_target::resume): Likewise.
1535         (procfs_init_inferior): Likewise.
1536         (procfs_set_exec_trap): Likewise.
1537         (procfs_target::thread_alive): Likewise.
1538         (procfs_target::pid_to_exec_file): Likewise.
1539         (iterate_over_mappings): Likewise.
1540         (procfs_target::make_corefile_notes): Likewise.
1541         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1542
1543         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1544         (procfs_find_LDT_entry): Likewise.
1545         * sol-thread.c (ps_lgetLDT): Likewise.
1546
1547 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1548
1549         PR tdep/17903
1550         * procfs.c (procfs_target): Declare pid_to_exec_file.
1551         (procfs_target::pid_to_exec_file): New.
1552
1553 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1554
1555         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1556         renaming.
1557         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1558         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1559
1560 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1561
1562         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1563         (supply_fpregset, fill_fpregset): Move ...
1564         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1565         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1566         Remove references to ioctl-based procfs.
1567         Include <sys/reg.h>.
1568         Remove PR_MODEL_NATIVE guards.
1569         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1570         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1571
1572 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1573
1574         PR gdb/20981:
1575         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1576         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1577         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1578
1579 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1580
1581         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1582         (fbsd_print_sockaddr_in6): Likewise.
1583
1584 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1585             Chris January  <chris.january@arm.com>
1586
1587         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1588         (evaluate_subexp_standard): Return a dummy type when
1589         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1590         OP_F77_UNDETERMINED_ARGLIST case.
1591         * expression.h (enum noside): Update comment.
1592
1593 2018-09-19  George Vasick <george.vasick@oracle.com>
1594
1595         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1596
1597 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1598             April Chin <april.chin@oracle.com>
1599             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1600
1601         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1602         uint_t lwpid_t.
1603         (create_procinfo): Print pids in /proc without leading zeros.
1604
1605 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1606
1607         * nios2-tdep.c (nios2_gcc_target_options): New.
1608         (nios2_gdb_arch_init): Install new hook.
1609
1610 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1611
1612         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1613         New file.
1614         * update-gnulib.sh: Apply patch.
1615         * configure: Re-generate.
1616
1617 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1618
1619         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1620         description.  Make "info proc" command descriptions more
1621         consistent.
1622
1623 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1624
1625         * NEWS: Mention 'info proc files' command.
1626
1627 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1628
1629         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1630         descriptors for IP_FILES and IP_ALL.
1631
1632 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1633
1634         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1635         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1636         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1637         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1638         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1639         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1640         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1641         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1642         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1643         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1644         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1645         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1646         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1647         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1648         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1649         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1650         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1651         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1652         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1653         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1654         (struct fbsd_sockaddr_un): New types.
1655         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1656         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1657         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1658         (fbsd_core_info_proc_files): New functions.
1659         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1660         IP_ALL.
1661         * fbsd-tdep.h (fbsd_info_proc_files_header)
1662         (fbsd_info_proc_files_entry): New.
1663
1664 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1665
1666         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1667         * infcmd.c (info_proc_cmd_files): New function.
1668         (_initialize_infcmd): Register 'info proc files' command.
1669
1670 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1671
1672         * gnulib/aclocal-m4-deps.mk: Re-generate.
1673         * gnulib/aclocal.m4: Re-generate.
1674         * gnulib/config.in: Re-generate.
1675         * gnulib/configure: Re-generate.
1676         * gnulib/import/Makefile.am: Re-generate.
1677         * gnulib/import/Makefile.in: Re-generate.
1678         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1679         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1680         * gnulib/import/arpa_inet.in.h: New file.
1681         * gnulib/import/inet_ntop.c: New file.
1682         * gnulib/import/m4/arpa_inet_h.m4: New file.
1683         * gnulib/import/m4/inet_ntop.m4: New file.
1684         * gnulib/import/m4/netinet_in_h.m4: New file.
1685         * gnulib/import/m4/socklen.m4: New file.
1686         * gnulib/import/m4/sockpfaf.m4: New file.
1687         * gnulib/import/m4/stdalign.m4: New file.
1688         * gnulib/import/m4/sys_uio_h.m4: New file.
1689         * gnulib/import/netinet_in.in.h: New file.
1690         * gnulib/import/stdalign.in.h: New file.
1691         * gnulib/import/sys_socket.c: New file.
1692         * gnulib/import/sys_socket.in.h: New file.
1693         * gnulib/import/sys_uio.in.h: New file.
1694         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1695         module.
1696
1697 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1698
1699         * gnulib/aclocal-m4-deps.mk: New file.
1700         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1701         deterministically.
1702
1703 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1704
1705         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1706         KVE_PATH.
1707
1708 2018-09-18  Tom Tromey  <tom@tromey.com>
1709
1710         * compile/compile-object-load.c (struct
1711         link_hash_table_cleanup_data): Add constructor and destructor.
1712         Use DISABLE_COPY_AND_ASSIGN.
1713         (~link_hash_table_cleanup_data): Rename from
1714         link_hash_table_free.  Now a destructor.
1715         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1716
1717 2018-09-18  Tom Tromey  <tom@tromey.com>
1718
1719         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1720         * compile/compile-object-load.c (struct munmap_list): Move to
1721         header file.
1722         (munmap_list::add): Rename from munmap_list_add; rewrite.
1723         (munmap_list::~munmap_list): Rename from munmap_list_free.
1724         (munmap_listp_free_cleanup): Remove.
1725         (compile_object_load): Update.
1726         * compile/compile-object-load.h (struct munmap_list): Move from
1727         compile-object-load.c.  Rewrite.
1728
1729 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1730
1731         * aarch64-tdep.c (pass_in_v): Use register size.
1732         (aarch64_extract_return_value): Likewise.
1733         (aarch64_store_return_value): Likewise.
1734
1735 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1736
1737         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1738         rlim_t.
1739
1740 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1741
1742         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1743         Fix short help line.
1744
1745 2018-09-17  Tom Tromey  <tom@tromey.com>
1746
1747         PR python/20445:
1748         * configure: Rebuild.
1749         * configure.ac: Conditionally use -DNDEBUG for Python.
1750
1751 2018-09-17  Tom Tromey  <tom@tromey.com>
1752
1753         * configure: Rebuild.
1754         * configure.ac: Use gmp as a library dependency when checking for
1755         mpfr.
1756
1757 2018-09-17  Pedro Alves  <palves@redhat.com>
1758
1759         * python/py-inferior.c (find_inferior_object): Delete.
1760
1761 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1762
1763         * compile/compile-cplus-types.c
1764         (compile_cplus_instance::enter_scope): Don't use new_scope after
1765         std::move.
1766
1767 2018-09-17  Tom Tromey  <tom@tromey.com>
1768
1769         * common/pathstuff.c (get_standard_cache_dir): Use
1770         ~/Library/Caches on macOS.
1771         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1772
1773 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1774
1775         PR python/23669
1776         * breakpoint.c (commands_cmd_element): New.
1777         (_initialize_breakpoint): Assign commands_cmd_element.
1778         * breakpoint.h (commands_cmd_element): New.
1779         * cli/cli-script.c (while_cmd_element, if_command,
1780         define_cmd_element): New.
1781         (command_name_equals): Remove.
1782         (process_next_line): Compare commands by pointer, not by name.
1783         (_initialize_cli_script): Assign the various cmd_list_element
1784         variables.
1785         * compile/compile.c (compile_cmd_element): New.
1786         (_initialize_compile): Assign compile_cmd_element.
1787         * compile/compile.h (compile_cmd_element): New.
1788         * guile/guile.c (guile_cmd_element): New.
1789         (install_gdb_commands): Assign guile_cmd_element.
1790         * guile/guile.h (guile_cmd_element): New.
1791         * python/python.c (python_cmd_element): New.
1792         (_initialize_python): Assign python_cmd_element.
1793         * python/python.h (python_cmd_element): New.
1794         * tracepoint.c (while_stepping_cmd_element): New.
1795         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1796         * tracepoint.h (while_stepping_cmd_element): New.
1797
1798 2018-09-17  Tom Tromey  <tom@tromey.com>
1799
1800         * infrun.c (save_infcall_suspend_state): Return
1801         infcall_suspend_state_up.
1802         (save_infcall_control_state): Return infcall_control_state_up.
1803         * inferior.h (save_infcall_suspend_state)
1804         (save_infcall_control_state): Declare later.  Return unique
1805         pointers.
1806
1807 2018-09-17  Tom Tromey  <tom@tromey.com>
1808
1809         * infrun.c (struct stop_context): Declare constructor,
1810         destructor, "changed" method.
1811         (stop_context::stop_context): Rename from save_stop_context.
1812         (stop_context::~stop_context): Rename from
1813         release_stop_context_cleanup.
1814         (normal_stop): Update.
1815         (stop_context::changed): Rename from stop_context_changed.  Return
1816         bool.
1817
1818 2018-09-17  Tom Tromey  <tom@tromey.com>
1819
1820         * inferior.h (struct infcall_suspend_state_deleter): New.
1821         (infcall_suspend_state_up): New typedef.
1822         (struct infcall_control_state_deleter): New.
1823         (infcall_control_state_up): New typedef.
1824         (make_cleanup_restore_infcall_suspend_state)
1825         (make_cleanup_restore_infcall_control_state): Don't declare.
1826         * infcall.c (call_function_by_hand_dummy): Update.
1827         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1828         (make_cleanup_restore_infcall_suspend_state): Remove.
1829         (do_restore_infcall_control_state_cleanup)
1830         (make_cleanup_restore_infcall_control_state): Remove.
1831
1832 2018-09-17  Tom Tromey  <tom@tromey.com>
1833
1834         * gdbthread.h (struct thread_control_state): Add initializer.
1835         (class thread_info) <control>: Remove initializer.
1836         * inferior.h (struct inferior_control_state): Add initializer.
1837         (class inferior) <control>: Remove initializer.
1838         (exit_inferior_1): Update.
1839         * infrun.c (struct infcall_control_state): Add constructors.
1840         (save_infcall_control_state): Use new.
1841         (restore_infcall_control_state, discard_infcall_control_state):
1842         Use delete.
1843
1844 2018-09-17  Tom Tromey  <tom@tromey.com>
1845
1846         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1847         unique_ptr.
1848         <siginfo_data>: Now a unique_xmalloc_ptr.
1849         (save_infcall_suspend_state, restore_infcall_suspend_state)
1850         (discard_infcall_suspend_state)
1851         (get_infcall_suspend_state_regcache): Update.
1852
1853 2018-09-17  Tom Tromey  <tom@tromey.com>
1854
1855         * gdbthread.h (struct thread_suspend_state): Add initializers.
1856         (class thread_info) <suspend>: Remove initializer.
1857         * infrun.c (struct infcall_suspend_state): Add initializers.
1858         (save_infcall_suspend_state): Use new.
1859         (discard_infcall_suspend_state): Use delete.
1860
1861 2018-09-16  Tom Tromey  <tom@tromey.com>
1862
1863         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1864         Remove.
1865         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1866         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1867         (py_varobj_iter_new): Likewise.
1868         (py_varobj_get_iterator): Use gdbpy_ref.
1869
1870 2018-09-16  Tom Tromey  <tom@tromey.com>
1871
1872         * python/py-threadevent.c (py_get_event_thread): Simplify.
1873         * python/py-inferior.c (infpy_thread_from_thread_handle):
1874         Return immediately after calling thread_to_thread_object.  Use
1875         Py_RETURN_NONE.
1876         (thread_to_thread_object): Set the exception on a NULL return.
1877
1878 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1879
1880         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1881
1882 2018-09-16  Tom Tromey  <tom@tromey.com>
1883
1884         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1885         Remove.
1886
1887 2018-09-16  Tom Tromey  <tom@tromey.com>
1888
1889         * python/python-internal.h (thread_to_thread_object): Change
1890         return type.
1891         * python/py-inferior.c (thread_to_thread_object): Return a new
1892         reference.
1893         (infpy_thread_from_thread_handle): Update.
1894         * python/py-infthread.c (gdbpy_selected_thread): Update.
1895         * python/py-stopevent.c (create_stop_event_object): Update.
1896         * python/py-threadevent.c (py_get_event_thread): Return a new
1897         reference.
1898         (py_get_event_thread): Update.
1899         * python/py-event.h (py_get_event_thread): Change return type.
1900         * python/py-continueevent.c (create_continue_event_object):
1901         Update.
1902
1903 2018-09-16  Tom Tromey  <tom@tromey.com>
1904
1905         * python/py-progspace.c (pspy_get_objfiles): Update.
1906         * python/python-internal.h (objfile_to_objfile_object): Change
1907         return type.
1908         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1909         Update.
1910         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1911         Update.
1912         * python/python.c (gdbpy_get_current_objfile): Update.
1913         (gdbpy_objfiles): Update.
1914         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1915         Update.
1916         (objfile_to_objfile_object): Return a new reference.
1917         * python/py-symtab.c (stpy_get_objfile): Update.
1918         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1919         Update.
1920
1921 2018-09-16  Tom Tromey  <tom@tromey.com>
1922
1923         * python/py-inferior.c (infpy_get_progspace): Update.
1924         * python/python-internal.h (pspace_to_pspace_object): Change
1925         return type.
1926         * python/py-newobjfileevent.c
1927         (create_clear_objfiles_event_object): Update.
1928         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1929         Update.
1930         * python/python.c (gdbpy_get_current_progspace): Update.
1931         (gdbpy_progspaces): Update.
1932         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1933         reference.
1934         * python/py-objfile.c (objfpy_get_progspace): Update.
1935         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1936         Update.
1937
1938 2018-09-16  Tom Tromey  <tom@tromey.com>
1939
1940         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1941         (solib_name, block_for_pc, find_pc_line): New functions.
1942         (execute_unwinders): Update.
1943         * python/py-block.c (gdbpy_block_for_pc): Remove.
1944         * python/py-inferior.c (infpy_get_progspace): New function.
1945         (inferior_object_getset) <progspace>: Add.
1946         * python/py-progspace.c (pspy_objfiles): Rewrite.
1947         (pspy_solib_name, pspy_block_for_pc)
1948         (pspy_find_pc_line, pspy_is_valid): New functions.
1949         (progspace_object_methods): Add entries for solib_name,
1950         block_for_pc, find_pc_line, is_valid.
1951         * python/python-internal.h (gdbpy_block_for_pc)
1952         (build_objfiles_list): Don't declare.
1953         * python/python.c: Don't include solib.h.
1954         (gdbpy_solib_name, gdbpy_find_pc_line)
1955         (gdbpy_get_current_progspace, build_objfiles_list)
1956         (gdbpy_objfiles): Remove.
1957         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1958         solib_name, find_pc_line>: Remove entries.
1959
1960 2018-09-16  Tom Tromey  <tom@tromey.com>
1961
1962         * top.c (new_ui_command): Use GNU style for metasyntactic
1963         variables.
1964         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1965         variables.
1966         * maint.c (maintenance_translate_address): Remove "<>" around
1967         text.
1968         * interps.c (interpreter_exec_cmd): Use GNU style for
1969         metasyntactic variables.
1970         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1971         metasyntactic variables.
1972         * tracepoint.c (tfind_range_command): Use GNU style for
1973         metasyntactic variables.
1974         (tfind_outside_command): Likewise.
1975         (_initialize_tracepoint): Likewise.
1976         * remote.c (extended_remote_target::create_inferior): Use GNU
1977         style for metasyntactic variables.
1978         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1979         metasyntactic variables.
1980         (adi_assign_command): Likewise.
1981
1982 2018-09-16  Tom Tromey  <tom@tromey.com>
1983
1984         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1985         metasyntactic variables.  Print message if no disassembler options
1986         are available.
1987
1988 2018-09-15  Tom Tromey  <tom@tromey.com>
1989
1990         * infcmd.c (get_inferior_args): Return const char *.
1991         * inferior.h (get_inferior_args): Return type now const.
1992         * linux-tdep.c (linux_fill_prpsinfo): Update.
1993         * procfs.c (procfs_target::make_corefile_notes): Update.
1994
1995 2018-09-07  Tom Tromey  <tom@tromey.com>
1996
1997         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1998         inside the TRY.
1999
2000 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2001
2002         * nios2-tdep.c (nios2_type_align): New.
2003         (nios2_gdb_arch_init): Install type_align hook.
2004
2005 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2006
2007         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2008         type that is neither object file owned, nor gdbarch owned.
2009         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2010         gdbarch is non-NULL.
2011         (alloc_type_instance): Allocate non-objfile owned types on the
2012         gdbarch obstack.
2013         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2014         using TYPE_ALLOC to ensure memory is allocated on the correct
2015         obstack.
2016         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2017         obstack, or the gdbarch obstack.
2018         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2019
2020 2018-09-14  Tom Tromey  <tom@tromey.com>
2021
2022         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2023         block.
2024
2025 2018-09-14  Tom Tromey  <tom@tromey.com>
2026
2027         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2028
2029 2018-09-13  Tom Tromey  <tom@tromey.com>
2030
2031         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2032         static.
2033
2034 2018-09-13  Tom Tromey  <tom@tromey.com>
2035
2036         * exec.c (try_open_exec_file): Use std::string.
2037
2038 2018-09-13  Tom Tromey  <tom@tromey.com>
2039
2040         * utils.h (gdb_bfd_errmsg): Return std::string.
2041         * exec.c (exec_file_attach): Update.
2042         * compile/compile-object-load.c (compile_object_load): Update.
2043         * utils.c (gdb_bfd_errmsg): Return std::string.
2044
2045 2018-09-13  Tom Tromey  <tom@tromey.com>
2046
2047         * procfs.c (struct procinfo_deleter): New.
2048         (procinfo_up): New typedef.
2049         (do_destroy_procinfo_cleanup): Remove.
2050         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2051
2052 2018-09-13  Tom Tromey  <tom@tromey.com>
2053
2054         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2055
2056 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2057 2018-09-13  Tom Tromey  <tom@tromey.com>
2058
2059         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2060         (pspy_get_objfiles): New function.
2061         (progspace_object_methods): New.
2062         (pspace_object_type): Add tp_methods callback.
2063         * python/python-internal.h (build_objfiles_list): New
2064         declaration.
2065         * python/python.c (build_objfiles_list): New function.
2066         (gdbpy_objfiles): Implement using build_objfiles_list.
2067         * NEWS: Mention the Progspace.objfiles method.
2068
2069 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2070
2071         * python/py-inferior.c (infpy_get_progspace): New function.
2072         (inferior_object_getset): Add progspace property.
2073         * NEWS: Mention the new property.
2074
2075 2018-09-13  Tom Tromey  <tom@tromey.com>
2076
2077         PR rust/23650:
2078         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2079
2080 2018-09-13  Tom Tromey  <tom@tromey.com>
2081
2082         PR rust/23626:
2083         * rust-lang.c (rust_enum_variant): Now static.
2084         (rust_empty_enum_p): New function.
2085         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2086         Handle empty enum.
2087
2088 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2089
2090         * python/py-inferior.c (infpy_repr): New.
2091         (inferior_object_type): Register infpy_repr.
2092         * python/py-objfile.c (objfpy_repr): New.
2093         (objfile_object_type): Register objfpy_repr.
2094
2095 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2096
2097         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2098
2099 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2100
2101         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2102         typo.
2103
2104 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2105
2106         * common/common-utils.c: Don't include '<sys/stat.h>'.
2107         (is_regular_file): Move to...
2108         * common/filestuff.c (is_regular_file): ... here.
2109         * common/common-utils.h (is_regular_file): Move to...
2110         * common/filestuff.h (is_regular_file): ... here.
2111
2112 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2113
2114         * skip.c (debug_skip): New variable.
2115         (skiplist_entry::do_skip_file_p): Add debug output.
2116         (skiplist_entry::do_skip_gfile_p): Likewise.
2117         (skiplist_entry::skip_function_p): Likewise.
2118         (_initialize_step_skip): Create debug command.
2119         * NEWS: Mention set/show debug skip.
2120
2121 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2122
2123         * darwin-nat.c (should_disable_startup_with_shell):
2124         New function.
2125         (darwin_nat_target::create_inferior): Add call.
2126
2127 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2128
2129         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2130         inf_port, msg_state>: Initialize.
2131         (struct darwin_thread_info) <signaled, single_step>: Change
2132         type and initialize.
2133         (struct darwin_thread_info) <event>: Initialize.
2134
2135 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2136
2137         PR gdb/23555
2138         PR gdb/23558
2139         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2140         guesses.
2141
2142 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2143
2144         Revert:
2145         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2146
2147         PR gdb/23555
2148         PR gdb/23558
2149         * gnulib/aclocal.m4: Regenerate.
2150         * gnulib/config.in: Regenerate.
2151         * gnulib/configure: Regenerate.
2152         * gnulib/import/Makefile.am: Update.
2153         * gnulib/import/Makefile.in: Update.
2154         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2155         * gnulib/import/_Noreturn.h: ... this.
2156         * gnulib/import/alloca.in.h: Update.
2157         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2158         * gnulib/import/arg-nonnull.h: ... this.
2159         * gnulib/import/assure.h: Update.
2160         * gnulib/import/at-func.c: Update.
2161         * gnulib/import/basename-lgpl.c: Update.
2162         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2163         * gnulib/import/c++defs.h: ... this.
2164         * gnulib/import/canonicalize-lgpl.c: Update.
2165         * gnulib/import/cdefs.h: Update.
2166         * gnulib/import/chdir-long.c: Update.
2167         * gnulib/import/chdir-long.h: Update.
2168         * gnulib/import/cloexec.c: Update.
2169         * gnulib/import/cloexec.h: Update.
2170         * gnulib/import/close.c: Update.
2171         * gnulib/import/closedir.c: Update.
2172         * gnulib/import/config.charset: Update.
2173         * gnulib/import/dirent-private.h: Update.
2174         * gnulib/import/dirent.in.h: Update.
2175         * gnulib/import/dirfd.c: Update.
2176         * gnulib/import/dirname-lgpl.c: Update.
2177         * gnulib/import/dirname.h: Update.
2178         * gnulib/import/dosname.h: Update.
2179         * gnulib/import/dup-safer-flag.c: Update.
2180         * gnulib/import/dup-safer.c: Update.
2181         * gnulib/import/dup.c: Update.
2182         * gnulib/import/dup2.c: Update.
2183         * gnulib/import/errno.in.h: Update.
2184         * gnulib/import/error.c: Update.
2185         * gnulib/import/error.h: Update.
2186         * gnulib/import/exitfail.c: Update.
2187         * gnulib/import/exitfail.h: Update.
2188         * gnulib/import/extra/update-copyright: Update.
2189         * gnulib/import/fchdir.c: Update.
2190         * gnulib/import/fcntl.c: Update.
2191         * gnulib/import/fcntl.in.h: Update.
2192         * gnulib/import/fd-hook.c: Update.
2193         * gnulib/import/fd-hook.h: Update.
2194         * gnulib/import/fd-safer-flag.c: Update.
2195         * gnulib/import/fd-safer.c: Update.
2196         * gnulib/import/fdopendir.c: Update.
2197         * gnulib/import/filename.h: Update.
2198         * gnulib/import/filenamecat-lgpl.c: Update.
2199         * gnulib/import/filenamecat.h: Update.
2200         * gnulib/import/flexmember.h: Update.
2201         * gnulib/import/float+.h: Update.
2202         * gnulib/import/float.c: Update.
2203         * gnulib/import/float.in.h: Update.
2204         * gnulib/import/fnmatch.c: Update.
2205         * gnulib/import/fnmatch.in.h: Update.
2206         * gnulib/import/fnmatch_loop.c: Update.
2207         * gnulib/import/fpucw.h: Update.
2208         * gnulib/import/frexp.c: Update.
2209         * gnulib/import/frexpl.c: Update.
2210         * gnulib/import/fstat.c: Update.
2211         * gnulib/import/fstatat.c: Update.
2212         * gnulib/import/getcwd-lgpl.c: Update.
2213         * gnulib/import/getcwd.c: Update.
2214         * gnulib/import/getdtablesize.c: Update.
2215         * gnulib/import/getlogin_r.c: Update.
2216         * gnulib/import/getprogname.c: Update.
2217         * gnulib/import/getprogname.h: Update.
2218         * gnulib/import/gettext.h: Update.
2219         * gnulib/import/gettimeofday.c: Update.
2220         * gnulib/import/glob-libc.h: Update.
2221         * gnulib/import/glob.c: Update.
2222         * gnulib/import/glob.in.h: Update.
2223         * gnulib/import/glob_internal.h: Update.
2224         * gnulib/import/glob_pattern_p.c: Update.
2225         * gnulib/import/globfree.c: Update.
2226         * gnulib/import/hard-locale.c: Update.
2227         * gnulib/import/hard-locale.h: Update.
2228         * gnulib/import/intprops.h: Update.
2229         * gnulib/import/inttypes.in.h: Update.
2230         * gnulib/import/isnan.c: Update.
2231         * gnulib/import/isnand-nolibm.h: Update.
2232         * gnulib/import/isnand.c: Update.
2233         * gnulib/import/isnanl-nolibm.h: Update.
2234         * gnulib/import/isnanl.c: Update.
2235         * gnulib/import/itold.c: Update.
2236         * gnulib/import/libc-config.h: Update.
2237         * gnulib/import/limits.in.h: Update.
2238         * gnulib/import/localcharset.c: Update.
2239         * gnulib/import/localcharset.h: Update.
2240         * gnulib/import/localtime-buffer.c: Update.
2241         * gnulib/import/localtime-buffer.h: Update.
2242         * gnulib/import/lstat.c: Update.
2243         * gnulib/import/m4/00gnulib.m4: Update.
2244         * gnulib/import/m4/__inline.m4: Update.
2245         * gnulib/import/m4/absolute-header.m4: Update.
2246         * gnulib/import/m4/alloca.m4: Update.
2247         * gnulib/import/m4/builtin-expect.m4: Update.
2248         * gnulib/import/m4/canonicalize.m4: Update.
2249         * gnulib/import/m4/chdir-long.m4: Update.
2250         * gnulib/import/m4/close.m4: Update.
2251         * gnulib/import/m4/closedir.m4: Update.
2252         * gnulib/import/m4/configmake.m4: Update.
2253         * gnulib/import/m4/d-ino.m4: Update.
2254         * gnulib/import/m4/d-type.m4: Update.
2255         * gnulib/import/m4/dirent_h.m4: Update.
2256         * gnulib/import/m4/dirfd.m4: Update.
2257         * gnulib/import/m4/dirname.m4: Update.
2258         * gnulib/import/m4/double-slash-root.m4: Update.
2259         * gnulib/import/m4/dup.m4: Update.
2260         * gnulib/import/m4/dup2.m4: Update.
2261         * gnulib/import/m4/eealloc.m4: Update.
2262         * gnulib/import/m4/environ.m4: Update.
2263         * gnulib/import/m4/errno_h.m4: Update.
2264         * gnulib/import/m4/error.m4: Update.
2265         * gnulib/import/m4/exponentd.m4: Update.
2266         * gnulib/import/m4/exponentl.m4: Update.
2267         * gnulib/import/m4/extensions.m4: Update.
2268         * gnulib/import/m4/extern-inline.m4: Update.
2269         * gnulib/import/m4/fchdir.m4: Update.
2270         * gnulib/import/m4/fcntl-o.m4: Update.
2271         * gnulib/import/m4/fcntl.m4: Update.
2272         * gnulib/import/m4/fcntl_h.m4: Update.
2273         * gnulib/import/m4/fdopendir.m4: Update.
2274         * gnulib/import/m4/filenamecat.m4: Update.
2275         * gnulib/import/m4/flexmember.m4: Update.
2276         * gnulib/import/m4/float_h.m4: Update.
2277         * gnulib/import/m4/fnmatch.m4: Update.
2278         * gnulib/import/m4/fnmatch_h.m4: Update.
2279         * gnulib/import/m4/fpieee.m4: Update.
2280         * gnulib/import/m4/frexp.m4: Update.
2281         * gnulib/import/m4/frexpl.m4: Update.
2282         * gnulib/import/m4/fstat.m4: Update.
2283         * gnulib/import/m4/fstatat.m4: Update.
2284         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2285         * gnulib/import/m4/getcwd-path-max.m4: Update.
2286         * gnulib/import/m4/getcwd.m4: Update.
2287         * gnulib/import/m4/getdtablesize.m4: Update.
2288         * gnulib/import/m4/getlogin.m4: Update.
2289         * gnulib/import/m4/getlogin_r.m4: Update.
2290         * gnulib/import/m4/getpagesize.m4: Update.
2291         * gnulib/import/m4/getprogname.m4: Update.
2292         * gnulib/import/m4/gettimeofday.m4: Update.
2293         * gnulib/import/m4/glibc21.m4: Update.
2294         * gnulib/import/m4/glob.m4: Update.
2295         * gnulib/import/m4/glob_h.m4: Update.
2296         * gnulib/import/m4/gnulib-cache.m4: Update.
2297         * gnulib/import/m4/gnulib-common.m4: Update.
2298         * gnulib/import/m4/gnulib-comp.m4: Update.
2299         * gnulib/import/m4/gnulib-tool.m4: Update.
2300         * gnulib/import/m4/hard-locale.m4: Update.
2301         * gnulib/import/m4/include_next.m4: Update.
2302         * gnulib/import/m4/inttypes-pri.m4: Update.
2303         * gnulib/import/m4/inttypes.m4: Update.
2304         * gnulib/import/m4/isnand.m4: Update.
2305         * gnulib/import/m4/isnanl.m4: Update.
2306         * gnulib/import/m4/largefile.m4: Update.
2307         * gnulib/import/m4/limits-h.m4: Update.
2308         * gnulib/import/m4/localcharset.m4: Update.
2309         * gnulib/import/m4/locale-fr.m4: Update.
2310         * gnulib/import/m4/locale-ja.m4: Update.
2311         * gnulib/import/m4/locale-zh.m4: Update.
2312         * gnulib/import/m4/localtime-buffer.m4: Update.
2313         * gnulib/import/m4/longlong.m4: Update.
2314         * gnulib/import/m4/lstat.m4: Update.
2315         * gnulib/import/m4/malloc.m4: Update.
2316         * gnulib/import/m4/malloca.m4: Update.
2317         * gnulib/import/m4/math_h.m4: Update.
2318         * gnulib/import/m4/mbrtowc.m4: Update.
2319         * gnulib/import/m4/mbsinit.m4: Update.
2320         * gnulib/import/m4/mbsrtowcs.m4: Update.
2321         * gnulib/import/m4/mbstate_t.m4: Update.
2322         * gnulib/import/m4/memchr.m4: Update.
2323         * gnulib/import/m4/memmem.m4: Update.
2324         * gnulib/import/m4/mempcpy.m4: Update.
2325         * gnulib/import/m4/memrchr.m4: Update.
2326         * gnulib/import/m4/mkdir.m4: Update.
2327         * gnulib/import/m4/mkstemp.m4: Update.
2328         * gnulib/import/m4/mmap-anon.m4: Update.
2329         * gnulib/import/m4/mode_t.m4: Update.
2330         * gnulib/import/m4/msvc-inval.m4: Update.
2331         * gnulib/import/m4/msvc-nothrow.m4: Update.
2332         * gnulib/import/m4/multiarch.m4: Update.
2333         * gnulib/import/m4/nocrash.m4: Update.
2334         * gnulib/import/m4/off_t.m4: Update.
2335         * gnulib/import/m4/onceonly.m4: Update.
2336         * gnulib/import/m4/open-cloexec.m4: Update.
2337         * gnulib/import/m4/open.m4: Update.
2338         * gnulib/import/m4/openat.m4: Update.
2339         * gnulib/import/m4/opendir.m4: Update.
2340         * gnulib/import/m4/pathmax.m4: Update.
2341         * gnulib/import/m4/rawmemchr.m4: Update.
2342         * gnulib/import/m4/readdir.m4: Update.
2343         * gnulib/import/m4/readlink.m4: Update.
2344         * gnulib/import/m4/realloc.m4: Update.
2345         * gnulib/import/m4/rename.m4: Update.
2346         * gnulib/import/m4/rewinddir.m4: Update.
2347         * gnulib/import/m4/rmdir.m4: Update.
2348         * gnulib/import/m4/save-cwd.m4: Update.
2349         * gnulib/import/m4/secure_getenv.m4: Update.
2350         * gnulib/import/m4/setenv.m4: Update.
2351         * gnulib/import/m4/signal_h.m4: Update.
2352         * gnulib/import/m4/ssize_t.m4: Update.
2353         * gnulib/import/m4/stat-time.m4: Update.
2354         * gnulib/import/m4/stat.m4: Update.
2355         * gnulib/import/m4/std-gnu11.m4: Update.
2356         * gnulib/import/m4/stdbool.m4: Update.
2357         * gnulib/import/m4/stddef_h.m4: Update.
2358         * gnulib/import/m4/stdint.m4: Update.
2359         * gnulib/import/m4/stdio_h.m4: Update.
2360         * gnulib/import/m4/stdlib_h.m4: Update.
2361         * gnulib/import/m4/strchrnul.m4: Update.
2362         * gnulib/import/m4/strdup.m4: Update.
2363         * gnulib/import/m4/strerror.m4: Update.
2364         * gnulib/import/m4/string_h.m4: Update.
2365         * gnulib/import/m4/strstr.m4: Update.
2366         * gnulib/import/m4/strtok_r.m4: Update.
2367         * gnulib/import/m4/sys_socket_h.m4: Update.
2368         * gnulib/import/m4/sys_stat_h.m4: Update.
2369         * gnulib/import/m4/sys_time_h.m4: Update.
2370         * gnulib/import/m4/sys_types_h.m4: Update.
2371         * gnulib/import/m4/tempname.m4: Update.
2372         * gnulib/import/m4/time_h.m4: Update.
2373         * gnulib/import/m4/unistd-safer.m4: Update.
2374         * gnulib/import/m4/unistd_h.m4: Update.
2375         * gnulib/import/m4/warn-on-use.m4: Update.
2376         * gnulib/import/m4/wchar_h.m4: Update.
2377         * gnulib/import/m4/wchar_t.m4: Update.
2378         * gnulib/import/m4/wctype_h.m4: Update.
2379         * gnulib/import/m4/wint_t.m4: Update.
2380         * gnulib/import/malloc.c: Update.
2381         * gnulib/import/malloc/scratch_buffer.h: Update.
2382         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2383         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2384         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2385         * gnulib/import/malloca.c: Update.
2386         * gnulib/import/malloca.h: Update.
2387         * gnulib/import/malloca.valgrind: Update.
2388         * gnulib/import/math.in.h: Update.
2389         * gnulib/import/mbrtowc.c: Update.
2390         * gnulib/import/mbsinit.c: Update.
2391         * gnulib/import/mbsrtowcs-impl.h: Update.
2392         * gnulib/import/mbsrtowcs-state.c: Update.
2393         * gnulib/import/mbsrtowcs.c: Update.
2394         * gnulib/import/memchr.c: Update.
2395         * gnulib/import/memmem.c: Update.
2396         * gnulib/import/mempcpy.c: Update.
2397         * gnulib/import/memrchr.c: Update.
2398         * gnulib/import/mkdir.c: Update.
2399         * gnulib/import/mkstemp.c: Update.
2400         * gnulib/import/msvc-inval.c: Update.
2401         * gnulib/import/msvc-inval.h: Update.
2402         * gnulib/import/msvc-nothrow.c: Update.
2403         * gnulib/import/msvc-nothrow.h: Update.
2404         * gnulib/import/open.c: Update.
2405         * gnulib/import/openat-die.c: Update.
2406         * gnulib/import/openat-priv.h: Update.
2407         * gnulib/import/openat-proc.c: Update.
2408         * gnulib/import/openat.c: Update.
2409         * gnulib/import/openat.h: Update.
2410         * gnulib/import/opendir.c: Update.
2411         * gnulib/import/pathmax.h: Update.
2412         * gnulib/import/pipe-safer.c: Update.
2413         * gnulib/import/rawmemchr.c: Update.
2414         * gnulib/import/readdir.c: Update.
2415         * gnulib/import/readlink.c: Update.
2416         * gnulib/import/realloc.c: Update.
2417         * gnulib/import/ref-add.sin: Update.
2418         * gnulib/import/ref-del.sin: Update.
2419         * gnulib/import/rename.c: Update.
2420         * gnulib/import/rewinddir.c: Update.
2421         * gnulib/import/rmdir.c: Update.
2422         * gnulib/import/same-inode.h: Update.
2423         * gnulib/import/save-cwd.c: Update.
2424         * gnulib/import/save-cwd.h: Update.
2425         * gnulib/import/scratch_buffer.h: Update.
2426         * gnulib/import/secure_getenv.c: Update.
2427         * gnulib/import/setenv.c: Update.
2428         * gnulib/import/signal.in.h: Update.
2429         * gnulib/import/stat-time.c: Update.
2430         * gnulib/import/stat-time.h: Update.
2431         * gnulib/import/stat-w32.c: Update.
2432         * gnulib/import/stat-w32.h: Update.
2433         * gnulib/import/stat.c: Update.
2434         * gnulib/import/stdbool.in.h: Update.
2435         * gnulib/import/stddef.in.h: Update.
2436         * gnulib/import/stdint.in.h: Update.
2437         * gnulib/import/stdio.in.h: Update.
2438         * gnulib/import/stdlib.in.h: Update.
2439         * gnulib/import/str-two-way.h: Update.
2440         * gnulib/import/strchrnul.c: Update.
2441         * gnulib/import/strdup.c: Update.
2442         * gnulib/import/streq.h: Update.
2443         * gnulib/import/strerror-override.c: Update.
2444         * gnulib/import/strerror-override.h: Update.
2445         * gnulib/import/strerror.c: Update.
2446         * gnulib/import/string.in.h: Update.
2447         * gnulib/import/stripslash.c: Update.
2448         * gnulib/import/strnlen1.c: Update.
2449         * gnulib/import/strnlen1.h: Update.
2450         * gnulib/import/strstr.c: Update.
2451         * gnulib/import/strtok_r.c: Update.
2452         * gnulib/import/sys_stat.in.h: Update.
2453         * gnulib/import/sys_time.in.h: Update.
2454         * gnulib/import/sys_types.in.h: Update.
2455         * gnulib/import/tempname.c: Update.
2456         * gnulib/import/tempname.h: Update.
2457         * gnulib/import/time.in.h: Update.
2458         * gnulib/import/unistd--.h: Update.
2459         * gnulib/import/unistd-safer.h: Update.
2460         * gnulib/import/unistd.in.h: Update.
2461         * gnulib/import/unsetenv.c: Update.
2462         * gnulib/import/verify.h: Update.
2463         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2464         * gnulib/import/wchar.in.h: Update.
2465         * gnulib/import/wctype.in.h: Update.
2466         * gnulib/import/xalloc-oversized.h: Update.
2467         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2468         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2469
2470 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2471
2472         * record-btrace.c (get_thread_current_frame): Remove
2473         old_inferior_ptid.
2474
2475 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2476
2477         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2478         with check_tag to 1 if and only if the type is tagged and the
2479         component being searched cannot been found in the current
2480         view. Otherwise, always call ada_to_fixed_type with
2481         check_tag to 0.
2482
2483 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2484
2485         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2486         declaration.
2487         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2488         * ada-varobj.c (ada_varobj_get_number_of_children,
2489         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2490
2491 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2492
2493         * ada-valprint.c (ada_value_print): Use type instead of
2494         enclosing type.
2495
2496 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2497
2498         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2499         an array of access to unconstrained array.
2500
2501 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2502
2503         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2504         (ada_check_typedef): Use it.
2505
2506 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2507
2508         * ada-varobj.c (ada_varobj_describe_struct_child)
2509         (ada_varobj_describe_child): Handle union case like struct one.
2510
2511 2018-09-10  Tom Tromey  <tom@tromey.com>
2512
2513         PR python/18380:
2514         * python/python.c (_initialize_python): Make example in "python"
2515         help work in Python 3.
2516
2517 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2518
2519         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2520         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2521         $(EXEEXT) to the script, as it is not a program.
2522
2523 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2524
2525         * python/py-prettyprint.c (pretty_print_one_value): Return
2526         gdbpy_ref<>.
2527         (print_string_repr): Adjust.
2528         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2529         * python/python-internal.h (apply_varobj_pretty_printer): Return
2530         gdbpy_ref<>.
2531         * varobj.c (varobj_value_get_print_value): Adjust.
2532
2533 2018-09-08  Tom Tromey  <tom@tromey.com>
2534
2535         PR python/16047:
2536         * python/py-prettyprint.c (pretty_print_one_value): Check for
2537         to_string method.
2538
2539 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2540
2541         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2542         replace_operator_with_call.
2543
2544 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2545
2546         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2547
2548 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2549
2550         * ada-typeprint.c (print_range): Print the bounds using TYPE
2551         rather than its TYPE_TARGET_TYPE.
2552
2553 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2554
2555         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2556         call to ada_to_fixed_value_create.
2557
2558 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2559
2560         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2561
2562 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2563
2564         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2565         by calls to error.
2566
2567 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2568
2569         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2570         Move update of loop variable "fi".
2571
2572 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2573
2574         * ada-lang.c (value_assign_to_component): In the case of
2575         big-endian targets, extract the bits of the given VAL
2576         using an src_offset of zero if container is not a scalar.
2577
2578 2018-09-06  Simon Ser  <contact@emersion.fr>
2579
2580         PR gdb/23105
2581         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2582         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2583         * fbsd-tdep.c (fbsd_make_note_desc): New.
2584         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2585         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2586         * target.h (enum target_object) Add FreeBSD-specific
2587         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2588
2589 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2590
2591         * compile/compile-c.h (generate_c_for_variable_locations):
2592         Change reference to pointer.
2593         * compile/compile-c-support.c (compile_program) <compute>:
2594         Likewise.
2595         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2596         (generate_c_for_for_one_variable): Likewise
2597         (generate_c_for_variable_locations): Likewise
2598         * compile/compile-c-types.c (compile_c_instance::convert_type):
2599         Likewise
2600         * compile/compile-cplus-symbols.c (convert_one_symbol):
2601         std::move the scope passed to enter_scope.
2602         * compile/compile-cplus-types.c
2603         (compile_cplus_instance::enter_scope): Make parameter
2604         rvalue-reference.
2605         (compile_cplus_instance::new_scope): Change reference to
2606         pointer.
2607         (compile_cplus_instance::convert_type): Likewise
2608         (compile_cplus_convert_typedef): std::move the scope passed to
2609         enter_scope.
2610         (compile_cplus_convert_struct_or_union): Likewise.
2611         (compile_cplus_convert_enum): Likewise.
2612         (compile_cplus_convert_namespace): Likewise.
2613         * compile/compile-cplus.h (compile_cplus_instance)
2614         <enter_scope>: Make parameter rvalue-reference.
2615         * compile/compile-internal.h (compile_instance)
2616         <get_cached_type>: Likewise
2617         * compile/compile-loc2c.c (push): Likewise
2618         (pushf): Likewise
2619         (unary): Likewise
2620         (binary): Likewise
2621         (print_label): Likewise
2622         (pushf_register_address): Likewise
2623         (pushf_register): Likewise
2624         (do_compile_dwarf_expr_to_c): Likewise
2625         (compile_dwarf_expr_to_c): Likewise
2626         (compile_dwarf_bounds_to_c): Likewise
2627         * compile/compile.c (compile_instance::get_cached_type):
2628         Likewise
2629         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2630         (compile_dwarf_bounds_to_c): Likewise
2631         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2632         (dwarf2_compile_property_to_c): Likewise
2633         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2634         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2635         Likewise
2636
2637 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2638
2639         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2640         * tui/tui-data.c (init_content_element): Don't initialize it.
2641
2642 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2643
2644         * tui/tui-data.h (struct tui_win_info)
2645         <detail::opaque>: Remove.
2646         * tui/tui-data.c (init_win_info): Remove assignment.
2647
2648 2018-09-05  Tom Tromey  <tom@tromey.com>
2649
2650         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2651         -Wformat-nonliteral.
2652         * target-float.c (host_float_ops<T>::to_string)
2653         (host_float_ops<T>::from_string): Use
2654         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2655         * configure: Rebuild.
2656
2657 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2658
2659         * printcmd.c (printf_c_string): Use
2660         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2661         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2662
2663 2018-09-05  Tom Tromey  <tom@tromey.com>
2664
2665         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2666
2667 2018-09-05  Tom de Vries  <tdevries@suse.de>
2668
2669         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2670         with resolve_abstract_p == true.
2671         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2672         defaulting to false. Propagate resolve_abstract_p to
2673         dwarf2_fetch_die_loc_sect_off.
2674         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2675         parameter, defaulting to false.
2676         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2677         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2678         parameter.
2679         * dwarf2read.h (struct die_info): Forward-declare.
2680         (die_info_ptr): New typedef.
2681         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2682
2683 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2684
2685         GDB 8.2 released.
2686
2687 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2688             Pedro Alves  <palves@redhat.com>
2689
2690         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2691         "aclocal-m4-deps.mk".  Include file here.
2692         $(srcdir)/aclocal.m4: Add "configure.ac".
2693         * gnulib/aclocal-m4-deps.mk: New file.
2694         * gnulib/update-gnulib.sh: Automatically update
2695         "aclocal-m4-deps.mk".
2696
2697 2018-09-04  Tom Tromey  <tom@tromey.com>
2698
2699         * configure: Rebuild.
2700         * configure.ac: Remove multi-ice code.
2701
2702 2018-09-04  Tom Tromey  <tom@tromey.com>
2703
2704         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2705         (ada-exp.o): Update.
2706
2707 2018-09-04  Tom Tromey  <tom@tromey.com>
2708
2709         * Makefile.in (printcmd.o, target-float.o): Remove.
2710         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2711
2712 2018-09-04  Tom Tromey  <tom@tromey.com>
2713
2714         * gnulib/Makefile.in: Remove obsolete comment.
2715         * Makefile.in: Remove obsolete comment.
2716
2717 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2718
2719         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2720         line with '+'.
2721
2722 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2723
2724         * riscv-tdep.c: Add 'prologue-value.h' include.
2725         (struct riscv_unwind_cache): New struct.
2726         (riscv_debug_unwinder): New global.
2727         (riscv_scan_prologue): Update arguments, capture register details
2728         from prologue scan.
2729         (riscv_skip_prologue): Reformat arguments line, move end of
2730         prologue calculation into riscv_scan_prologue.
2731         (riscv_frame_cache): Update return type, create
2732         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2733         details.
2734         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2735         (riscv_frame_prev_register): Use the trad_frame within the
2736         riscv_unwind_cache.
2737         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2738         flag.
2739
2740 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2741
2742         * trad-frame.h (trad_frame_set_realreg): Declare.
2743         (trad_frame_set_addr): Declare.
2744         * trad-frame.c (trad_frame_set_realreg): Define new function.
2745         (trad_frame_set_addr): Define new function.
2746         (trad_frame_set_reg_realreg): Use new function.
2747         (trad_frame_set_reg_addr): Use new function.
2748
2749 2018-09-01  Keith Seitz  <keiths@redhat.com>
2750
2751         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2752         pulongest instead of "%lld".
2753         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2754         ATTRIBUTE_UNUSED.
2755
2756 2018-08-31  Tom Tromey  <tom@tromey.com>
2757
2758         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2759         variant part type.
2760
2761 2018-08-31  Pedro Alves  <palves@redhat.com>
2762
2763         * gdbarch.h: Regenerate.
2764
2765 2018-08-31  Pedro Alves  <palves@redhat.com>
2766
2767         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2768         * target.h (Hardware watchpoint interfaces): Describe
2769         continuable/steppable/non-steppable watchpoints.
2770         * gdbarch.h, gdbarch.c: Regenerate.
2771
2772 2018-08-31  Pedro Alves  <palves@redhat.com>
2773
2774         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2775         Delete.
2776         * s390-linux-nat.c
2777         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2778         * target.h (target_ops::have_continuable_watchpoint): Delete.
2779         (target_have_continuable_watchpoint): Delete.
2780         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2781         * target-delegates.c: Regenerate.
2782
2783 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2784
2785         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2786         the files present in "gnulib/import/m4/".
2787
2788 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2789
2790         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2791         c.sw, c.swsp, and c.sdsp.
2792
2793 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2794
2795         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2796         (riscv_read_misa_reg): Don't cache value read into inferior data.
2797         (riscv_new_inferior_data): Delete.
2798         (riscv_inferior_data_cleanup): Delete.
2799         (riscv_inferior_data): Delete.
2800         (riscv_invalidate_inferior_data): Delete.
2801         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2802
2803 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2804
2805         * compile/compile-cplus-types.c
2806         (compile_cplus_instance::leave_scope): Take the address of scope
2807         object.
2808         (compile_cplus_instance::convert_qualified_base): Compare quals
2809         to 0.
2810
2811 2018-08-30  Keith Seitz  <keiths@redhat.com>
2812
2813         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2814         Use "%s" and host_address_to_string instead of "%p" in printf.
2815
2816 2018-08-29  Keith Seitz  <keiths@redhat.com>
2817
2818         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2819         and compile-cplus-types.c.
2820         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2821         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2822         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2823         Declare.
2824         * compile/compile-c-support.c: Include compile-cplus.h.
2825         (load_libcompile): Templatize.
2826         (get_compile_context): "New" function.
2827         (c_get_compile_context): Use get_compile_context.
2828         (cplus_get_compile_context): New function.
2829         (cplus_push_user_expression, cplus_pop_user_expression)
2830         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2831         (cplus_compute_program): Define new structs/functions.
2832         * compile/compile-cplus-symmbols.c: New file.
2833         * compile/compile-cplus-types.c: New file.
2834         * compile/compile-cplus.h: New file.
2835         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2836         Declare.
2837         * compile/compile-object-load.c (get_out_value_type): Use
2838         strncmp_iw when comparing symbol names.
2839         (compile_object_load): Add mst_bss and mst_data.
2840         * compile/compile.c (_initialize_compile): Remove
2841         -Wno-implicit-function-declaration from `compile_args'.
2842         * compile/gcc-cp-plugin.h: New file.
2843         * NEWS: Mention C++ compile support and new debug options.
2844
2845 2018-08-29  Keith Seitz  <keiths@redhat.com>
2846
2847         * linespec.c (collect_info::add_symbol): Make virtual.
2848         (struct symbol_searcher_collect_info): New struct.
2849         (symbol_searcher::find_all_symbols): New method.
2850         * symtab.h (class symbol_searcher): New class.
2851
2852 2018-08-29  Keith Seitz  <keiths@redhat.com>
2853
2854         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2855         Change to vector of block_symbol.  Update all users.
2856         (struct collect_info) <symbols>: Likewise.
2857         (collect_info::add_symbol): Take block_symbol as argument.
2858         Update all callers.
2859         (decode_compound_collector) <m_symbols>: Change type to vector
2860         of block_symbol.  Update all users.
2861         (decode_compound_collector::operator ()): Change parameter type
2862         to block_symbol.
2863         (find_method, find_function_symbols, find_linespec_symbols)
2864         (find_label_symbols_in_block, find_label_symbols): Change symbol
2865         vectors to block_symbol vectors.
2866         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2867         block_symbol.
2868
2869 2018-08-29  Keith Seitz  <keiths@redhat.com>
2870
2871         * linespec.c (symbolp): Remove typedef and VEC definitions.
2872         (bound_minimal_symbol_d): Likewise.
2873
2874 2018-08-29  Keith Seitz  <keiths@redhat.com>
2875
2876         * linespec.c (decode_compound_collector::decode_compound_collector):
2877         Remove initialization for `m_symtabs'.
2878         (decode_compound_collector::release_symbols): Change return type
2879         to std::vector.  Update all callers.
2880         (class decode_compound_collector) <m_symbols>: Change type to
2881         std::vector.
2882         (lookup_prefix_sym): Change return type to std::vector.  Update all
2883         callers.
2884         (compare_symbols): Remove.
2885         (std_compare_symbols): Rename to `compare_symbols'.
2886         (find_method): Change `sym_classes' parameter to std::vector.
2887         Update all callers.  Use std::sort to sort sym_classes.
2888         (find_linespec_symbols): Remove cleanup.
2889
2890 2018-08-29  Keith Seitz  <keiths@redhat.com>
2891
2892         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2893         std::vector.  Update all users.
2894         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2895         (struct collect_info) <minimal_symbols>: Likewise.
2896         (compare_msymbols): Return bool.  Change parameters to const
2897         bound_minimal_symbol references.
2898         (find_method, find_function_symbols, find_linespec_symbols): Change
2899         `minsyms' parameter to std::vector.  Update all callers.
2900
2901 2018-08-29  Keith Seitz  <keiths@redhat.com>
2902
2903         * linespec.c (struct linespec) <label_symbols>: Change type to
2904         std::vector.  Update all users.
2905         (find_label_symbols_in_block): Change `result' parameter to
2906         std::vector.  Update all callers.
2907         (find_label_symbols): Return std::vector.  Update all callers.
2908
2909 2018-08-29  Keith Seitz  <keiths@redhat.com>
2910
2911         * linespec.c (struct linespec) <function_symbols>: Change type to
2912         std::vector.  Update all users.
2913         (struct collect_info) <function_symbols>: Likewise.
2914         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2915         (std_compare_symbols): New function.
2916         (find_method, find_function_symbols, find_linespec_symbols)
2917         (find_label_symbols_in_block): Change `symbols' parameter to
2918         std::vector.  Update all callers.
2919         (find_label_symbols): Likewise for `function_symbols' and
2920         `label_funcs_ret'.
2921
2922 2018-08-29  Keith Seitz  <keiths@redhat.com>
2923
2924         * linespec.c (symtab_vector_up): Define.
2925         (struct linespec) <file_symtabs>: Change type to std::vector *.
2926         Update all uses.
2927         (struct collect_info) <file_symtabs>: Likewise.
2928         (collect_symtabs_from_filename): Return symtab_vector_up.
2929         Update all callers.
2930         (decode_objc): Remove cleanup.
2931         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2932         (symtab_collector::release_symtabs): Return symtab_vector_up.
2933         Update all callers.
2934         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2935         Update all users.
2936         (collect_symtabs_from_filename, symtabs_from_filename): Return
2937         symtab_vector_up.  Update all callers.
2938
2939 2018-08-29  Tom Tromey  <tom@tromey.com>
2940
2941         * csky-tdep.c (csky_analyze_prologue): Use
2942         core_addr_to_string_nz.
2943
2944 2018-08-29  Tom Tromey  <tom@tromey.com>
2945
2946         * windows-nat.c (struct xlate_exception) <them>: Change type to
2947         DWORD.
2948         (xlate): Fix formatting.  Remove last entry.
2949         (struct xlate_exception, xlate): Comment out.
2950         (windows_nat_target::resume): Use ranged for.
2951
2952 2018-08-29  Jim Wilson  <jimw@sifive.com>
2953
2954         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2955         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2956         of NT_PRFPREG.
2957         (riscv_linux_nat_target::store_registers): Likewise.
2958
2959 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2960
2961         PR gdb/23555
2962         PR gdb/23558
2963         * gnulib/aclocal.m4: Regenerate.
2964         * gnulib/config.in: Regenerate.
2965         * gnulib/configure: Regenerate.
2966         * gnulib/import/Makefile.am: Update.
2967         * gnulib/import/Makefile.in: Update.
2968         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2969         * gnulib/import/_Noreturn.h: ... this.
2970         * gnulib/import/alloca.in.h: Update.
2971         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2972         * gnulib/import/arg-nonnull.h: ... this.
2973         * gnulib/import/assure.h: Update.
2974         * gnulib/import/at-func.c: Update.
2975         * gnulib/import/basename-lgpl.c: Update.
2976         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2977         * gnulib/import/c++defs.h: ... this.
2978         * gnulib/import/canonicalize-lgpl.c: Update.
2979         * gnulib/import/cdefs.h: Update.
2980         * gnulib/import/chdir-long.c: Update.
2981         * gnulib/import/chdir-long.h: Update.
2982         * gnulib/import/cloexec.c: Update.
2983         * gnulib/import/cloexec.h: Update.
2984         * gnulib/import/close.c: Update.
2985         * gnulib/import/closedir.c: Update.
2986         * gnulib/import/config.charset: Update.
2987         * gnulib/import/dirent-private.h: Update.
2988         * gnulib/import/dirent.in.h: Update.
2989         * gnulib/import/dirfd.c: Update.
2990         * gnulib/import/dirname-lgpl.c: Update.
2991         * gnulib/import/dirname.h: Update.
2992         * gnulib/import/dosname.h: Update.
2993         * gnulib/import/dup-safer-flag.c: Update.
2994         * gnulib/import/dup-safer.c: Update.
2995         * gnulib/import/dup.c: Update.
2996         * gnulib/import/dup2.c: Update.
2997         * gnulib/import/errno.in.h: Update.
2998         * gnulib/import/error.c: Update.
2999         * gnulib/import/error.h: Update.
3000         * gnulib/import/exitfail.c: Update.
3001         * gnulib/import/exitfail.h: Update.
3002         * gnulib/import/extra/update-copyright: Update.
3003         * gnulib/import/fchdir.c: Update.
3004         * gnulib/import/fcntl.c: Update.
3005         * gnulib/import/fcntl.in.h: Update.
3006         * gnulib/import/fd-hook.c: Update.
3007         * gnulib/import/fd-hook.h: Update.
3008         * gnulib/import/fd-safer-flag.c: Update.
3009         * gnulib/import/fd-safer.c: Update.
3010         * gnulib/import/fdopendir.c: Update.
3011         * gnulib/import/filename.h: Update.
3012         * gnulib/import/filenamecat-lgpl.c: Update.
3013         * gnulib/import/filenamecat.h: Update.
3014         * gnulib/import/flexmember.h: Update.
3015         * gnulib/import/float+.h: Update.
3016         * gnulib/import/float.c: Update.
3017         * gnulib/import/float.in.h: Update.
3018         * gnulib/import/fnmatch.c: Update.
3019         * gnulib/import/fnmatch.in.h: Update.
3020         * gnulib/import/fnmatch_loop.c: Update.
3021         * gnulib/import/fpucw.h: Update.
3022         * gnulib/import/frexp.c: Update.
3023         * gnulib/import/frexpl.c: Update.
3024         * gnulib/import/fstat.c: Update.
3025         * gnulib/import/fstatat.c: Update.
3026         * gnulib/import/getcwd-lgpl.c: Update.
3027         * gnulib/import/getcwd.c: Update.
3028         * gnulib/import/getdtablesize.c: Update.
3029         * gnulib/import/getlogin_r.c: Update.
3030         * gnulib/import/getprogname.c: Update.
3031         * gnulib/import/getprogname.h: Update.
3032         * gnulib/import/gettext.h: Update.
3033         * gnulib/import/gettimeofday.c: Update.
3034         * gnulib/import/glob-libc.h: Update.
3035         * gnulib/import/glob.c: Update.
3036         * gnulib/import/glob.in.h: Update.
3037         * gnulib/import/glob_internal.h: Update.
3038         * gnulib/import/glob_pattern_p.c: Update.
3039         * gnulib/import/globfree.c: Update.
3040         * gnulib/import/hard-locale.c: Update.
3041         * gnulib/import/hard-locale.h: Update.
3042         * gnulib/import/intprops.h: Update.
3043         * gnulib/import/inttypes.in.h: Update.
3044         * gnulib/import/isnan.c: Update.
3045         * gnulib/import/isnand-nolibm.h: Update.
3046         * gnulib/import/isnand.c: Update.
3047         * gnulib/import/isnanl-nolibm.h: Update.
3048         * gnulib/import/isnanl.c: Update.
3049         * gnulib/import/itold.c: Update.
3050         * gnulib/import/libc-config.h: Update.
3051         * gnulib/import/limits.in.h: Update.
3052         * gnulib/import/localcharset.c: Update.
3053         * gnulib/import/localcharset.h: Update.
3054         * gnulib/import/localtime-buffer.c: Update.
3055         * gnulib/import/localtime-buffer.h: Update.
3056         * gnulib/import/lstat.c: Update.
3057         * gnulib/import/m4/00gnulib.m4: Update.
3058         * gnulib/import/m4/__inline.m4: Update.
3059         * gnulib/import/m4/absolute-header.m4: Update.
3060         * gnulib/import/m4/alloca.m4: Update.
3061         * gnulib/import/m4/builtin-expect.m4: Update.
3062         * gnulib/import/m4/canonicalize.m4: Update.
3063         * gnulib/import/m4/chdir-long.m4: Update.
3064         * gnulib/import/m4/close.m4: Update.
3065         * gnulib/import/m4/closedir.m4: Update.
3066         * gnulib/import/m4/configmake.m4: Update.
3067         * gnulib/import/m4/d-ino.m4: Update.
3068         * gnulib/import/m4/d-type.m4: Update.
3069         * gnulib/import/m4/dirent_h.m4: Update.
3070         * gnulib/import/m4/dirfd.m4: Update.
3071         * gnulib/import/m4/dirname.m4: Update.
3072         * gnulib/import/m4/double-slash-root.m4: Update.
3073         * gnulib/import/m4/dup.m4: Update.
3074         * gnulib/import/m4/dup2.m4: Update.
3075         * gnulib/import/m4/eealloc.m4: Update.
3076         * gnulib/import/m4/environ.m4: Update.
3077         * gnulib/import/m4/errno_h.m4: Update.
3078         * gnulib/import/m4/error.m4: Update.
3079         * gnulib/import/m4/exponentd.m4: Update.
3080         * gnulib/import/m4/exponentl.m4: Update.
3081         * gnulib/import/m4/extensions.m4: Update.
3082         * gnulib/import/m4/extern-inline.m4: Update.
3083         * gnulib/import/m4/fchdir.m4: Update.
3084         * gnulib/import/m4/fcntl-o.m4: Update.
3085         * gnulib/import/m4/fcntl.m4: Update.
3086         * gnulib/import/m4/fcntl_h.m4: Update.
3087         * gnulib/import/m4/fdopendir.m4: Update.
3088         * gnulib/import/m4/filenamecat.m4: Update.
3089         * gnulib/import/m4/flexmember.m4: Update.
3090         * gnulib/import/m4/float_h.m4: Update.
3091         * gnulib/import/m4/fnmatch.m4: Update.
3092         * gnulib/import/m4/fnmatch_h.m4: Update.
3093         * gnulib/import/m4/fpieee.m4: Update.
3094         * gnulib/import/m4/frexp.m4: Update.
3095         * gnulib/import/m4/frexpl.m4: Update.
3096         * gnulib/import/m4/fstat.m4: Update.
3097         * gnulib/import/m4/fstatat.m4: Update.
3098         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3099         * gnulib/import/m4/getcwd-path-max.m4: Update.
3100         * gnulib/import/m4/getcwd.m4: Update.
3101         * gnulib/import/m4/getdtablesize.m4: Update.
3102         * gnulib/import/m4/getlogin.m4: Update.
3103         * gnulib/import/m4/getlogin_r.m4: Update.
3104         * gnulib/import/m4/getpagesize.m4: Update.
3105         * gnulib/import/m4/getprogname.m4: Update.
3106         * gnulib/import/m4/gettimeofday.m4: Update.
3107         * gnulib/import/m4/glibc21.m4: Update.
3108         * gnulib/import/m4/glob.m4: Update.
3109         * gnulib/import/m4/glob_h.m4: Update.
3110         * gnulib/import/m4/gnulib-cache.m4: Update.
3111         * gnulib/import/m4/gnulib-common.m4: Update.
3112         * gnulib/import/m4/gnulib-comp.m4: Update.
3113         * gnulib/import/m4/gnulib-tool.m4: Update.
3114         * gnulib/import/m4/hard-locale.m4: Update.
3115         * gnulib/import/m4/include_next.m4: Update.
3116         * gnulib/import/m4/inttypes-pri.m4: Update.
3117         * gnulib/import/m4/inttypes.m4: Update.
3118         * gnulib/import/m4/isnand.m4: Update.
3119         * gnulib/import/m4/isnanl.m4: Update.
3120         * gnulib/import/m4/largefile.m4: Update.
3121         * gnulib/import/m4/limits-h.m4: Update.
3122         * gnulib/import/m4/localcharset.m4: Update.
3123         * gnulib/import/m4/locale-fr.m4: Update.
3124         * gnulib/import/m4/locale-ja.m4: Update.
3125         * gnulib/import/m4/locale-zh.m4: Update.
3126         * gnulib/import/m4/localtime-buffer.m4: Update.
3127         * gnulib/import/m4/longlong.m4: Update.
3128         * gnulib/import/m4/lstat.m4: Update.
3129         * gnulib/import/m4/malloc.m4: Update.
3130         * gnulib/import/m4/malloca.m4: Update.
3131         * gnulib/import/m4/math_h.m4: Update.
3132         * gnulib/import/m4/mbrtowc.m4: Update.
3133         * gnulib/import/m4/mbsinit.m4: Update.
3134         * gnulib/import/m4/mbsrtowcs.m4: Update.
3135         * gnulib/import/m4/mbstate_t.m4: Update.
3136         * gnulib/import/m4/memchr.m4: Update.
3137         * gnulib/import/m4/memmem.m4: Update.
3138         * gnulib/import/m4/mempcpy.m4: Update.
3139         * gnulib/import/m4/memrchr.m4: Update.
3140         * gnulib/import/m4/mkdir.m4: Update.
3141         * gnulib/import/m4/mkstemp.m4: Update.
3142         * gnulib/import/m4/mmap-anon.m4: Update.
3143         * gnulib/import/m4/mode_t.m4: Update.
3144         * gnulib/import/m4/msvc-inval.m4: Update.
3145         * gnulib/import/m4/msvc-nothrow.m4: Update.
3146         * gnulib/import/m4/multiarch.m4: Update.
3147         * gnulib/import/m4/nocrash.m4: Update.
3148         * gnulib/import/m4/off_t.m4: Update.
3149         * gnulib/import/m4/onceonly.m4: Update.
3150         * gnulib/import/m4/open-cloexec.m4: Update.
3151         * gnulib/import/m4/open.m4: Update.
3152         * gnulib/import/m4/openat.m4: Update.
3153         * gnulib/import/m4/opendir.m4: Update.
3154         * gnulib/import/m4/pathmax.m4: Update.
3155         * gnulib/import/m4/rawmemchr.m4: Update.
3156         * gnulib/import/m4/readdir.m4: Update.
3157         * gnulib/import/m4/readlink.m4: Update.
3158         * gnulib/import/m4/realloc.m4: Update.
3159         * gnulib/import/m4/rename.m4: Update.
3160         * gnulib/import/m4/rewinddir.m4: Update.
3161         * gnulib/import/m4/rmdir.m4: Update.
3162         * gnulib/import/m4/save-cwd.m4: Update.
3163         * gnulib/import/m4/secure_getenv.m4: Update.
3164         * gnulib/import/m4/setenv.m4: Update.
3165         * gnulib/import/m4/signal_h.m4: Update.
3166         * gnulib/import/m4/ssize_t.m4: Update.
3167         * gnulib/import/m4/stat-time.m4: Update.
3168         * gnulib/import/m4/stat.m4: Update.
3169         * gnulib/import/m4/std-gnu11.m4: Update.
3170         * gnulib/import/m4/stdbool.m4: Update.
3171         * gnulib/import/m4/stddef_h.m4: Update.
3172         * gnulib/import/m4/stdint.m4: Update.
3173         * gnulib/import/m4/stdio_h.m4: Update.
3174         * gnulib/import/m4/stdlib_h.m4: Update.
3175         * gnulib/import/m4/strchrnul.m4: Update.
3176         * gnulib/import/m4/strdup.m4: Update.
3177         * gnulib/import/m4/strerror.m4: Update.
3178         * gnulib/import/m4/string_h.m4: Update.
3179         * gnulib/import/m4/strstr.m4: Update.
3180         * gnulib/import/m4/strtok_r.m4: Update.
3181         * gnulib/import/m4/sys_socket_h.m4: Update.
3182         * gnulib/import/m4/sys_stat_h.m4: Update.
3183         * gnulib/import/m4/sys_time_h.m4: Update.
3184         * gnulib/import/m4/sys_types_h.m4: Update.
3185         * gnulib/import/m4/tempname.m4: Update.
3186         * gnulib/import/m4/time_h.m4: Update.
3187         * gnulib/import/m4/unistd-safer.m4: Update.
3188         * gnulib/import/m4/unistd_h.m4: Update.
3189         * gnulib/import/m4/warn-on-use.m4: Update.
3190         * gnulib/import/m4/wchar_h.m4: Update.
3191         * gnulib/import/m4/wchar_t.m4: Update.
3192         * gnulib/import/m4/wctype_h.m4: Update.
3193         * gnulib/import/m4/wint_t.m4: Update.
3194         * gnulib/import/malloc.c: Update.
3195         * gnulib/import/malloc/scratch_buffer.h: Update.
3196         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3197         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3198         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3199         * gnulib/import/malloca.c: Update.
3200         * gnulib/import/malloca.h: Update.
3201         * gnulib/import/malloca.valgrind: Update.
3202         * gnulib/import/math.in.h: Update.
3203         * gnulib/import/mbrtowc.c: Update.
3204         * gnulib/import/mbsinit.c: Update.
3205         * gnulib/import/mbsrtowcs-impl.h: Update.
3206         * gnulib/import/mbsrtowcs-state.c: Update.
3207         * gnulib/import/mbsrtowcs.c: Update.
3208         * gnulib/import/memchr.c: Update.
3209         * gnulib/import/memmem.c: Update.
3210         * gnulib/import/mempcpy.c: Update.
3211         * gnulib/import/memrchr.c: Update.
3212         * gnulib/import/mkdir.c: Update.
3213         * gnulib/import/mkstemp.c: Update.
3214         * gnulib/import/msvc-inval.c: Update.
3215         * gnulib/import/msvc-inval.h: Update.
3216         * gnulib/import/msvc-nothrow.c: Update.
3217         * gnulib/import/msvc-nothrow.h: Update.
3218         * gnulib/import/open.c: Update.
3219         * gnulib/import/openat-die.c: Update.
3220         * gnulib/import/openat-priv.h: Update.
3221         * gnulib/import/openat-proc.c: Update.
3222         * gnulib/import/openat.c: Update.
3223         * gnulib/import/openat.h: Update.
3224         * gnulib/import/opendir.c: Update.
3225         * gnulib/import/pathmax.h: Update.
3226         * gnulib/import/pipe-safer.c: Update.
3227         * gnulib/import/rawmemchr.c: Update.
3228         * gnulib/import/readdir.c: Update.
3229         * gnulib/import/readlink.c: Update.
3230         * gnulib/import/realloc.c: Update.
3231         * gnulib/import/ref-add.sin: Update.
3232         * gnulib/import/ref-del.sin: Update.
3233         * gnulib/import/rename.c: Update.
3234         * gnulib/import/rewinddir.c: Update.
3235         * gnulib/import/rmdir.c: Update.
3236         * gnulib/import/same-inode.h: Update.
3237         * gnulib/import/save-cwd.c: Update.
3238         * gnulib/import/save-cwd.h: Update.
3239         * gnulib/import/scratch_buffer.h: Update.
3240         * gnulib/import/secure_getenv.c: Update.
3241         * gnulib/import/setenv.c: Update.
3242         * gnulib/import/signal.in.h: Update.
3243         * gnulib/import/stat-time.c: Update.
3244         * gnulib/import/stat-time.h: Update.
3245         * gnulib/import/stat-w32.c: Update.
3246         * gnulib/import/stat-w32.h: Update.
3247         * gnulib/import/stat.c: Update.
3248         * gnulib/import/stdbool.in.h: Update.
3249         * gnulib/import/stddef.in.h: Update.
3250         * gnulib/import/stdint.in.h: Update.
3251         * gnulib/import/stdio.in.h: Update.
3252         * gnulib/import/stdlib.in.h: Update.
3253         * gnulib/import/str-two-way.h: Update.
3254         * gnulib/import/strchrnul.c: Update.
3255         * gnulib/import/strdup.c: Update.
3256         * gnulib/import/streq.h: Update.
3257         * gnulib/import/strerror-override.c: Update.
3258         * gnulib/import/strerror-override.h: Update.
3259         * gnulib/import/strerror.c: Update.
3260         * gnulib/import/string.in.h: Update.
3261         * gnulib/import/stripslash.c: Update.
3262         * gnulib/import/strnlen1.c: Update.
3263         * gnulib/import/strnlen1.h: Update.
3264         * gnulib/import/strstr.c: Update.
3265         * gnulib/import/strtok_r.c: Update.
3266         * gnulib/import/sys_stat.in.h: Update.
3267         * gnulib/import/sys_time.in.h: Update.
3268         * gnulib/import/sys_types.in.h: Update.
3269         * gnulib/import/tempname.c: Update.
3270         * gnulib/import/tempname.h: Update.
3271         * gnulib/import/time.in.h: Update.
3272         * gnulib/import/unistd--.h: Update.
3273         * gnulib/import/unistd-safer.h: Update.
3274         * gnulib/import/unistd.in.h: Update.
3275         * gnulib/import/unsetenv.c: Update.
3276         * gnulib/import/verify.h: Update.
3277         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3278         * gnulib/import/wchar.in.h: Update.
3279         * gnulib/import/wctype.in.h: Update.
3280         * gnulib/import/xalloc-oversized.h: Update.
3281         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3282         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3283
3284 2018-08-16  Gary Benson <gbenson@redhat.com>
3285
3286         PR gdb/13000:
3287         * gdb/main.c (captured_main_1): Exit with nonzero status
3288         in batch mode if the last command to be executed failed.
3289         * NEWS: Mention the above.
3290
3291 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3292
3293         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3294         end of warning message.
3295
3296 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3297
3298         PR gdb/22943:
3299         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3300         (aarch64_extract_return_value): Use
3301         aapcs_is_vfp_call_or_return_candidate.
3302         (aarch64_return_in_memory): Likewise.
3303         (aarch64_store_return_value): Likewise.
3304
3305 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3306
3307         * aarch64-tdep.c
3308         (aapcs_is_vfp_call_or_return_candidate): Make static
3309         (pass_in_v_or_stack): Remove function.
3310         (pass_in_v_vfp_candidate): New function.
3311         (aarch64_push_dummy_call): Check for float register candidates.
3312
3313 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3314
3315         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3316         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3317         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3318
3319 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3320
3321         PR build/23399
3322         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3323         (struct ipa_sym_addresses): Rename to...
3324         (struct ipa_sym_addresses_common): ... this.
3325         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3326
3327 2018-08-28  Tom Tromey  <tom@tromey.com>
3328
3329         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3330         (token_fifo): Now a std::vector.
3331         (yylex, c_parse): Update.
3332         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3333         (token_fifo): Now a std::vector.
3334         (yylex, d_parse): Update.
3335         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3336         (token_fifo): Now a std::vector.
3337         (yylex, go_parse): Update.
3338
3339 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3340
3341         * parser-defs.h (struct type_stack) <elements>: Change type to
3342         std::vector<union type_stack_elt>.
3343         <depth, size>: Remove.
3344         * parse.c (parse_exp_in_context_1): Adjust.
3345         (type_stack_reserve): Remove.
3346         (check_type_stack_depth): Remove.
3347         (insert_into_type_stack): Adjust to std::vector.
3348         (insert_type): Likewise.
3349         (push_type): Likewise.
3350         (push_type_int): Likewise.
3351         (insert_type_address_space): Likewise.
3352         (pop_type): Likewise.
3353         (pop_type_int): Likewise.
3354         (pop_typelist): Likewise.
3355         (pop_type_stack): Likewise.
3356         (append_type_stack): Likewise.
3357         (push_type_stack): Likewise.
3358         (get_type_stack): Likewise.
3359         (type_stack_cleanup): Likewise.
3360         (push_typelist): Likewise.
3361         (follow_types): Likewise.
3362         (_initialize_parse): Likewise.
3363
3364 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3365
3366         * NEWS: Mention csky target.
3367
3368 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3369             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3370             Don Breazeal  <donb@codesourcery.com>
3371
3372         * csky-linux-tdep.c: New file.
3373         * csky-tdep.c: Likewise.
3374         * csky-tdep.h: Likewise.
3375         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3376         csky-tdep.o.
3377         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3378         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3379         * configure.tgt: Add csky support.
3380
3381 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3382
3383         * python/py-framefilter.c (py_print_frame): Print frame architecture
3384         when printing on an MI output.
3385
3386 2018-08-27  Tom Tromey  <tom@tromey.com>
3387
3388         PR build/23087:
3389         * configure: Rebuild.
3390         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3391
3392 2018-08-27  Tom Tromey  <tom@tromey.com>
3393
3394         * aarch64-linux-tdep.c
3395         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3396         casts to int.
3397
3398 2018-08-27  Tom Tromey  <tom@tromey.com>
3399
3400         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3401         unsigned.
3402         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3403         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3404         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3405         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3406         unsigned.
3407
3408 2018-08-27  Tom Tromey  <tom@tromey.com>
3409
3410         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3411         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3412
3413 2018-08-27  Tom Tromey  <tom@tromey.com>
3414
3415         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3416         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3417         ULONGEST_MAX.
3418         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3419         ULONGEST_MAX.
3420         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3421         ULONGEST_MAX.
3422         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3423         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3424         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3425         ULONGEST_MAX.
3426         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3427         (ppc64_linux_sigaction_tramp_frame)
3428         (ppc32_linux_sighandler_tramp_frame)
3429         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3430         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3431         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3432         * mn10300-linux-tdep.c (am33_linux_sigframe)
3433         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3434         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3435         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3436         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3437         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3438         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3439         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3440         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3441         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3442         * microblaze-linux-tdep.c
3443         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3444         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3445         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3446         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3447         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3448         * common/common-types.h (ULONGEST_MAX): New define.
3449         (CORE_ADDR_MAX): Fix formatting.
3450         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3451         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3452         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3453         (arm_linux_rt_sigreturn_tramp_frame)
3454         (arm_eabi_linux_sigreturn_tramp_frame)
3455         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3456         (thumb2_eabi_linux_sigreturn_tramp_frame)
3457         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3458         (arm_linux_restart_syscall_tramp_frame)
3459         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3460         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3461         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3462         ULONGEST_MAX.
3463         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3464
3465 2018-08-27  Tom Tromey  <tom@tromey.com>
3466
3467         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3468         CORE_ADDR_MAX.
3469         * mips-tdep.c (mips_deal_with_atomic_sequence)
3470         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3471         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3472         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3473         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3474         CORE_ADDR_MAX.
3475         * aarch64-tdep.c (aarch64_software_single_step): Use
3476         CORE_ADDR_MAX.
3477
3478 2018-08-27  Tom Tromey  <tom@tromey.com>
3479
3480         * linespec.c (complete_linespec_component): Add cast to "char".
3481         * completer.c (completion_tracker::build_completion_result): Add
3482         cast to "char".
3483
3484 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3485
3486         * solist.h (struct solist, struct target_so_ops): Fix
3487         indentation.
3488
3489 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3490
3491         * ada-tasks.c (ada_task_info_s): Remove typedef.
3492         (DEF_VEC_O(ada_task_info_s)): Remove.
3493         (struct ada_tasks_inferior_data): Initialize fields.
3494         <task_list>: Make an std::vector.
3495         (get_ada_tasks_inferior_data): Allocate with new.
3496         (ada_get_task_number): Adjust.
3497         (get_task_number_from_id): Likewise.
3498         (valid_task_id): Likewise.
3499         (ada_get_task_info_from_ptid): Likewise.
3500         (iterate_over_live_ada_tasks): Likewise.
3501         (add_ada_task): Likewise.
3502         (read_known_tasks): Likewise.
3503         (ada_build_task_list): Likewise.
3504         (print_ada_task_info): Likewise.
3505         (info_task): Likewise.
3506         (task_command_1): Likewise.
3507
3508 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3509
3510         * ada-lang.c (add_angle_brackets): Return std::string.
3511
3512 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3513
3514         * python/py-threadevent.c (py_get_event_thread): Initialize
3515         pythread.
3516
3517 2018-08-24  Pedro Alves  <palves@redhat.com>
3518
3519         * python/py-bpevent.c (create_breakpoint_event_object): Use
3520         copy-initialization.
3521         * python/py-continueevent.c (emit_continue_event): Use
3522         copy-initialization.
3523         * python/py-exitedevent.c (create_exited_event_object): Return a
3524         gdbpy_ref<>.
3525         (emit_exited_event): Use copy-initialization.
3526         * python/py-inferior.c (python_new_inferior)
3527         (python_inferior_deleted, add_thread_object): Use
3528         copy-initialization.
3529         * python/py-infevents.c (create_inferior_call_event_object)
3530         (create_register_changed_event_object)
3531         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3532         (emit_inferior_call_event, emit_memory_changed_event)
3533         (emit_register_changed_event): Use copy-initialization.
3534         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3535         Return a gdbpy_ref<>.
3536         (emit_new_objfile_event): Use copy-initialization.
3537         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3538         (emit_clear_objfiles_event): Use copy-initialization.
3539         * python/py-signalevent.c (create_signal_event_object): Use
3540         copy-initialization.
3541         * python/py-threadevent.c (create_thread_event_object): Use
3542         copy-initialization.
3543
3544 2018-08-24  Pedro Alves  <palves@redhat.com>
3545             Simon Marchi  <simon.marchi@ericsson.com>
3546
3547         PR gdb/23379
3548         * python/py-continueevent.c: Include "gdbthread.h".
3549         (create_continue_event_object): Add intro comment.  Add 'ptid'
3550         parameter.  Use it to find thread to pass to
3551         create_thread_event_object.
3552         (emit_continue_event): Pass PTID down to
3553         create_continue_event_object.
3554         * python/py-event.h (py_get_event_thread): Declare.
3555         (create_thread_event_object): Remove default from 'thread'
3556         parameter.
3557         * python/py-stopevent.c (create_stop_event_object): Use
3558         py_get_event_thread.
3559         * python/py-threadevent.c (get_event_thread): Rename to ...
3560         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3561         and use it to find the thread.
3562         (create_thread_event_object): Assert that THREAD isn't null.
3563         Don't find the event thread here.
3564
3565 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3566
3567         * block.h (blockrange, blockranges): New struct declarations.
3568         (struct block): Add new field named `ranges'.
3569         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3570         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3571         macros for accessing ranges in struct block.
3572         (make_blockranges): New declaration.
3573         block.c (make_blockranges): New function.
3574         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3575         for block.
3576         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3577         * blockframe.c (cache_pc_function_block): New static global.
3578         (clear_pc_function_cache): Clear cache_pc_function_block.
3579         (find_pc_partial_function): Move comment to symtab.h.  Add
3580         support for non-contiguous blocks.
3581         * cli/cli-cmds.c (block.h): Include.
3582         (print_disassembly): Handle printing of non-contiguous blocks.
3583         (disassemble_current_function): Likewise.
3584         (disassemble_command): Likewise.
3585
3586         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3587         BLOCK_START.
3588         * blockframe.c (get_pc_function_start): Likewise.
3589         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3590         (gcc_symbol_address): Likewise.
3591         * compile/compile-object-run.c (compile_object_run): Likewise.
3592         * compile/compile.c (get_expr_block_and_pc): Likewise.
3593         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3594         (func_addr_to_tail_call_list): Likewise.
3595         * findvar.c (default_read_var_value): Likewise.
3596         * inline-frame.c (inline_frame_this_id): Likewise.
3597         (skip-inline_frames): Likewise.
3598         * infcmd.c (until_next_command): Likewise.
3599         * linespec.c (convert_linespec_to_sals): Likewise.
3600         * parse.c (parse_exp_in_context_1): Likewise.
3601         * printcmd.c (build_address_symbolic): likewise.
3602         (info_address_command): Likewise.
3603         symtab.c (find_function_start_sal): Likewise.
3604         (skip_prologue_sal): Likewise.
3605         (find_function_alias_target): Likewise.
3606         (find_gnu_ifunc): Likewise.
3607         * stack.c (find_frame_funname): Likewise.
3608         * symtab.c (fixup_symbol_section): Likewise.
3609         (find_function_start_sal): Likewise.
3610         (skip_prologue_sal): Likewsie.
3611         (find_function_alias_target): Likewise.
3612         (find_gnu_ifunc): Likewise.
3613         * tracepoint.c (info_scope_command): Likewise.
3614         * value.c (value_fn_field): Likewise.
3615
3616         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3617         in place of find_pc_partial_function.
3618         * blockframe.c (find_function_entry_range_from_pc): New function.
3619         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3620         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3621         for each range in a block.
3622
3623
3624 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3625
3626         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3627         incrementation.
3628
3629 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3630
3631         * solib-svr4.c (read_program_headers_from_bfd): Return
3632         gdb::optional<gdb::byte_vector>.
3633         (svr4_exec_displacement): Adjust.
3634
3635 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3636
3637         * solib-svr4.c (read_program_header): Return
3638         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3639         (find_program_interpreter): Return
3640         gdb::optional<gdb::byte_vector>.
3641         (scan_dyntag_auxv): Adjust.
3642         (enable_break): Adjust.
3643         (svr4_exec_displacement): Adjust.
3644
3645 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3646
3647         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3648         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3649
3650 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3651
3652         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3653         string_vprintf.
3654         * guile/scm-utils.c (gdbscm_printf): Likewise.
3655         * serial.c (serial_printf): Likewise.
3656         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3657
3658 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3659
3660         * stack.c (print_frame): Print frame architecture when printing on
3661         an MI output.
3662         * NEWS: Mention new "arch" attribute in frame output.
3663
3664 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3665
3666         * arch/aarch64.h (aarch64_regnum): Update comment.
3667
3668 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3669
3670         * NEWS: Add SVE to 8.2 section.
3671
3672 2018-08-21  Pedro Alves  <palves@redhat.com>
3673
3674         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3675         out from gdbscm_parse_function_args.
3676         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3677         gdbscm_parse_function_args_1.
3678
3679 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3680
3681         PR gdb/17816
3682         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3683         operator.
3684
3685 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3686
3687         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3688
3689 2018-08-19  Michael Spang  <spang@google.com>
3690
3691         PR gdb/11786
3692         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3693         for PT_TLS segments.
3694
3695 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3696
3697         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3698         dwarf_variable_value.
3699         * dwarf2-frame.c (class dwarf_expr_executor):
3700         Add override for dwarf_variable_value.
3701         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3702         (class symbol_needs_eval_context): Likewise.
3703         (indirect_synthetic_pointer): Add forward declaration.
3704         (sect_variable_value): New function.
3705         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3706         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3707         for DW_OP_GNU_variable_value.
3708
3709 2018-08-16  Tom Tromey  <tom@tromey.com>
3710
3711         * top.c (read_command_file): Update.
3712         (command_line_input): Remove "repeat" argument.
3713         * ada-lang.c (get_selections): Update.
3714         * linespec.c (decode_line_2): Update.
3715         * defs.h (command_line_input): Remove argument.
3716         * cli/cli-script.c (read_next_line): Update.
3717         * python/py-gdb-readline.c: Update.
3718
3719 2018-08-17  Tom Tromey  <tom@tromey.com>
3720
3721         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3722         command_line_input.
3723
3724 2018-08-15  Tom Tromey  <tom@tromey.com>
3725
3726         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3727
3728 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3729
3730         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3731         If used, use find_pc_partial_function to find address range
3732         to disassemble.
3733         * mi/mi-main.c (mi_cmd_list_features): Report
3734         "data-disassemble-a-option" feature.
3735         * NEWS: Mention new -data-disassemble option -a.
3736
3737 2018-08-13  Tom Tromey  <tom@tromey.com>
3738
3739         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3740
3741 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3742
3743         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3744         (aarch64_linux_collect_sve_regset): Likewise.
3745         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3746         * regcache.h (regcache_map_entry_size): New function.
3747
3748 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3749
3750         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3751         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3752         (SVE_HEADER_VL_LENGTH): Likewise.
3753         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3754         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3755         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3756         (SVE_HEADER_SIZE_OFFSET): Likewise.
3757         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3758         (SVE_HEADER_VL_OFFSET): Likewise.
3759         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3760         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3761         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3762         (SVE_HEADER_SIZE): Likewise.
3763         (aarch64_linux_core_read_vq): Add function.
3764         (aarch64_linux_core_read_description): Check for SVE section.
3765
3766 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3767
3768         * aarch64-fbsd-tdep.c
3769         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3770         collect_size.
3771         * aarch64-linux-tdep.c
3772         (aarch64_linux_iterate_over_regset_sections): Likewise.
3773         * alpha-linux-tdep.c
3774         (alpha_linux_iterate_over_regset_sections):
3775         * alpha-nbsd-tdep.c
3776         (alphanbsd_iterate_over_regset_sections): Likewise.
3777         * amd64-fbsd-tdep.c
3778         (amd64fbsd_iterate_over_regset_sections): Likewise.
3779         * amd64-linux-tdep.c
3780         (amd64_linux_iterate_over_regset_sections): Likewise.
3781         * arm-bsd-tdep.c
3782         (armbsd_iterate_over_regset_sections): Likewise.
3783         * arm-fbsd-tdep.c
3784         (arm_fbsd_iterate_over_regset_sections): Likewise.
3785         * arm-linux-tdep.c
3786         (arm_linux_iterate_over_regset_sections): Likewise.
3787         * corelow.c (get_core_registers_cb): Likewise.
3788         (core_target::fetch_registers): Likewise.
3789         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3790         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3791         * gdbarch.h (void): Regenerate.
3792         * gdbarch.sh: Add supply_size and collect_size.
3793         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3794         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3795         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3796         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3797         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3798         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3799         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3800         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3801         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3802         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3803         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3804         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3805         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3806         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3807         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3808         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3809         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3810         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3811         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3812         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3813         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3814         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3815         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3816         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3817         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3818         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3819         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3820         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3821         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3822         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3823
3824 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3825
3826         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3827         with string_printf.
3828
3829 2018-08-10  Keith Seitz  <keiths@redhat.com>
3830
3831         * compile/compile-c-support.c (add_code_header, add_code_footer):
3832         Move into policy class.
3833         (c_push_user_expression, pop_user_expression_nop)
3834         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3835         (compile_program): New host class.
3836         (c_compile_program): New typedef.
3837         (c_compute_porgram): Use c_compile_program.
3838
3839 2018-08-10  Keith Seitz  <keiths@redhat.com>
3840
3841         * compile/compile-internal.h (compile_instance::~compile_instance):
3842         Remove calls to htab_delete.
3843         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3844         * compile.c (compile_instance::compile_instance): Initialize
3845         htab unique pointers.
3846         (compile_instance::get_cached_type, compile_instance::insert_type)
3847         (compile_instance::error_symbol_once): Update for unique_ptr.
3848
3849 2018-08-10  Keith Seitz  <keiths@redhat.com>
3850
3851         * compile/compile-c-symbols.c (struct symbol_error)
3852         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3853         (compile_instance::insert_symbol_error)
3854         (compile_instance::error_symbol_once): Move to ...
3855         * compile/compile.c: ... here.
3856
3857 2018-08-10  Keith Seitz  <keiths@redhat.com>
3858
3859         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3860         instead of `new_compile_instance'.
3861         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3862         Update description.
3863         If the symbol error map is not initialized, create it.
3864         (generate_c_for_for_one_symbol): Do not check/initialize
3865         the symbol error map.
3866         * compile/compile-c-types.c (compile_c_instance): Make a class.
3867         Update all callers.
3868         (compile_instance::compile_instance): Initialize the type cache.
3869         (get_cached_type): New function.
3870         (insert_type): Update description.
3871         (compile_c_instance::m_default_cflags): Define.
3872         (convert_type): Update description.  Use get_cached_type.
3873         (delete_instance): Moved to destructor.
3874         (new_compile_instance): Moved to constructor.
3875         * compile/compile-c.h (compile_c_instance): Make class inheriting
3876         from compile_instance.
3877         <base>: Remove field.
3878         <type_map, symbol_err_map>: Move to base class.
3879         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3880         * compile/compile-internal.h (compile_instance): Make class.
3881         <type_map_t, symbol_err_map_t>: Define.
3882         <fe>: Rename to `m_gcc_fe'.
3883         <scope, block, gcc_target_options>: Add `m_' prefix.
3884         <m_type_map, m_symbol_err_map>: New fields, moved from
3885         compile_c_instance.
3886         <destroy>: Remove.
3887         (convert_type, new_compile_instance): Remove.
3888         * compile/compile.c (cleanup_compile_instance): Remove.
3889         (compile_to_object): Use unique_ptr to eliminate cleanups.
3890         (compile_instance::set_print_callback, compile_instance::version)
3891         (compile_instance::set_verbose)
3892         (compile_instance::set_driver_filename)
3893         (compile_instance::set_triplet_regexp)
3894         (compile_instance::set_arguments)
3895         (compile_instance::set_source_file)
3896         (compile_instance::compile): Define.
3897
3898 2018-08-10  Keith Seitz  <keiths@redhat.com>
3899
3900         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3901         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3902         gcc-c-fe.def to define C plugin.
3903         (delete_instance): Delete `c_plugin'.
3904         (new_compile_instance): Initialize `c_plugin'.
3905         * compile/compile-c.h: Include gcc_c_plugin.h.
3906         (struct compile_c_instance) <c_plugin>: New member.
3907         * gcc-c-plugin.h: New file.
3908         Update all callers with API change.
3909
3910 2018-08-10  Keith Seitz  <keiths@redhat.com>
3911
3912         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3913         (HFILES_NO_SRCDIR): ... to here.
3914         Add compile-internal.h and compile-c.h.
3915         * compile/compile-c-support.c: Include compile-c.h.
3916         * compile/compile-c-symbols.c: Include compile-c.h.
3917         (generate_c_for_variable_locations): Update comment.
3918         * compile/compile-c-types.c: Include compile-c.h.
3919         * compile/compile-c.h: New file -- moved C language declarations
3920         from other files here.
3921         * compile/compile-internal.h: Do not include hashtab.h or
3922         common/enum-flags.h.
3923         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3924         (gcc_convert_symbol, gcc_symbol_address)
3925         (generate_c_for_variable_locations, c_get_mode_for_size)
3926         (c_get_range_decl_name): Definitions moved to compile-c.h.
3927         * compile/compile-loc2c.c: Include compile-c.h.
3928
3929 2018-08-10  Keith Seitz  <keiths@redhat.com>
3930
3931         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3932         (c_symbol_substitution_name): ... this.
3933         Update all callers.
3934
3935 2018-08-10  Keith Seitz  <keiths@redhat.com>
3936
3937         * compile/compile-c-support.c (c_compute_program): Use
3938         unique_xmalloc_ptr to eliminate cleanup.
3939         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3940         Return a unique_xmalloc_ptr and eliminate cleanup.
3941         * compile/compile-internal.h (generate_c_for_variable_locations):
3942         Return unique_xmalloc_ptr and update description.
3943
3944 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3945
3946         * corelow.c (core_target::get_core_register_section): Rename
3947         min_size to section_min_size.
3948
3949 2018-08-09  Jim Wilson  <jimw@sifive.com>
3950
3951         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3952         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3953         * NEWS: Mention new GNU/Linux RISC-V target.
3954         * configure.host: Add riscv*-*-linux*.
3955         * configure.nat: Add riscv*.
3956         * configure.tgt: Add riscv*-*-linux*.
3957         * riscv-linux-nat.c: New file.
3958         * riscv-linux-tdep.c: New file.
3959
3960 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3961
3962         * infrun.c (resume): Make static, add forward declaration.
3963         (proceed): Update header comment.
3964         * infrun.h (resume): Delete declaration.
3965
3966 2018-08-09  Tom Tromey  <tom@tromey.com>
3967
3968         * riscv-tdep.h: Minor formatting fixes.
3969
3970 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3971
3972         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3973         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3974         (test_mkdir_recursive): Likewise.
3975         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3976
3977 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3978
3979         * valarith.c (value_subscripted_rvalue): If an array is not in
3980         memory, and we don't know the upper bound, then we can't know that
3981         the requested element exists or not.
3982
3983 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3984
3985         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3986         (target_options_to_string): Add comment.
3987
3988 2018-08-08  Tom Tromey  <tom@tromey.com>
3989
3990         * unittests/scoped_mmap-selftests.c: Check result of "write".
3991
3992 2018-08-08  Jim Wilson  <jimw@sifive.com>
3993
3994         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3995         (decode_register_index_short): New.
3996         (decode_j_type_insn, decode_cj_type_insn): New.
3997         (decode_b_type_insn, decode_cb_type_insn): New.
3998         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3999         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4000         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4001         is_c_sw_insn instead of is_sw_insn.
4002         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4003         (riscv_software_single_step): New.
4004         * riscv-tdep.h (riscv_software_single_step): Declare.
4005
4006         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4007         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4008
4009 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4010
4011         PR gdb/18050:
4012         * target.c (dispose_inferior): Don't dispose of inferiors that are
4013         already killed.
4014
4015 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4016
4017         * remote.c (remote_target::download_tracepoint): Change char* to
4018         const char*.
4019
4020 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4021
4022         * target.h (target_options_to_string): Return an std::string.
4023         * target.c (str_comma_list_concat_elem): Return void, use
4024         std::string.
4025         (do_option): Likewise.
4026         (target_options_to_string): Return an std::string.
4027         * linux-nat.c (linux_nat_target::wait): Adjust.
4028         * target-debug.h (target_debug_print_options): Adjust.
4029
4030 2018-08-07  Tom Tromey  <tom@tromey.com>
4031
4032         * Makefile.in (CPPFLAGS): New variable.
4033         (INTERNAL_CPPFLAGS): Use it.
4034
4035 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4036
4037         * NEWS: Mention the index cache.
4038
4039 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4040
4041         * common/pathstuff.h (get_standard_cache_dir): New.
4042         * common/pathstuff.c (get_standard_cache_dir): New.
4043         * build-id.h (build_id_to_string): New.
4044         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4045         DEBUG_STR_SUFFIX): Move to here.
4046         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4047         DEBUG_STR_SUFFIX): Move from there.
4048         (write_psymtabs_to_index): Make non-static, add basename
4049         parameter.  Write to temporary files, rename when done.
4050         (save_gdb_index_command): Adjust call to
4051         write_psymtabs_to_index.
4052         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4053         field.
4054         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4055         (get_gdb_index_contents_from_cache): New.
4056         (get_gdb_index_contents_from_cache_dwz): New.
4057         (dwarf2_initialize_objfile): Read index from cache.
4058         (dwarf2_build_psymtabs): Save to index.
4059         * dwarf-index-cache.h: New file.
4060         * dwarf-index-cache.c: New file.
4061         * dwarf-index-write.h: New file.
4062
4063 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4064
4065         * gnulib/aclocal.m4: Re-generate.
4066         * gnulib/config.in: Re-generate.
4067         * gnulib/configure: Re-generate.
4068         * gnulib/import/Makefile.am: Re-generate.
4069         * gnulib/import/Makefile.in: Re-generate.
4070         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4071         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4072         * gnulib/import/m4/mkdir.m4: New file.
4073         * gnulib/import/mkdir.c: New file.
4074         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4075         module.
4076
4077 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4078
4079         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4080         * common/scoped_mmap.c: New file.
4081         * common/scoped_mmap.h (destroy): New method.
4082         (~scoped_mmap, reset): Use destroy.
4083         (scoped_mmap): New move constructor.
4084         (mmap_file): New declaration.
4085         * unittests/scoped_mmap-selftests.c (test_normal,
4086         test_invalid_filename, run_tests): New functions.
4087         (_initialize_scoped_mmap_selftests): Register selftest.
4088
4089 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4090
4091         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4092         (read_gdb_index_from_buffer): ... this.  Remove section
4093         parameter, add buffer parameter.
4094         (get_gdb_index_contents_ftype,
4095         get_gdb_index_contents_dwz_ftype): New typedefs.
4096         (dwarf2_read_gdb_index): Add callback parameters to get the
4097         index contents.
4098         (get_gdb_index_contents_from_section): New.
4099         (dwarf2_initialize_objfile): Update call to
4100         dwarf2_read_gdb_index.
4101
4102 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4103
4104         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4105         (gdb_open_cloexec): Likewise.
4106         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4107         (commandline_from_pid): Likewise.
4108         (linux_xfer_osdata_threads): Likewise.
4109         (linux_xfer_osdata_fds): Likewise.
4110         * ada-lang.c (is_package_name): Likewise.
4111         * auxv.c (procfs_xfer_auxv): Likewise.
4112         * breakpoint.c (print_one_breakpoint_location): Use
4113         uiout::field_fmt.
4114         (print_one_catch_solib): Use string_printf.
4115         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4116         (add_pe_forwarded_sym): Likewise.
4117         * dwarf2read.c (create_type_unit_group): Likewise.
4118         (build_error_marker_type): Likewise.
4119         * infcall.c (get_function_name): Likewise.
4120         * valprint.c (print_converted_chars_to_obstack): Likewise.
4121         * xtensa-tdep.c (xtensa_register_type): Likewise.
4122
4123 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4124
4125         * remote.c (remote_target::download_tracepoint): Fix format
4126         string errors.
4127
4128 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4129
4130         * tracefile.c: Include common/byte-vector.h.
4131         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4132         with trace_regblock_size if needed.  Update uses of buf.
4133
4134 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4135
4136         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4137         std::vector<unsigned char>.
4138         * tracepoint.c (collection_list::collection_list): Remove
4139         m_regs_mask initializer from initializer list.  Resize
4140         m_regs_mask using the largest remote register number.
4141         (collection_list::add_remote_register): Remove size check on
4142         m_regs_mask.  Use at to access element.
4143         (collection_list::stringify): Change type of temp_buf to
4144         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4145         stringify the register mask.  Use pack_hex_byte for the register
4146         mask.
4147
4148 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4149
4150         * tracepoint.h (class collection_list) <add_register>: Remove.
4151         <add_remote_register, add_ax_registers, add_local_register>:
4152         Declare.
4153         <add_memrange>: Add scope parameter.
4154         * tracepoint.c (encode_actions_1): Likewise.
4155         (collection_list::add_register): Rename to ...
4156         (collection_list::add_remote_register): ... this.  Update
4157         comment.
4158         (collection_list::add_ax_registers, add_local_register): New
4159         methods.
4160         (collection_list::add_memrange): Add scope parameter.  Call
4161         add_local_register instead of add_register.
4162         (finalize_tracepoint_aexpr): New function.
4163         (collection_list::collect_symbol): Update calls to add_memrange.
4164         Call add_local_register instead of add_register.  Call
4165         add_ax_registers.  Call finalize_tracepoint_aexpr.
4166         (encode_actions_1): Get remote regnos for $reg action.  Call
4167         add_remote_register, add_ax_registers, and add_local_register.
4168         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4169         (validate_actionline): Call finalize_tracepoint_aexpr.
4170
4171 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4172
4173         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4174         Replace array buf with gdb::char_vector buf, of size
4175         get_remote_packet_size ().  Replace references to buf and
4176         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4177         and xsnprintf with snprintf.  Raise errors if the buffer is too
4178         small.
4179
4180 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4181
4182         * remote.c (remote_target::download_tracepoint): Fix the has_more
4183         predicate in the QTDP action list iteration.
4184
4185 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4186
4187         * remote.c (remote_target::download_tracepoint): Fix indentation
4188         in for block.
4189
4190 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4191
4192         * proc-api.c (_initialize_proc_api): Remove c, unused.
4193         * procfs.c (procfs_init_inferior): Remove signals, unused.
4194         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4195         unused.
4196
4197 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4198             Andrew Burgess  <andrew.burgess@embecosm.com>
4199
4200         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4201         'W_STOPCODE (0)' as this could be ambiguous.
4202
4203 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4204
4205         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4206         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4207         "ai_socktype").
4208
4209 2018-08-02  Tom Tromey  <tom@tromey.com>
4210
4211         PR symtab/16842.
4212         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4213         symbols.
4214         (process_structure_scope): Likewise.
4215
4216 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4217
4218         PR gdb/22629:
4219         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4220         kill inferior.
4221
4222 2018-08-02  Tom Tromey  <tom@tromey.com>
4223
4224         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4225         (darwin_suspend_inferior, darwin_resume_inferior)
4226         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4227         (darwin_check_new_threads): Check result of get_darwin_inferior.
4228
4229 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4230
4231         GDB 8.1.1 released.
4232
4233 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4234
4235         * varobj.c (varobj_get_path_expr_parent): Report an error if
4236         parent is a dynamic varobj.
4237
4238 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4239
4240         * gnulib/aclocal.m4: Re-generate.
4241         * gnulib/config.in: Re-generate.
4242         * gnulib/configure: Re-generate.
4243         * gnulib/import/Makefile.in: Re-generate.
4244         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4245         * gnulib/import/m4/onceonly.m4: Re-generate.
4246
4247 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4248
4249         * target-descriptions.c (struct xml_test_tdesc): New.
4250         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4251         (record_xml_tdesc): Update.
4252         (maintenance_check_xml_descriptions): Update.
4253         * target-descriptions.h (record_xml_tdesc): Update comment.
4254
4255 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4256
4257         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4258         checking array bounds are defined.
4259
4260 2018-07-30  Tom Tromey  <tom@tromey.com>
4261
4262         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4263         irreflexivity violation.
4264
4265 2018-07-30  Tom Tromey  <tom@tromey.com>
4266
4267         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4268         * value.c (unpack_long): Remove lint code.
4269         * valops.c (value_ind): Remove lint code.
4270         * valarith.c (value_x_binop, value_x_unop, value_equal)
4271         (value_pos): Remove lint code.
4272
4273 2018-07-28  Tom de Vries  <tdevries@suse.de>
4274
4275         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4276         with undefined upper bound as <optimized out>.
4277
4278 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4279
4280         * gcore.in: Rename variable "name" to "prefix".  Expand
4281         "usage" text.
4282
4283 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4284
4285         * windows-nat.c (windows_nat_target::create_inferior): Update to
4286         call close() in global namespace.
4287
4288 2018-07-26  Tom Tromey  <tom@tromey.com>
4289
4290         * dwarf-index-write.c (add_address_entry): Don't add objfile
4291         offsets.
4292         * dbxread.c (find_stab_function): Rename from
4293         find_stab_function_addr.  Return a bound_minimal_symbol.
4294         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4295         Don't add objfile offsets.
4296         (end_psymtab): Use raw_text_low, raw_text_high,
4297         MSYMBOL_VALUE_RAW_ADDRESS.
4298         (read_ofile_symtab): Update.
4299         (process_one_symbol): Update.
4300         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4301         offsets.
4302         (dw2_relocate): Remove.
4303         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4304         searching addrmap.
4305         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4306         Update.
4307         (process_psymtab_comp_unit_reader, add_partial_symbol)
4308         (add_partial_subprogram, dwarf2_ranges_read): Update.
4309         (load_partial_dies): Update.
4310         (add_address_entry): Don't add objfile offsets.
4311         (dwarf2_build_include_psymtabs): Update.
4312         (create_addrmap_from_aranges): Don't add objfile offsets.
4313         (dw2_find_pc_sect_compunit_symtab): Update.
4314         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4315         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4316         Update.
4317         (parse_partial_symbols): Don't add objfile offsets.  Use
4318         raw_text_low, raw_text_high.  Update.
4319         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4320         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4321         or call 'relocate' quick function.  Clear psymbol_map.
4322         * psympriv.h (struct partial_symbol) <address>: Add section
4323         offset.
4324         <set_unrelocated_address>: Rename from set_address.
4325         <raw_text_low, raw_text_high>: New methods.
4326         <text_low, text_high>: Add objfile parameter.
4327         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4328         set_unrelocated_address.
4329         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4330         (find_pc_psymbol): Update.
4331         (fixup_psymbol_section, relocate_psymtabs): Remove.
4332         (dump_psymtab, psym_functions): Update.
4333         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4334         parameter.
4335         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4336         (start_psymtab_common): Update.
4337         * symfile-debug.c (debug_qf_relocate): Remove.
4338         (debug_sym_quick_functions): Update.
4339         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4340         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4341         Update.
4342
4343 2018-07-26  Tom Tromey  <tromey@redhat.com>
4344
4345         * dbxread.c (end_psymtab): Use text_high_valid and
4346         text_low_valid.
4347         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4348         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4349         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4350         Update comment.
4351         <text_low_valid, text_high_valid>: New fields.
4352         <set_text_low, set_text_high>: Update.
4353         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4354
4355 2018-07-26  Tom Tromey  <tom@tromey.com>
4356
4357         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4358         Update.
4359         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4360         textlow and texthigh fields.
4361         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4362         Update.
4363         * mdebugread.c (parse_lines, parse_partial_symbols)
4364         (psymtab_to_symtab_1): Update.
4365         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4366         Rename fields.  Update comment.  Now private.
4367         <text_low, text_high, set_text_low, set_text_high>: New methods.
4368         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4369         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4370         (start_psymtab_common, maintenance_info_psymtabs)
4371         (maintenance_check_psymtabs): Update.
4372         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4373         texthigh fields.
4374         (scan_xcoff_symtab): Update.
4375
4376 2018-07-26  Tom Tromey  <tromey@redhat.com>
4377
4378         * psympriv.h (struct partial_symbol) <unrelocated_address,
4379         address, set_address>: New methods.
4380         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4381         (fixup_psymbol_section, relocate_psymtabs): Update.
4382         (print_partial_symbols): Add 'objfile' parameter.  Update.
4383         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4384         Update.
4385
4386 2018-07-26  Tom Tromey  <tom@tromey.com>
4387
4388         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4389         (debug_names::write_psymbols): Update.
4390         * psympriv.h (struct partial_symbol): Derive from
4391         general_symbol_info.
4392         <obj_section>: New method.
4393         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4394         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4395         (find_pc_sect_psymbol, fixup_psymbol_section)
4396         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4397         (print_partial_symbols, recursively_search_psymtabs)
4398         (compare_psymbols, psymbol_hash, psymbol_compare)
4399         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4400         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4401
4402 2018-07-26  Tom Tromey  <tromey@redhat.com>
4403
4404         * dbxread.c (end_psymtab): Remove dead code.
4405
4406 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4407
4408         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4409         DWARF unwinders are disabled.
4410         * dwarf2-frame.c: Add dwarf2read.h include.
4411         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4412         disabled.
4413         (dwarf2_frame_unwinders_enabled_p): Define.
4414         (show_dwarf_unwinders_enabled_p): New function.
4415         (_initialize_dwarf2_frame): Register switch to control DWARF
4416         unwinder use.
4417         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4418         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4419         (show_dwarf_cmdlist): Remove static keyword.
4420         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4421         (show_dwarf_cmdlist): Declare.
4422         * NEWS: Document new feature.
4423
4424 2018-07-26  Tom de Vries  <tdevries@suse.de>
4425
4426         PR breakpoints/23366
4427         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4428
4429 2018-07-26  Tom de Vries  <tdevries@suse.de>
4430
4431         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4432         DW_AT_count can't be translated to a dynamic prop.
4433
4434 2018-07-25  Tom de Vries  <tdevries@suse.de>
4435
4436         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4437         try/catch.
4438
4439 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4440
4441         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4442
4443 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4444
4445         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4446
4447 2018-07-24  Keith Seitz  <keiths@redhat.comt
4448
4449         PR symtab/23010
4450         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4451         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4452         instead of add_symbol_to_list.
4453         (read_file_scope): Call prepare_one_comp_unit before reading
4454         any other DIEs.
4455
4456 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4457
4458         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4459
4460 2018-07-24  Tom Tromey  <tom@tromey.com>
4461
4462         * utils.c (malloc, realloc, free): Don't declare.
4463         * configure, config.in: Rebuild.
4464         * configure.ac: Don't check for declarations of free, malloc, or
4465         realloc.
4466
4467 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4468
4469         * aarch64-linux-nat.c
4470         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4471         variable.
4472         * arm-linux-nat.c (fetch_regs): Likewise.
4473         (store_regs): Likewise.
4474         (fetch_vfp_regs): Likewise.
4475         (store_vfp_regs): Likewise.
4476         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4477         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4478         (arm_linux_nat_target::insert_watchpoint): Likewise.
4479         (arm_linux_nat_target::remove_watchpoint): Likewise.
4480         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4481         Likewise.
4482         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4483         Likewise.
4484         * ppc-linux-nat.c (fetch_register): Likewise.
4485         (fetch_all_gp_regs): Likewise.
4486         (fetch_ppc_registers): Likewise.
4487         (store_all_gp_regs): Likewise.
4488         (store_ppc_registers): Likewise.
4489         (hwdebug_insert_point): Likewise.
4490         (can_use_watchpoint_cond_accel): Likewise.
4491         * remote-sim.c (gdb_os_write_stdout): Likewise.
4492
4493 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4494             Tom Tromey  <tom@tromey.com>
4495
4496         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4497         test for it.
4498         * configure: Rebuild.
4499
4500 2018-07-22  Tom Tromey  <tom@tromey.com>
4501
4502         * regformats/regdat.sh: Define xmltarget_${name} inside
4503         #ifndef IN_PROCESS_AGENT.
4504
4505 2018-07-22  Tom Tromey  <tom@tromey.com>
4506
4507         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4508
4509 2018-07-22  Tom Tromey  <tom@tromey.com>
4510
4511         * symfile.c (reread_symbols): Notify iter, not objfile.
4512
4513 2018-07-22  Tom Tromey  <tom@tromey.com>
4514
4515         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4516         Use arch_ops.
4517         (ravenscar_thread_target::prepare_to_store): Likewise.
4518
4519 2018-07-22  Tom Tromey  <tom@tromey.com>
4520
4521         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4522         unused variable.  Call value_fetch_lazy when needed.
4523         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4524         Remove unused variable.  Call value_fetch_lazy when needed.
4525
4526 2018-07-22  Tom Tromey  <tom@tromey.com>
4527
4528         * m32c-tdep.c (mark_dma): Return void.
4529         (make_regs): Remove unused declarations.
4530
4531 2018-07-22  Tom Tromey  <tom@tromey.com>
4532
4533         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4534         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4535         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4536         bkscm_get_valid_block_smob_arg_unsafe for effect.
4537
4538 2018-07-22  Tom Tromey  <tom@tromey.com>
4539
4540         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4541         value_type.
4542
4543 2018-07-22  Tom Tromey  <tom@tromey.com>
4544
4545         * windows-nat.c (saved_context): Conditionally define.
4546         * remote.c (remote_target::remote_btrace_maybe_reopen):
4547         Conditionally declare "warned".
4548         * inflow.c (sigquit_ours): Conditionally define.
4549         (new_tty): Move "tty" declaration inside #if.
4550         * guile/guile.c (guile_datadir): Conditionally define.
4551         * charset.c (set_be_le_names): Move some declarations inside #if.
4552         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4553         #if.
4554         (parse_xml_btrace_conf): Likewise.
4555
4556 2018-07-22  Tom Tromey  <tom@tromey.com>
4557
4558         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4559
4560 2018-07-22  Tom Tromey  <tom@tromey.com>
4561
4562         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4563         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4564         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4565         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4566         * stack.c (frame_apply_level_command): Remove unused variable.
4567         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4568         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4569         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4570         unused variable.
4571         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4572         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4573         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4574         variable.
4575         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4576         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4577         variable.
4578         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4579         Remove unused variable.
4580         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4581         variable.
4582         * common/tdesc.c (print_xml_feature::visit): Remove unused
4583         variable.
4584         * compile/compile-object-load.c (store_regs): Remove unused
4585         variables.
4586         * complaints.c (clear_complaints): Remove unused variable.
4587         * corelow.c (core_target_open): Remove unused variable.
4588         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4589         variable.
4590         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4591         variable.
4592         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4593         variable.
4594         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4595         variable.
4596         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4597         variable.
4598         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4599         variable.
4600         * ia64-tdep.c (examine_prologue): Remove unused variable.
4601         * infcall.c (run_inferior_call): Remove unused variable.
4602         * inferior.c (exit_inferior): Remove unused variable.
4603         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4604         * linespec.c (decode_line_2): Remove unused variable.
4605         * linux-nat.c (super_close): Remove.
4606         * linux-tdep.c (linux_info_proc): Remove unused variable.
4607         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4608         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4609         Remove unused variable.
4610         * parse.c (find_minsym_type_and_address): Remove unused variable.
4611         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4612         variable.
4613         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4614         variable.
4615         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4616         variables.
4617         * record-btrace.c (record_btrace_target::store_registers): Remove
4618         unused variable.
4619         (cmd_show_record_btrace_cpu): Remove unused variable.
4620         * riscv-tdep.c (riscv_register_reggroup_p)
4621         (riscv_push_dummy_call, riscv_return_value): Remove unused
4622         variable.
4623         * rust-exp.y (literal): Remove unused variable.
4624         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4625         unused variable.
4626         <STRUCTOP_ANONYMOUS>: Likewise.
4627         * s390-linux-tdep.c (s390_linux_init_abi_31)
4628         (s390_linux_init_abi_64): Remove unused variable.
4629         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4630         (file_select_thread, net_windows_open, _initialize_ser_windows):
4631         Remove unused variables.
4632         * symtab.c (find_pc_sect_line): Remove unused variable.
4633         * target-memory.c (compute_garbled_blocks): Remove unused
4634         variable.
4635         (target_write_memory_blocks): Remove unused variable.
4636         * target.c (target_stack::unpush): Remove unused variables.
4637         * tracepoint.c (start_tracing, all_tracepoint_actions)
4638         (merge_uploaded_trace_state_variables)
4639         (print_one_static_tracepoint_marker): Remove unused variable.
4640         * unittests/basic_string_view/element_access/char/1.cc (test01):
4641         Remove unused variable.
4642         * windows-nat.c (windows_continue, windows_add_all_dlls)
4643         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4644         Remove unused variables.
4645
4646 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4647
4648         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4649         attr_profile in HAVE_ELF.
4650         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4651         HAVE_ELF.
4652
4653 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4654
4655         * frame.c (frame_register_unwind): Change parameter name.
4656         (frame_unwind_register): Likewise.
4657         (frame_unwind_register_value): Likewise.
4658         (frame_unwind_register_signed): Likewise.
4659         (frame_unwind_register_unsigned): Likewise.
4660         * frame.h (frame_register_unwind): Likewise.
4661         (frame_unwind_register): Likewise.
4662         (frame_unwind_register_value): Likewise.
4663         (frame_unwind_register_signed): Likewise.
4664         (frame_unwind_register_unsigned): Likewise.
4665         (frame_unwind_arch): Likewise.
4666
4667 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4668
4669         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4670         ISA maintenance.
4671
4672 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4673
4674         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4675         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4676         hand.
4677
4678 2018-07-20  Keith Seitz  <keiths@redhat.com>
4679
4680         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4681         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4682         m_compunit_symtab, m_language>: Add "m_" prefix.
4683         Update all uses.
4684         * buildsym.c: Update all uses.
4685
4686 2018-07-20  Tom Tromey  <tom@tromey.com>
4687
4688         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4689         * buildsym.h (record_line_ftype): Remove typedef.
4690
4691 2018-07-20  Tom Tromey  <tom@tromey.com>
4692
4693         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4694         (end_expandable_symtab): Likewise.
4695         (end_symtab_get_static_block): Likewise.
4696         (end_symtab_from_static_block): Likewise.
4697         * buildsym-legacy.c (augment_type_symtab): Remove.
4698         (end_expandable_symtab): Remove.
4699         (end_symtab_get_static_block): Remove.
4700         (end_symtab_from_static_block): Remove.
4701
4702 2018-07-20  Tom Tromey  <tom@tromey.com>
4703
4704         * dwarf2read.c: Include buildsym.h.
4705         (struct dwarf2_cu) <builder>: New method.
4706         (fixup_go_packaging): Update.
4707         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4708         use scoped_free_pendings.
4709         (using_directives): Add "cu" parameter, remove "language".
4710         (read_import_statement, setup_type_unit_groups, )
4711         (read_func_scope, read_lexical_block_scope)
4712         (dwarf2_record_block_ranges, read_namespace): Update.
4713         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4714         (lnp_state_machine::handle_end_sequence): Update.
4715         (class lnp_state_machine) <m_cu>: New member.
4716         <m_record_line_callback>: Remove.
4717         <m_currently_recording_lines>: New member.
4718         (lnp_state_machine::handle_set_file): Update.
4719         (noop_record_line): Remove.
4720         (dwarf_record_line_p): Add cu parameter.
4721         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4722         (lnp_state_machine::record_line)
4723         (lnp_state_machine::lnp_state_machine)
4724         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4725         (dwarf_decode_lines): Update.
4726         (dwarf2_start_subfile): Add cu parameter.
4727         (dwarf2_start_symtab, new_symbol): Update.
4728         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4729         Remove dwarf2_per_objfile parameter.
4730         (dwarf_decode_macros): Update.
4731
4732 2018-07-20  Tom Tromey  <tom@tromey.com>
4733
4734         * stabsread.c (define_symbol): Update.
4735         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4736         * dwarf2read.c (new_symbol): Update.
4737         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4738         * cp-namespace.c: Include buildsym.h.
4739         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4740         * buildsym-legacy.c (get_buildsym_compunit): New function.
4741
4742 2018-07-20  Tom Tromey  <tom@tromey.com>
4743
4744         * xcoffread.c: Include buildsym-legacy.h.
4745         * windows-nat.c: Include buildsym-legacy.h.
4746         * stabsread.c: Include buildsym-legacy.h.
4747         * mdebugread.c: Include buildsym-legacy.h.
4748         * buildsym-legacy.h: New file.
4749         * buildsym-legacy.c: New file, from buildsym.c.
4750         * go32-nat.c: Include buildsym-legacy.h.
4751         * dwarf2read.c: Include buildsym-legacy.h.
4752         * dbxread.c: Include buildsym-legacy.h.
4753         * cp-namespace.c: Include buildsym-legacy.h.
4754         * coffread.c: Include buildsym-legacy.h.
4755         * buildsym.h: Move some contents to buildsym-legacy.h.
4756         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4757         buildsym-legacy.c.
4758         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4759
4760 2018-07-20  Tom Tromey  <tom@tromey.com>
4761
4762         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4763         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4764         (buildsym_compunit::buildsym_compunit)
4765         (buildsym_compunit::~buildsym_compunit)
4766         (buildsym_compunit::get_macro_table): Define.
4767
4768 2018-07-20  Tom Tromey  <tom@tromey.com>
4769
4770         * buildsym.c (reset_symtab_globals): Remove.
4771         (buildsym_compunit::end_symtab_from_static_block): Update.
4772         (buildsym_compunit::augment_type_symtab): Update.
4773         (end_symtab_from_static_block): Call free_buildsym_compunit.
4774         (augment_type_symtab, end_symtab, end_expandable_symtab):
4775         Likewise.
4776
4777 2018-07-20  Tom Tromey  <tom@tromey.com>
4778
4779         * arch-utils.c: Do not include buildsym.h.
4780         * mipsread.c: Do not include buildsym.h.
4781         * machoread.c: Do not include buildsym.h.
4782         * elfread.c: Do not include buildsym.h.
4783
4784 2018-07-20  Tom Tromey  <tom@tromey.com>
4785
4786         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4787         initialization.
4788         (buildsym_compunit): Add new constructor.
4789         (struct buildsym_compunit) <get_last_source_file, finish_block,
4790         record_block_range, start_subfile, patch_subfile_names,
4791         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4792         set_last_source_start_addr, get_last_source_start_addr,
4793         get_local_using_directives, set_local_using_directives,
4794         get_global_using_directives, outermost_context_p,
4795         get_current_context_stack, get_context_stack_depth,
4796         get_current_subfile, get_local_symbols, get_file_symbols,
4797         get_global_symbols, record_debugformat, record_producer,
4798         push_context, pop_context, end_symtab_get_static_block,
4799         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4800         New public methods.
4801         <record_pending_block, finish_block_internal, make_blockvector,
4802         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4803         private methods.
4804         Update all users.
4805
4806 2018-05-22  Tom Tromey  <tom@tromey.com>
4807
4808         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4809         parameter.
4810         (finish_block_internal): Update.
4811
4812 2018-07-20  Tom Tromey  <tom@tromey.com>
4813
4814         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4815         parameter.
4816         (finish_block_internal): Update.
4817
4818 2018-07-20  Tom Tromey  <tom@tromey.com>
4819
4820         * buildsym.h (EXTERN): Don't define or undef.
4821         * buildsym.c (EXTERN): Don't define.
4822
4823 2018-07-20  Tom Tromey  <tom@tromey.com>
4824
4825         * buildsym.c: Remove TODO comment.
4826
4827 2018-07-20  Tom Tromey  <tom@tromey.com>
4828
4829         * coffread.c (coff_symtab_read): Update.
4830         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4831         (xcoff_new_init): Update.
4832         * mipsread.c (mipscoff_new_init): Update.
4833         * mdebugread.c (mdebug_build_psymtabs): Update.
4834         * elfread.c (elf_new_init): Update.
4835         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4836         Update.
4837         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4838         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4839         (stabsect_build_psymtabs): Update.
4840         * buildsym.h (buildsym_init): Don't declare.
4841         * buildsym.c: Update comment.
4842         (prepare_for_building): Remove.
4843         (start_symtab, restart_symtab): Update.
4844         (reset_symtab_globals): Update comment.
4845         (buildsym_init): Remove.
4846
4847 2018-07-20  Tom Tromey  <tom@tromey.com>
4848
4849         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4850         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4851         (read_enum_type, common_block_start, common_block_end)
4852         (cleanup_undefined_types_1, finish_global_stabs): Update.
4853         * mdebugread.c (psymtab_to_symtab_1): Update.
4854         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4855         (read_lexical_block_scope, new_symbol): Update.
4856         * dbxread.c (process_one_symbol): Update.
4857         * coffread.c (coff_symtab_read, process_coff_symbol)
4858         (coff_read_enum_type): Update.
4859         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4860         declare.
4861         (get_local_symbols, get_file_symbols, get_global_symbols): New
4862         functions.
4863         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4864         m_global_symbols.
4865         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4866         (~scoped_free_pendings): Update.
4867         (finish_block, prepare_for_building, reset_symtab_globals)
4868         (end_symtab_get_static_block, end_symtab_with_blockvector)
4869         (augment_type_symtab, push_context): Update.
4870         (get_local_symbols, get_file_symbols, get_global_symbols): New
4871         functions.
4872         (buildsym_init): Update.
4873
4874 2018-07-20  Tom Tromey  <tom@tromey.com>
4875
4876         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4877         (process_full_type_unit): Likewise.
4878         (dwarf2_start_symtab): Set list_in_scope.
4879
4880 2018-07-20  Tom Tromey  <tom@tromey.com>
4881
4882         * dwarf2read.c (process_psymtab_comp_unit_reader)
4883         (build_type_psymtabs_reader): Do not set list_in_scope.
4884
4885 2018-07-20  Tom Tromey  <tom@tromey.com>
4886
4887         * buildsym.c (free_pendings): Remove.
4888         (add_symbol_to_list, scoped_free_pendings)
4889         (finish_block_internal, buildsym_init): Update.
4890
4891 2018-07-20  Tom Tromey  <tom@tromey.com>
4892
4893         * xcoffread.c (read_xcoff_symtab): Update.
4894         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4895         Update.
4896         * dbxread.c (process_one_symbol): Update.
4897         * coffread.c (coff_symtab_read): Update.
4898         * buildsym.h (finish_block): Update.
4899         * buildsym.c (finish_block): Remove "listhead" argument.
4900         (end_symtab_get_static_block): Update.
4901
4902 2018-07-20  Tom Tromey  <tom@tromey.com>
4903
4904         * buildsym.h (class scoped_free_pendings): Remove constructor.
4905         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4906         method.
4907         <m_pending_block_obstack, m_pending_blocks>: New members.
4908         (pending_block_obstack, pending_blocks): Remove.
4909         (scoped_free_pendings::scoped_free_pendings): Default.
4910         (~scoped_free_pendings): Update.
4911         (free_pending_blocks): Remove.
4912         (finish_block_internal, record_pending_block, make_blockvector)
4913         (end_symtab_get_static_block, augment_type_symtab, push_context)
4914         (buildsym_init): Update.
4915
4916 2018-07-20  Tom Tromey  <tom@tromey.com>
4917
4918         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4919         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4920         members.
4921         (pending_addrmap, pending_addrmap_obstack)
4922         (pending_addrmap_interesting): Remove.
4923         (scoped_free_pendings, record_block_range, make_blockvector)
4924         (prepare_for_building, reset_symtab_globals, buildsym_init):
4925         Update.
4926
4927 2018-07-20  Tom Tromey  <tom@tromey.com>
4928
4929         * xcoffread.c (process_linenos): Update.
4930         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4931         * mdebugread.c (psymtab_to_symtab_1): Update.
4932         * dwarf2read.c (setup_type_unit_groups)
4933         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4934         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4935         * dbxread.c (process_one_symbol): Update.
4936         * coffread.c (coff_symtab_read, enter_linenos)
4937         (process_coff_symbol): Update.
4938         * buildsym.h (current_subfile): Don't declare.
4939         (get_current_subfile): Declare.
4940         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4941         member.
4942         (start_subfile, free_buildsym_compunit, push_subfile)
4943         (prepare_for_building, start_symtab): Update.
4944         (get_current_subfile): New function.
4945
4946 2018-07-20  Tom Tromey  <tom@tromey.com>
4947
4948         * coffread.c (coff_symtab_read): Update.
4949         * xcoffread.c (read_xcoff_symtab): Update.
4950         * dwarf2read.c (new_symbol): Update.
4951         (read_func_scope, read_lexical_block_scope): Update.
4952         * dbxread.c (process_one_symbol): Update.
4953         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4954         (outermost_context_p): Remove macro.
4955         (outermost_context_p, get_current_context_stack)
4956         (get_context_stack_depth): Declare.
4957         (pop_context): Return struct context_stack.
4958         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4959         member.
4960         (context_stack_size): Remove.
4961         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4962         (prepare_for_building, end_symtab_get_static_block)
4963         (augment_type_symtab, push_context): Update.
4964         (pop_context): Return struct context_stack.
4965         (outermost_context_p, get_current_context_stack)
4966         (get_context_stack_depth): New functions.
4967         (buildsym_init): Update.
4968
4969 2018-07-20  Tom Tromey  <tom@tromey.com>
4970
4971         * rust-exp.y: Now a pure parser.  Update all rules.
4972         (%union): Move earlier.
4973         (current_parser, work_obstack): Remove globals.
4974         (rust_parser, ~rust_parser): Update.
4975         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4976         lex_character, lex_number, lex_string, lex_identifier,
4977         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4978         convert_name, convert_params_to_expression,
4979         convert_ast_to_expression, ast_basic_type, ast_operation,
4980         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4981         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4982         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4983         ast_array_type, ast_slice_type, ast_reference_type,
4984         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4985         (rust_parse): Update.
4986         (rustyyerror, rustyylex): Add parser parameter.
4987         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4988         (rust_lex_stringish_test, rust_lex_test_sequence)
4989         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4990         (rust_lex_test_push_back, rust_lex_tests): Update.
4991
4992 2018-07-19  Pedro Alves  <palves@redhat.com>
4993
4994         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4995         gdb::unique_xmalloc_ptr.
4996         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4997         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4998         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4999         copy-initialization.
5000         * guile/scm-pretty-print.c (ppscm_print_children): Use
5001         gdb::unique_xmalloc_ptr instead of cleanups.
5002         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5003         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5004         gdb::unique_xmalloc_ptr.
5005         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5006         Adjust to use gdb::unique_xmalloc_ptr.
5007         * guile/scm-utils.c (extract_arg): Adjust.
5008         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5009         gdb::unique_xmalloc_ptr instead of a cleanup.
5010
5011 2018-07-19  Tom Tromey  <tom@tromey.com>
5012
5013         * utils.c (do_value_free_to_mark)
5014         (make_cleanup_value_free_to_mark): Remove.
5015         * utils.h (make_cleanup_value_free_to_mark): Remove.
5016
5017 2018-07-19  Pedro Alves  <palves@redhat.com>
5018
5019         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5020         forwarding reference.
5021
5022 2018-07-18  Pedro Alves  <palves@redhat.com>
5023
5024         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5025         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5026         cleanup.
5027
5028 2018-07-18  Pedro Alves  <palves@redhat.com>
5029
5030         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5031         exceptions.
5032         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5033         (gdbscm_wrap): New.
5034         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5035         directly instead of a cleanup.
5036         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5037         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5038         (vlscm_binop_gdbthrow): New, factored out from ...
5039         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5040         (vlscm_rich_compare): Use gdbscm_wrap.
5041         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5042         instead of a cleanup.
5043         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5044         cleanup.
5045         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5046         Use xfree directly instead of a cleanup.
5047         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5048         Adjust to use gdbscm_wrap and scoped_value_mark.
5049         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5050         (gdbscm_value_address, gdbscm_value_dereference)
5051         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5052         scoped_value_mark.
5053         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5054         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5055         scoped_value_mark.
5056         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5057         gdbscm_wrap and scoped_value_mark.
5058         (gdbscm_value_to_string): Use xfree directly instead of a
5059         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5060         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5061         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5062         scoped_value_mark.
5063         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5064         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5065         scoped_value_mark.
5066         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5067         gdbscm_wrap.
5068
5069 2018-07-18  Tom de Vries  <tdevries@suse.de>
5070
5071         * findvar.c (default_read_var_value): Also resolve dynamic type for
5072         LOC_OPTIMIZED_OUT vars.
5073
5074 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5075
5076         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5077         decoding.
5078
5079 2018-07-17  Tom Tromey  <tom@tromey.com>
5080
5081         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5082         (compute_enum_list, pascm_set_param_value_x)
5083         (gdbscm_parameter_value): Update.
5084         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5085         (gdbscm_scm_to_host_string): Update.
5086         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5087         Update.
5088         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5089         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5090         * guile/scm-string.c (gdbscm_scm_to_string): Return
5091         unique_xmalloc_ptr.
5092         (gdbscm_scm_to_host_string): Likewise.
5093
5094 2018-07-17  Tom Tromey  <tom@tromey.com>
5095
5096         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5097         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5098         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5099         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5100         unique_xmalloc_ptr.
5101
5102 2018-07-17  Tom Tromey  <tom@tromey.com>
5103
5104         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5105         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5106         Update.
5107         * guile/scm-cmd.c (cmdscm_function): Update.
5108         * guile/scm-pretty-print.c
5109         (ppscm_print_exception_unless_memory_error): Update.
5110         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5111         Return unique_xmalloc_ptr.
5112
5113 2018-07-17  Tom Tromey  <tom@tromey.com>
5114
5115         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5116         Use string_printf.
5117
5118 2018-07-17  Jim Wilson  <jimw@sifive.com>
5119
5120         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5121         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5122         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5123         unecessary braces after EF_RISCV_RVC test.  Delete call to
5124         set_gdbarch_decr_pc_after_break.
5125
5126         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5127         RISCV_LAST_FP_REGNUM + 1.
5128         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5129
5130 2018-07-17  Tom Tromey  <tom@tromey.com>
5131
5132         * configure.ac: Remove --disable-gdbcli.
5133         * configure: Rebuild.
5134         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5135         (SUBDIR_CLI_CFLAGS): Remove.
5136         (SFILES): Use SUBDIR_CLI_SRCS.
5137         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5138
5139 2018-07-17  Tom Tromey  <tom@tromey.com>
5140
5141         PR gdb/18624:
5142         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5143
5144 2018-07-16  Jim Wilson  <jimw@sifive.com>
5145
5146         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5147
5148 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5149
5150         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5151         variable.
5152         (libunwind_frame_sniffer): Likewise.
5153         (libunwind_frame_prev_register): Likewise.
5154         (libunwind_sigtramp_frame_sniffer): Likewise.
5155         * ia64-tdep.c (ia64_access_reg): Likewise.
5156         (ia64_access_rse_reg): Likewise.
5157         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5158         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5159
5160 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5161
5162         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5163
5164 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5165
5166         * remote-sim.c (gdbsim_target::close,
5167         gdbsim_target::mourn_inferior): Remove unused variables.
5168
5169 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5170
5171         * ia64-tdep.c (ktab_buf): New global.
5172         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5173         (get_kernel_table): Adjust.
5174
5175 2018-07-16  Tom Tromey  <tom@tromey.com>
5176
5177         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5178         * dwarf2read.c (using_directives, new_symbol): Use
5179         outermost_context_p.
5180         * dbxread.c (process_one_symbol): Use outermost_context_p.
5181         * coffread.c (coff_symtab_read): Use outermost_context_p.
5182
5183 2018-07-16  Tom Tromey  <tom@tromey.com>
5184
5185         * dwarf2read.c (using_directives, read_func_scope)
5186         (read_lexical_block_scope): Update.
5187         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5188         * buildsym.h (local_using_directives, global_using_directives):
5189         Don't declare.
5190         (get_local_using_directives, set_local_using_directives)
5191         (get_global_using_directives): Declare.
5192         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5193         m_global_using_directives>: New members.
5194         (finish_block_internal, prepare_for_building)
5195         (reset_symtab_globals, end_symtab_get_static_block)
5196         (push_context): Update.
5197         (get_local_using_directives, set_local_using_directives)
5198         (get_global_using_directives): New functions.
5199         (buildsym_init): Update.
5200
5201 2018-07-16  Tom Tromey  <tom@tromey.com>
5202
5203         * xcoffread.c (xcoff_initial_scan): Don't call
5204         free_pending_blocks.
5205         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5206         * buildsym.h (class scoped_free_pendings): Add constructor.
5207         (free_pending_blocks): Don't declare.
5208         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5209         (free_pending_blocks): Now static.
5210
5211 2018-07-16  Tom Tromey  <tom@tromey.com>
5212
5213         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5214         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5215         member.
5216         (struct subfile_stack): Remove.
5217         (subfile_stack): Remove.
5218         (push_subfile, pop_subfile, buildsym_init): Update.
5219
5220 2018-07-16  Tom Tromey  <tom@tromey.com>
5221
5222         * buildsym.c (push_subfile): Use gdb_assert.
5223         (pop_subfile): Use gdb_assert.
5224
5225 2018-07-16  Tom Tromey  <tom@tromey.com>
5226
5227         * buildsym.h (merge_symbol_lists): Remove.
5228         * buildsym.c (merge_symbol_lists): Remove.
5229
5230 2018-07-16  Tom Tromey  <tom@tromey.com>
5231
5232         * stabsread.c (scan_file_globals): Update comment.
5233         * stabsread.h (scan_file_globals): Move from buildsym.h.
5234         * buildsym.h (scan_file_globals): Move to stabsread.h.
5235
5236 2018-07-16  Tom Tromey  <tom@tromey.com>
5237
5238         * xcoffread.c (xcoff_new_init): Update.
5239         * mipsread.c (mipscoff_new_init): Update.
5240         * mdebugread.c (mdebug_build_psymtabs): Update.
5241         * elfread.c (elf_new_init): Update.
5242         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5243         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5244         * buildsym.h (buildsym_new_init): Don't declare.
5245         * buildsym.c (buildsym_new_init): Remove.
5246
5247 2018-07-16  Tom Tromey  <tom@tromey.com>
5248
5249         * stabsread.h (within_function): Move from buildsym.h.
5250         * stabsread.c (start_stabs): Clear within_function.
5251         * coffread.c (coff_start_symtab): Clear within_function.
5252         * buildsym.h (within_function): Move to stabsread.h.
5253         * buildsym.c (prepare_for_building): Update.
5254
5255 2018-07-16  Tom Tromey  <tom@tromey.com>
5256
5257         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5258         * dwarf2read.c (dwarf2_start_symtab): Don't set
5259         processing_gcc_compilation.
5260         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5261
5262 2018-07-16  Tom Tromey  <tom@tromey.com>
5263
5264         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5265         (next_symbol_text_func): Move from buildsym.h.
5266         * stabsread.c (hashname): Move from buildsym.c.
5267         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5268         (next_symbol_text_func, hashname): Move to stabsread.h.
5269         * buildsym.c: Don't include bcache.h
5270         (hashname): Move to stasbread.c.
5271
5272 2018-07-16  Tom Tromey  <tom@tromey.com>
5273
5274         * buildsym.h (context_stack_size): Don't declare.
5275         * buildsym.c (context_stack_size): New global.
5276
5277 2018-07-16  Tom Tromey  <tom@tromey.com>
5278
5279         * dbxread.c (processing_acc_compilation): New global.
5280         * buildsym.h (processing_acc_compilation): Don't declare.
5281
5282 2018-07-16  Tom Tromey  <tom@tromey.com>
5283
5284         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5285         * dbxread.c (read_ofile_symtab): Update.
5286         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5287         * buildsym.h (last_source_start_addr): Remove.
5288         (set_last_source_start_addr, get_last_source_start_addr):
5289         Declare.
5290         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5291         parameter.
5292         (struct buildsym_compunit) <m_last_source_start_addr>: New
5293         member.
5294         (prepare_for_building): Remove start_addr parameter.
5295         (start_symtab, restart_symtab, end_symtab_get_static_block)
5296         (end_symtab_with_blockvector): Update.
5297         (set_last_source_start_addr, get_last_source_start_addr): New
5298         functions.
5299
5300 2018-07-16  Tom Tromey  <tom@tromey.com>
5301
5302         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5303         member.
5304         (have_line_numbers): Remove.
5305         (record_line, prepare_for_building, end_symtab_get_static_block)
5306         (augment_type_symtab): Update.
5307
5308 2018-07-16  Tom Tromey  <tom@tromey.com>
5309
5310         * buildsym.c (~buildsym_compunit): Free the macro table.
5311         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5312         methods.
5313         <m_pending_macros>: New member.
5314         (pending_macros): Remove.
5315         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5316         (reset_symtab_globals, end_symtab_get_static_block)
5317         (end_symtab_with_blockvector, augment_type_symtab)
5318         (buildsym_init): Update.
5319
5320 2018-07-16  Tom Tromey  <tom@tromey.com>
5321
5322         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5323         parameter.
5324         (buildsym_compunit::set_last_source_file): New method.
5325         <m_last_source_file>: New member.
5326         (prepare_for_building): Remove "name" parameter.
5327         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5328         (last_source_file): Remove.
5329         (set_last_source_file, get_last_source_file): Update.
5330
5331 2018-07-16  Tom Tromey  <tom@tromey.com>
5332
5333         * buildsym.c (prepare_for_building): Add assert.
5334
5335 2018-07-16  Tom Tromey  <tom@tromey.com>
5336
5337         * buildsym.c (~buildsym_compunit): Update.
5338         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5339         (start_subfile, patch_subfile_names)
5340         (end_symtab_with_blockvector): Update.
5341
5342 2018-07-16  Tom Tromey  <tom@tromey.com>
5343
5344         * buildsym.c (struct buildsym_compunit): Add constructor,
5345         destructor, initializers.
5346         (start_buildsym_compunit): Remove.
5347         (free_buildsym_compunit): Use "delete".
5348         (start_symtab, restart_symtab): Use "new".
5349
5350 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5351
5352         * symfile.c (set_objfile_default_section_offset): Remove struct
5353         keyword.
5354
5355 2018-07-14  Stafford Horne  <shorne@gmail.com>
5356
5357         * (Responsible Maintainers): Add myself as or1k maintainer.
5358
5359 2018-07-13  Tom Tromey  <tom@tromey.com>
5360
5361         * symfile.c (set_objfile_default_section_offset): Use extra braces
5362         around initializer.
5363
5364 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5365
5366         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5367         non-branching basr.
5368
5369 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5370
5371         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5372         unittests/cli-utils-selftests.c
5373         * unittests/cli-utils-selftests.c: New file.
5374
5375 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5376
5377         * NEWS: Mention new commands. Mention change to 'thread apply'.
5378
5379 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5380
5381         * thread.c (thr_try_catch_cmd): New function.
5382         (thread_apply_all_command): Handle qcs flags.
5383         (thread_apply_command): Handle qcs flags.
5384         (taas_command): New function.
5385         (tfaas_command): New function.
5386         (_initialize_thread): Update to setup the new commands 'taas
5387         and 'tfaas'. Change doc string for 'thread apply'.
5388
5389 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5390
5391         * stack.c: (trailing_outermost_frame): New function, mostly
5392         extracted from backtrace_command_1.
5393         (leading_innermost_frame): New function.
5394         (backtrace_command_1): Update to call trailing_outermost_frame.
5395         (frame_apply_command_count): New function.
5396         (frame_apply_level_command): New function.
5397         (frame_apply_all_command): New function.
5398         (frame_apply_command): New function.
5399         (faas_command): New function.
5400         (frame_cmd_list): New variable.
5401         (_initialize_stack): Update to setup the new commands 'frame apply'
5402         and 'faas'.
5403
5404 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5405
5406         * cli-utils.c (number_or_range_parser::get_number): Only handle
5407         numbers or convenience var as numbers.
5408         (parse_flags): New function.
5409         (parse_flags_qcs): New function.
5410         (number_or_range_parser::finished): Ensure parsing end is detected
5411         before end of string.
5412         * cli-utils.h (parse_flags): New function.
5413         (parse_flags_qcs): New function.
5414         (number_or_range_parser): Remove m_finished bool.
5415         (number_or_range_parser::skip_range): Set m_in_range to false.
5416
5417 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5418
5419         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5420         on Windows.
5421
5422 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5423             Jan Kratochvil  <jan.kratochvil@redhat.com>
5424             Paul Fertser  <fercerpav@gmail.com>
5425             Tsutomu Seki  <sekiriki@gmail.com>
5426             Pedro Alves  <palves@redhat.com>
5427
5428         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5429         'unittests/parse-connection-spec-selftests.c'.
5430         (COMMON_SFILES): Add 'common/netstuff.c'.
5431         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5432         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5433         * common/netstuff.c: New file.
5434         * common/netstuff.h: New file.
5435         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5436         (wait_for_connect): Update comment.  New parameter
5437         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5438         Use 'sock' directly instead of 'scb->fd'.
5439         (try_connect): New function, with code from 'net_open'.
5440         (net_open): Rewrite main loop to deal with multiple
5441         sockets/addresses.  Handle IPv6-style hostnames; implement
5442         support for IPv6 connections.
5443         * unittests/parse-connection-spec-selftests.c: New file.
5444
5445 2018-07-11  Pedro Alves  <palves@redhat.com>
5446
5447         PR gdb/23377
5448         * remote.c (remote_target::remote_detach_pid): Call
5449         set_current_process.
5450
5451 2018-07-11  Pedro Alves  <palves@redhat.com>
5452
5453         * h8300-tdep.c (h8300_gdbarch_init): Remove
5454         set_gdbarch_ecoff_reg_to_regnum calls.
5455
5456 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5457
5458         PR c++/23373
5459         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5460         offsets/sizes for static members of a class/struct.
5461
5462 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5463
5464         * target-descriptions.c (tdesc_register_bitsize): Rename.
5465         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5466         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5467         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5468
5469 2018-07-10  Tom Tromey  <tom@tromey.com>
5470
5471         * breakpoint.c (moribund_locations): Now static and a
5472         std::vector.
5473         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5474         (build_bpstat_chain, update_global_location_list)
5475         (breakpoint_retire_moribund): Update.
5476         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5477         VEC.
5478
5479 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5480
5481         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5482         (riscv_register_reggroup_p): Use new function, remove unneeded
5483         parenthesis.
5484         (riscv_push_dummy_call): Extend assert to compare against xlen or
5485         flen based on register type.
5486
5487 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5488
5489         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5490
5491 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5492
5493         * remote.c (show_hardware_watchpoint_limit): New function.
5494         (show_hardware_watchpoint_length_limit): New function.
5495         (show_hardware_breakpoint_limit): New function.
5496         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5497         where appropriate, update help text.
5498
5499 2018-07-09  Tom Tromey  <tom@tromey.com>
5500
5501         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5502         (CLIBS): Don't mention NAT_CLIBS.
5503
5504 2018-07-09  Tom Tromey  <tom@tromey.com>
5505
5506         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5507         (LIBGDB_OBS, clean mostlyclean): Update.
5508         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5509
5510 2018-07-09  Tom Tromey  <tom@tromey.com>
5511
5512         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5513         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5514         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5515
5516 2018-07-09  Tom Tromey  <tom@tromey.com>
5517
5518         * Makefile.in (ALLDEPFILES): Remove exec.c.
5519         (COMMON_OBS): Remove exec.o.
5520         (COMMON_SFILES): Add exec.c.
5521
5522 2018-07-09  Tom Tromey  <tom@tromey.com>
5523
5524         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5525
5526 2018-07-09  Tom Tromey  <tom@tromey.com>
5527
5528         * Makefile.in (clean mostlyclean): Remove stamp-version.
5529         (version.c): Depend on stamp-version.
5530         (stamp-version): New rule, from version.c rule.
5531
5532 2018-07-09  Tom Tromey  <tom@tromey.com>
5533
5534         * Makefile.in (init.c): Depend on stamp-init.
5535         (stamp-init): New rule, from init.c rule.
5536         (clean mostlyclean): Remove stamp-init.
5537
5538 2018-07-09  Tom Tromey  <tom@tromey.com>
5539
5540         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5541         SUBDIR_GCC_COMPILE_SRCS.
5542
5543 2018-07-09  Tom Tromey  <tom@tromey.com>
5544
5545         * Makefile.in (init.c): Remove some unused sed rules.
5546
5547 2018-07-09  Tom Tromey  <tom@tromey.com>
5548
5549         * Makefile.in (TSOBS): Remove.
5550         (INIT_FILES): Update.
5551         (LIBGDB_OBS): Update.
5552         (COMMON_SFILES): Add inflow.c.
5553         (SFILES): Remove inflow.c.
5554
5555 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5556
5557         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5558
5559 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5560
5561         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5562         get_saveloc_name, is_signal_frame_name, step_name,
5563         init_remote_name, create_addr_space_name,
5564         destroy_addr_space_name, search_unwind_table_name,
5565         find_dyn_list_name): Constify.
5566
5567 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5568
5569         * darwin-nat.c (darwin_pthread_kill): New function.
5570         (darwin_resume_thread): Use darwin_pthread_kill.
5571
5572 2018-07-05  Tom de Vries  <tdevries@suse.de>
5573
5574         * macroexp.c (macro_buffer) <operator=>: New member function.
5575
5576 2018-07-04  Tom Tromey  <tom@tromey.com>
5577
5578         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5579
5580 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5581
5582         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5583         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5584         * maint.c: Likewise.
5585         * top.c: Likewise.
5586
5587 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5588
5589         * NEWS: Create a new section for the next release branch.
5590         Rename the section of the current branch, now that it has
5591         been cut.
5592
5593 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5594
5595         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5596         * version.in: Bump version to 8.2.50.DATE-git.
5597
5598 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5599             Pedro Alves  <palves@redhat.com>
5600
5601         * linux-nat.c (linux_init_ptrace): Rename to ...
5602         (linux_init_ptrace_procfs): ... this.  Call
5603         linux_proc_init_warnings.
5604         (linux_nat_target::post_attach)
5605         (linux_nat_target::post_startup_inferior): Adjust.
5606         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5607         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5608
5609 2018-07-04  Tom de Vries  <tdevries@suse.de>
5610
5611         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5612         check ...
5613         (read_comp_unit_head): ... here.
5614
5615 2018-07-03  Tom Tromey  <tom@tromey.com>
5616
5617         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5618         (stop_tracing, tstatus_command)
5619         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5620         (print_one_static_tracepoint_marker): Update.
5621         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5622         std::vector.
5623         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5624         VEC.
5625         (all_tracepoints, static_tracepoints_here): Return std::vector.
5626
5627 2018-07-03  Tom Tromey  <tom@tromey.com>
5628
5629         * common/ptid.c (ptid_equal): Remove.
5630         * common/ptid.h (ptid_equal): Don't declare.
5631         * ada-tasks.c: Update.
5632         * breakpoint.c: Update.
5633         * common/agent.c: Update.
5634         * corelow.c: Update.
5635         * darwin-nat-info.c: Update.
5636         * darwin-nat.c: Update.
5637         * dcache.c: Update.
5638         * dtrace-probe.c: Update.
5639         * dummy-frame.c: Update.
5640         * fbsd-nat.c: Update.
5641         * frame.c: Update.
5642         * gdbthread.h: Update.
5643         * gnu-nat.c: Update.
5644         * go32-nat.c: Update.
5645         * inf-loop.c: Update.
5646         * inf-ptrace.c: Update.
5647         * infcall.c: Update.
5648         * infcmd.c: Update.
5649         * inflow.c: Update.
5650         * infrun.c: Update.
5651         * linux-fork.c: Update.
5652         * linux-nat.c: Update.
5653         * linux-thread-db.c: Update.
5654         * mi/mi-cmd-var.c: Update.
5655         * mi/mi-interp.c: Update.
5656         * mi/mi-main.c: Update.
5657         * nto-procfs.c: Update.
5658         * ppc-linux-tdep.c: Update.
5659         * procfs.c: Update.
5660         * python/py-inferior.c: Update.
5661         * python/py-record-btrace.c: Update.
5662         * python/py-record.c: Update.
5663         * ravenscar-thread.c: Update.
5664         * regcache.c: Update.
5665         * remote-sim.c: Update.
5666         * remote.c: Update.
5667         * sol-thread.c: Update.
5668         * solib.c: Update.
5669         * target.c: Update.
5670         * tui/tui-stack.c: Update.
5671         * varobj.c: Update.
5672         * windows-nat.c: Update.
5673         * windows-tdep.c: Update.
5674
5675 2018-07-03  Tom Tromey  <tom@tromey.com>
5676
5677         * common/ptid.c (ptid_match): Remove.
5678         * common/ptid.h (ptid_match): Don't declare.
5679         * fbsd-nat.c: Update.
5680         * infcmd.c: Update.
5681         * infrun.c: Update.
5682         * linux-nat.c: Update.
5683         * record-btrace.c: Update.
5684         * regcache.c: Update.
5685         * remote.c: Update.
5686
5687 2018-07-03  Tom Tromey  <tom@tromey.com>
5688
5689         * common/ptid.c (ptid_tid_p): Remove.
5690         * common/ptid.h (ptid_tid_p): Don't declare.
5691         * sol-thread.c: Update.
5692
5693 2018-07-03  Tom Tromey  <tom@tromey.com>
5694
5695         * common/ptid.c (ptid_lwp_p): Remove.
5696         * common/ptid.h (ptid_lwp_p): Don't declare.
5697         * fbsd-nat.c: Update.
5698         * linux-nat.c: Update.
5699         * nat/linux-procfs.c: Update.
5700         * nat/x86-linux-dregs.c: Update.
5701         * sol-thread.c: Update.
5702
5703 2018-07-03  Tom Tromey  <tom@tromey.com>
5704
5705         * common/ptid.c (ptid_is_pid): Remove.
5706         * common/ptid.h (ptid_is_pid): Don't declare.
5707         * infrun.c: Update.
5708         * linux-nat.c: Update.
5709         * mi/mi-interp.c: Update.
5710         * remote.c: Update.
5711         * thread.c: Update.
5712
5713 2018-07-03  Tom Tromey  <tom@tromey.com>
5714
5715         * common/ptid.c (ptid_get_tid): Remove.
5716         * common/ptid.h (ptid_get_tid): Don't declare.
5717         * ada-tasks.c: Update.
5718         * aix-thread.c: Update.
5719         * bsd-uthread.c: Update.
5720         * darwin-nat.c: Update.
5721         * fbsd-nat.c: Update.
5722         * i386-darwin-nat.c: Update.
5723         * infrun.c: Update.
5724         * linux-tdep.c: Update.
5725         * nto-procfs.c: Update.
5726         * ppc-ravenscar-thread.c: Update.
5727         * python/py-infthread.c: Update.
5728         * ravenscar-thread.c: Update.
5729         * sol-thread.c: Update.
5730         * sparc-ravenscar-thread.c: Update.
5731         * windows-nat.c: Update.
5732
5733 2018-07-03  Tom Tromey  <tom@tromey.com>
5734
5735         * common/ptid.c (ptid_get_lwp): Remove.
5736         * common/ptid.h (ptid_get_lwp): Don't declare.
5737         * aarch64-linux-nat.c: Update.
5738         * ada-tasks.c: Update.
5739         * aix-thread.c: Update.
5740         * amd64-linux-nat.c: Update.
5741         * arm-linux-nat.c: Update.
5742         * corelow.c: Update.
5743         * fbsd-nat.c: Update.
5744         * fbsd-tdep.c: Update.
5745         * gnu-nat.c: Update.
5746         * i386-cygwin-tdep.c: Update.
5747         * i386-gnu-nat.c: Update.
5748         * i386-linux-nat.c: Update.
5749         * ia64-linux-nat.c: Update.
5750         * inf-ptrace.c: Update.
5751         * infrun.c: Update.
5752         * linux-fork.c: Update.
5753         * linux-nat.c: Update.
5754         * linux-tdep.c: Update.
5755         * linux-thread-db.c: Update.
5756         * mips-linux-nat.c: Update.
5757         * nat/aarch64-linux-hw-point.c: Update.
5758         * nat/aarch64-linux.c: Update.
5759         * nat/linux-btrace.c: Update.
5760         * nat/linux-osdata.c: Update.
5761         * nat/linux-procfs.c: Update.
5762         * nat/x86-linux-dregs.c: Update.
5763         * obsd-nat.c: Update.
5764         * ppc-fbsd-nat.c: Update.
5765         * ppc-linux-nat.c: Update.
5766         * procfs.c: Update.
5767         * python/py-infthread.c: Update.
5768         * ravenscar-thread.c: Update.
5769         * remote.c: Update.
5770         * s390-linux-nat.c: Update.
5771         * sol-thread.c: Update.
5772         * sol2-tdep.c: Update.
5773         * spu-linux-nat.c: Update.
5774         * x86-linux-nat.c: Update.
5775         * xtensa-linux-nat.c: Update.
5776
5777 2018-07-03  Tom Tromey  <tom@tromey.com>
5778
5779         * common/ptid.c (ptid_get_pid): Remove.
5780         * common/ptid.h (ptid_get_pid): Don't declare.
5781         * aarch64-linux-nat.c: Update.
5782         * ada-lang.c: Update.
5783         * aix-thread.c: Update.
5784         * alpha-bsd-nat.c: Update.
5785         * amd64-fbsd-nat.c: Update.
5786         * amd64-linux-nat.c: Update.
5787         * arm-linux-nat.c: Update.
5788         * arm-nbsd-nat.c: Update.
5789         * auxv.c: Update.
5790         * break-catch-syscall.c: Update.
5791         * breakpoint.c: Update.
5792         * bsd-uthread.c: Update.
5793         * corelow.c: Update.
5794         * ctf.c: Update.
5795         * darwin-nat.c: Update.
5796         * fbsd-nat.c: Update.
5797         * fbsd-tdep.c: Update.
5798         * gcore.c: Update.
5799         * gnu-nat.c: Update.
5800         * hppa-nbsd-nat.c: Update.
5801         * hppa-obsd-nat.c: Update.
5802         * i386-fbsd-nat.c: Update.
5803         * ia64-linux-nat.c: Update.
5804         * inf-ptrace.c: Update.
5805         * infcmd.c: Update.
5806         * inferior.c: Update.
5807         * inferior.h: Update.
5808         * inflow.c: Update.
5809         * infrun.c: Update.
5810         * linux-fork.c: Update.
5811         * linux-nat.c: Update.
5812         * linux-tdep.c: Update.
5813         * linux-thread-db.c: Update.
5814         * m68k-bsd-nat.c: Update.
5815         * mi/mi-interp.c: Update.
5816         * mi/mi-main.c: Update.
5817         * mips-linux-nat.c: Update.
5818         * mips-nbsd-nat.c: Update.
5819         * mips64-obsd-nat.c: Update.
5820         * nat/aarch64-linux-hw-point.c: Update.
5821         * nat/aarch64-linux.c: Update.
5822         * nat/linux-btrace.c: Update.
5823         * nat/linux-osdata.c: Update.
5824         * nat/linux-procfs.c: Update.
5825         * nat/x86-linux-dregs.c: Update.
5826         * nto-procfs.c: Update.
5827         * obsd-nat.c: Update.
5828         * ppc-linux-nat.c: Update.
5829         * ppc-nbsd-nat.c: Update.
5830         * ppc-obsd-nat.c: Update.
5831         * proc-service.c: Update.
5832         * procfs.c: Update.
5833         * python/py-inferior.c: Update.
5834         * python/py-infthread.c: Update.
5835         * ravenscar-thread.c: Update.
5836         * record.c: Update.
5837         * remote-sim.c: Update.
5838         * remote.c: Update.
5839         * rs6000-nat.c: Update.
5840         * s390-linux-nat.c: Update.
5841         * sh-nbsd-nat.c: Update.
5842         * sol-thread.c: Update.
5843         * sparc-nat.c: Update.
5844         * sparc64-tdep.c: Update.
5845         * spu-linux-nat.c: Update.
5846         * spu-tdep.c: Update.
5847         * target-debug.h: Update.
5848         * target.c: Update.
5849         * thread.c: Update.
5850         * tid-parse.c: Update.
5851         * tracefile-tfile.c: Update.
5852         * vax-bsd-nat.c: Update.
5853         * windows-nat.c: Update.
5854         * x86-linux-nat.c: Update.
5855         * x86-nat.c: Update.
5856
5857 2018-07-03  Tom Tromey  <tom@tromey.com>
5858
5859         * common/ptid.c (pid_to_ptid): Remove.
5860         * common/ptid.h (pid_to_ptid): Don't declare.
5861         * aix-thread.c: Update.
5862         * arm-linux-nat.c: Update.
5863         * common/ptid.c: Update.
5864         * common/ptid.h: Update.
5865         * corelow.c: Update.
5866         * ctf.c: Update.
5867         * darwin-nat.c: Update.
5868         * fbsd-nat.c: Update.
5869         * fork-child.c: Update.
5870         * gnu-nat.c: Update.
5871         * go32-nat.c: Update.
5872         * inf-ptrace.c: Update.
5873         * infcmd.c: Update.
5874         * inferior.c: Update.
5875         * infrun.c: Update.
5876         * linux-fork.c: Update.
5877         * linux-nat.c: Update.
5878         * nat/aarch64-linux-hw-point.c: Update.
5879         * nat/fork-inferior.c: Update.
5880         * nat/x86-linux-dregs.c: Update.
5881         * nto-procfs.c: Update.
5882         * obsd-nat.c: Update.
5883         * procfs.c: Update.
5884         * progspace.c: Update.
5885         * remote.c: Update.
5886         * rs6000-nat.c: Update.
5887         * s390-linux-nat.c: Update.
5888         * sol-thread.c: Update.
5889         * spu-linux-nat.c: Update.
5890         * target.c: Update.
5891         * top.c: Update.
5892         * tracefile-tfile.c: Update.
5893         * windows-nat.c: Update.
5894
5895 2018-07-03  Tom Tromey  <tom@tromey.com>
5896
5897         * common/ptid.h (ptid_build): Don't declare.
5898         * common/ptid.c (ptid_build): Remove.
5899         * aix-thread.c: Update.
5900         * bsd-kvm.c: Update.
5901         * bsd-uthread.c: Update.
5902         * common/agent.c: Update.
5903         * common/ptid.c: Update.
5904         * common/ptid.h: Update.
5905         * corelow.c: Update.
5906         * darwin-nat.c: Update.
5907         * fbsd-nat.c: Update.
5908         * gnu-nat.c: Update.
5909         * linux-fork.c: Update.
5910         * linux-nat.c: Update.
5911         * linux-thread-db.c: Update.
5912         * nat/linux-osdata.c: Update.
5913         * nat/linux-procfs.c: Update.
5914         * nto-procfs.c: Update.
5915         * obsd-nat.c: Update.
5916         * proc-service.c: Update.
5917         * procfs.c: Update.
5918         * ravenscar-thread.c: Update.
5919         * remote-sim.c: Update.
5920         * remote.c: Update.
5921         * sol-thread.c: Update.
5922         * target.c: Update.
5923         * windows-nat.c: Update.
5924
5925 2018-07-03  Tom Tromey  <tom@tromey.com>
5926
5927         * infrun.c (follow_exec): Use exit_inferior_silent.
5928         * inferior.c (exit_inferior_num_silent): Remove.
5929         * inferior.h (exit_inferior_num_silent): Don't declare.
5930
5931 2018-07-03  Tom Tromey  <tom@tromey.com>
5932
5933         PR cli/23340:
5934         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5935         inferior_ptid on error.
5936
5937 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5938             Simon Marchi  <simon.marchi@polymtl.ca>
5939
5940         PR tdep/8282
5941         * disasm.h (gdb_disassembler): Add
5942         `m_disassembler_options_holder'. member
5943         * disasm.c (get_all_disassembler_options): New function.
5944         (gdb_disassembler::gdb_disassembler): Use it.
5945         (gdb_buffered_insn_length_init_dis): Likewise.
5946         (gdb_buffered_insn_length): Adjust accordingly.
5947         (set_disassembler_options): Handle options with arguments.
5948         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5949         line if showing options with descriptions.
5950         (disassembler_options_completer): Adapt to using the
5951         `disasm_options_and_args_t' structure.
5952         * mips-tdep.c (mips_disassembler_options): New variable.
5953         (mips_disassembler_options_o32): Likewise.
5954         (mips_disassembler_options_n32): Likewise.
5955         (mips_disassembler_options_n64): Likewise.
5956         (gdb_print_insn_mips): Don't set `disassembler_options'.
5957         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5958         functions.
5959         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5960         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5961         `gdbarch_disassembler_options_implicit' and
5962         `gdbarch_valid_disassembler_options'.
5963         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5964         `disasm_options_and_args_t' structure.
5965         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5966         method.
5967         (valid_disassembler_options): Switch from `disasm_options_t' to
5968         the `disasm_options_and_args_t' structure.
5969         * NEWS: Document `set disassembler-options' support for the MIPS
5970         target.
5971         * gdbarch.h: Regenerate.
5972         * gdbarch.c: Regenerate.
5973
5974 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5975
5976         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5977
5978 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5979
5980         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5981         parameter in call to amd64_target_description.
5982         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5983         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5984         (amd64fbsd_init_abi): Likewise.
5985         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5986         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5987         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5988         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5989
5990 2018-06-29  Pedro Alves  <palves@redhat.com>
5991
5992         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5993         "segments" parameter.
5994         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5995         (_initialize_amd64_tdep): Update call to
5996         amd64_create_target_description.
5997         (amd64_target_description): Add "segments" parameter.  Adjust
5998         the implementation to use it.
5999         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6000         call to amd64_create_target_description.
6001         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6002         * gdb/arch/amd64.h (amd64_create_target_description): Add
6003         "segments" register.
6004         * gdb/arch/amd64.c (amd64_create_target_description): Add
6005         "segments" parameter.  Call create_feature_i386_64bit_segments
6006         only if SEGMENTS is true.
6007         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6008         call to amd64_create_target_description.
6009
6010 2018-06-29  Pedro Alves  <palves@redhat.com>
6011
6012         * thread.c (thread_target_id_str): New, factored out from ...
6013         (print_thread_info_1): ... here.  Use it to compute the max
6014         "Target Id" column width.
6015
6016 2018-06-29  Pedro Alves  <palves@redhat.com>
6017
6018         * remote.c (remote_target::extra_thread_info): Delete
6019         'display_buf' and 'n' locals.  from the cache, regardless of
6020         packet mechanims is in use.  Use cache for qThreadExtra and qP
6021         methods too.
6022
6023 2018-06-29  Pedro Alves  <palves@redhat.com>
6024
6025         * blockframe.c (find_pc_sect_containing_function): New function.
6026         * breakpoint.c (print_breakpoint_location): Don't call
6027         find_pc_sect_function.
6028         * linespec.c (create_sals_line_offset): Record the location's
6029         symbol in the sal.
6030         * linespec.c (convert_address_location_to_sals): Fill in sal's
6031         symbol with find_pc_sect_containing_function.
6032         * symtab.c (find_function_start_sal): Rename to ...
6033         (find_function_start_sal_1): ... this.
6034         (find_function_start_sal): Reimplement as wrapper around
6035         find_function_start_sal_1, and use
6036         find_pc_sect_containing_function to fill in the sal's symbol.
6037         (find_function_start_sal(symbol*, bool)): Adjust.
6038         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6039         comments.
6040         (find_pc_sect_containing_function): Declare.
6041
6042 2018-06-29  Pedro Alves  <palves@redhat.com>
6043
6044         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6045         true if the the location has no symbol.
6046
6047 2018-06-28  Tom Tromey  <tom@tromey.com>
6048
6049         * NEWS: Mention --enable-codesign.
6050         * silent-rules.mk (ECHO_SIGN): New variable.
6051         * configure.ac: Add --enable-codesign.
6052         * configure: Rebuild.
6053         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6054         (gdb$(EXEEXT)): Optionally invoke codesign.
6055
6056 2018-06-28  Pedro Alves  <palves@redhat.com>
6057
6058         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6059         comments.
6060         (switch_to_thread_no_regs): Adjust comment.
6061         * infcmd.c (stop_pc): Delete.
6062         (post_create_inferior, info_program_command): Replace references
6063         to stop_pc with references to thread_info->suspend.stop_pc.
6064         * inferior.h (stop_pc): Delete declaration.
6065         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6066         (handle_inferior_event_1, handle_signal_stop)
6067         (process_event_stop_test, keep_going_stepped_thread)
6068         (handle_step_into_function, handle_step_into_function_backward)
6069         (print_stop_location): Replace references to stop_pc with
6070         references to thread_info->suspend.stop_pc.
6071         (struct infcall_suspend_state) <stop_pc>: Delete field.
6072         (save_infcall_suspend_state, restore_infcall_suspend_state):
6073         Remove references to inf_stat->stop_pc.
6074         * linux-fork.c (fork_load_infrun_state): Likewise.
6075         * record-btrace.c (record_btrace_set_replay): Likewise.
6076         * record-full.c (record_full_goto_entry): Likewise.
6077         * remote.c (print_one_stopped_thread): Likewise.
6078         * target.c (target_resume): Extend comment.
6079         * thread.c (set_executing_thread): New.
6080         (set_executing): Use it.
6081         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6082         Remove references to stop_pc.
6083
6084 2018-06-28  Pedro Alves  <palves@redhat.com>
6085
6086         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6087         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6088
6089 2018-06-28  Tom Tromey  <tom@tromey.com>
6090
6091         * coffread.c (coff_symfile_finish): Update.
6092         * xcoffread.c (xcoff_symfile_finish): Update.
6093         * elfread.c (elf_symfile_finish): Update.
6094         * symfile.h (dwarf2_free_objfile): Don't declare.
6095         * dwarf2read.c (_initialize_dwarf2_read): Use
6096         register_objfile_data_with_cleanup.
6097         (dwarf2_free_objfile): Now static.  Change signature.
6098
6099 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6100
6101         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6102         option "-o" to add-symbol-file-load to add an offset to each
6103         section's load address.
6104         * symfile.c (set_objfile_default_section_offset): New function.
6105
6106 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6107
6108         * symfile.c (add_symbol_file_command): Make sure that sections
6109         with the same name are sorted in the same order.
6110
6111 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6112
6113         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6114         require the second argument.  If omitted, load sections at the
6115         addresses specified in the file.
6116
6117 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6118
6119         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6120         (_initialize_symfile): Add option "-o" to symbol-file to add an
6121         offset to each section of the symbol file.
6122
6123 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6124
6125         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6126
6127 2018-06-27  Tom Tromey  <tom@tromey.com>
6128
6129         * stack.c (_initialize_stack): Update "func" help text.
6130
6131 2018-06-27  Tom Tromey  <tom@tromey.com>
6132
6133         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6134         std::vector.
6135         (unwind_infopy_str, pyuw_create_unwind_info)
6136         (unwind_infopy_add_saved_register, pyuw_sniffer)
6137         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6138         Update.
6139         (struct saved_reg): Add constructor.
6140         <value>: Now a gdbpy_ref<>.
6141
6142 2018-06-27  Tom Tromey  <tom@tromey.com>
6143
6144         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6145
6146 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6147
6148         * gdb-gdb.py.in: Format using autopep8.
6149
6150 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6151
6152         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6153         (type_lookup_function): Recognize CORE_ADDR values.
6154
6155 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6156
6157         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6158         print tag_name.
6159
6160 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6161
6162         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6163         <__lt__>: Add.
6164
6165 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6166
6167         * gdb-gdb.py: Move to...
6168         * gdb-gdb.py.in: ... here.
6169         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6170         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6171         dependencies.
6172         (distclean): Remove gdb-gdb.py when cleaning.
6173         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6174         * configure: Re-generate.
6175
6176 2018-06-27  Pedro Alves  <palves@redhat.com>
6177
6178         * proc-service.c (get_ps_regcache): New.
6179         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6180         (ps_lsetfpregs): Use it.
6181
6182 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6183
6184         PR gdb/21695
6185         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6186         (dwarf_decode_lines_1): Adjust.
6187
6188 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6189
6190         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6191         override.
6192         <info_proc>: Likewise.
6193
6194 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6195
6196         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6197         to windows_fetch_one_register, and only handle the case of
6198         fetching one register.  Move the code that reloads the context
6199         and iterates over all registers if R is negative to...
6200         (windows_nat_target::fetch_registers): ... here.
6201         (do_windows_store_inferior_registers): Rename to
6202         windows_store_one_register, and only handle the case of storing
6203         one register.  Move the code that handles the case where r is
6204         negative to...
6205         (windows_nat_target::store_registers) ... here.
6206
6207 2018-06-26  Tom Tromey  <tom@tromey.com>
6208
6209         PR rust/22574:
6210         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6211         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6212         Update.
6213         (rust_internal_print_type): Add podata parameter.
6214         (rust_print_type): Update.
6215
6216 2018-06-26  Tom Tromey  <tom@tromey.com>
6217
6218         * typeprint.h (struct print_offset_data) <update, finish,
6219         maybe_print_hole>: New methods.
6220         <indentation>: New constant.
6221         * typeprint.c (print_offset_data::indentation): Define.
6222         (print_offset_data::maybe_print_hole, print_offset_data::update)
6223         (print_offset_data::finish): Move from c-typeprint.c and rename.
6224         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6225         (print_spaces_filtered_with_print_options): Update.
6226         (c_print_type_union_field_offset, maybe_print_hole)
6227         (c_print_type_struct_field_offset): Move to typeprint.c and
6228         rename.
6229         (c_type_print_base_struct_union): Update.
6230
6231 2018-06-25  Pedro Alves  <palves@redhat.com>
6232
6233         * gdbthread.h (thread_info_ref, delete_thread)
6234         (delete_thread_silent, first_thread_of_inferior)
6235         (any_thread_of_inferior, switch_to_thread)
6236         (enable_thread_stack_temporaries)
6237         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6238         (get_last_thread_stack_temporary)
6239         (value_in_thread_stack_temporaries, can_access_registers_thread):
6240         Spell out "struct thread_info" instead of just "thread_info".
6241         * inferior.h (notice_new_inferior): Likewise.
6242
6243 2018-06-25  Pedro Alves  <palves@redhat.com>
6244
6245         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6246         pass thread_info pointer to delete_thread.
6247         (windows_nat_target::detach): Pass inferior pointer to
6248         detach_inferior.
6249         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6250         delete_thread.
6251         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6252         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6253         and pass a thread_info pointer to delete_thread.
6254         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6255         pass thread_info pointer to delete_thread.
6256         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6257         delete_thread_silent call.
6258         * procfs.c (procfs_target::detach): Pass inferior pointer to
6259         detach_inferior.
6260         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6261         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6262         delete_thread_silent call.
6263         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6264         pass thread_info pointer to delete_thread.
6265         (windows_nat_target::detach): Pass inferior pointer to
6266         delete_inferior.
6267
6268 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6269
6270         * regcache.c (readable_regcache::read_part): Fix asserts.
6271         (reg_buffer::raw_collect_part): New function.
6272         (regcache::write_part): Fix asserts.
6273         (reg_buffer::raw_supply_part): New function.
6274         (regcache::transfer_regset_register): New helper function.
6275         (regcache::transfer_regset): Call new functions.
6276         (regcache_supply_regset): Use gdb_byte*.
6277         (regcache::supply_regset): Likewise.
6278         (regcache_collect_regset): Likewise.
6279         (regcache::collect_regset): Likewise.
6280         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6281         (reg_buffer::raw_supply_part): Likewise.
6282         (regcache::transfer_regset_register): Likewise.
6283         (regcache::transfer_regset): Use gdb_byte*.
6284
6285 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6286
6287         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6288
6289 2018-06-21  Pedro Alves  <palves@redhat.com>
6290
6291         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6292         instead of a ptid_t.  All callers adjusted.
6293         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6294         adjusted.
6295         (print_ada_task_info, display_current_task_id, task_command_1):
6296         Adjust.
6297         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6298         inferior_thread.
6299         (breakpoint_kind): Adjust.
6300         (remove_breakpoints_pid): Rename to ...
6301         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6302         pointer.  All callers adjusted.
6303         (bpstat_clear_actions): Use inferior_thread.
6304         (get_bpstat_thread): New.
6305         (bpstat_do_actions): Use it.
6306         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6307         to take a thread_info pointer.  All callers adjusted.
6308         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6309         (breakpoint_re_set_thread): Use inferior_thread.
6310         * breakpoint.h (struct inferior): Forward declare.
6311         (bpstat_stop_status): Update.
6312         (remove_breakpoints_pid): Delete.
6313         (remove_breakpoints_inf): New.
6314         * bsd-uthread.c (bsd_uthread_target::wait)
6315         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6316         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6317         (maint_btrace_packet_history_cmd)
6318         (maint_btrace_clear_packet_history_cmd): Adjust.
6319         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6320         inferior_thread.
6321         * cli/cli-interp.c: Include "inferior.h".
6322         * common/refcounted-object.h (struct
6323         refcounted_object_ref_policy): New.
6324         * compile/compile-object-load.c: Include gdbthread.h.
6325         (store_regs): Use inferior_thread.
6326         * corelow.c (core_target::close): Use current_inferior.
6327         (core_target_open): Adjust to use first_thread_of_inferior and use
6328         the current inferior.
6329         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6330         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6331         <thread>: ... this new field.  All references adjusted.
6332         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6333         Take a thread_info pointer instead of a ptid_t.
6334         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6335         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6336         thread_info pointer instead of a ptid_t.
6337         * elfread.c: Include "inferior.h".
6338         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6339         Use inferior_thread.
6340         * eval.c (evaluate_subexp): Likewise.
6341         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6342         inferior_thread.
6343         * gdb_proc_service.h (struct thread_info): Forward declare.
6344         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6345         <thread>: ... this new field.  All references adjusted.
6346         * gdbarch.h, gdbarch.c: Regenerate.
6347         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6348         'thread' parameter.  All implementations and callers adjusted.
6349         * gdbthread.h (thread_info) <set_running>: New method.
6350         (delete_thread, delete_thread_silent): Take a thread_info pointer
6351         instead of a ptid.
6352         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6353         (first_thread_of_process): Delete, replaced by ...
6354         (first_thread_of_inferior): ... this new function.  All callers
6355         adjusted.
6356         (any_live_thread_of_process): Delete, replaced by ...
6357         (any_live_thread_of_inferior): ... this new function.  All callers
6358         adjusted.
6359         (switch_to_thread, switch_to_no_thread): Declare.
6360         (is_executing): Delete.
6361         (enable_thread_stack_temporaries): Update comment.
6362         <enable_thread_stack_temporaries>: Take a thread_info pointer
6363         instead of a ptid_t.  Incref the thread.
6364         <~enable_thread_stack_temporaries>: Decref the thread.
6365         <m_ptid>: Delete
6366         <m_thr>: New.
6367         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6368         (get_last_thread_stack_temporary)
6369         (value_in_thread_stack_temporaries, can_access_registers_thread):
6370         Take a thread_info pointer instead of a ptid_t.  All callers
6371         adjusted.
6372         * infcall.c (get_call_return_value): Use inferior_thread.
6373         (run_inferior_call): Work with thread pointers instead of ptid_t.
6374         (call_function_by_hand_dummy): Work with thread pointers instead
6375         of ptid_t.  Use thread_info_ref.
6376         * infcmd.c (proceed_thread_callback): Access thread's state
6377         directly.
6378         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6379         access thread's state directly.
6380         (continue_command): Use inferior_thread.
6381         (info_program_command): Use find_thread_ptid and access thread
6382         state directly.
6383         (proceed_after_attach_callback): Use thread state directly.
6384         (notice_new_inferior): Take a thread_info pointer instead of a
6385         ptid_t.  All callers adjusted.
6386         (exit_inferior): Take an inferior pointer instead of a pid.  All
6387         callers adjusted.
6388         (exit_inferior_silent): New.
6389         (detach_inferior): Delete.
6390         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6391         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6392         (detach_inferior_command, kill_inferior_command): Use
6393         find_inferior_id instead of valid_gdb_inferior_id and
6394         gdb_inferior_id_to_pid.
6395         (inferior_command): Use inferior and thread pointers.
6396         * inferior.h (struct thread_info): Forward declare.
6397         (notice_new_inferior): Take a thread_info pointer instead of a
6398         ptid_t.  All callers adjusted.
6399         (detach_inferior): Delete declaration.
6400         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6401         instead of a pid.  All callers adjusted.
6402         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6403         (valid_gdb_inferior_id): Delete.
6404         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6405         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6406         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6407         ...
6408         <inf>: ... this new field.
6409         <step_ptid>: Delete, replaced by ...
6410         <step_thread>: ... this new field.
6411         (get_displaced_stepping_state): Take an inferior pointer instead
6412         of a pid.  All callers adjusted.
6413         (displaced_step_in_progress_any_inferior): Adjust.
6414         (displaced_step_in_progress_thread): Take a thread pointer instead
6415         of a ptid_t.  All callers adjusted.
6416         (displaced_step_in_progress, add_displaced_stepping_state): Take
6417         an inferior pointer instead of a pid.  All callers adjusted.
6418         (get_displaced_step_closure_by_addr): Adjust.
6419         (remove_displaced_stepping_state): Take an inferior pointer
6420         instead of a pid.  All callers adjusted.
6421         (displaced_step_prepare_throw, displaced_step_prepare)
6422         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6423         All callers adjusted.
6424         (start_step_over): Adjust.
6425         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6426         displaced step queue.
6427         (do_target_resume): Adjust.
6428         (fetch_inferior_event): Use inferior_thread.
6429         (context_switch, get_inferior_stop_soon): Take an
6430         execution_control_state pointer instead of a ptid_t.  All callers
6431         adjusted.
6432         (switch_to_thread_cleanup): Delete.
6433         (stop_all_threads): Use scoped_restore_current_thread.
6434         * inline-frame.c: Include "gdbthread.h".
6435         (inline_state) <inline_state>: Take a thread pointer instead of a
6436         ptid_t.  All callers adjusted.
6437         <ptid>: Delete, replaced by ...
6438         <thread>: ... this new field.
6439         (find_inline_frame_state): Take a thread pointer instead of a
6440         ptid_t.  All callers adjusted.
6441         (skip_inline_frames, step_into_inline_frame)
6442         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6443         pointer instead of a ptid_t.  All callers adjusted.
6444         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6445         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6446         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6447         pointers directly.
6448         * linux-nat.c (get_detach_signal): Likewise.
6449         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6450         (thread_db_notice_clone): Adjust.
6451         (thread_db_find_new_threads_silently)
6452         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6453         a thread pointer instead of a ptid_t.  All callers adjusted.
6454         * mi/mi-cmd-var.c: Include "inferior.h".
6455         (mi_cmd_var_update_iter): Update to use thread pointers.
6456         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6457         inferior directly.
6458         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6459         out to ...
6460         (mi_output_running): ... this new function.
6461         (mi_on_resume_1): Adjust to use it.
6462         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6463         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6464         directly.
6465         (interrupt_thread_callback): : Adjust to use thread and inferior
6466         pointers.
6467         * proc-service.c: Include "gdbthread.h".
6468         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6469         * progspace-and-thread.c: Include "inferior.h".
6470         * progspace.c: Include "inferior.h".
6471         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6472         hold a reference to an inferior_object.
6473         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6474         inferior_thread.
6475         * python/py-inferior.c (struct inferior_object): Give the type a
6476         tag name instead of a typedef.
6477         (python_on_normal_stop): No need to check if the current thread is
6478         listed.
6479         (inferior_to_inferior_object): Change return type to
6480         inferior_object.  All callers adjusted.
6481         (find_thread_object): Delete, bits factored out to ...
6482         (thread_to_thread_object): ... this new function.
6483         * python/py-infthread.c (create_thread_object): Use
6484         inferior_to_inferior_object.
6485         (thpy_is_stopped): Use thread pointer directly.
6486         (gdbpy_selected_thread): Use inferior_thread.
6487         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6488         field, replaced with ...
6489         <thread>: ... this new field.  All users adjusted.
6490         (btpy_insn_or_gap_new): Drop const.
6491         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6492         callers adjusted.
6493         * python/py-record.c: Include "gdbthread.h".
6494         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6495         a ptid_t.  All callers adjusted.
6496         (gdbpy_current_recording): Use inferior_thread.
6497         * python/py-record.h (recpy_record_object) <ptid>: Delete
6498         field, replaced with ...
6499         <thread>: ... this new field.  All users adjusted.
6500         (recpy_element_object) <ptid>: Delete
6501         field, replaced with ...
6502         <thread>: ... this new field.  All users adjusted.
6503         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6504         a ptid_t.  All callers adjusted.
6505         * python/py-threadevent.c: Include "gdbthread.h".
6506         (get_event_thread): Use thread_to_thread_object.
6507         * python/python-internal.h (struct inferior_object): Forward
6508         declare.
6509         (find_thread_object, find_inferior_object): Delete declarations.
6510         (thread_to_thread_object, inferior_to_inferior_object): New
6511         declarations.
6512         * record-btrace.c: Include "inferior.h".
6513         (require_btrace_thread): Use inferior_thread.
6514         (record_btrace_frame_sniffer)
6515         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6516         (get_thread_current_frame): Use scoped_restore_current_thread and
6517         switch_to_thread.
6518         (get_thread_current_frame): Use thread pointer directly.
6519         (record_btrace_replay_at_breakpoint): Use thread's inferior
6520         pointer directly.
6521         * record-full.c: Include "inferior.h".
6522         * regcache.c: Include "gdbthread.h".
6523         (get_thread_arch_regcache): Use the inferior's address space
6524         directly.
6525         (get_thread_regcache, registers_changed_thread): New.
6526         * regcache.h (get_thread_regcache(thread_info *thread)): New
6527         overload.
6528         (registers_changed_thread): New.
6529         (remote_target) <remote_detach_1>: Swap order of parameters.
6530         (remote_add_thread): <remote_add_thread>: Return the new thread.
6531         (get_remote_thread_info(ptid_t)): New overload.
6532         (remote_target::remote_notice_new_inferior): Use thread pointers
6533         directly.
6534         (remote_target::process_initial_stop_replies): Use
6535         thread_info::set_running.
6536         (remote_target::remote_detach_1, remote_target::detach)
6537         (extended_remote_target::detach): Adjust.
6538         * stack.c (frame_show_address): Use inferior_thread.
6539         * target-debug.h (target_debug_print_thread_info_pp): New.
6540         * target-delegates.c: Regenerate.
6541         * target.c (default_thread_address_space): Delete.
6542         (memory_xfer_partial_1): Use current_inferior.
6543         (target_detach): Use current_inferior.
6544         (target_thread_address_space): Delete.
6545         (generic_mourn_inferior): Use current_inferior.
6546         * target.h (struct target_ops) <thread_address_space>: Delete.
6547         (target_thread_address_space): Delete.
6548         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6549         pointers directly.
6550         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6551         thread pointer instead of a ptid_t.  Adjust all callers.
6552         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6553         (first_thread_of_process): Delete, replaced by ...
6554         (first_thread_of_inferior): ... this new function.  All callers
6555         adjusted.
6556         (any_thread_of_process): Rename to ...
6557         (any_thread_of_inferior): ... this, and take an inferior pointer.
6558         (any_live_thread_of_process): Rename to ...
6559         (any_live_thread_of_inferior): ... this, and take an inferior
6560         pointer.
6561         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6562         (value_in_thread_stack_temporaries)
6563         (get_last_thread_stack_temporary): Take a thread pointer instead
6564         of a ptid_t.  Adjust all callers.
6565         (thread_info::set_running): New.
6566         (validate_registers_access): Use inferior_thread.
6567         (can_access_registers_ptid): Rename to ...
6568         (can_access_registers_thread): ... this, and take a thread
6569         pointer.
6570         (print_thread_info_1): Adjust to compare thread pointers instead
6571         of ptids.
6572         (switch_to_no_thread, switch_to_thread): Make extern.
6573         (scoped_restore_current_thread::~scoped_restore_current_thread):
6574         Use m_thread pointer directly.
6575         (scoped_restore_current_thread::scoped_restore_current_thread):
6576         Use inferior_thread.
6577         (thread_command): Use thread pointer directly.
6578         (thread_num_make_value_helper): Use inferior_thread.
6579         * top.c (execute_command): Use inferior_thread.
6580         * tui/tui-interp.c: Include "inferior.h".
6581         * varobj.c (varobj_create): Use inferior_thread.
6582         (value_of_root_1): Use find_thread_global_id instead of
6583         global_thread_id_to_ptid.
6584
6585 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6586
6587         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6588         possible.
6589         (regcache::write_part): Likewise.
6590         (readable_regcache::cooked_read_part): Update comment.
6591         (readable_regcache::cooked_write_part): Likewise.
6592         * regcache.h: (readable_regcache::read_part): Likewise.
6593         (regcache::write_part): Likewise.
6594
6595 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6596             Dirk Schubert  <dirk.schubert@arm.com>
6597
6598         * aarch64-linux-nat.c (post_attach): New.
6599         (aarch64_linux_nat_target::post_attach): Override post_attach to
6600         record the number of hardware debug registers.
6601
6602 2018-06-20  Tom Tromey  <tom@tromey.com>
6603
6604         * python/py-param.c (add_setshow_generic): Make parameters const.
6605         (parmpy_init): Update.
6606
6607 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6608
6609         * regcache.h (regcache_cooked_read_ftype): Rename to...
6610         (register_read_ftype): ...this, change type to function_view.
6611         (class reg_buffer) <save>: Remove src parameter.
6612         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6613         parameter non-const in first overload.  Remove src parameter in
6614         second overload.
6615         * regcache.c (do_cooked_read): Remove.
6616         (readonly_detached_regcache::readonly_detached_regcache): Make
6617         parameter non-const, adjust call to other constructor.
6618         (reg_buffer::save): Remove src parameter.
6619         * frame.c (do_frame_register_read): Remove.
6620         (frame_save_as_regcache): Use lambda function.
6621         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6622         parameter to ppu2spu_data *.
6623         (ppu2spu_sniffer): Use lambda function.
6624
6625 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6626
6627         * record-full.c (record_full_target::insert_breakpoint): Remove
6628         "struct" keyword, add const.
6629
6630 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6631
6632         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6633         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6634         * configure.ac: Remove AC_PREREQ, add missing quoting.
6635         * gnulib/configure.ac: Modernize usage of
6636         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6637         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6638         (AUTOMAKE_VERSION): Bump to 1.15.1.
6639         * configure: Re-generate.
6640         * config.in: Re-generate.
6641         * aclocal.m4: Re-generate.
6642         * gnulib/aclocal.m4: Re-generate.
6643         * gnulib/config.in: Re-generate.
6644         * gnulib/configure: Re-generate.
6645         * gnulib/import/Makefile.in: Re-generate.
6646
6647 2018-06-19  Pedro Alves  <palves@redhat.com>
6648
6649         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6650         (lookup_minimal_symbol_by_pc_section): ... here with
6651         gdb_assert_not_reached added.
6652
6653 2018-06-19  Pedro Alves  <palves@redhat.com>
6654
6655         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6656         parameter with a block parameter.  Compare location's block symbol
6657         with the frame's block instead of addresses.
6658         (skip_inline_frames): Pass the current block instead of the
6659         frame's address.  Break out as soon as we determine the frame
6660         should not be skipped.
6661
6662 2018-06-18  Tom Tromey  <tom@tromey.com>
6663
6664         * solib-aix.c (solib_aix_get_section_offsets): Return
6665         unique_xmalloc_ptr.
6666         (solib_aix_solib_create_inferior_hook): Update.
6667
6668 2018-06-18  Tom Tromey  <tom@tromey.com>
6669
6670         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6671
6672 2018-06-18  Tom Tromey  <tom@tromey.com>
6673
6674         * solib-frv.c (frv_relocate_main_executable): Use
6675         unique_xmalloc_ptr.
6676         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6677         unique_xmalloc_ptr.
6678
6679 2018-06-18  Tom Tromey  <tom@tromey.com>
6680
6681         * objfiles.h (inhibit_section_map_updates): Update.
6682         (resume_section_map_updates, resume_section_map_updates_cleanup):
6683         Remove.
6684         * solib-svr4.c (svr4_handle_solib_event): Update.
6685         * objfiles.c (inhibit_section_map_updates): Return
6686         scoped_restore_tmpl<int>.
6687         (resume_section_map_updates, resume_section_map_updates_cleanup):
6688         Remove.
6689
6690 2018-06-18  Tom Tromey  <tom@tromey.com>
6691
6692         * valprint.h (read_string): Update.
6693         * valprint.c (read_string): Change type of "buffer".
6694         (val_print_string): Update.
6695         * python/py-value.c (valpy_string): Update.
6696         * language.h (struct language_defn) <la_get_string>: Change
6697         type of "buffer".
6698         (default_get_string, c_get_string): Update.
6699         * language.c (default_get_string): Change type of "buffer".
6700         * guile/scm-value.c (gdbscm_value_to_string): Update.
6701         * c-lang.c (c_get_string): Change type of "buffer".
6702
6703 2018-06-18  Tom Tromey  <tom@tromey.com>
6704
6705         * ser-mingw.c (struct pipe_state_destroyer): New.
6706         (pipe_state_up): New typedef.
6707         (cleanup_pipe_state): Remove.
6708         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6709
6710 2018-06-18  Tom Tromey  <tom@tromey.com>
6711
6712         * rust-lang.h (rust_yyerror): Don't declare.
6713         * rust-lang.c (rust_language_defn): Update.
6714         * rust-exp.y (yyerror): Now static.
6715         * parse.c (parse_exp_in_context_1): Update.
6716         * p-lang.h (p_yyerror): Don't declare.
6717         * p-lang.c (p_language_defn): Update.
6718         * p-exp.y (yyerror): Now static.
6719         * opencl-lang.c (opencl_language_defn): Update.
6720         * objc-lang.c (objc_language_defn): Update.
6721         * m2-lang.h (m2_yyerror): Don't declare.
6722         * m2-lang.c (m2_language_defn): Update.
6723         * m2-exp.y (yyerror): Now static.
6724         * language.h (struct language_defn) <la_error>: Remove.
6725         * language.c (unk_lang_error): Remove.
6726         (unknown_language_defn, auto_language_defn): Remove.
6727         * go-lang.h (go_yyerror): Don't declare.
6728         * go-lang.c (go_language_defn): Update.
6729         * go-exp.y (yyerror): Now static.
6730         * f-lang.h (f_yyerror): Don't declare.
6731         * f-lang.c (f_language_defn): Update.
6732         * f-exp.y (yyerror): Now static.
6733         * d-lang.h (d_yyerror): Don't declare.
6734         * d-lang.c (d_language_defn): Update.
6735         * d-exp.y (yyerror): Now static.
6736         * c-lang.h (c_yyerror): Don't declare.
6737         * c-lang.c (c_language_defn, cplus_language_defn)
6738         (asm_language_defn, minimal_language_defn): Update.
6739         * c-exp.y (yyerror): Now static.
6740         * ada-lang.h (ada_yyerror): Don't declare.
6741         * ada-lang.c (ada_language_defn): Update.
6742         * ada-exp.y (yyerror): Now static.
6743
6744 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6745
6746         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6747         (store_sveregs_to_thread): Likewise.
6748         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6749         (aarch64_linux_store_inferior_registers): Likewise.
6750         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6751         function.
6752         (aarch64_sve_regs_copy_to_regcache): Likewise.
6753         (aarch64_sve_regs_copy_from_regcache): Likewise.
6754         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6755         declaration.
6756         (aarch64_sve_regs_copy_to_regcache): Likewise.
6757         (aarch64_sve_regs_copy_from_regcache): Likewise.
6758         (sve_context): Structure from Linux headers.
6759         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6760         (SVE_SIG_ZREG_SIZE): Likewise.
6761         (SVE_SIG_PREG_SIZE): Likewise.
6762         (SVE_SIG_FFR_SIZE): Likewise.
6763         (SVE_SIG_REGS_OFFSET): Likewise.
6764         (SVE_SIG_ZREGS_OFFSET): Likewise.
6765         (SVE_SIG_ZREG_OFFSET): Likewise.
6766         (SVE_SIG_ZREGS_SIZE): Likewise.
6767         (SVE_SIG_PREGS_OFFSET): Likewise.
6768         (SVE_SIG_PREG_OFFSET): Likewise.
6769         (SVE_SIG_PREGS_SIZE): Likewise.
6770         (SVE_SIG_FFR_OFFSET): Likewise.
6771         (SVE_SIG_REGS_SIZE): Likewise.
6772         (SVE_SIG_CONTEXT_SIZE): Likewise.
6773         (SVE_PT_REGS_MASK): Likewise.
6774         (SVE_PT_REGS_FPSIMD): Likewise.
6775         (SVE_PT_REGS_SVE): Likewise.
6776         (SVE_PT_VL_INHERIT): Likewise.
6777         (SVE_PT_VL_ONEXEC): Likewise.
6778         (SVE_PT_REGS_OFFSET): Likewise.
6779         (SVE_PT_FPSIMD_OFFSET): Likewise.
6780         (SVE_PT_FPSIMD_SIZE): Likewise.
6781         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6782         (SVE_PT_SVE_PREG_SIZE): Likewise.
6783         (SVE_PT_SVE_FFR_SIZE): Likewise.
6784         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6785         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6786         (__SVE_SIG_TO_PT): Likewise.
6787         (SVE_PT_SVE_OFFSET): Likewise.
6788         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6789         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6790         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6791         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6792         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6793         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6794         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6795         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6796         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6797         (SVE_PT_SVE_SIZE): Likewise.
6798         (SVE_PT_SIZE): Likewise.
6799         (HAS_SVE_STATE): New define.
6800
6801 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6802
6803         * nat/aarch64-sve-linux-sigcontext.h: New file.
6804         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6805         new files.
6806         (SVE_VQ_MIN): Likewise.
6807         (SVE_VQ_MAX): Likewise.
6808         (SVE_VL_MIN): Likewise.
6809         (SVE_VL_MAX): Likewise.
6810         (SVE_NUM_ZREGS): Likewise.
6811         (SVE_NUM_PREGS): Likewise.
6812         (sve_vl_valid): Likewise.
6813         (struct user_sve_header): Likewise.
6814
6815 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6816             Richard Bunt <Richard.Bunt@arm.com>
6817
6818         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6819         was requested by GDB.
6820
6821 2018-06-15  Tom de Vries  <tdevries@suse.de>
6822
6823         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6824
6825 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6826
6827         * gnulib/update-gnulib.sh: Print expected versions of
6828         autoconf/aclocal.
6829
6830 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6831
6832         * arch-utils.c (default_type_align): Use type_length_units.
6833         * gdbtypes.c (type_align): Use type_length_units.
6834
6835 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6836
6837         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6838         of 'define' command.
6839
6840 2018-06-14  Tom de Vries  <tdevries@suse.de>
6841
6842         PR cli/22573
6843         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6844         get_no_prettyformat_print_options.
6845
6846 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6847
6848         * sparc-nat.h: Include target.h.
6849         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6850         <fetch_registers>: Remove this argument in function call.
6851         <store_registers>: Remove this argument in function call, remove
6852         extra semicolon.
6853         <low_forget_process>: Call sparc64_forget_process instead of
6854         sparc_forget_process.
6855
6856 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6857
6858         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6859         (procfs_target::make_corefile_notes): Adjust to new
6860         target_read_alloc return type.
6861
6862 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6863             Stephen Roberts  <stephen.roberts@arm.com>
6864
6865         PR gdb/22882
6866         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6867         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6868         Move should_notify_stop local into more inner scope.
6869
6870 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6871             Stephen Roberts  <stephen.roberts@arm.com>
6872
6873         PR gdb/22882
6874         * infrun.c (resume_1): Add call to mark_async_event_handler.
6875
6876 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6877
6878         * infrun.c (do_target_wait): Change old version of $pc printed.
6879
6880 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6881
6882         * dwarf2read.c (read_index_from_section): Rename to...
6883         (read_gdb_index_from_section): ... this, update all callers.
6884         (dwarf2_read_index): Rename to...
6885         (dwarf2_read_gdb_index): ... this, update all callers.
6886
6887 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6888
6889         * gdb/hppa-linux-nat.c
6890         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6891         hppa_linux_nat_target::fetch_registers.
6892
6893 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6894
6895         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6896         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6897         (AARCH64_DWARF_SVE_FFR): Likewise.
6898         (AARCH64_DWARF_SVE_P0): Likewise.
6899         (AARCH64_DWARF_SVE_Z0): Likewise.
6900
6901 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6902
6903         * common/common-regcache.h (raw_compare): New function.
6904         * regcache.c (regcache::raw_compare): Likewise.
6905         * regcache.h (regcache::raw_compare): New declaration.
6906
6907 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6908
6909         * common/common-regcache.h (reg_buffer_common): New structure.
6910         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6911         (reg_buffer::raw_supply): Likewise.
6912         (reg_buffer::raw_supply_integer): Likewise.
6913         (reg_buffer::raw_supply_zeroed): Likewise.
6914         (reg_buffer::raw_collect): Likewise.
6915         (reg_buffer::raw_collect_integer): Likewise.
6916         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6917         (reg_buffer::raw_supply): Likewise.
6918         (reg_buffer::raw_supply_integer): Likewise.
6919         (reg_buffer::raw_supply_zeroed): Likewise.
6920         (reg_buffer::raw_collect): Likewise.
6921         (reg_buffer::raw_collect_integer): Likewise.
6922
6923 2018-06-10  Tom Tromey  <tom@tromey.com>
6924
6925         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6926         (class remote_state) <stop_reply_queue>: Now std::vector.
6927         (remote_state::~remote_state)
6928         (remote_target::stop_reply_queue_length): Update.
6929         (struct queue_iter_param, remove_child_of_pending_fork)
6930         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6931         (check_pending_event_prevents_wildcard_vcont_callback)
6932         (remove_stop_reply_for_inferior)
6933         (remove_stop_reply_of_remote_state)
6934         (remote_notif_remove_once_on_match)
6935         (stop_reply_match_ptid_and_ws)
6936         (remote_kill_child_of_pending_fork): Remove.
6937         (remote_target::remove_new_fork_children)
6938         (remote_target::check_pending_events_prevent_wildcard_vcont)
6939         (remote_target::discard_pending_stop_replies)
6940         (remote_target::discard_pending_stop_replies_in_queue)
6941         (remote_target::remote_notif_remove_queued_reply)
6942         (remote_target::queued_stop_reply)
6943         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6944         (remote_target::wait, remote_target::kill_new_fork_children)
6945         (remote_target::async): Update.
6946
6947 2018-06-10  Tom Tromey  <tom@tromey.com>
6948
6949         * record-full.c (record_full_arch_list_cleanups): Remove.
6950         (record_full_message): Use try/catch.
6951         (record_full_wait_cleanups): Remove.
6952         (record_full_wait_1): Use try/catch.
6953         (record_full_restore): Likewise.
6954
6955 2018-06-10  Tom Tromey  <tom@tromey.com>
6956
6957         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6958         declare VEC.  Add constructor.
6959         <in_target_beneath>: Now bool.
6960         (record_full_breakpoints): Now a std::vector, static.
6961         (record_full_sync_record_breakpoints)
6962         (record_full_init_record_breakpoints)
6963         (record_full_target::insert_breakpoint)
6964         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6965
6966 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6967
6968         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6969         * serial.c (serial_interface_lookup): Remove struct keyword.
6970
6971 2018-06-10  Tom Tromey  <tom@tromey.com>
6972
6973         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6974         method.
6975         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6976         a method.
6977         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6978         method.
6979         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6980         "beneath" as a method.
6981         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6982         Use "beneath" as a method.
6983
6984 2018-06-10  Tom Tromey  <tom@tromey.com>
6985
6986         * tracefile.c (struct trace_file_writer_deleter): New.
6987         <operator()>: Rename from trace_file_writer_xfree.
6988         (trace_file_writer_up): New typedef.
6989         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6990
6991 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6992
6993         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6994         <m_registers, m_register_status>: Change type to
6995         std::unique_ptr.
6996         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6997         XCNEWVEC.
6998
6999 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7000
7001         * common/common-regcache.h (enum register_status): Add
7002         underlying type "signed char".
7003         * regcache.h (reg_buffer) <m_register_status>: Change type to
7004         register_status *.
7005         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7006         register_status instead of signed char.
7007         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7008         (reg_buffer::get_register_status): Remove cast.
7009         (readable_regcache::raw_read): Remove cast.
7010         (readable_regcache::cooked_read): Remove cast.
7011
7012 2018-06-09  Tom Tromey  <tom@tromey.com>
7013
7014         * source.c (reverse_search_command, forward_search_command): Use
7015         scoped_fd.
7016
7017 2018-06-09  Tom Tromey  <tom@tromey.com>
7018
7019         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7020         (serial_ops_list): Now static, std::vector.
7021         (serial_interface_lookup, serial_add_interface): Update.
7022
7023 2018-06-09  Tom Tromey  <tom@tromey.com>
7024
7025         * dwarf2read.c (process_cu_includes): Update.
7026         (process_full_comp_unit): Update.
7027         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7028         std::vector.
7029
7030 2018-06-08  Paul Koning  <paul_koning@dell.com>
7031
7032         PR gdb/23252
7033
7034         * python/python.c (do_start_initialization):
7035         Avoid call to internal Python API.
7036         (init__gdb_module): New function.
7037
7038 2018-06-08  Gary Benson <gbenson@redhat.com>
7039
7040         * linux-thread-db.c (valprint.h): New include.
7041         (struct check_thread_db_info): New structure.
7042         (check_thread_db_on_load, tdb_testinfo): New static globals.
7043         (check_thread_db, check_thread_db_callback): New functions.
7044         (try_thread_db_load_1): Run integrity checks if requested.
7045         (maintenance_check_libthread_db): New function.
7046         (_initialize_thread_db): Register "maint check libthread-db"
7047         and "maint set/show check-libthread-db".
7048         * NEWS: Mention the above new commands.
7049
7050 2018-06-08  Tom Tromey  <tom@tromey.com>
7051
7052         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7053         now a method.
7054
7055 2018-06-08  Tom Tromey  <tom@tromey.com>
7056
7057         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7058
7059 2018-06-08  Tom Tromey  <tom@tromey.com>
7060
7061         * common/btrace-common.h (struct btrace_data): Add constructor,
7062         destructor, move assignment operator.
7063         <empty, clear, fini>: New methods.
7064         <format>: Initialize.
7065         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7066         (btrace_data_empty): Don't declare.
7067         * common/btrace-common.c (btrace_data_init): Remove.
7068         (btrace_data::fini): Rename from btrace_data_fini.
7069         (btrace_data::empty): Rename from btrace_data_empty.
7070         (btrace_data::clear): Rename from btrace_data_clear.  Return
7071         bool.
7072         * btrace.h (make_cleanup_btrace_data): Don't declare.
7073         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7074         (parse_xml_btrace): Update.
7075         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7076         (maint_btrace_clear_packet_history_cmd): Update.
7077
7078 2018-06-07  Pedro Alves  <palves@redhat.com>
7079
7080         * target.h (target_ops) <beneath>: Now a method.  All references
7081         updated.
7082         (class target_stack): New.
7083         * target.c (g_target_stack): New.
7084         (g_current_top_target): Delete.
7085         (current_top_target): Get the top target out of g_target_stack.
7086         (target_stack::push, target_stack::unpush): New.
7087         (push_target, unpush_target): Reimplement.
7088         (target_is_pushed): Reimplement in terms of g_target_stack.
7089         (target_ops::beneath, target_stack::find_beneath): New.
7090
7091 2018-06-07  Pedro Alves  <palves@redhat.com>
7092
7093         * target.h (find_target_beneath): Delete declaration.
7094         * target.c (find_target_beneath): Delete definition.
7095         * aix-thread.c: All callers of find_target_beneath adjusted to
7096         call target_ops::beneath instead.
7097         * bsd-uthread.c: Likewise.
7098         * linux-thread-db.c: Likewise.
7099         * ravenscar-thread.c: Likewise.
7100         * sol-thread.c: Likewise.
7101         * spu-multiarch.c: Likewise.
7102
7103 2018-06-07  Pedro Alves  <palves@redhat.com>
7104
7105         * target.h (target_ops) <beneath>: Now a method.  All references
7106         updated.
7107         (target_ops) <m_beneath>: New.
7108         * target.c (target_ops::beneath): New.
7109         * corelow.c: Adjust all references to target_ops::beneath.
7110         * linux-thread-db.c: Likewise.
7111         * make-target-delegates: Likewise.
7112         * record-btrace.c: Likewise.
7113         * record-full.c: Likewise.
7114         * remote.c: Likewise.
7115         * target.c: Likewise.
7116         * target-delegates.c: Regenerate.
7117
7118 2018-06-07  Pedro Alves  <palves@redhat.com>
7119
7120         * target.h (target_stack): Delete.
7121         (current_top_target): Declare function.
7122         * target.c (target_stack): Delete.
7123         (g_current_top_target): New.
7124         (current_top_target): New function.
7125         * auxv.c: Use current_top_target instead of target_stack
7126         throughout.
7127         * avr-tdep.c: Likewise.
7128         * breakpoint.c: Likewise.
7129         * corefile.c: Likewise.
7130         * elfread.c: Likewise.
7131         * eval.c: Likewise.
7132         * exceptions.c: Likewise.
7133         * frame.c: Likewise.
7134         * gdbarch-selftests.c: Likewise.
7135         * gnu-v3-abi.c: Likewise.
7136         * ia64-tdep.c: Likewise.
7137         * ia64-vms-tdep.c: Likewise.
7138         * infcall.c: Likewise.
7139         * infcmd.c: Likewise.
7140         * infrun.c: Likewise.
7141         * linespec.c: Likewise.
7142         * linux-tdep.c: Likewise.
7143         * minsyms.c: Likewise.
7144         * ppc-linux-nat.c: Likewise.
7145         * ppc-linux-tdep.c: Likewise.
7146         * procfs.c: Likewise.
7147         * regcache.c: Likewise.
7148         * remote.c: Likewise.
7149         * rs6000-tdep.c: Likewise.
7150         * s390-linux-nat.c: Likewise.
7151         * s390-tdep.c: Likewise.
7152         * solib-aix.c: Likewise.
7153         * solib-darwin.c: Likewise.
7154         * solib-dsbt.c: Likewise.
7155         * solib-spu.c: Likewise.
7156         * solib-svr4.c: Likewise.
7157         * solib-target.c: Likewise.
7158         * sparc-tdep.c: Likewise.
7159         * sparc64-tdep.c: Likewise.
7160         * spu-tdep.c: Likewise.
7161         * symfile.c: Likewise.
7162         * symtab.c: Likewise.
7163         * target-descriptions.c: Likewise.
7164         * target-memory.c: Likewise.
7165         * target.c: Likewise.
7166         * target.h: Likewise.
7167         * tracefile-tfile.c: Likewise.
7168         * tracepoint.c: Likewise.
7169         * valops.c: Likewise.
7170         * valprint.c: Likewise.
7171         * value.c: Likewise.
7172         * windows-tdep.c: Likewise.
7173         * mi/mi-main.c: Likewise.
7174
7175 2018-06-07  Tom Tromey  <tom@tromey.com>
7176
7177         * valprint.h (build_address_symbolic): Declare.
7178         * printcmd.c (print_address_symbolic): Update.
7179         (build_address_symbolic): Change "name" and "filename" to
7180         std::string.
7181         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7182         Update.
7183         * defs.h (build_address_symbolic): Remove declaration.
7184
7185 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7186
7187         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7188         (aarch64_vnv_type): Add function.
7189         (aarch64_pseudo_register_name): Add V regs for SVE.
7190         (aarch64_pseudo_register_type): Likewise.
7191         (aarch64_pseudo_register_reggroup_p): Likewise.
7192         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7193         (aarch64_pseudo_read_value): Add V regs for SVE.
7194         (aarch64_pseudo_write_2): Use V0 offset for SVE
7195         (aarch64_pseudo_write): Add V regs for SVE.
7196         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7197
7198 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7199
7200         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7201         (sve_vl_from_vq): Likewise.
7202
7203 2018-06-05  Tom Tromey  <tom@tromey.com>
7204
7205         * cli/cli-cmds.c (show_version): Update.
7206         * top.c (print_gdb_version): Add "interactive" parameter.
7207         Update.
7208         * main.c (captured_main_1): Update.
7209         * top.h (print_gdb_version): Add "interactive" parameter and a
7210         comment.
7211
7212 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7213
7214         * common/enum-flags.h: Add trailing semicolon to example in
7215         comment.
7216
7217 2018-06-05  Tom Tromey  <tom@tromey.com>
7218
7219         PR cli/12326:
7220         * NEWS: Add entry about pager.
7221         * utils.c (pagination_disabled_for_command): New global.
7222         (prompt_for_continue): Allow "c" response to prompt.
7223         (reinitialize_more_filter): Clear
7224         pagination_disabled_for_command.
7225         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7226
7227 2018-06-04  Tom Tromey  <tom@tromey.com>
7228
7229         * ada-lang.h (ada_lookup_symbol_list): Update.
7230         * ada-lang.c (resolve_subexp): Update.
7231         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7232         parameter.
7233         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7234         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7235         results parameter to std::vector.
7236         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7237         Update.
7238         * ada-exp.y (block_lookup): Update.
7239         (select_possible_type_sym): Change type of syms.  Remove nsyms
7240         parameter.
7241         (write_var_or_type, write_name_assoc): Update.
7242
7243 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7244
7245         * windows-nat.c (windows_nat_target::xfer_partial): Return
7246         TARGET_XFER_E_IO if we need to delegate to the target beneath
7247         but BENEATH is NULL.
7248
7249 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7250
7251         * Makefile.in (config.status): Add configure.nat as a
7252         dependency.
7253
7254 2018-06-04  Tom Tromey  <tom@tromey.com>
7255
7256         * cp-name-parser.y (cpname_state): Add method declarations.
7257         (HANDLE_QUAL): Update.
7258         (cpname_state::d_grab, cpname_state::fill_comp)
7259         (cpname_state::make_operator, cpname_state::make_dtor)
7260         (cpname_state::make_builtin_type, cpname_state::make_name)
7261         (cpname_state::d_qualify, cpname_state::d_int_type)
7262         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7263         (%union): Move earlier.
7264
7265 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7266
7267         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7268
7269 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7270
7271         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7272         (aarch64_pseudo_write_1): Likewise.
7273         (aarch64_pseudo_read_value): Use helper.
7274         (aarch64_pseudo_write): Likewise.
7275
7276 2018-06-04  Pedro Alves  <palves@redhat.com>
7277
7278         * darwin-nat.c (darwin_ops): Delete.
7279         (darwin_attach_pid): Use get_native_target.
7280
7281 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7282
7283         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7284         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7285
7286 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7287
7288         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7289         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7290         (aarch64_gdbarch_init): Check for SVE.
7291         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7292
7293 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7294
7295         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7296         * aarch64-tdep.h (aarch64_read_description): Likewise.
7297         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7298         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7299         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7300         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7301         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7302
7303 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7304
7305         * value.c (value_fetch_lazy_bitfield): New.
7306         (value_fetch_lazy_memory): New.
7307         (value_fetch_lazy_register): New.
7308         (value_fetch_lazy): Factor out to smaller functions.
7309
7310 2018-06-01  Tom Tromey  <tom@tromey.com>
7311
7312         * cp-name-parser.y (backslashable, represented): Now const.
7313
7314 2018-06-01  Tom Tromey  <tom@tromey.com>
7315
7316         * cp-name-parser.y: Include parser-defs.h.
7317         (parser_fprintf): Remove declaration.
7318
7319 2018-06-01  Tom Tromey  <tom@tromey.com>
7320
7321         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7322         %parse-param.
7323         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7324         (global_result): Remove globals.
7325         (struct cpname_state): New.
7326         (yyparse): Don't declare.
7327         (yylex, yyerror): Move declarations after %union.
7328         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7329         (make_name): Add state parameter.
7330         Update all callers.
7331         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7332         parameter.
7333         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7334         Update.
7335         (yylex): Add lvalp, state parameters.
7336         (yyerror): Add state parameter.
7337         (cp_demangled_name_to_comp): Update.
7338
7339 2018-06-01  Tom Tromey  <tom@tromey.com>
7340
7341         * cp-name-parser.y (parser_fprintf): Declare.
7342         (GDB_YY_REMAP_PREFIX): Define.
7343         Include yy-remap.h.  Don't redefine yy* identifiers.
7344
7345 2018-06-01  Tom Tromey  <tom@tromey.com>
7346
7347         * python/py-type.c (typy_legacy_template_argument): Update.
7348         * cp-support.h (cp_demangled_name_to_comp): Update.
7349         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7350         parameter to be a "std::string *".
7351         (main): Update.
7352
7353 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7354
7355         * ada-lex.l: Include "diagnostics.h" instead of
7356         "common/diagnostics.h".
7357         * unittests/environ-selftests.c: Likewise.
7358         * common/diagnostics.h: Moved to ../include.
7359
7360 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7361
7362         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7363         to language_mode_manual while calling breakpoint_re_set_one.
7364
7365 2018-06-01  Tom Tromey  <tom@tromey.com>
7366
7367         * valops.c (value_cast_structs, destructor_name_p): Update.
7368         * symtab.c (gdb_mangle_name): Update.
7369         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7370         Update.
7371         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7372         (pascal_object_print_value_fields, pascal_object_print_value):
7373         Update.
7374         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7375         * linespec.c (find_methods): Update.
7376         * gdbtypes.h (type_name_no_tag): Remove.
7377         (type_name_or_error): Rename from type_name_no_tag_or_error.
7378         * gdbtypes.c (type_name_no_tag): Remove.
7379         (type_name_or_error): Rename from type_name_no_tag_or_error.
7380         (lookup_struct_elt_type, check_typedef): Update.
7381         * expprint.c (print_subexp_standard): Update.
7382         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7383         * d-namespace.c (d_lookup_nested_symbol): Update.
7384         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7385         (cp_print_class_member): Update.
7386         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7387         * completer.c (add_struct_fields): Update.
7388         * c-typeprint.c (cp_type_print_derivation_info)
7389         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7390         Update.
7391         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7392         (ada_prefer_type, ada_is_exception_sym): Update.
7393
7394 2018-06-01  Tom Tromey  <tom@tromey.com>
7395
7396         * valops.c (enum_constant_from_type, value_namespace_elt)
7397         (value_maybe_namespace_elt): Update.
7398         * valarith.c (find_size_for_pointer_math): Update.
7399         * target-descriptions.c (make_gdb_type): Update.
7400         * symmisc.c (print_symbol): Update.
7401         * stabsread.c (define_symbol, read_type)
7402         (complain_about_struct_wipeout, add_undefined_type)
7403         (cleanup_undefined_types_1): Update.
7404         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7405         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7406         (rust_internal_print_type, rust_composite_type)
7407         (rust_evaluate_funcall, rust_evaluate_subexp)
7408         (rust_inclusive_range_type_p): Update.
7409         * python/py-type.c (typy_get_tag): Update.
7410         * p-typeprint.c (pascal_type_print_base): Update.
7411         * mdebugread.c (parse_symbol, parse_type): Update.
7412         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7413         Update.
7414         * guile/scm-type.c (gdbscm_type_tag): Update.
7415         * go-lang.c (sixg_string_p): Update.
7416         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7417         Update.
7418         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7419         (TYPE_TAG_NAME): Remove.
7420         * gdbtypes.c (type_name_no_tag): Simplify.
7421         (check_typedef, check_types_equal, recursive_dump_type)
7422         (copy_type_recursive, arch_composite_type): Update.
7423         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7424         in summary mode when needed.
7425         * eval.c (evaluate_funcall): Update.
7426         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7427         (process_structure_scope, read_enumeration_type)
7428         (read_namespace_type, read_module_type, determine_prefix): Update.
7429         * cp-support.c (inspect_type): Update.
7430         * coffread.c (process_coff_symbol, decode_base_type): Update.
7431         * c-varobj.c (c_is_path_expr_parent): Update.
7432         * c-typeprint.c (c_type_print_base_struct_union): Update.
7433         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7434         summary when using C language.
7435         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7436         (gen_maybe_namespace_elt): Update.
7437         * ada-lang.c (ada_type_name): Simplify.
7438         (empty_record, ada_template_to_fixed_record_type_1)
7439         (template_to_static_fixed_type)
7440         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7441
7442 2018-06-01  Tom Tromey  <tom@tromey.com>
7443
7444         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7445         c_print_type.
7446         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7447         (c_print_type): Update.
7448         (c_print_type): New overload.
7449         (c_type_print_varspec_prefix, c_type_print_args)
7450         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7451         (c_type_print_base_struct_union, c_type_print_base_1)
7452         (cp_type_print_method_args): Add "language" parameter.
7453         (c_type_print_base): Update.
7454         * c-lang.h (c_print_type): Add new overload.
7455
7456 2018-06-01  Tom Tromey  <tom@tromey.com>
7457
7458         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7459         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7460
7461 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7462
7463         * aarch64-tdep.c (aarch64_sve_register_names): New const
7464         var.
7465         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7466         (AARCH64_SVE_Z_REGS_NUM): New define.
7467         (AARCH64_SVE_P_REGS_NUM): Likewise.
7468         (AARCH64_SVE_NUM_REGS): Likewise.
7469
7470 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7471
7472         * nat/linux-ptrace.h [__alpha__]
7473         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7474         definitions.
7475
7476 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7477
7478         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7479         the endianness selected.
7480         * NEWS: Document `set endian auto' mode operation update.
7481
7482 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7483
7484         * Makefile.in: Add new header.
7485         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7486         (sve_vl_from_vg): Likewise.
7487         (sve_vq_from_vl): Likewise.
7488         (sve_vl_from_vq): Likewise.
7489         (sve_vq_from_vg): Likewise.
7490         (sve_vg_from_vq): Likewise.
7491         * configure.nat: Add new c file.
7492         * nat/aarch64-sve-linux-ptrace.c: New file.
7493         * nat/aarch64-sve-linux-ptrace.h: New file.
7494
7495 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7496
7497         * aarch64-linux-nat.c (aarch64_linux_read_description):
7498         Add parmeter zero.
7499         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7500         Likewise.
7501         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7502         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7503         (aarch64_gdbarch_init): Add parmeter zero.
7504         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7505         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7506         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7507         parmeter.
7508         * doc/gdb.texinfo: Describe SVE feature
7509         * features/aarch64-sve.c: New file.
7510
7511 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7512
7513         PR gdb/23210
7514         * gdbarch.sh (significant_addr_bit): Default to zero when
7515         not set by target architecture.
7516         * gdbarch.c: Re-generated.
7517         * utils.c (address_significant): Update.
7518
7519 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7520
7521         * stack.c (func_command): Remove trailing newline in call to error.
7522
7523 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7524
7525         * regcache.h (regcache_raw_collect): Remove, update callers to
7526         use regcache::raw_collect.
7527         * regcache.c (regcache_raw_collect): Remove.
7528
7529 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7530
7531         * regcache.h (regcache_raw_supply): Remove, update callers to
7532         use detached_regcache::raw_supply.
7533         * regcache.c (regcache_raw_supply): Remove.
7534
7535 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7536
7537         * regcache.h (regcache_cooked_write_part): Remove, update
7538         callers to use regcache::cooked_write_part.
7539         * regcache.c (regcache_cooked_write_part): Remove.
7540
7541 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7542
7543         * regcache.h (regcache_cooked_read_part): Remove, update callers
7544         to use readable_regcache::cooked_read_part.
7545         * regcache.c (regcache_cooked_read_part): Remove.
7546
7547 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7548
7549         * regcache.h (regcache_cooked_read_value): Remove, update
7550         callers to use readable_regcache::cooked_read_value.
7551         * regcache.c (regcache_cooked_read_value): Remove.
7552
7553 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7554
7555         * regcache.h (regcache_cooked_write): Remove, update callers to
7556         use regcache::cooked_write.
7557         * regcache.c (regcache_cooked_write): Remove.
7558
7559 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7560
7561         * regcache.h (regcache_invalidate): Remove, update callers to
7562         use detached_regcache::invalidate instead.
7563         * regcache.c (regcache_invalidate): Remove.
7564
7565 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7566
7567         * regcache.h (regcache_raw_write_part): Remove, update callers
7568         to use regcache::raw_write_part instead.
7569         * regcache.c (regcache_raw_write_part): Remove.
7570
7571 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7572
7573         * regcache.h (regcache_raw_read_part): Remove, update callers to
7574         use readable_regcache::raw_read_part instead.
7575         * regcache.c (regcache_raw_read_part): Remove.
7576
7577 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7578
7579         * regcache.h (regcache_cooked_read): Remove, update callers to
7580         use readable_regcache::cooked_read instead.
7581         * regcache.c (regcache_cooked_read): Remove.
7582
7583 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7584
7585         * regcache.h (regcache_raw_write): Remove, update callers to use
7586         regcache::raw_write instead.
7587         * regcache.c (regcache_raw_write): Remove.
7588
7589 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7590
7591         * regcache.h (regcache_raw_read): Remove, update callers to use
7592         readable_regcache::raw_read instead.
7593         * regcache.c (regcache_raw_read): Remove.
7594
7595 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7596
7597         * regcache.h (regcache_raw_update): Remove, update callers to
7598         use readable_regcache::raw_update instead.
7599         * regcache.c (regcache_raw_update): Remove.
7600
7601 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7602
7603         * regcache.h (regcache_register_status): Remove, update callers
7604         to use reg_buffer::get_register_status directly instead.
7605         * regcache.c (regcache_register_status): Remove.
7606
7607 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7608
7609         * regcache.h (regcache_get_ptid): Remove, update all callers to
7610         call regcache::ptid instead.
7611         * regcache.c (regcache_get_ptid): Remove.
7612
7613 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7614
7615         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7616
7617 2018-05-30  Pedro Alves  <palves@redhat.com>
7618
7619         * common/common-exceptions.h (exception_rethrow): Use
7620         ATTRIBUTE_NORETURN.
7621
7622 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7623
7624         * breakpoint.c (print_solib_event, check_status_catch_solib):
7625         Remove struct keyword in range-based for loops.
7626         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7627         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7628         Likewise.
7629         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7630         Likewise.
7631         * symfile.c (addr_info_make_relative): Likewise.
7632         * thread.c (value_in_thread_stack_temporaries): Likewise.
7633
7634 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7635
7636         PR gdb/16841
7637         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7638         aggregate type to get its real type before accessing it.
7639
7640 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7641
7642         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7643         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7644         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7645         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7646         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7647         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7648         * printcmd.c (info_address_command): Likewise.
7649
7650 2018-05-29  Tom Tromey  <tom@tromey.com>
7651
7652         * windows-nat.c (handle_exception): Update fall-through comment.
7653
7654 2018-05-29  Tom Tromey  <tom@tromey.com>
7655
7656         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7657         (struct program_space) <added_solibs>: Now a std::vector.
7658         * breakpoint.c (print_solib_event): Update.
7659         (check_status_catch_solib): Update.
7660         * progspace.c (clear_program_space_solib_cache): Update.
7661         * solib.c (update_solib_list): Update.
7662
7663 2018-05-29  Tom Tromey  <tom@tromey.com>
7664
7665         * python/py-type.c (typy_richcompare): Update.
7666         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7667         * gdbtypes.h (types_deeply_equal): Return bool.
7668         (types_equal): Likewise.
7669         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7670         declare VEC.
7671         (check_types_equal): Change worklist to std::vector.  Return
7672         bool.
7673         (struct type_equality_entry): Add constructor.
7674         (compare_maybe_null_strings): Return bool.
7675         (check_types_worklist): Return bool.  Change worklist to
7676         std::vector.
7677         (types_deeply_equal): Use std::vector.
7678         (types_equal): Return bool.
7679         (compare_maybe_null_strings): Simplify.
7680
7681 2018-05-29  Tom Tromey  <tom@tromey.com>
7682
7683         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7684
7685 2018-05-29  Tom Tromey  <tom@tromey.com>
7686
7687         * objc-lang.h: Don't include cp-support.h.
7688         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7689         declare VEC.
7690
7691 2018-05-27  Tom Tromey  <tom@tromey.com>
7692
7693         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7694
7695 2018-05-25  Tom Tromey  <tom@tromey.com>
7696
7697         * value.c (value::location): Initialize.
7698
7699 2018-05-25  Tom Tromey  <tom@tromey.com>
7700
7701         * dbxread.c (init_bincl_list): Remove.
7702         (bincl_list): Now a std::vector.
7703         (bincls_allocated, next_bincl): Remove.
7704         (free_bincl_list, do_free_bincl_list_cleanup)
7705         (make_cleanup_free_bincl_list): Remove.
7706         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7707         unique_xmalloc_ptr.
7708         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7709         (struct header_file_location): Add constructor.
7710         (add_bincl_to_list): Remove.
7711
7712 2018-05-25  Tom Tromey  <tom@tromey.com>
7713
7714         * tui/tui.c (tui_enable): Update.
7715         * mi/mi-interp.c (mi_interp::init): Update.
7716         * interps.h (class interp) <name>: New method.
7717         <m_name>: Rename from name.
7718         (~scoped_restore_interp): Update.
7719         * interps.c (interp::interp): Update.
7720         (interp_add, interp_set, interp_lookup_existing)
7721         (current_interp_named_p): Update.
7722
7723 2018-05-25  Tom Tromey  <tom@tromey.com>
7724
7725         * interps.c (interp_name): Remove.
7726         * mi/mi-interp.c (mi_interp::init): Update.
7727         * interps.h (interp_name): Remove.
7728         (~scoped_restore_interp): Update.
7729         * tui/tui.c (tui_enable): Update.
7730
7731 2018-05-25  Tom Tromey  <tom@tromey.com>
7732
7733         * utils.c (fputs_maybe_filtered): Update.
7734         * linespec.c (decode_line_full): Update.
7735         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7736         (mi_print_breakpoint_for_event, mi_solib_loaded)
7737         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7738         (mi_user_selected_context_changed): Update.
7739         * mi/mi-main.c (mi_execute_command): Update.
7740         * cli/cli-script.c (execute_control_command): Update.
7741         * python/python.c (execute_gdb_command): Update.
7742         * solib.c (info_sharedlibrary_command): Update.
7743         * interps.c (interp_ui_out): Remove.
7744         * interps.h (interp_ui_out): Remove.
7745
7746 2018-05-25  Tom Tromey  <tom@tromey.com>
7747
7748         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7749         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7750         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7751
7752 2018-05-25  Tom Tromey  <tom@tromey.com>
7753
7754         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7755         * interps.c (interp_exec): Use scoped_restore.
7756
7757 2018-05-25  Tom Tromey  <tom@tromey.com>
7758
7759         * remote.c (remote_target::remote_file_get): Use
7760         gdb::byte_vector.
7761         (remote_target::remote_file_put): Likewise.
7762
7763 2018-05-25  Tom Tromey  <tom@tromey.com>
7764
7765         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7766         a std::string.
7767         (get_pe_section_index, add_pe_exported_sym): Update.
7768         (read_pe_exported_syms): Use gdb::def_vector.
7769
7770 2018-05-25  Tom Tromey  <tom@tromey.com>
7771
7772         * frame.c (remove_prev_frame): Remove.
7773         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7774
7775 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7776
7777         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7778         Remove prototypes.
7779         * mips-linux-nat.c (supply_fpregset): Always call
7780         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7781         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7782         `mips_fill_fpregset'.
7783         * mips-linux-tdep.c (mips_supply_fpregset)
7784         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7785         (mips_fill_fpregset_wrapper): Remove functions.
7786         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7787         (mips_linux_fpregset): Remove variable.
7788         (mips_linux_iterate_over_regset_sections): Use
7789         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7790         (mips_linux_o32_sigframe_init): Remove comment.
7791
7792 2018-05-25  Pedro Alves  <palves@redhat.com>
7793
7794         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7795         (struct readahead_cache, struct packet_reg, struct
7796         remote_arch_state, class remote_state): Move higher up in the
7797         file.
7798         (remote_target::m_remote_state): Now an object instead of a pointer.
7799         (remote_target::get_remote_state): Adjust.
7800
7801 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7802
7803         * stack.c (select_and_print_frame): Delete.
7804         (struct function_bounds): Move struct within function.
7805         (func_command): Most content moved into new function
7806         find_frame_for_function, use new function, print result, add
7807         function comment.
7808         (find_frame_for_function): New function, now returns a result.
7809
7810 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7811
7812         * stack.c (iterate_over_block_arg_vars): Fix comment.
7813         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7814
7815 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7816
7817         PR gdb/23203
7818         * frame.c
7819         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7820         Define.
7821         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7822         Define.
7823         * frame.h (class scoped_restore_selected_frame): New class.
7824         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7825         of any exception, use scoped_restore_selected_frame to restore the
7826         frame instead.
7827
7828 2018-05-24  Pedro Alves  <palves@redhat.com>
7829
7830         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7831         override.
7832
7833 2018-05-23  Tom Tromey  <tom@tromey.com>
7834
7835         * complaints.c (struct complaints): Remove.
7836         (symfile_complaint_book): Remove.
7837         (series): New global.
7838         (complaint_internal): Update.
7839         (clear_complaints): Update.
7840
7841 2018-05-23  Tom Tromey  <tom@tromey.com>
7842
7843         * complaints.c (counters): New global.
7844         (struct complain): Remove.
7845         (struct complaints) <root>: Remove.
7846         (complaint_sentinel): Remove.
7847         (symfile_complaint_book): Update.
7848         (find_complaint) Remove.
7849         (complaint_internal, clear_complaints): Update.
7850
7851 2018-05-23  Tom Tromey  <tom@tromey.com>
7852
7853         * complaints.c (struct complain) <file, line>: Remove.
7854         (find_complaint): Remove file, line parameters.
7855         (complaint_internal): Update.
7856
7857 2018-05-23  Tom Tromey  <tom@tromey.com>
7858
7859         * complaints.c (vcomplaint): Remove.
7860         (complaint_internal) Merge in contents of vcomplaint.
7861
7862 2018-05-23  Tom Tromey  <tom@tromey.com>
7863
7864         * complaints.c (struct complaints) <explanation>: Remove.
7865         (symfile_explanations): Remove.
7866         (symfile_complaint_book): Update.
7867         (vcomplaint): Update.
7868         (struct explanation): Remove.
7869
7870 2018-05-23  Tom Tromey  <tom@tromey.com>
7871
7872         * complaints.c (symfile_complaints): Remove.
7873         (complaint_internal): Remove "complaints" parameter.
7874         (clear_complaints, vcomplaint): Remove "c" parameter.
7875         (get_complaints): Remove.
7876         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7877         (dwarf2_debug_line_missing_file_complaint)
7878         (dwarf2_debug_line_missing_end_sequence_complaint)
7879         (dwarf2_complex_location_expr_complaint)
7880         (dwarf2_const_value_length_mismatch_complaint)
7881         (dwarf2_section_buffer_overflow_complaint)
7882         (dwarf2_macro_malformed_definition_complaint)
7883         (dwarf2_invalid_attrib_class_complaint)
7884         (create_addrmap_from_index, dw2_symtab_iter_next)
7885         (dw2_expand_marked_cus)
7886         (dw2_debug_names_iterator::find_vec_in_debug_names)
7887         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7888         (create_debug_type_hash_table, init_cutu_and_read_dies)
7889         (partial_die_parent_scope, add_partial_enumeration)
7890         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7891         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7892         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7893         (create_cus_hash_table, create_dwp_hash_table)
7894         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7895         (dwarf2_rnglists_process, dwarf2_ranges_process)
7896         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7897         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7898         (handle_struct_member_die, process_structure_scope)
7899         (read_array_type, read_common_block, read_module_type)
7900         (read_tag_pointer_type, read_typedef, read_base_type)
7901         (read_subrange_type, load_partial_dies, partial_die_info::read)
7902         (partial_die_info::read, partial_die_info::read)
7903         (partial_die_info::read, read_checked_initial_length_and_offset)
7904         (dwarf2_string_attr, read_formatted_entries)
7905         (dwarf_decode_line_header)
7906         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7907         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7908         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7909         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7910         (get_signatured_type, get_DW_AT_signature_type)
7911         (decode_locdesc, file_file_name, consume_improper_spaces)
7912         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7913         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7914         (dwarf2_symbol_mark_computed, set_die_type)
7915         (read_attribute_value): Update.
7916         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7917         Update.
7918         * dbxread.c (unknown_symtype_complaint)
7919         (lbrac_mismatch_complaint, repeated_header_complaint)
7920         (set_namestring, function_outside_compilation_unit_complaint)
7921         (read_dbx_symtab, process_one_symbol): Update.
7922         * gdbtypes.c (stub_noname_complaint): Update.
7923         * windows-nat.c (handle_unload_dll): Update.
7924         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7925         (decode_base_type): Update.
7926         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7927         (eb_complaint, record_include_begin, record_include_end)
7928         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7929         (process_xcoff_symbol, read_symbol)
7930         (function_outside_compilation_unit_complaint)
7931         (scan_xcoff_symtab): Update.
7932         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7933         * buildsym.c (finish_block_internal, make_blockvector)
7934         (end_symtab_get_static_block, augment_type_symtab): Update.
7935         * dtrace-probe.c (dtrace_process_dof)
7936         (dtrace_static_probe_ops::get_probes): Update.
7937         * complaints.h (struct complaint): Don't declare.
7938         (symfile_complaints): Remove.
7939         (complaint_internal): Remove "complaints" parameter.
7940         (complaint): Likewise.
7941         (clear_complaints): Likewise.
7942         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7943         (reread_symbols): Update.
7944         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7945         (dwarf2_frame_cache, decode_frame_entry): Update.
7946         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7947         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7948         (info_selectors_command): Update.
7949         * macrotab.c (macro_include, check_for_redefinition)
7950         (macro_undef): Update.
7951         * objfiles.c (filter_overlapping_sections): Update.
7952         * stabsread.c (invalid_cpp_abbrev_complaint)
7953         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7954         (define_symbol, error_type, read_type, rs6000_builtin_type)
7955         (stabs_method_name_from_physname, read_member_functions)
7956         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7957         (attach_fields_to_type, complain_about_struct_wipeout)
7958         (read_range_type, read_args, common_block_start)
7959         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7960         Update.
7961         * mdebugread.c (index_complaint, unknown_ext_complaint)
7962         (basic_type_complaint, bad_tag_guess_complaint)
7963         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7964         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7965         (parse_procedure, parse_lines)
7966         (function_outside_compilation_unit_complaint)
7967         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7968         (bad_tag_guess_complaint, reg_value_complaint): Update.
7969         * cp-support.c (demangled_name_complaint): Update.
7970         * macroscope.c (sal_macro_scope): Update.
7971         * dwarf-index-write.c (class debug_names): Update.
7972
7973 2018-05-23  Tom Tromey  <tom@tromey.com>
7974
7975         * complaints.c (clear_complaints): Remove "noisy" parameter.
7976         * complaints.h (clear_complaints): Update.
7977         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7978         (reread_symbols): Update.
7979
7980 2018-05-23  Tom Tromey  <tom@tromey.com>
7981
7982         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7983         SUBSEQUENT_MESSAGE.
7984         (vcomplaint, clear_complaints): Update.
7985         (symfile_explanations): Remove some messages.
7986
7987 2018-05-23  Tom Tromey  <tom@tromey.com>
7988
7989         * complaints.c (internal_complaint): Remove.
7990         * complaints.h (internal_complaint): Remove.
7991
7992 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7993
7994         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7995
7996 2018-05-22  Pedro Alves  <palves@redhat.com>
7997
7998         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7999         (remote_fileio_badfd, remote_fileio_return_errno)
8000         (remote_fileio_return_success, remote_fileio_func_open)
8001         (remote_fileio_func_open, remote_fileio_func_close)
8002         (remote_fileio_func_read, remote_fileio_func_write)
8003         (remote_fileio_func_lseek, remote_fileio_func_rename)
8004         (remote_fileio_func_unlink, remote_fileio_func_stat)
8005         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8006         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8007         remote_target parameter.
8008         (remote_fio_func_map) <func>: Add remote_target parameter.
8009         (do_remote_fileio_request, remote_fileio_request):
8010         * remote-fileio.h (remote_fileio_request):
8011         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8012         remote_target parameter.
8013         (remote_notif_process, handle_notification): Adjust to pass down
8014         the remote.
8015         (remote_notif_state_allocate): Add remote_target parameter.  Save
8016         it.
8017         * remote-notif.h (struct remote_target): Forward declare.
8018         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8019         remote_target parameter.
8020         (struct remote_notif_state) <remote>: New field.
8021         (remote_notif_ack, remote_notif_parse): Add remote_target
8022         parameter.
8023         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8024         remote_target parameter.
8025         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8026         (threads_listing_context, rmt_thread_action, protocol_feature)
8027         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8028         (packet_result, struct threads_listing_context, remote_state):
8029         Move definitions and declarations higher up.
8030         (remote_target) <~remote_target>: Declare.
8031         (remote_download_command_source, remote_file_put, remote_file_get)
8032         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8033         (remote_hostio_pread_vFile, remote_hostio_send_command)
8034         (remote_hostio_set_filesystem, remote_hostio_open)
8035         (remote_hostio_close, remote_hostio_unlink, remote_state)
8036         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8037         (get_memory_write_packet_size, get_memory_read_packet_size)
8038         (append_pending_thread_resumptions, remote_detach_1)
8039         (append_resumption, remote_resume_with_vcont)
8040         (add_current_inferior_and_thread, wait_ns, wait_as)
8041         (process_stop_reply, remote_notice_new_inferior)
8042         (process_initial_stop_replies, remote_add_thread)
8043         (btrace_sync_conf, remote_btrace_maybe_reopen)
8044         (remove_new_fork_children, kill_new_fork_children)
8045         (discard_pending_stop_replies, stop_reply_queue_length)
8046         (check_pending_events_prevent_wildcard_vcont)
8047         (discard_pending_stop_replies_in_queue, stop_reply)
8048         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8049         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8050         (remote_interrupt_as, remote_interrupt_ns)
8051         (remote_get_noisy_reply, remote_query_attached)
8052         (remote_add_inferior, remote_current_thread, get_current_thread)
8053         (set_thread, set_general_thread, set_continue_thread)
8054         (set_general_process, write_ptid)
8055         (remote_unpack_thread_info_response, remote_get_threadinfo)
8056         (parse_threadlist_response, remote_get_threadlist)
8057         (remote_threadlist_iterator, remote_get_threads_with_ql)
8058         (remote_get_threads_with_qxfer)
8059         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8060         (get_offsets, remote_check_symbols, remote_supported_packet)
8061         (remote_query_supported, remote_packet_size)
8062         (remote_serial_quit_handler, remote_detach_pid)
8063         (remote_vcont_probe, remote_resume_with_hc)
8064         (send_interrupt_sequence, interrupt_query)
8065         (remote_notif_get_pending_events, fetch_register_using_p)
8066         (send_g_packet, process_g_packet, fetch_registers_using_g)
8067         (store_register_using_P, store_registers_using_G)
8068         (set_remote_traceframe, check_binary_download)
8069         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8070         (remote_xfer_live_readonly_partial, remote_read_bytes)
8071         (remote_send_printf, remote_flash_write, readchar)
8072         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8073         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8074         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8075         (extended_remote_disable_randomization, extended_remote_run)
8076         (send_environment_packet, extended_remote_environment_support)
8077         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8078         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8079         (packet_command): Now methods of ...
8080         (remote_target): ... this class.
8081         (m_remote_state) <remote_target>: New field.
8082         (struct remote_state) <stop_reply_queue,
8083         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8084         fields.
8085         (remote_state::remote_state): Allocate stop_reply_queue.
8086         (remote_state): Delete global.
8087         (get_remote_state_raw): Delete.
8088         (remote_target::get_remote_state): Allocate m_remote_state on
8089         demand.
8090         (get_current_remote_target): New.
8091         (remote_ops, extended_remote_ops): Delete.
8092         (wait_forever_enabled_p, remote_async_inferior_event_token):
8093         Delete, moved to struct remote_state.
8094         (remote_target::close): Delete self.  Destruction bits split to
8095         ...
8096         (remote_target::~remote_target): ... this.
8097         (show_memory_packet_size): Adjust to use
8098         get_current_remote_target.
8099         (struct protocol_feature) <func>: Add remote_target parameter.
8100         All callers adjusted.
8101         (curr_quit_handler_target): New.
8102         (remote_serial_quit_handler): Reimplement.
8103         (remote_target::open_1): Adjust to use get_current_remote_target.
8104         Heap-allocate remote_target/extended_remote_target instances.
8105         (vcont_builder::vcont_builder): Add remote_target parameter, and
8106         save it in m_remote.  All callers adjusted.
8107         (vcont_builder::m_remote): New field.
8108         (vcont_builder::restart, vcont_builder::flush)
8109         (vcont_builder::push_action): Use it.
8110         (remote_target::commit_resume): Use it.
8111         (struct queue_iter_param) <remote>: New field.
8112         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8113         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8114         (check_pending_event_prevents_wildcard_vcont_callback)
8115         (remote_target::check_pending_events_prevent_wildcard_vcont)
8116         (remote_target::discard_pending_stop_replies)
8117         (remote_target::discard_pending_stop_replies_in_queue)
8118         (remote_target::remote_notif_remove_queued_reply): Fill in
8119         'remote' field.
8120         (remote_notif_get_pending_events): New.
8121         (remote_target::readchar, remote_target::remote_serial_write):
8122         Save/restore curr_quit_handler_target.
8123         (putpkt): New.
8124         (kill_new_fork_children): Fill in 'remote' field.
8125         (packet_command): Use get_current_remote_target, defer to
8126         remote_target method of same name.
8127         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8128         parameter, and save it in m_remote.  All callers adjusted.
8129         (scoped_remote_fd::release): Use m_remote.
8130         (scoped_remote_fd::m_remote): New field.
8131         (remote_file_put, remote_file_get, remote_file_delete): Use
8132         get_current_remote_target, defer to remote_target method of same
8133         name.
8134         (remote_btrace_reset): Add remote_state paremeter.  Update all
8135         callers.
8136         (remote_async_inferior_event_handler). Pass down 'data'.
8137         (remote_new_objfile): Use get_current_remote_target.
8138         (remote_target::vcont_r_supported): New.
8139         (set_range_stepping): Use get_current_remote_target and
8140         remote_target::vcont_r_supported.
8141         (_initialize_remote): Don't allocate 'remote_state' and
8142         'stop_reply_queue' globals.
8143         * remote.h (struct remote_target): Forward declare.
8144         (getpkt, putpkt, remote_notif_get_pending_events): Add
8145         'remote_target' parameter.
8146
8147 2018-05-22  Pedro Alves  <palves@redhat.com>
8148
8149         * remote.c (vcont_builder): Now a class.  Make all data members
8150         private.
8151         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8152         Declare methods.
8153         (vcont_builder_restart): Rename to ...
8154         (vcont_builder::restart): ... this.
8155         (vcont_builder_flush): Rename to ...
8156         (vcont_builder::flush): ... this.
8157         (vcont_builder_push_action): Rename to ...
8158         (vcont_builder::push_action): ... this.
8159         (remote_target::commit_resume): Adjust.
8160
8161 2018-05-22  Pedro Alves  <palves@redhat.com>
8162
8163         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8164         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8165         (get_fixed_memory_packet_size): New.
8166         (get_memory_packet_size): Use it.
8167         (set_memory_packet_size): Don't override the config size with
8168         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8169         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8170         Don't refer to get_memory_packet_size if not connected to a remote
8171         target.  Show "(default)" if configured size is 0.
8172
8173 2018-05-22  Pedro Alves  <palves@redhat.com>
8174
8175         * remote.c (remote_target::mourn_inferior): Move
8176         discard_pending_stop_replies call here from ...
8177         (_initialize_remote): ... here.
8178
8179 2018-05-22  Pedro Alves  <palves@redhat.com>
8180
8181         * remote.c (compare_section_command): Remove set_general_process
8182         call.
8183
8184 2018-05-22  Pedro Alves  <palves@redhat.com>
8185
8186         * remote.c (struct packet_reg, struct remote_arch_state):
8187         Move higher up in the file.
8188         (remote_state) <m_arch_states>: Store remote_arch_state values
8189         instead of remote_arch_state pointers.
8190         (remote_state::get_remote_arch_state): Adjust.
8191
8192 2018-05-22  Pedro Alves  <palves@redhat.com>
8193
8194         * remote.c: Include <unordered_map>.
8195         (remote_state): Now a class.
8196         (remote_state) <get_remote_arch_state>: Declare method.
8197         <get_remote_arch_state>: New field.
8198         (remote_arch_state) <remote_arch_state>: Declare ctor.
8199         <regs>: Now a unique_ptr.
8200         (remote_gdbarch_data_handle): Delete.
8201         (get_remote_arch_state): Delete.
8202         (remote_state::get_remote_arch_state): New.
8203         (get_remote_state): Adjust to call remote_state's
8204         get_remote_arch_state method.
8205         (init_remote_state): Delete, bits factored out to ...
8206         (remote_arch_state::remote_arch_state): ... this new method.
8207         (get_remote_packet_size, get_memory_packet_size)
8208         (process_g_packet, remote_target::fetch_registers)
8209         (remote_target::prepare_to_store, store_registers_using_G)
8210         (remote_target::store_registers, remote_target::get_trace_status):
8211         Adjust to call remote_state's method.
8212         (_initialize_remote): Remove reference to
8213         remote_gdbarch_data_handle.
8214
8215 2018-05-22  Pedro Alves  <palves@redhat.com>
8216
8217         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8218         pread>: New method declarations.
8219         (remote_target::open_1): Adjust.
8220         (readahead_cache_invalidate): Rename to ...
8221         (readahead_cache::invalidate): ... this, and adjust to be a class
8222         method.
8223         (readahead_cache_invalidate_fd): Rename to ...
8224         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8225         class method.
8226         (remote_hostio_pwrite): Adjust.
8227         (remote_hostio_pread_from_cache): Rename to ...
8228         (readahead_cache::pread): ... this, and adjust to be a class
8229         method.
8230         (remote_hostio_close): Adjust.
8231
8232 2018-05-22  Pedro Alves  <palves@redhat.com>
8233
8234         * remote.c (remote_hostio_close_cleanup): Delete.
8235         (class scoped_remote_fd): New.
8236         (remote_file_put, remote_file_get): Use it.
8237
8238 2018-05-22  Pedro Alves  <palves@redhat.com>
8239
8240         (struct vCont_action_support): Use bool and initialize all fields.
8241         (struct readahead_cache): Initialize all fields.
8242         (remote_state): Use bool and initialize all fields.
8243         (remote_state::remote_state, remote_state::~remote_state): New.
8244         (new_remote_state): Delete.
8245         (_initialize_remote): Use new to allocate remote_state.
8246
8247 2018-05-22  Pedro Alves  <palves@redhat.com>
8248             張俊芝  <zjz@zjz.name>
8249
8250         PR gdb/22973
8251         * c-exp.y: Include "c-support.h".
8252         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8253         of tolower.  Use c_ident_is_alpha to scan names.
8254         * c-lang.c: Include "c-support.h".
8255         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8256         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8257         * c-support.h: New file, with bits factored out from ...
8258         * cp-name-parser.y: ... this file.
8259         Include "c-support.h".
8260         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8261         c-support.h and renamed.
8262         (symbol_end, yylex): Adjust.
8263
8264 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8265
8266         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8267         parameter type to CORE_ADDR.
8268         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8269         parameter type in declaration to CORE_ADDR.
8270         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8271         target_auxv_search to get AT_HWCAP and use the result to get the
8272         target description.
8273         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8274         to CORE_ADDR. Remove the cast of the return value to unsigned
8275         long. Fix error predicate of target_auxv_search.
8276         (ppc_linux_nat_target::read_description): Change the type of the
8277         hwcap variable to CORE_ADDR.
8278
8279 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8280
8281         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8282         if the size of fpscr is larger than 32 bits.
8283
8284 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8285
8286         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8287         (ppc32_linux_vsxregmap): New global.
8288         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8289         regcache_supply_regset, and regcache_collect_regset.
8290         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8291         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8292         (fetch_vsx_register, store_vsx_register): Remove.
8293         (fetch_vsx_registers): Add regno parameter. Get regset using
8294         ppc_linux_vsxregset. Use regset to supply registers.
8295         (store_vsx_registers): Add regno parameter. Get regset using
8296         ppc_linux_vsxregset. Use regset to collect registers.
8297         (fetch_register): Call fetch_vsx_registers instead of
8298         fetch_vsx_register.
8299         (store_register): Call store_vsx_registers instead of
8300         store_vsx_register.
8301         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8302         new regno parameter.
8303         (store_ppc_registers): Call store_vsx_registers with -1 for the
8304         new regno parameter.
8305         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8306         (ppc_collect_vsxregset): Remove.
8307
8308 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8309
8310         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8311         offset fields.
8312         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8313         for vector register offset fields.
8314         (ppc64_fbsd_reg_offsets): Likewise.
8315         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8316         to vector register offset fields.
8317         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8318         to vector register offset fields.
8319         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8320         vector register offset fields.
8321         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8322         initializers for vector register offset fields.
8323         (rs6000_aix64_reg_offsets): Likewise.
8324         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8325         (ppc_supply_vrregset): Remove.
8326         (ppc_collect_vrregset): Remove.
8327         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8328         (ppc_linux_vrregset) : New function.
8329         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8330         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8331         (ppc32_linux_vrregset): Remove.
8332         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8333         and use result instead of ppc32_linux_vrregset.
8334         (ppc32_linux_reg_offsets): Remove initializers for vector register
8335         offset fields.
8336         (ppc64_linux_reg_offsets): Likewise.
8337         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8338         * ppc-linux-nat.c: Include regset.h.
8339         (gdb_vrregset_t): Adjust comment to account for little-endian
8340         mode.
8341         (supply_vrregset, fill_vrregset): Remove.
8342         (fetch_altivec_register, store_altivec_register): Remove.
8343         (fetch_altivec_registers): Add regno parameter. Get regset using
8344         ppc_linux_vrregset. Use regset to supply registers.
8345         (store_altivec_registers): Add regno parameter. Get regset using
8346         ppc_linux_vrregset. Use regset to collect registers.
8347         (fetch_register): Call fetch_altivec_registers instead of
8348         fetch_altivec_register.
8349         (store_register): Call store_altivec_registers instead of
8350         store_altivec_register.
8351         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8352         the new regno parameter.
8353         (store_ppc_registers): Call store_altivec_registers with -1 for
8354         the new regno parameter.
8355
8356 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8357
8358         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8359         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8360         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8361         (gdb_vrregset_t): Change array type size to
8362         PPC_LINUX_SIZEOF_VRREGSET.
8363         (gdb_vsxregset_t): Change array type size to
8364         PPC_LINUX_SIZEOF_VSXREGSET.
8365         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8366         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8367         PPC_LINUX_SIZEOF_VSXREGSET.
8368
8369 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8370
8371         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8372         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8373         nat/ppc-linux.c.
8374         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8375         ppc_linux_target_wordsize with tid.
8376         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8377         wordsize with tid.
8378         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8379         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8380         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8381         tid parameter. Remove static specifier.
8382         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8383         (ppc_linux_target_wordsize): New declaration.
8384
8385 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8386
8387         * arch/ppc-linux-common.c: New file.
8388         * arch/ppc-linux-common.h: New file.
8389         * arch/ppc-linux-tdesc.h: New file.
8390         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8391         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8392         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8393         arch/ppc-linux-tdesc.h.
8394         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8395         arch/ppc-linux-tdesc.h.
8396         (ppc_linux_nat_target::read_description): Remove target
8397         description matching code. Fill a ppc_linux_features struct and
8398         call ppc_linux_match_description with it. Move comment about ISA
8399         2.05 to ppc-linux-common.c.
8400         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8401         arch/ppc-linux-tdesc.h.
8402         (ppc_linux_core_read_description): Remove target description
8403         matching code. Fill a ppc_linux_features struct and call
8404         ppc_linux_match_description with it.
8405         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8406         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8407         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8408         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8409         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8410         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8411         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8412         (tdesc_powerpc_e500l): Remove.
8413
8414 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8415
8416         * ada-lang.c (catch_assert_command): Pass empty string instead
8417         of NULL for excep_string argument.
8418
8419 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8420
8421         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8422         the width of the requested register exceeds the width of the
8423         `ptrace' data type.
8424
8425 2018-05-21  Tom Tromey  <tom@tromey.com>
8426
8427         * printcmd.c (output_command): Remove.
8428         (output_command_const): Rename to output_command.
8429         * valprint.h (output_command): Rename from output_command_const.
8430         * tracepoint.c (trace_dump_actions): Call output_command.
8431
8432 2018-05-21  Tom Tromey  <tom@tromey.com>
8433
8434         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8435         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8436         * ada-lang.h (create_ada_exception_catchpoint): Update.
8437         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8438         std::string.
8439         (create_excep_cond_exprs, ~ada_catchpoint)
8440         (should_stop_exception, print_one_exception)
8441         (print_mention_exception, print_recreate_exception): Update.
8442         (ada_get_next_arg): Remove.
8443         (catch_ada_exception_command_split): Use std::string.  Change type
8444         of "excep_string", "cond_string".
8445         (catch_ada_exception_command): Update.
8446         (create_ada_exception_catchpoint): Change type of excep_string.
8447         (ada_exception_sal): Remove excep_string parameter.
8448         (~ada_catchpoint): Remove.
8449
8450 2018-05-21  Tom Tromey  <tom@tromey.com>
8451
8452         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8453         cleanup.
8454
8455 2018-05-21  Tom Tromey  <tom@tromey.com>
8456
8457         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8458         Return unique_xmalloc_ptr.
8459         (print_it_exception): Update.
8460
8461 2018-05-21  Tom Tromey  <tom@tromey.com>
8462
8463         * tracepoint.c (trace_dump_actions): Use std::string.
8464
8465 2018-05-21  Tom Tromey  <tom@tromey.com>
8466
8467         * symfile.c (reread_symbols): Use std::string for original_name.
8468
8469 2018-05-21  Tom Tromey  <tom@tromey.com>
8470
8471         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8472         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8473         constructor.
8474
8475 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8476
8477         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8478         instance to...
8479         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8480         * objfiles.c (get_objfile_bfd_data): Allocate
8481         objfile_per_bfd_storage with obstack_new when allocating on
8482         obstack.
8483
8484 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8485
8486         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8487         OBSTACK_ZALLOC.
8488         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8489         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8490         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8491         (add_pending): Likewise.
8492         (parse_symbol): Likewise.
8493         (parse_partial_symbols): Likewise.
8494         (psymtab_to_symtab_1): Likewise.
8495         (new_psymtab): Likewise.
8496         (elfmdebug_build_psymtabs): Likewise.
8497         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8498         * objfiles.c (get_objfile_bfd_data): Likewise.
8499         (objfile_register_static_link): Likewise.
8500         * psymtab.c (allocate_psymtab): Likewise.
8501         * stabsread.c (read_member_functions): Likewise.
8502         * xcoffread.c (xcoff_end_psymtab): Likewise.
8503
8504 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8505
8506         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8507         compiler supports std::is_trivially_constructible.
8508         * common/poison.h: Include obstack.h.
8509         (IsMallocable): Define to is_trivially_constructible if the
8510         compiler supports it, define to true_type otherwise.
8511         (xobnew): New.
8512         (XOBNEW): Redefine.
8513         (xobnewvec): New.
8514         (XOBNEWVEC): Redefine.
8515         * gdb_obstack.h (obstack_zalloc): New.
8516         (OBSTACK_ZALLOC): Redefine.
8517         (obstack_calloc): New.
8518         (OBSTACK_CALLOC): Redefine.
8519         (obstack_new): New.
8520         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8521         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8522         gdbarch.c.
8523         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8524         obstack_calloc/obstack_zalloc.
8525         (gdbarch_obstack_zalloc): Remove.
8526         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8527
8528 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8529
8530         * stack.c (backtrace_command_1): Remove useless variable int i.
8531
8532 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8533
8534         * stack.c (print_frame_info): Fix comment.
8535
8536 2018-05-18  Tom Tromey  <tom@tromey.com>
8537
8538         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8539         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8540         (~dwarf2_per_objfile): Update
8541         (dwarf2_get_dwz_file): Use new.
8542         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8543         unique_ptr.
8544
8545 2018-05-18  Tom Tromey  <tom@tromey.com>
8546
8547         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8548         unique_ptr.
8549         * dwarf2read.c (struct dwp_file): Add constructor and
8550         initializers.
8551         (open_and_init_dwp_file): Return a unique_ptr.
8552         (dwarf2_per_objfile, create_dwp_hash_table)
8553         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8554         (lookup_dwo_unit_in_dwp): Update.
8555         (open_and_init_dwp_file, get_dwp_file): Update.
8556
8557 2018-05-18  Tom Tromey  <tom@tromey.com>
8558
8559         * dwarf2read.c (dwarf2_per_objfile): Update.
8560         (struct mapped_index): Add initializers.
8561         (dwarf2_read_index): Use new.
8562         (dw2_symtab_iter_init): Update.
8563         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8564         unique_ptr.
8565
8566 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8567
8568         * dwarf2read.c (mapped_index) <total_size>: Remove.
8569
8570 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8571
8572         * unittests/format_pieces-selftests.c (test_format_specifier):
8573         Add ARI comments.
8574
8575 2018-05-18  Tom Tromey  <tom@tromey.com>
8576
8577         * c-typeprint.c (maybe_print_hole): New function.
8578         (c_print_type_struct_field_offset): Update.
8579         (c_type_print_base_struct_union): Call maybe_print_hole.
8580
8581 2018-05-17  Keith Seitz  <keiths@redhat.com>
8582
8583         * breakpoint.c (build_bpstat_chain): New function, moved from
8584         bpstat_stop_status.
8585         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8586         If no stop chain is passed, call build_bpstat_chain to build it.
8587         * breakpoint.h (build_bpstat_chain): Declare.
8588         (bpstat_stop_status): Move documentation here from breakpoint.c.
8589         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8590         build the stop chain and pass it to skip_inline_frames.
8591         Pass this stop chain to bpstat_stop_status.
8592         * inline-frame.c: Include breakpoint.h.
8593         (stopped_by_user_bp_inline_frame): New function.
8594         (skip_inline_frames): Add parameter `stop_chain'.
8595         Move documention to inline-frame.h.
8596         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8597         whether the frame should be elided.
8598         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8599         Add moved documentation and update for new parameter.
8600
8601 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8602
8603         PR cli/14975
8604         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8605         unittests/format_pieces-selftests.c.
8606         * common/format.h (format_piece) <operator==>: New.
8607         (format_pieces) <operator[]>: Remove.
8608         * common/format.c (format_pieces::format_pieces): Handle \e.
8609         * unittests/format_pieces-selftests.c: New.
8610
8611 2018-05-17  Tom Tromey  <tom@tromey.com>
8612
8613         PR symtab/23010:
8614         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8615         (dw2_instantiate_symtab): Add skip_partial parameter.
8616         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8617         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8618         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8619         (dw2_expand_symtabs_matching_one)
8620         (dw2_find_pc_sect_compunit_symtab)
8621         (dw2_debug_names_lookup_symbol)
8622         (dw2_debug_names_expand_symtabs_for_function): Update.
8623         (init_cutu_and_read_dies): Add skip_partial parameter.
8624         (process_psymtab_comp_unit, build_type_psymtabs_1)
8625         (process_skeletonless_type_unit, load_partial_comp_unit)
8626         (psymtab_to_symtab_1): Update.
8627         (load_full_comp_unit): Add skip_partial parameter.
8628         (process_imported_unit_die, dwarf2_read_addr_index)
8629         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8630         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8631         (read_signatured_type): Update.
8632
8633 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8634
8635         * value.c (release_value): Remove unused variable.
8636         (record_latest_value): Likewise.
8637         (access_value_history): Likewise.
8638         (preserve_values): Likewise.
8639
8640 2018-05-17  Tom Tromey  <tom@tromey.com>
8641
8642         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8643         Initialize.
8644
8645 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8646
8647         PR gdb/22286
8648         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8649         Also handle registers whose width is not a multiple of
8650         PTRACE_TYPE_RET.
8651         (linux_nat_trad_target::store_register): Likewise.
8652
8653 2018-05-16  Tom Tromey  <tom@tromey.com>
8654
8655         * gdbcore.h (core_bfd): Redefine.
8656         * corelow.c (core_target::close): Update.
8657         (core_target_open): Update.
8658         * progspace.h (struct program_space) <cbfd>: Now a
8659         gdb_bfd_ref_ptr.
8660
8661 2018-05-16  Tom Tromey  <tom@tromey.com>
8662
8663         PR cli/19551:
8664         * symfile-add-flags.h (enum symfile_add_flags)
8665         <SYMFILE_NOT_FILENAME>: New constant.
8666         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8667         objfile name from BFD.
8668         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8669         * minidebug.c (find_separate_debug_file_in_section): Put
8670         ".gnu_debugdata" into BFD's file name.
8671
8672 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8673
8674         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8675         Remove.
8676
8677 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8678
8679         PR binutils/21446
8680         * aarch64-tdep.c (aarch64_analyze_prologue,
8681         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8682         Indicate not interested in errors.
8683
8684 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8685
8686         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8687         Supply the MIPS_ZERO_REGNUM register.
8688
8689 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8690
8691         * mips-tdep.c (mask_address_var): Make variable static.
8692
8693 2018-05-14  Tom Tromey  <tom@tromey.com>
8694
8695         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8696
8697 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8698
8699         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8700         FXSAVE_ADDR for the mxcsr register.
8701
8702 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8703
8704         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8705
8706 2018-05-11  Pedro Alves  <palves@redhat.com>
8707
8708         * corelow.c (core_target) <core_target>: No longer inline.
8709         Initialize m_core_gdbarch, m_core_vec and build the section table
8710         here.
8711         <~core_target>: New.
8712         <core_gdbarch, get_core_register_section>: New methods.
8713         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8714         factored out from ...
8715         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8716         (core_ops): Delete.
8717         (sniff_core_bfd): Add gdbarch parameter.
8718         (core_close): Delete, merged into ...
8719         (core_target::close): ... here.  Delete self.
8720         (core_close_cleanup): Delete.
8721         (core_target_open): Allocate a core_target on the heap.  Use a
8722         unique_ptr instead of a cleanup.  Bits moved into the core_target
8723         ctor.  Adjust to use core_target methods instead of globals.
8724         (get_core_register_section): Rename to ...
8725         (core_target::get_core_register_section): ... this and adjust.
8726         (struct get_core_registers_cb_data): New.
8727         (get_core_registers_cb): Use it.  Use bool.
8728         (core_target::fetch_registers, core_target::files_info)
8729         (core_target::xfer_partial, core_target::read_description)
8730         (core_target::pid_to, core_target::thread_name): Adjust to
8731         reference class fields instead of globals.
8732         * target.h (struct target_ops_deleter, target_ops_up): New.
8733
8734 2018-05-11  Pedro Alves  <palves@redhat.com>
8735
8736         * corefile.c (core_file_command): Move to corelow.c.
8737         * corelow.c (the_core_target): Delete.
8738         (core_file_command): Moved from corefile.c.  Check exec_bfd
8739         instead of the_core_target.  Use target_detach instead of calling
8740         into the_core_target directly.
8741         (maybe_say_no_core_file_now): New.
8742         (core_target::detach): Use it.
8743         (_initialize_corelow): Remove references to the_core_target.
8744         * gdbcore.h (the_core_target): Delete.
8745
8746 2018-05-11  Tom Tromey  <tromey@redhat.com>
8747             Pedro Alves  <palves@redhat.com>
8748
8749         * corefile.c (core_bfd): Remove.
8750         * gdbcore.h (core_bfd): Now a macro.
8751         * progspace.h (struct program_space) <cbfd>: New field.
8752
8753 2018-05-11  Tom Tromey  <tom@tromey.com>
8754
8755         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8756         gdb::def_vector.
8757
8758 2018-05-10  Tom Tromey  <tom@tromey.com>
8759
8760         * configure: Rebuild.
8761         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8762
8763 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8764
8765         PR server/23158:
8766         * regformats/regdat.sh: Adjust script, following the addition
8767         of the new expedite_regs parameter to init_target_desc.
8768
8769 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8770     
8771         PR gdb/23127
8772         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8773         set_gdbarch_significant_addr_bit.
8774         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8775         set_gdbarch_significant_addr_bit.
8776         * utils.c (address_significant): Update to sign extend addr.
8777
8778 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8779
8780         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8781         (xtensa_linux_init_abi): Limit tdep->num_regs by
8782         tdep->num_nopriv_regs.
8783         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8784         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8785         not initialized.
8786
8787 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8788
8789         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8790
8791 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8792
8793         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8794         (I387_MXCSR_INIT_VAL): New constant.
8795         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8796         buffer if it was supplied by the inferior.
8797         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8798         (i387_xsave_get_clear_bv): New function.
8799         (i387_supply_xsave): Only read x87 control registers from the
8800         xsave buffer if the feature is enabled, and the state will have
8801         been written, otherwise, provide a suitable default.
8802         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8803         including x87 control registers.  Update control registers if they
8804         have changed from the default value, and mark features as enabled
8805         as required.
8806         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8807
8808 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8809
8810         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8811
8812 2018-05-07  Tom Tromey  <tom@tromey.com>
8813
8814         * configure: Rebuild.
8815         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8816
8817 2018-05-07  Tom Tromey  <tom@tromey.com>
8818
8819         PR tdep/20362:
8820         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8821         bit.  Use correct value for VDIV.
8822
8823 2018-05-04  Tom Tromey  <tom@tromey.com>
8824
8825         * configure: Rebuild.
8826         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8827
8828 2018-05-04  Tom Tromey  <tom@tromey.com>
8829
8830         * linux-record.c (record_linux_system_call) <case
8831         RECORD_SYS_RECVFROM>: Add "break".
8832
8833 2018-05-04  Tom Tromey  <tom@tromey.com>
8834
8835         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8836         Add missing "break".
8837         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8838         Add missing "break".
8839
8840 2018-05-04  Tom Tromey  <tom@tromey.com>
8841
8842         * rs6000-tdep.c (ppc_process_record_op4)
8843         (ppc_process_record_op63): Add fall-through comment.
8844
8845 2018-05-04  Tom Tromey  <tom@tromey.com>
8846
8847         * i386-tdep.c (i386_process_record): Add fall-through comment.
8848
8849 2018-05-04  Tom Tromey  <tom@tromey.com>
8850
8851         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8852         comment.
8853
8854 2018-05-04  Tom Tromey  <tom@tromey.com>
8855
8856         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8857         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8858         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8859         comment.
8860         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8861         comment.
8862         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8863         comment.
8864
8865 2018-05-04  Tom Tromey  <tom@tromey.com>
8866
8867         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8868
8869 2018-05-04  Tom Tromey  <tom@tromey.com>
8870
8871         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8872         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8873         * symfile.c (section_is_mapped): Fix fall-through comment.
8874         * stabsread.c (define_symbol, read_member_functions): Fix
8875         fall-through comment.
8876         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8877         comment.
8878         * remote.c (remote_wait_as): Fix fall-through comment.
8879         * p-exp.y (yylex): Fix fall-through comment.
8880         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8881         comment.
8882         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8883         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8884         * jv-exp.y (yylex): Fix fall-through comment.
8885         * go-exp.y (lex_one_token): Fix fall-through comment.
8886         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8887         fall-through comment.
8888         * f-exp.y (yylex): Fix fall-through comment.
8889         * dwarf2read.c (process_die): Fix fall-through comments.
8890         * dbxread.c (process_one_symbol): Fix fall-through comment.
8891         * d-exp.y (lex_one_token): Fix fall-through comment.
8892         * cp-name-parser.y (yylex): Fix fall-through comment.
8893         * coffread.c (coff_symtab_read): Fix fall-through comment.
8894         * c-exp.y (lex_one_token): Fix fall-through comment.
8895         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8896         comment.
8897         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8898         comment.
8899
8900 2018-05-04  Tom Tromey  <tom@tromey.com>
8901
8902         PR python/22730:
8903         * NEWS: Mention gdb.execute change.
8904         * gdbcmd.h (execute_control_command): Don't declare.
8905         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8906         execute_control_commands, execute_control_commands_to_string.
8907         * cli/cli-script.h (execute_control_commands)
8908         (execute_control_commands_to_string): Declare.
8909         (execute_control_command): Add from_tty parameter.
8910         * cli/cli-script.c (execute_control_commands)
8911         (execute_control_commands_to_string): New functions.
8912         (execute_user_command): Use execute_control_commands.
8913         (execute_control_command_1): Add "from_tty" parameter.  Update.
8914         (execute_control_command): Likewise.
8915
8916 2018-05-04  Tom Tromey  <tom@tromey.com>
8917
8918         PR python/22731:
8919         * NEWS: Mention that breakpoint commands are writable.
8920         * python/py-breakpoint.c (bppy_set_commands): New function.
8921         (breakpoint_object_getset) <"commands">: Use it.
8922
8923 2018-05-04  Tom Tromey  <tom@tromey.com>
8924
8925         * tracepoint.c (actions_command): Update.
8926         * mi/mi-cmd-break.c (mi_command_line_array)
8927         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8928         (mi_read_next_line): Remove.
8929         (mi_cmd_break_commands): Update.
8930         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8931         function_view.
8932         * cli/cli-script.c (get_command_line): Update.
8933         (process_next_line): Use function_view.  Constify.
8934         (recurse_read_control_structure, read_command_lines)
8935         (read_command_lines_1): Change argument types to function_view.
8936         (do_define_command, document_command): Update.
8937         * breakpoint.h (check_tracepoint_command): Don't declare.
8938         * breakpoint.c (check_tracepoint_command): Remove.
8939         (commands_command_1, create_tracepoint_from_upload): Update.
8940
8941 2018-05-04  Tom Tromey  <tom@tromey.com>
8942
8943         PR gdb/11750:
8944         * cli/cli-script.h (enum command_control_type) <define_control>:
8945         New constant.
8946         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8947         (build_command_line, execute_control_command_1)
8948         (process_next_line): Likewise.
8949         (do_define_command): New function, extracted from define_command.
8950         (define_command): Use it.
8951
8952 2018-05-04  Tom Tromey  <tom@tromey.com>
8953
8954         * tracepoint.c (actions_command): Update.
8955         * cli/cli-script.h (read_command_lines): Update.
8956         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8957         (MAX_TMPBUF): Remove define.
8958         (define_command): Use string_printf.
8959         (document_command): Likewise.
8960         * breakpoint.c (commands_command_1): Update.
8961
8962 2018-05-04  Tom Tromey  <tom@tromey.com>
8963
8964         * top.c (execute_command): Update.
8965         * cli/cli-script.h (print_command_lines): Now varargs.
8966         * cli/cli-script.c (print_command_lines): Now varargs.
8967         (execute_control_command_1) <case while_control, case if_control>:
8968         Update.
8969
8970 2018-05-04  Tom Tromey  <tom@tromey.com>
8971
8972         * tracepoint.c (all_tracepoint_actions): Rename from
8973         all_tracepoint_actions_and_cleanup.  Change return type.
8974         (actions_command, encode_actions_1, encode_actions)
8975         (trace_dump_actions, tdump_command): Update.
8976         * remote.c (remote_download_command_source): Update.
8977         * python/python.c (gdbpy_eval_from_control_command)
8978         (python_command, python_interactive_command): Update.
8979         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8980         * guile/guile.c (guile_command)
8981         (gdbscm_eval_from_control_command, guile_command): Update.
8982         * compile/compile.c (compile_code_command)
8983         (compile_print_command, compile_to_object): Update.
8984         * cli/cli-script.h (struct command_lines_deleter): New.
8985         (counted_command_line): New typedef.
8986         (struct command_line): Add constructor, destructor.
8987         <body_list>: Remove.
8988         <body_list_0, body_list_1>: New members.
8989         (command_line_up): Remove typedef.
8990         (read_command_lines, read_command_lines_1, get_command_line):
8991         Update.
8992         (copy_command_lines): Don't declare.
8993         * cli/cli-script.c (build_command_line): Use "new".
8994         (get_command_line): Return counted_command_line.
8995         (print_command_lines, execute_user_command)
8996         (execute_control_command_1, while_command, if_command): Update.
8997         (realloc_body_list): Remove.
8998         (process_next_line, recurse_read_control_structure): Update.
8999         (read_command_lines, read_command_lines_1): Return counted_command_line.
9000         (free_command_lines): Use "delete".
9001         (copy_command_lines): Remove.
9002         (define_command, document_command, show_user_1): Update.
9003         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9004         a counted_command_line.
9005         * breakpoint.h (counted_command_line): Remove typedef.
9006         (breakpoint_set_commands): Update.
9007         * breakpoint.c (check_no_tracepoint_commands)
9008         (validate_commands_for_breakpoint): Update.
9009         (breakpoint_set_commands): Change commands to be a
9010         counted_command_line.
9011         (commands_command_1, update_dprintf_command_list)
9012         (create_tracepoint_from_upload): Update.
9013
9014 2018-05-04  Tom Tromey  <tom@tromey.com>
9015
9016         * cli/cli-decode.h (cmd_list_element): New constructor.
9017         (~cmd_list_element): New destructor.
9018         (struct cmd_list_element): Add initializers.
9019         * cli/cli-decode.c (do_add_cmd): Use "new".
9020         (delete_cmd): Use "delete".
9021
9022 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9023             Pedro Alves <palves@redhat.com>
9024
9025         PR breakpoints/19806 and support for PR external/20207.
9026         * NEWS: Mention Aarch64 watchpoint improvements.
9027         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9028         watchpoints and PR external/20207 watchpoints.
9029         * nat/aarch64-linux-hw-point.c
9030         (kernel_supports_any_contiguous_range): New.
9031         (aarch64_watchpoint_offset): New.
9032         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9033         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9034         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9035         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9036         next_addr_orig_p.  Support PR external/20207 watchpoints.
9037         (aarch64_downgrade_regs): New.
9038         (aarch64_dr_state_insert_one_point): New parameters offset and
9039         addr_orig.
9040         (aarch64_dr_state_remove_one_point): Likewise.
9041         (aarch64_handle_breakpoint): Update caller.
9042         (aarch64_handle_aligned_watchpoint): Likewise.
9043         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9044         aligned_offset.
9045         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9046         aarch64_downgrade_regs.
9047         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9048         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9049         (DR_CONTROL_MASK): ... this.
9050         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9051         (unsigned int aarch64_watchpoint_offset): New prototype.
9052         (aarch64_linux_set_debug_regs): Remove const from state.
9053         * utils.c (align_up, align_down): Move to ...
9054         * common/common-utils.c (align_up, align_down): ... here.
9055         * utils.h (align_up, align_down): Move to ...
9056         * common/common-utils.h (align_up, align_down): ... here.
9057
9058 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9059
9060         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9061         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9062         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9063         Re-implement to match the ABI as summarized in GCC's
9064         gcc/config/sparc/sparc.c.  All callers updated.
9065         (sparc32_store_arguments): Remove assertion.
9066
9067 2018-05-04  Tom Tromey  <tom@tromey.com>
9068
9069         * printcmd.c: Don't include tui.h.
9070         (decode_format): Use skip_spaces.
9071
9072 2018-05-04  Tom Tromey  <tom@tromey.com>
9073
9074         PR gdb/22619:
9075         * printcmd.c (last_count): New global.
9076         (x_command): Use saved count when repeating.
9077
9078 2018-05-04  Tom Tromey  <tom@tromey.com>
9079
9080         * nto-procfs.c (do_closedir_cleanup): Remove.
9081         (procfs_pidlist): Use gdb_dir_up.
9082         * procfs.c (do_closedir_cleanup): Remove.
9083         (proc_update_threads): Use gdb_dir_up.
9084         * common/filestuff.h (struct gdb_dir_deleter): New.
9085         (gdb_dir_up): New typedef.
9086
9087 2018-05-04  Tom Tromey  <tom@tromey.com>
9088
9089         * ada-lang.c (print_mention_exception): Use std::string.
9090
9091 2018-05-04  Tom Tromey  <tom@tromey.com>
9092
9093         * ada-lang.c (create_excep_cond_exprs): Update.
9094         (ada_exception_catchpoint_cond_string): Use std::string.
9095
9096 2018-05-04  Tom Tromey  <tom@tromey.com>
9097
9098         * ada-lang.c (xget_renaming_scope): Return std::string.
9099         (old_renaming_is_invisible): Update.
9100
9101 2018-05-04  Tom Tromey  <tom@tromey.com>
9102
9103         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9104         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9105
9106 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9107
9108         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9109
9110 2018-05-04  Tom Tromey  <tom@tromey.com>
9111
9112         * remote.c (remote_query_supported_append): Change type.
9113         (remote_check_symbols): Update.
9114
9115 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9116
9117         PR gdb/11420
9118         * configure.ac: Prepend libpython.
9119         * python/python-config.py: Likewise.
9120         * configure: Regenerate.
9121
9122 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9123
9124         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9125
9126 2018-05-03  Pedro Alves  <palves@redhat.com>
9127
9128         * s390-linux-nat.c
9129         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9130         override.  Write 'true' instead of '1'.
9131         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9132         declaration.
9133
9134 2018-05-02  Pedro Alves  <palves@redhat.com>
9135
9136         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9137         add_inf_child_target.
9138         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9139         add_inf_child_target.
9140         * aix-thread.c (aix_thread_target_info): New.
9141         (aix_thread_target) <shortname, longname, doc>: Delete.
9142         <info>: New.
9143         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9144         add_inf_child_target.
9145         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9146         add_inf_child_target.
9147         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9148         add_inf_child_target.
9149         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9150         add_inf_child_target.
9151         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9152         add_inf_child_target.
9153         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9154         add_inf_child_target.
9155         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9156         add_inf_child_target.
9157         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9158         add_inf_child_target.
9159         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9160         add_inf_child_target.
9161         * bfd-target.c (target_bfd_target_info): New.
9162         (target_bfd) <shortname, longname, doc>: Delete.
9163         <info>: New.
9164         * bsd-kvm.c (bsd_kvm_target_info): New.
9165         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9166         <info>: New.
9167         (bsd_kvm_target::open): Rename to ...
9168         (bsd_kvm_target_open): ... this.  Adjust.
9169         * bsd-uthread.c (bsd_uthread_target_info): New.
9170         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9171         <info>: New.
9172         * corefile.c (core_file_command): Adjust.
9173         * corelow.c (core_target_info): New.
9174         (core_target) <shortname, longname, doc>: Delete.
9175         <info>: New.
9176         (core_target::open): Rename to ...
9177         (core_target_open): ... this.  Adjust.
9178         * ctf.c (ctf_target_info): New.
9179         (ctf_target) <shortname, longname, doc>: Delete.
9180         <info>: New.
9181         (ctf_target::open): Rename to ...
9182         (ctf_target_open): ... this.
9183         (_initialize_ctf): Adjust.
9184         * exec.c (exec_target_info): New.
9185         (exec_target) <shortname, longname, doc>: Delete.
9186         <info>: New.
9187         (exec_target::open): Rename to ...
9188         (exec_target_open): ... this.
9189         * gdbcore.h (core_target_open): Declare.
9190         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9191         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9192         add_inf_child_target.
9193         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9194         add_inf_child_target.
9195         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9196         add_inf_child_target.
9197         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9198         add_inf_child_target.
9199         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9200         add_inf_child_target.
9201         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9202         add_inf_child_target.
9203         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9204         add_inf_child_target.
9205         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9206         add_inf_child_target.
9207         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9208         add_inf_child_target.
9209         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9210         add_inf_child_target.
9211         * inf-child.c (inf_child_target_info): New.
9212         (inf_child_target::info): New.
9213         (inf_child_open_target): Remove 'target' parameter.  Use
9214         get_native_target instead.
9215         (inf_child_target::open): Delete.
9216         (add_inf_child_target): New.
9217         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9218         Delete.
9219         <info>: New.
9220         (add_inf_child_target): Declare.
9221         (inf_child_open_target): Declare.
9222         * linux-thread-db.c (thread_db_target_info): New.
9223         (thread_db_target) <shortname, longname, doc>: Delete.
9224         <info>: New.
9225         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9226         add_inf_child_target.
9227         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9228         add_inf_child_target.
9229         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9230         add_inf_child_target.
9231         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9232         add_inf_child_target.
9233         * make-target-delegates (print_class): Adjust.
9234         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9235         add_inf_child_target.
9236         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9237         add_inf_child_target.
9238         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9239         add_inf_child_target.
9240         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9241         add_inf_child_target.
9242         * nto-procfs.c (nto_native_target_info): New.
9243         (nto_procfs_target_native) <shortname, longname, doc>:
9244         Delete.
9245         <info>: New.
9246         (nto_procfs_target_info): New.
9247         (nto_procfs_target_procfs) <shortname, longname, doc>:
9248         Delete.
9249         <info>: New.
9250         (init_procfs_targets): Adjust.
9251         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9252         add_inf_child_target.
9253         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9254         add_inf_child_target.
9255         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9256         add_inf_child_target.
9257         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9258         add_inf_child_target.
9259         * ravenscar-thread.c (ravenscar_target_info): New.
9260         (ravenscar_thread_target) <shortname, longname, doc>:
9261         Delete.
9262         <info>: New.
9263         * record-btrace.c (record_btrace_target_info):
9264         (record_btrace_target) <shortname, longname, doc>: Delete.
9265         <info>: New.
9266         (record_btrace_target::open): Rename to ...
9267         (record_btrace_target_open): ... this.  Adjust.
9268         * record-full.c (record_longname, record_doc): New.
9269         (record_full_base_target) <shortname, longname, doc>: Delete.
9270         <info>: New.
9271         (record_full_target_info): New.
9272         (record_full_target): <shortname>: Delete.
9273         <info>: New.
9274         (record_full_core_open_1, record_full_open_1): Update comments.
9275         (record_full_base_target::open): Rename to ...
9276         (record_full_open): ... this.
9277         (cmd_record_full_restore): Update.
9278         (_initialize_record_full): Update.
9279         * remote-sim.c (remote_sim_target_info): New.
9280         (gdbsim_target) <shortname, longname, doc>: Delete.
9281         <info>: New.
9282         (gdbsim_target::open): Rename to ...
9283         (gdbsim_target_open): ... this.
9284         (_initialize_remote_sim): Adjust.
9285         * remote.c (remote_doc): New.
9286         (remote_target_info): New.
9287         (remote_target) <shortname, longname, doc>: Delete.
9288         <info>: New.
9289         (extended_remote_target_info): New.
9290         (extended_remote_target) <shortname, longname, doc>: Delete.
9291         <info>: New.
9292         (remote_target::open_1): Make static.  Adjust.
9293         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9294         * s390-linux-nat.c (_initialize_s390_nat): Use
9295         add_inf_child_target.
9296         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9297         add_inf_child_target.
9298         * sol-thread.c (thread_db_target_info): New.
9299         (sol_thread_target) <shortname, longname, doc>: Delete.
9300         <info>: New.
9301         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9302         add_inf_child_target.
9303         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9304         add_inf_child_target.
9305         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9306         add_inf_child_target.
9307         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9308         add_inf_child_target.
9309         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9310         add_inf_child_target.
9311         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9312         add_inf_child_target.
9313         * spu-linux-nat.c (_initialize_spu_nat): Use
9314         add_inf_child_target.
9315         * spu-multiarch.c (spu_multiarch_target_info): New.
9316         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9317         <info>: New.
9318         * target-delegates.c: Regenerate.
9319         * target.c: Include <unordered_map>.
9320         (target_ops_p): Delete.
9321         (DEF_VEC_P(target_ops_p)): Delete.
9322         (target_factories): New.
9323         (test_target_info): New.
9324         (test_target_ops::info): New.
9325         (open_target): Adjust to use target_factories.
9326         (add_target_with_completer): Rename to ...
9327         (add_target): ... this.  Change prototype.  Register target_info
9328         and open callback in target_factories.  Register target_info in
9329         command context instead of target_ops.
9330         (add_target): Delete old implementation.
9331         (add_deprecated_target_alias): Change prototype.  Adjust.
9332         (the_native_target): New.
9333         (set_native_target, get_native_target): New.
9334         (find_default_run_target): Use the_native_target.
9335         (find_attach_target, find_run_target): Simplify.
9336         (target_ops::open): Delete.
9337         (dummy_target_info): New.
9338         (dummy_target::shortname, dummy_target::longname)
9339         (dummy_target::doc): Delete.
9340         (dummy_target::info): New.
9341         (debug_target::shortname, debug_target::longname)
9342         (debug_target::doc): Delete.
9343         (debug_target::info): New.
9344         * target.h (struct target_info): New.
9345         (target_ops::~target_ops): Add comment.
9346         (target_ops::info): New.
9347         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9348         longer virtual.  Implement in terms of target_info.
9349         (set_native_target, get_native_target): Declare.
9350         (target_open_ftype): New.
9351         (add_target, add_target_with_completer)
9352         (add_deprecated_target_alias): Change prototype.
9353         (test_target) <shortname, longname, doc>: Delete.
9354         <info>: New.
9355         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9356         add_inf_child_target.
9357         * tracefile-tfile.c (tfile_target_info): New.
9358         (tfile_target) <shortname, longname, doc>: Delete.
9359         <info>: New.
9360         (tfile_target::open): Rename to ...
9361         (tfile_target_open): ... this.
9362         (_initialize_tracefile_tfile): Adjust.
9363         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9364         add_inf_child_target.
9365         * windows-nat.c (_initialize_windows_nat): Use
9366         add_inf_child_target.
9367         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9368         add_inf_child_target.
9369
9370 2018-05-02  Pedro Alves  <palves@redhat.com>
9371
9372         * linux-nat.h (linux_nat_target) <low_new_thread,
9373         low_delete_thread, low_new_fork, low_forget_process,
9374         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9375         New virtual methods.
9376         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9377         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9378         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9379         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9380         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9381         Delete.
9382         * linux-fork.c (delete_fork): Adjust to call low method.
9383         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9384         (linux_nat_new_fork, linux_nat_forget_process_hook)
9385         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9386         (linux_nat_status_is_event):
9387         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9388         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9389         to call low method.
9390         (sigtrap_is_event): Rename to ...
9391         (linux_nat_target::low_status_is_event): ... this.
9392         (linux_nat_set_status_is_event): Delete.
9393         (save_stop_reason, linux_nat_wait_1)
9394         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9395         low methods.
9396         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9397         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9398         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9399         (linux_nat_set_prepare_to_resume): Delete.
9400         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9401         low virtual methods.
9402         * amd64-linux-nat.c: Likewise.
9403         * arm-linux-nat.c: Likewise.
9404         * i386-linux-nat.c: Likewise.
9405         * ia64-linux-nat.c: Likewise.
9406         * mips-linux-nat.c: Likewise.
9407         * ppc-linux-nat.c: Likewise.
9408         * s390-linux-nat.c: Likewise.
9409         * sparc64-linux-nat.c: Likewise.
9410         * x86-linux-nat.c: Likewise.
9411         * x86-linux-nat.h: Include "nat/x86-linux.h".
9412         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9413         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9414         Override methods.
9415
9416 2018-05-02  Pedro Alves  <palves@redhat.com>
9417
9418         * target.h (target_ops)
9419         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9420         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9421         stopped_by_watchpoint, have_continuable_watchpoint,
9422         stopped_data_address, watchpoint_addr_within_range,
9423         can_accel_watchpoint_condition, can_run, thread_alive,
9424         has_all_memory, has_memory, has_stack, has_registers,
9425         has_execution, can_async_p, is_async_p, supports_non_stop,
9426         always_non_stop_p, can_execute_reverse, supports_multi_process,
9427         supports_enable_disable_tracepoint,
9428         supports_disable_randomization, supports_string_tracing,
9429         supports_evaluation_of_breakpoint_conditions,
9430         can_run_breakpoint_commands, filesystem_is_local,
9431         can_download_tracepoint, get_trace_state_variable_value,
9432         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9433         record_is_replaying, record_will_replay,
9434         augmented_libraries_svr4_read>: Adjust to return bool.
9435         * aarch64-linux-nat.c: All implementations adjusted.
9436         * aix-thread.c: All implementations adjusted.
9437         * arm-linux-nat.c: All implementations adjusted.
9438         * breakpoint.c: All implementations adjusted.
9439         * bsd-kvm.c: All implementations adjusted.
9440         * bsd-uthread.c: All implementations adjusted.
9441         * corelow.c: All implementations adjusted.
9442         * ctf.c: All implementations adjusted.
9443         * darwin-nat.c: All implementations adjusted.
9444         * darwin-nat.h: All implementations adjusted.
9445         * exec.c: All implementations adjusted.
9446         * fbsd-nat.c: All implementations adjusted.
9447         * fbsd-nat.h: All implementations adjusted.
9448         * gnu-nat.c: All implementations adjusted.
9449         * gnu-nat.h: All implementations adjusted.
9450         * go32-nat.c: All implementations adjusted.
9451         * ia64-linux-nat.c: All implementations adjusted.
9452         * inf-child.c: All implementations adjusted.
9453         * inf-child.h: All implementations adjusted.
9454         * inf-ptrace.c: All implementations adjusted.
9455         * inf-ptrace.h: All implementations adjusted.
9456         * linux-nat.c: All implementations adjusted.
9457         * linux-nat.h: All implementations adjusted.
9458         * mips-linux-nat.c: All implementations adjusted.
9459         * nto-procfs.c: All implementations adjusted.
9460         * ppc-linux-nat.c: All implementations adjusted.
9461         * procfs.c: All implementations adjusted.
9462         * ravenscar-thread.c: All implementations adjusted.
9463         * record-btrace.c: All implementations adjusted.
9464         * record-full.c: All implementations adjusted.
9465         * remote-sim.c: All implementations adjusted.
9466         * remote.c: All implementations adjusted.
9467         * s390-linux-nat.c: All implementations adjusted.
9468         * sol-thread.c: All implementations adjusted.
9469         * spu-multiarch.c: All implementations adjusted.
9470         * target-delegates.c: All implementations adjusted.
9471         * target.c: All implementations adjusted.
9472         * target.h: All implementations adjusted.
9473         * tracefile-tfile.c: All implementations adjusted.
9474         * tracefile.c: All implementations adjusted.
9475         * tracefile.h: All implementations adjusted.
9476         * windows-nat.c: All implementations adjusted.
9477         * x86-linux-nat.h: All implementations adjusted.
9478         * x86-nat.h: All implementations adjusted.
9479
9480 2018-05-02  Pedro Alves  <palves@redhat.com>
9481
9482         * make-target-delegates (scan_target_h): Don't trim lines here.
9483         Replace sequences of tabs and/or whitespace with a single
9484         whitespace.
9485         (top level, parsing methods): Trim each line before processing it
9486         here.
9487
9488 2018-05-02  Pedro Alves  <palves@redhat.com>
9489             John Baldwin  <jhb@freebsd.org>
9490
9491         * target.h (enum strata) <debug_stratum>: New.
9492         (struct target_ops) <all delegation methods>: Replace by C++
9493         virtual methods, and drop "to_" prefix.  All references updated
9494         throughout.
9495         <to_shortname, to_longname, to_doc, to_data,
9496         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9497         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9498         virtual methods.  All references updated throughout.
9499         <can_attach, supports_terminal_ours, can_create_inferior,
9500         get_thread_control_capabilities, attach_no_wait>: New
9501         virtual methods.
9502         <insert_breakpoint, remove_breakpoint>: Now
9503         TARGET_DEFAULT_NORETURN methods.
9504         <info_proc>: Now returns bool.
9505         <to_magic>: Delete.
9506         (OPS_MAGIC): Delete.
9507         (current_target): Delete.  All references replaced by references
9508         to ...
9509         (target_stack): ... this.  New.
9510         (target_shortname, target_longname): Adjust.
9511         (target_can_run): Now a function declaration.
9512         (default_child_has_all_memory, default_child_has_memory)
9513         (default_child_has_stack, default_child_has_registers)
9514         (default_child_has_execution): Remove target_ops parameter.
9515         (complete_target_initialization): Delete.
9516         (memory_breakpoint_target): New template class.
9517         (test_target_ops): Refactor as a C++ class with virtual methods.
9518         * make-target-delegates (NAME_PART): Tighten.
9519         (POINTER_PART, CP_SYMBOL): New.
9520         (SIMPLE_RETURN_PART): Reimplement.
9521         (VEC_RETURN_PART): Expect less.
9522         (RETURN_PART, VIRTUAL_PART): New.
9523         (METHOD): Adjust to C++ virtual methods.
9524         (scan_target_h): Remove reference to C99.
9525         (dname): Output "target_ops::" prefix.
9526         (write_function_header): Adjust to output a C++ class method.
9527         (write_declaration): New.
9528         (write_delegator): Adjust to output a C++ class method.
9529         (tdname): Output "dummy_target::" prefix.
9530         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9531         method.
9532         (tdefault_names, debug_names): Delete.
9533         (return_types, tdefaults, styles, argtypes_array): New.
9534         (top level): All methods are delegators.
9535         (print_class): New.
9536         (top level): Print dummy_target and debug_target classes.
9537         * target-delegates.c: Regenerate.
9538         * target-debug.h (target_debug_print_enum_info_proc_what)
9539         (target_debug_print_thread_control_capabilities)
9540         (target_debug_print_thread_info_p): New.
9541         * target.c (dummy_target): Delete.
9542         (the_dummy_target, the_debug_target): New.
9543         (target_stack): Now extern.
9544         (set_targetdebug): Push/unpush debug target.
9545         (default_child_has_all_memory, default_child_has_memory)
9546         (default_child_has_stack, default_child_has_registers)
9547         (default_child_has_execution): Remove target_ops parameter.
9548         (complete_target_initialization): Delete.
9549         (add_target_with_completer): No longer call
9550         complete_target_initialization.
9551         (target_supports_terminal_ours): Use regular delegation.
9552         (update_current_target): Delete.
9553         (push_target): No longer check magic number.  Don't call
9554         update_current_target.
9555         (unpush_target): Don't call update_current_target.
9556         (target_is_pushed): No longer check magic number.
9557         (target_require_runnable): Skip for all stratums over
9558         process_stratum.
9559         (target_ops::info_proc): New.
9560         (target_info_proc): Use find_target_at and
9561         find_default_run_target.
9562         (target_supports_disable_randomization): Use regular delegation.
9563         (target_get_osdata): Use find_target_at.
9564         (target_ops::open, target_ops::close, target_ops::can_attach)
9565         (target_ops::attach, target_ops::can_create_inferior)
9566         (target_ops::create_inferior, target_ops::can_run)
9567         (target_can_run): New.
9568         (default_fileio_target): Use regular delegation.
9569         (target_ops::fileio_open, target_ops::fileio_pwrite)
9570         (target_ops::fileio_pread, target_ops::fileio_fstat)
9571         (target_ops::fileio_close, target_ops::fileio_unlink)
9572         (target_ops::fileio_readlink): New.
9573         (target_fileio_open_1, target_fileio_unlink)
9574         (target_fileio_readlink): Always call the target method.  Handle
9575         FILEIO_ENOSYS.
9576         (return_zero, return_zero_has_execution): Delete.
9577         (init_dummy_target): Delete.
9578         (dummy_target::dummy_target, dummy_target::shortname)
9579         (dummy_target::longname, dummy_target::doc)
9580         (debug_target::debug_target, debug_target::shortname)
9581         (debug_target::longname, debug_target::doc): New.
9582         (target_supports_delete_record): Use regular delegation.
9583         (setup_target_debug): Delete.
9584         (maintenance_print_target_stack): Skip debug_stratum.
9585         (initialize_targets): Instantiate the_dummy_target and
9586         the_debug_target.
9587         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9588         use target_stack.
9589         (target_auxv_search, fprint_target_auxv): Adjust.
9590         (info_auxv_command): Adjust to use target_stack.
9591         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9592         * exceptions.c (print_flush): Handle a NULL target_stack.
9593         * regcache.c (target_ops_no_register): Refactor as class with
9594         virtual methods.
9595
9596         * exec.c (exec_target): New class.
9597         (exec_ops): Now an exec_target.
9598         (exec_open, exec_close_1, exec_get_section_table)
9599         (exec_xfer_partial, exec_files_info, exec_has_memory)
9600         (exec_make_note_section): Refactor as exec_target methods.
9601         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9602         Delete.
9603         (exec_target::find_memory_regions): New.
9604         (_initialize_exec): Don't call init_exec_ops.
9605         * gdbcore.h (exec_file_clear): Delete.
9606
9607         * corefile.c (core_target): Delete.
9608         (core_file_command): Adjust.
9609         * corelow.c (core_target): New class.
9610         (the_core_target): New.
9611         (core_close): Remove target_ops parameter.
9612         (core_close_cleanup): Adjust.
9613         (core_target::close): New.
9614         (core_open, core_detach, get_core_registers, core_files_info)
9615         (core_xfer_partial, core_thread_alive, core_read_description)
9616         (core_pid_to_str, core_thread_name, core_has_memory)
9617         (core_has_stack, core_has_registers, core_info_proc): Rework as
9618         core_target methods.
9619         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9620         (_initialize_corelow): Initialize the_core_target.
9621         * gdbcore.h (core_target): Delete.
9622         (the_core_target): New.
9623
9624         * ctf.c: (ctf_target): New class.
9625         (ctf_ops): Now a ctf_target.
9626         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9627         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9628         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9629         methods.
9630         (init_ctf_ops): Delete.
9631         (_initialize_ctf): Don't call it.
9632         * tracefile-tfile.c (tfile_target): New class.
9633         (tfile_ops): Now a tfile_target.
9634         (tfile_open, tfile_close, tfile_files_info)
9635         (tfile_get_tracepoint_status, tfile_trace_find)
9636         (tfile_fetch_registers, tfile_xfer_partial)
9637         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9638         Refactor as tfile_target methods.
9639         (tfile_xfer_partial_features): Remove target_ops parameter.
9640         (init_tfile_ops): Delete.
9641         (_initialize_tracefile_tfile): Don't call it.
9642         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9643         (tracefile_has_stack, tracefile_has_registers)
9644         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9645         tracefile_target methods.
9646         (init_tracefile_ops): Delete.
9647         (tracefile_target::tracefile_target): New.
9648         * tracefile.h: Include "target.h".
9649         (tracefile_target): New class.
9650         (init_tracefile_ops): Delete.
9651
9652         * spu-multiarch.c (spu_multiarch_target): New class.
9653         (spu_ops): Now a spu_multiarch_target.
9654         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9655         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9656         (spu_search_memory, spu_mourn_inferior): Refactor as
9657         spu_multiarch_target methods.
9658         (init_spu_ops): Delete.
9659         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9660         complete_target_initialization.
9661
9662         * ravenscar-thread.c (ravenscar_thread_target): New class.
9663         (ravenscar_ops): Now a ravenscar_thread_target.
9664         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9665         (ravenscar_thread_alive, ravenscar_pid_to_str)
9666         (ravenscar_fetch_registers, ravenscar_store_registers)
9667         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9668         (ravenscar_stopped_by_hw_breakpoint)
9669         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9670         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9671         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9672         methods.
9673         (init_ravenscar_thread_ops): Delete.
9674         (_initialize_ravenscar): Remove references to
9675         init_ravenscar_thread_ops and complete_target_initialization.
9676
9677         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9678         (bsd_uthread_target): New class.
9679         (bsd_uthread_ops): Now a bsd_uthread_target.
9680         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9681         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9682         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9683         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9684         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9685         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9686         (bsd_uthread_target): Delete function.
9687         (_initialize_bsd_uthread): Remove reference to
9688         complete_target_initialization.
9689
9690         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9691         (target_bfd): ... this new class.
9692         (target_bfd_xfer_partial, target_bfd_get_section_table)
9693         (target_bfd_close): Refactor as target_bfd methods.
9694         (target_bfd::~target_bfd): New.
9695         (target_bfd_reopen): Adjust.
9696         (target_bfd::close): New.
9697
9698         * record-btrace.c (record_btrace_target): New class.
9699         (record_btrace_ops): Now a record_btrace_target.
9700         (record_btrace_open, record_btrace_stop_recording)
9701         (record_btrace_disconnect, record_btrace_close)
9702         (record_btrace_async, record_btrace_info)
9703         (record_btrace_insn_history, record_btrace_insn_history_range)
9704         (record_btrace_insn_history_from, record_btrace_call_history)
9705         (record_btrace_call_history_range)
9706         (record_btrace_call_history_from, record_btrace_record_method)
9707         (record_btrace_is_replaying, record_btrace_will_replay)
9708         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9709         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9710         (record_btrace_store_registers, record_btrace_prepare_to_store)
9711         (record_btrace_to_get_unwinder)
9712         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9713         (record_btrace_commit_resume, record_btrace_wait)
9714         (record_btrace_stop, record_btrace_can_execute_reverse)
9715         (record_btrace_stopped_by_sw_breakpoint)
9716         (record_btrace_supports_stopped_by_sw_breakpoint)
9717         (record_btrace_stopped_by_hw_breakpoint)
9718         (record_btrace_supports_stopped_by_hw_breakpoint)
9719         (record_btrace_update_thread_list, record_btrace_thread_alive)
9720         (record_btrace_goto_begin, record_btrace_goto_end)
9721         (record_btrace_goto, record_btrace_stop_replaying_all)
9722         (record_btrace_execution_direction)
9723         (record_btrace_prepare_to_generate_core)
9724         (record_btrace_done_generating_core): Refactor as
9725         record_btrace_target methods.
9726         (init_record_btrace_ops): Delete.
9727         (_initialize_record_btrace): Remove reference to
9728         init_record_btrace_ops.
9729         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9730         the execution_direction global.
9731         (record_full_base_target, record_full_target)
9732         (record_full_core_target): New classes.
9733         (record_full_ops): Now a record_full_target.
9734         (record_full_core_ops): Now a record_full_core_target.
9735         (record_full_target::detach, record_full_target::disconnect)
9736         (record_full_core_target::disconnect)
9737         (record_full_target::mourn_inferior, record_full_target::kill):
9738         New.
9739         (record_full_open, record_full_close, record_full_async): Refactor
9740         as methods of the record_full_base_target class.
9741         (record_full_resume, record_full_commit_resume): Refactor
9742         as methods of the record_full_target class.
9743         (record_full_wait, record_full_stopped_by_watchpoint)
9744         (record_full_stopped_data_address)
9745         (record_full_stopped_by_sw_breakpoint)
9746         (record_full_supports_stopped_by_sw_breakpoint)
9747         (record_full_stopped_by_hw_breakpoint)
9748         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9749         methods of the record_full_base_target class.
9750         (record_full_store_registers, record_full_xfer_partial)
9751         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9752         Refactor as methods of the record_full_target class.
9753         (record_full_can_execute_reverse, record_full_get_bookmark)
9754         (record_full_goto_bookmark, record_full_execution_direction)
9755         (record_full_record_method, record_full_info, record_full_delete)
9756         (record_full_is_replaying, record_full_will_replay)
9757         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9758         (record_full_stop_replaying): Refactor as methods of the
9759         record_full_base_target class.
9760         (record_full_core_resume, record_full_core_kill)
9761         (record_full_core_fetch_registers)
9762         (record_full_core_prepare_to_store)
9763         (record_full_core_store_registers, record_full_core_xfer_partial)
9764         (record_full_core_insert_breakpoint)
9765         (record_full_core_remove_breakpoint)
9766         (record_full_core_has_execution): Refactor
9767         as methods of the record_full_core_target class.
9768         (record_full_base_target::supports_delete_record): New.
9769         (init_record_full_ops): Delete.
9770         (init_record_full_core_ops): Delete.
9771         (record_full_save): Refactor as method of the
9772         record_full_base_target class.
9773         (_initialize_record_full): Remove references to
9774         init_record_full_ops and init_record_full_core_ops.
9775
9776         * remote.c (remote_target, extended_remote_target): New classes.
9777         (remote_ops): Now a remote_target.
9778         (extended_remote_ops): Now an extended_remote_target.
9779         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9780         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9781         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9782         (remote_pass_signals, remote_set_syscall_catchpoint)
9783         (remote_program_signals, )
9784         (remote_thread_always_alive): Remove target_ops parameter.
9785         (remote_thread_alive, remote_thread_name)
9786         (remote_update_thread_list, remote_threads_extra_info)
9787         (remote_static_tracepoint_marker_at)
9788         (remote_static_tracepoint_markers_by_strid)
9789         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9790         (remote_open): Refactor as methods of remote_target.
9791         (extended_remote_open, extended_remote_detach)
9792         (extended_remote_attach, extended_remote_post_attach):
9793         (extended_remote_supports_disable_randomization)
9794         (extended_remote_create_inferior): : Refactor as method of
9795         extended_remote_target.
9796         (remote_set_permissions, remote_open_1, remote_detach)
9797         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9798         (remote_resume, remote_commit_resume, remote_stop)
9799         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9800         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9801         (remote_prepare_to_store, remote_store_registers)
9802         (remote_flash_erase, remote_flash_done, remote_files_info)
9803         (remote_kill, remote_mourn, remote_insert_breakpoint)
9804         (remote_remove_breakpoint, remote_insert_watchpoint)
9805         (remote_watchpoint_addr_within_range)
9806         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9807         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9808         (remote_supports_stopped_by_sw_breakpoint)
9809         (remote_stopped_by_hw_breakpoint)
9810         (remote_supports_stopped_by_hw_breakpoint)
9811         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9812         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9813         (remote_verify_memory): Refactor as methods of remote_target.
9814         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9815         parameter.
9816         (remote_xfer_partial, remote_get_memory_xfer_limit)
9817         (remote_search_memory, remote_rcmd, remote_memory_map)
9818         (remote_pid_to_str, remote_get_thread_local_address)
9819         (remote_get_tib_address, remote_read_description): Refactor as
9820         methods of remote_target.
9821         (remote_target::fileio_open, remote_target::fileio_pwrite)
9822         (remote_target::fileio_pread, remote_target::fileio_close): New.
9823         (remote_hostio_readlink, remote_hostio_fstat)
9824         (remote_filesystem_is_local, remote_can_execute_reverse)
9825         (remote_supports_non_stop, remote_supports_disable_randomization)
9826         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9827         (remote_supports_enable_disable_tracepoint)
9828         (remote_supports_string_tracing)
9829         (remote_can_run_breakpoint_commands, remote_trace_init)
9830         (remote_download_tracepoint, remote_can_download_tracepoint)
9831         (remote_download_trace_state_variable, remote_enable_tracepoint)
9832         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9833         (remote_trace_start, remote_get_trace_status)
9834         (remote_get_tracepoint_status, remote_trace_stop)
9835         (remote_trace_find, remote_get_trace_state_variable_value)
9836         (remote_save_trace_data, remote_get_raw_trace_data)
9837         (remote_set_disconnected_tracing, remote_core_of_thread)
9838         (remote_set_circular_trace_buffer, remote_traceframe_info)
9839         (remote_get_min_fast_tracepoint_insn_len)
9840         (remote_set_trace_buffer_size, remote_set_trace_notes)
9841         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9842         (remote_disable_btrace, remote_teardown_btrace)
9843         (remote_read_btrace, remote_btrace_conf)
9844         (remote_augmented_libraries_svr4_read, remote_load)
9845         (remote_pid_to_exec_file, remote_can_do_single_step)
9846         (remote_execution_direction, remote_thread_handle_to_thread_info):
9847         Refactor as methods of remote_target.
9848         (init_remote_ops, init_extended_remote_ops): Delete.
9849         (remote_can_async_p, remote_is_async_p, remote_async)
9850         (remote_thread_events, remote_upload_tracepoints)
9851         (remote_upload_trace_state_variables): Refactor as methods of
9852         remote_target.
9853         (_initialize_remote): Remove references to init_remote_ops and
9854         init_extended_remote_ops.
9855
9856         * remote-sim.c (gdbsim_target): New class.
9857         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9858         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9859         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9860         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9861         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9862         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9863         Refactor as methods of gdbsim_target.
9864         (gdbsim_ops): Now a gdbsim_target.
9865         (init_gdbsim_ops): Delete.
9866         (gdbsim_cntrl_c): Adjust.
9867         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9868
9869         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9870         (the_amd64_linux_nat_target): New.
9871         (amd64_linux_fetch_inferior_registers)
9872         (amd64_linux_store_inferior_registers): Refactor as methods of
9873         amd64_linux_nat_target.
9874         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9875         * i386-linux-nat.c: Don't include "linux-nat.h".
9876         (i386_linux_nat_target): New class.
9877         (the_i386_linux_nat_target): New.
9878         (i386_linux_fetch_inferior_registers)
9879         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9880         as methods of i386_linux_nat_target.
9881         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9882         * inf-child.c (inf_child_ops): Delete.
9883         (inf_child_fetch_inferior_registers)
9884         (inf_child_store_inferior_registers): Delete.
9885         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9886         methods of inf_child_target.
9887         (inf_child_target::supports_terminal_ours)
9888         (inf_child_target::terminal_init)
9889         (inf_child_target::terminal_inferior)
9890         (inf_child_target::terminal_ours_for_output)
9891         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9892         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9893         New.
9894         (inf_child_open, inf_child_disconnect, inf_child_close)
9895         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9896         (inf_child_post_startup_inferior, inf_child_can_run)
9897         (inf_child_pid_to_exec_file): Refactor as methods of
9898         inf_child_target.
9899         (inf_child_follow_fork): Delete.
9900         (inf_child_target::can_create_inferior)
9901         (inf_child_target::can_attach): New.
9902         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9903         (inf_child_target::has_stack, inf_child_target::has_registers)
9904         (inf_child_target::has_execution): New.
9905         (inf_child_fileio_open, inf_child_fileio_pwrite)
9906         (inf_child_fileio_pread, inf_child_fileio_fstat)
9907         (inf_child_fileio_close, inf_child_fileio_unlink)
9908         (inf_child_fileio_readlink, inf_child_use_agent)
9909         (inf_child_can_use_agent): Refactor as methods of
9910         inf_child_target.
9911         (return_zero, inf_child_target): Delete.
9912         (inf_child_target::inf_child_target): New.
9913         * inf-child.h: Include "target.h".
9914         (inf_child_target): Delete function prototype.
9915         (inf_child_target): New class.
9916         (inf_child_open_target, inf_child_mourn_inferior)
9917         (inf_child_maybe_unpush_target): Delete.
9918         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9919         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9920         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9921         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9922         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9923         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9924         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9925         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9926         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9927         methods of inf_ptrace_target.
9928         (inf_ptrace_target): Delete function.
9929         * inf-ptrace.h: Include "inf-child.h".
9930         (inf_ptrace_target): Delete function declaration.
9931         (inf_ptrace_target): New class.
9932         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9933         * linux-nat.c (linux_target): New.
9934         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9935         (linux_nat_target::~linux_nat_target): New.
9936         (linux_child_post_attach, linux_child_post_startup_inferior)
9937         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9938         (linux_child_remove_fork_catchpoint)
9939         (linux_child_insert_vfork_catchpoint)
9940         (linux_child_remove_vfork_catchpoint)
9941         (linux_child_insert_exec_catchpoint)
9942         (linux_child_remove_exec_catchpoint)
9943         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9944         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9945         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9946         (linux_nat_stopped_data_address)
9947         (linux_nat_stopped_by_sw_breakpoint)
9948         (linux_nat_supports_stopped_by_sw_breakpoint)
9949         (linux_nat_stopped_by_hw_breakpoint)
9950         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9951         (linux_nat_kill, linux_nat_mourn_inferior)
9952         (linux_nat_xfer_partial, linux_nat_thread_alive)
9953         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9954         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9955         (linux_child_static_tracepoint_markers_by_strid)
9956         (linux_nat_is_async_p, linux_nat_can_async_p)
9957         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9958         (linux_nat_supports_multi_process)
9959         (linux_nat_supports_disable_randomization, linux_nat_async)
9960         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9961         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9962         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9963         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9964         methods of linux_nat_target.
9965         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9966         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9967         parameter.
9968         (check_stopped_by_watchpoint): Adjust.
9969         (linux_xfer_partial): Delete.
9970         (linux_target_install_ops, linux_target, linux_nat_add_target):
9971         Delete.
9972         (linux_nat_target::linux_nat_target): New.
9973         * linux-nat.h: Include "inf-ptrace.h".
9974         (linux_nat_target): New.
9975         (linux_target, linux_target_install_ops, linux_nat_add_target):
9976         Delete function declarations.
9977         (linux_target): Declare global.
9978         * linux-thread-db.c (thread_db_target): New.
9979         (thread_db_target::thread_db_target): New.
9980         (thread_db_ops): Delete.
9981         (the_thread_db_target): New.
9982         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9983         (thread_db_update_thread_list, thread_db_pid_to_str)
9984         (thread_db_extra_thread_info)
9985         (thread_db_thread_handle_to_thread_info)
9986         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9987         (thread_db_resume): Refactor as methods of thread_db_target.
9988         (init_thread_db_ops): Delete.
9989         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9990         * x86-linux-nat.c: Don't include "linux-nat.h".
9991         (super_post_startup_inferior): Delete.
9992         (x86_linux_nat_target::~x86_linux_nat_target): New.
9993         (x86_linux_child_post_startup_inferior)
9994         (x86_linux_read_description, x86_linux_enable_btrace)
9995         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9996         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9997         methods of x86_linux_nat_target.
9998         (x86_linux_create_target): Delete.  Bits folded ...
9999         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10000         pointer.
10001         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10002         (x86_linux_nat_target): New class.
10003         (x86_linux_create_target): Delete.
10004         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10005         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10006         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10007         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10008         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10009         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10010         make extern.
10011         (x86_use_watchpoints): Delete.
10012         * x86-nat.h: Include "breakpoint.h" and "target.h".
10013         (x86_use_watchpoints): Delete.
10014         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10015         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10016         (x86_insert_watchpoint, x86_remove_watchpoint)
10017         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10018         (x86_stopped_by_hw_breakpoint): New declarations.
10019         (x86_nat_target): New template class.
10020
10021         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10022         (the_ppc_linux_nat_target): New.
10023         (ppc_linux_fetch_inferior_registers)
10024         (ppc_linux_can_use_hw_breakpoint)
10025         (ppc_linux_region_ok_for_hw_watchpoint)
10026         (ppc_linux_ranged_break_num_registers)
10027         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10028         (ppc_linux_insert_mask_watchpoint)
10029         (ppc_linux_remove_mask_watchpoint)
10030         (ppc_linux_can_accel_watchpoint_condition)
10031         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10032         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10033         (ppc_linux_watchpoint_addr_within_range)
10034         (ppc_linux_masked_watch_num_registers)
10035         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10036         (ppc_linux_read_description): Refactor as methods of
10037         ppc_linux_nat_target.
10038         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10039
10040         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10041         (procfs_target): New class.
10042         (the_procfs_target): New.
10043         (procfs_target): Delete function.
10044         (procfs_auxv_parse, procfs_attach, procfs_detach)
10045         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10046         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10047         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10048         (procfs_create_inferior, procfs_update_thread_list)
10049         (procfs_thread_alive, procfs_pid_to_str)
10050         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10051         (procfs_stopped_data_address, procfs_insert_watchpoint)
10052         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10053         (proc_find_memory_regions, procfs_info_proc)
10054         (procfs_make_note_section): Refactor as methods of procfs_target.
10055         (_initialize_procfs): Adjust.
10056         * sol-thread.c (sol_thread_target): New class.
10057         (sol_thread_ops): Now a sol_thread_target.
10058         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10059         (sol_thread_fetch_registers, sol_thread_store_registers)
10060         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10061         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10062         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10063         (init_sol_thread_ops): Delete.
10064         (_initialize_sol_thread): Adjust.  Remove references to
10065         init_sol_thread_ops and complete_target_initialization.
10066
10067         * windows-nat.c (windows_nat_target): New class.
10068         (windows_fetch_inferior_registers)
10069         (windows_store_inferior_registers, windows_resume, windows_wait)
10070         (windows_attach, windows_detach, windows_pid_to_exec_file)
10071         (windows_files_info, windows_create_inferior)
10072         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10073         (windows_close, windows_pid_to_str, windows_xfer_partial)
10074         (windows_get_tib_address, windows_get_ada_task_ptid)
10075         (windows_thread_name, windows_thread_alive): Refactor as
10076         windows_nat_target methods.
10077         (do_initial_windows_stuff): Adjust.
10078         (windows_target): Delete function.
10079         (_initialize_windows_nat): Adjust.
10080
10081         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10082         (darwin_mourn_inferior, darwin_kill_inferior)
10083         (darwin_create_inferior, darwin_attach, darwin_detach)
10084         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10085         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10086         (darwin_supports_multi_process): Refactor as darwin_nat_target
10087         methods.
10088         (darwin_resume_to, darwin_files_info): Delete.
10089         (_initialize_darwin_inferior): Rename to ...
10090         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10091         * darwin-nat.h: Include "inf-child.h".
10092         (darwin_nat_target): New class.
10093         (darwin_complete_target): Delete.
10094         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10095         (darwin_target): New.
10096         (i386_darwin_fetch_inferior_registers)
10097         (i386_darwin_store_inferior_registers): Refactor as methods of
10098         darwin_nat_target.
10099         (darwin_complete_target): Delete, with ...
10100         (_initialize_i386_darwin_nat): ... bits factored out here.
10101
10102         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10103         (the_alpha_linux_nat_target): New.
10104         (alpha_linux_register_u_offset): Refactor as
10105         alpha_linux_nat_target method.
10106         (_initialize_alpha_linux_nat): Adjust.
10107         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10108         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10109         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10110         methods of linux_nat_trad_target.
10111         (linux_trad_target): Delete.
10112         * linux-nat-trad.h (linux_trad_target): Delete function.
10113         (linux_nat_trad_target): New class.
10114         * mips-linux-nat.c (mips_linux_nat_target): New class.
10115         (super_fetch_registers, super_store_registers, super_close):
10116         Delete.
10117         (the_mips_linux_nat_target): New.
10118         (mips64_linux_regsets_fetch_registers)
10119         (mips64_linux_regsets_store_registers)
10120         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10121         (mips_linux_register_u_offset, mips_linux_read_description)
10122         (mips_linux_can_use_hw_breakpoint)
10123         (mips_linux_stopped_by_watchpoint)
10124         (mips_linux_stopped_data_address)
10125         (mips_linux_region_ok_for_hw_watchpoint)
10126         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10127         (mips_linux_close): Refactor as methods of mips_linux_nat.
10128         (_initialize_mips_linux_nat): Adjust to C++ification.
10129
10130         * aix-thread.c (aix_thread_target): New class.
10131         (aix_thread_ops): Now an aix_thread_target.
10132         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10133         (aix_thread_fetch_registers, aix_thread_store_registers)
10134         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10135         (aix_thread_thread_alive, aix_thread_pid_to_str)
10136         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10137         Refactor as methods of aix_thread_target.
10138         (init_aix_thread_ops): Delete.
10139         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10140         and complete_target_initialization.
10141         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10142         (rs6000_nat_target): New class.
10143         (the_rs6000_nat_target): New.
10144         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10145         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10146         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10147         (super_create_inferior): Delete.
10148         (_initialize_rs6000_nat): Adjust to C++ification.
10149
10150         * arm-linux-nat.c (arm_linux_nat_target): New class.
10151         (the_arm_linux_nat_target): New.
10152         (arm_linux_fetch_inferior_registers)
10153         (arm_linux_store_inferior_registers, arm_linux_read_description)
10154         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10155         (arm_linux_remove_hw_breakpoint)
10156         (arm_linux_region_ok_for_hw_watchpoint)
10157         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10158         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10159         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10160         arm_linux_nat_target.
10161         (_initialize_arm_linux_nat): Adjust to C++ification.
10162
10163         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10164         (the_aarch64_linux_nat_target): New.
10165         (aarch64_linux_fetch_inferior_registers)
10166         (aarch64_linux_store_inferior_registers)
10167         (aarch64_linux_child_post_startup_inferior)
10168         (aarch64_linux_read_description)
10169         (aarch64_linux_can_use_hw_breakpoint)
10170         (aarch64_linux_insert_hw_breakpoint)
10171         (aarch64_linux_remove_hw_breakpoint)
10172         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10173         (aarch64_linux_region_ok_for_hw_watchpoint)
10174         (aarch64_linux_stopped_data_address)
10175         (aarch64_linux_stopped_by_watchpoint)
10176         (aarch64_linux_watchpoint_addr_within_range)
10177         (aarch64_linux_can_do_single_step): Refactor as methods of
10178         aarch64_linux_nat_target.
10179         (super_post_startup_inferior): Delete.
10180         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10181
10182         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10183         (the_hppa_linux_nat_target): New.
10184         (hppa_linux_fetch_inferior_registers)
10185         (hppa_linux_store_inferior_registers): Refactor as methods of
10186         hppa_linux_nat_target.
10187         (_initialize_hppa_linux_nat): Adjust to C++ification.
10188
10189         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10190         (the_ia64_linux_nat_target): New.
10191         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10192         (ia64_linux_stopped_data_address)
10193         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10194         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10195         ia64_linux_nat_target methods.
10196         (super_xfer_partial): Delete.
10197         (_initialize_ia64_linux_nat): Adjust to C++ification.
10198
10199         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10200         (the_m32r_linux_nat_target): New.
10201         (m32r_linux_fetch_inferior_registers)
10202         (m32r_linux_store_inferior_registers): Refactor as
10203         m32r_linux_nat_target methods.
10204         (_initialize_m32r_linux_nat): Adjust to C++ification.
10205
10206         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10207         (the_m68k_linux_nat_target): New.
10208         (m68k_linux_fetch_inferior_registers)
10209         (m68k_linux_store_inferior_registers): Refactor as
10210         m68k_linux_nat_target methods.
10211         (_initialize_m68k_linux_nat): Adjust to C++ification.
10212
10213         * s390-linux-nat.c (s390_linux_nat_target): New class.
10214         (the_s390_linux_nat_target): New.
10215         (s390_linux_fetch_inferior_registers)
10216         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10217         (s390_insert_watchpoint, s390_remove_watchpoint)
10218         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10219         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10220         (s390_auxv_parse, s390_read_description): Refactor as methods of
10221         s390_linux_nat_target.
10222         (_initialize_s390_nat): Adjust to C++ification.
10223
10224         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10225         (the_sparc_linux_nat_target): New.
10226         (_initialize_sparc_linux_nat): Adjust to C++ification.
10227         * sparc-nat.c (sparc_fetch_inferior_registers)
10228         (sparc_store_inferior_registers): Remove target_ops parameter.
10229         * sparc-nat.h (sparc_fetch_inferior_registers)
10230         (sparc_store_inferior_registers): Remove target_ops parameter.
10231         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10232         (the_sparc64_linux_nat_target): New.
10233         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10234
10235         * spu-linux-nat.c (spu_linux_nat_target): New class.
10236         (the_spu_linux_nat_target): New.
10237         (spu_child_post_startup_inferior, spu_child_post_attach)
10238         (spu_child_wait, spu_fetch_inferior_registers)
10239         (spu_store_inferior_registers, spu_xfer_partial)
10240         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10241         methods.
10242         (_initialize_spu_nat): Adjust to C++ification.
10243
10244         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10245         (the_tilegx_linux_nat_target): New.
10246         (fetch_inferior_registers, store_inferior_registers):
10247         Refactor as methods.
10248         (_initialize_tile_linux_nat): Adjust to C++ification.
10249
10250         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10251         (the_xtensa_linux_nat_target): New.
10252         (xtensa_linux_fetch_inferior_registers)
10253         (xtensa_linux_store_inferior_registers): Refactor as
10254         xtensa_linux_nat_target methods.
10255         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10256
10257         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10258         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10259         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10260         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10261         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10262         (fbsd_stopped_by_sw_breakpoint)
10263         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10264         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10265         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10266         (fbsd_post_startup_inferior, fbsd_post_attach)
10267         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10268         (fbsd_set_syscall_catchpoint)
10269         (super_xfer_partial, super_resume, super_wait)
10270         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10271         (fbsd_handle_debug_trap): Remove target_ops parameter.
10272         (fbsd_nat_add_target): Delete.
10273         * fbsd-nat.h: Include "inf-ptrace.h".
10274         (fbsd_nat_add_target): Delete.
10275         (USE_SIGTRAP_SIGINFO): Define.
10276         (fbsd_nat_target): New class.
10277
10278         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10279         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10280         (amd64bsd_target): Delete.
10281         * amd64-bsd-nat.h: New file.
10282         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10283         "x86-bsd-nat.h".
10284         (amd64_fbsd_nat_target): New class.
10285         (the_amd64_fbsd_nat_target): New.
10286         (amd64fbsd_read_description): Refactor as method of
10287         amd64_fbsd_nat_target.
10288         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10289         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10290         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10291         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10292         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10293         (i386bsd_target): Delete.
10294         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10295         (i386bsd_fetch_inferior_registers)
10296         (i386bsd_store_inferior_registers): Declare.
10297         (i386_bsd_nat_target): New class.
10298         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10299         (the_i386_fbsd_nat_target): New.
10300         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10301         i386_fbsd_nat_target methods.
10302         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10303         (_initialize_i386fbsd_nat): Adjust to C++ification.
10304         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10305         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10306         (_initialize_x86_bsd_nat): Adjust to C++ification.
10307         * x86-bsd-nat.h: Include "x86-nat.h".
10308         (x86bsd_target): Delete declaration.
10309         (x86bsd_nat_target): New class.
10310
10311         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10312         (the_aarch64_fbsd_nat_target): New.
10313         (aarch64_fbsd_fetch_inferior_registers)
10314         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10315         aarch64_fbsd_nat_target.
10316         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10317         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10318         (the_alpha_bsd_nat_target): New.
10319         (alphabsd_fetch_inferior_registers)
10320         (alphabsd_store_inferior_registers): Refactor as
10321         alpha_bsd_nat_target methods.
10322         (_initialize_alphabsd_nat): Refactor as methods of
10323         alpha_bsd_nat_target.
10324         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10325         (the_amd64_nbsd_nat_target): New.
10326         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10327         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10328         (the_amd64_obsd_nat_target): New.
10329         (_initialize_amd64obsd_nat): Adjust to C++ification.
10330         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10331         (the_arm_fbsd_nat_target): New.
10332         (arm_fbsd_fetch_inferior_registers)
10333         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10334         (_initialize_arm_fbsd_nat): Refactor as methods of
10335         arm_fbsd_nat_target.
10336         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10337         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10338         (the_arm_netbsd_nat_target): New.
10339         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10340         arm_netbsd_nat_target.
10341         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10342         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10343         (the_hppa_nbsd_nat_target): New.
10344         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10345         hppa_nbsd_nat_target methods.
10346         (_initialize_hppanbsd_nat): Adjust to C++ification.
10347         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10348         (the_hppa_obsd_nat_target): New.
10349         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10350         methods of hppa_obsd_nat_target.
10351         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10352         add_target.
10353         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10354         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10355         add_target.
10356         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10357         (_initialize_i386obsd_nat): Use add_target.
10358         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10359         (the_m68k_bsd_nat_target): New.
10360         (m68kbsd_fetch_inferior_registers)
10361         (m68kbsd_store_inferior_registers): Refactor as methods of
10362         m68k_bsd_nat_target.
10363         (_initialize_m68kbsd_nat): Adjust to C++ification.
10364         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10365         (the_mips_fbsd_nat_target): New.
10366         (mips_fbsd_fetch_inferior_registers)
10367         (mips_fbsd_store_inferior_registers): Refactor as methods of
10368         mips_fbsd_nat_target.
10369         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10370         add_target.
10371         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10372         (the_mips_nbsd_nat_target): New.
10373         (mipsnbsd_fetch_inferior_registers)
10374         (mipsnbsd_store_inferior_registers): Refactor as methods of
10375         mips_nbsd_nat_target.
10376         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10377         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10378         (the_mips64_obsd_nat_target): New.
10379         (mips64obsd_fetch_inferior_registers)
10380         (mips64obsd_store_inferior_registers): Refactor as methods of
10381         mips64_obsd_nat_target.
10382         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10383         add_target.
10384         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10385         nbsd_nat_target.
10386         * nbsd-nat.h: Include "inf-ptrace.h".
10387         (nbsd_nat_target): New class.
10388         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10389         (obsd_wait): Refactor as methods of obsd_nat_target.
10390         (obsd_add_target): Delete.
10391         * obsd-nat.h: Include "inf-ptrace.h".
10392         (obsd_nat_target): New class.
10393         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10394         (the_ppc_fbsd_nat_target): New.
10395         (ppcfbsd_fetch_inferior_registers)
10396         (ppcfbsd_store_inferior_registers): Refactor as methods of
10397         ppc_fbsd_nat_target.
10398         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10399         add_target.
10400         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10401         (the_ppc_nbsd_nat_target): New.
10402         (ppcnbsd_fetch_inferior_registers)
10403         (ppcnbsd_store_inferior_registers): Refactor as methods of
10404         ppc_nbsd_nat_target.
10405         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10406         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10407         (the_ppc_obsd_nat_target): New.
10408         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10409         methods of ppc_obsd_nat_target.
10410         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10411         add_target.
10412         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10413         (the_sh_nbsd_nat_target): New.
10414         (shnbsd_fetch_inferior_registers)
10415         (shnbsd_store_inferior_registers): Refactor as methods of
10416         sh_nbsd_nat_target.
10417         (_initialize_shnbsd_nat): Adjust to C++ification.
10418         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10419         (inf_ptrace_xfer_partial): Delete.
10420         (sparc_xfer_partial, sparc_target): Delete.
10421         * sparc-nat.h (sparc_fetch_inferior_registers)
10422         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10423         (sparc_target): Delete function declaration.
10424         (sparc_target): New template class.
10425         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10426         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10427         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10428         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10429         add_target.
10430         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10431         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10432         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10433         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10434         add_target.
10435         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10436         (the_vax_bsd_nat_target): New.
10437         (vaxbsd_fetch_inferior_registers)
10438         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10439         methods.
10440         (_initialize_vaxbsd_nat): Adjust to C++ification.
10441
10442         * bsd-kvm.c (bsd_kvm_target): New class.
10443         (bsd_kvm_ops): Now a bsd_kvm_target.
10444         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10445         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10446         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10447         bsd_kvm_target.
10448         (bsd_kvm_return_one): Delete.
10449         (bsd_kvm_add_target): Adjust to C++ification.
10450
10451         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10452         (nto_procfs_target_procfs): New classes.
10453         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10454         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10455         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10456         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10457         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10458         (procfs_remove_hw_breakpoint, procfs_resume)
10459         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10460         (procfs_kill_inferior, procfs_store_registers)
10461         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10462         as methods of nto_procfs_target.
10463         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10464         (nto_native_ops): Delete.
10465         (procfs_open, procfs_native_open): Delete.
10466         (nto_native_ops): Now an nto_procfs_target_native.
10467         (init_procfs_targets): Adjust to C++ification.
10468         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10469         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10470         Refactor as methods of nto_procfs_target.
10471
10472         * go32-nat.c (go32_nat_target): New class.
10473         (the_go32_nat_target): New.
10474         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10475         (go32_store_registers, go32_xfer_partial, go32_files_info)
10476         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10477         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10478         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10479         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10480         (go32_target): Delete.
10481         (_initialize_go32_nat): Adjust to C++ification.
10482
10483         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10484         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10485         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10486         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10487         gnu_nat_target.
10488         (gnu_target): Delete.
10489         * gnu-nat.h (gnu_target): Delete.
10490         (gnu_nat_target): New class.
10491         * i386-gnu-nat.c (gnu_base_target): New.
10492         (i386_gnu_nat_target): New class.
10493         (the_i386_gnu_nat_target): New.
10494         (_initialize_i386gnu_nat): Adjust to C++ification.
10495
10496 2018-05-02  Pedro Alves  <palves@redhat.com>
10497
10498         * bfd-target.c (target_bfd_xclose): Rename to ...
10499         (target_bfd_close): ... this.
10500         (target_bfd_reopen): Adjust.
10501         * target.c (target_close): Remove references to to_xclose.
10502         * target.h (target_ops::to_xclose): Delete.
10503         (target_ops::to_close): Update comments.
10504
10505 2018-05-02  Pedro Alves  <palves@redhat.com>
10506
10507         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10508         "linux-nat.h".
10509         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10510         * inf-ptrace.c (inf_ptrace_register_u_offset)
10511         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10512         (inf_ptrace_store_register, inf_ptrace_store_registers)
10513         (inf_ptrace_trad_target): Move to ...
10514         * linux-nat-trad.c: ... this new file.
10515         * linux-nat-trad.h: New file.
10516         * linux-nat.c (linux_target_install_ops): Make extern.
10517         (linux_trad_target): Delete.
10518         * linux-nat.h (linux_trad_target): Delete declaration.
10519         (linux_target_install_ops): Declare.
10520         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10521         "linux-nat.h".
10522
10523 2018-05-02  Pedro Alves  <palves@redhat.com>
10524
10525         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10526         procfs_target/add_target here.
10527         * procfs.c (procfs_target): Make static.
10528         (_initialize_procfs): Call add_target here.
10529         * procfs.h (struct target_ops): Remove forward declaration.
10530         (procfs_target): Remove declaration.
10531         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10532
10533 2018-05-02  Pedro Alves  <palves@redhat.com>
10534
10535         * procfs.c (procfs_stopped_by_watchpoint)
10536         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10537         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10538         Forward declare.
10539         (procfs_use_watchpoints): Delete, move contents...
10540         (procfs_target): ... here.
10541         * procfs.h (procfs_use_watchpoints): Delete declaration.
10542         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10543         procfs_use_watchpoints.
10544         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10545         procfs_use_watchpoints.
10546
10547 2018-05-02  Tom Tromey  <tom@tromey.com>
10548
10549         PR python/20084:
10550         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10551         and var_zuinteger_unlimited.
10552         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10553         and PARAM_ZUINTEGER_UNLIMITED.
10554         (set_parameter_value): Handle var_zuinteger and
10555         var_zuinteger_unlimited.
10556         (add_setshow_generic): Likewise.
10557         (parmpy_init): Likewise.
10558
10559 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10560
10561         PR rust/23124
10562         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10563         pointer is not null before dereferencing it.
10564
10565 2018-04-30  Tom Tromey  <tom@tromey.com>
10566
10567         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10568         is_mi_like_p.
10569
10570 2018-04-30  Tom Tromey  <tom@tromey.com>
10571
10572         * breakpoint.c (mention): Remove use of is_mi_like_p.
10573         (print_mention_ranged_breakpoint): Likewise.
10574         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10575         of is_mi_like_p.
10576
10577 2018-04-30  Tom Tromey  <tom@tromey.com>
10578
10579         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10580
10581 2018-04-30  Tom Tromey  <tom@tromey.com>
10582
10583         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10584         (info_spu_event_command): Remove some uses of is_mi_like_p.
10585
10586 2018-04-30  Tom Tromey  <tom@tromey.com>
10587
10588         * python/py-framefilter.c (py_print_single_arg)
10589         (enumerate_locals, py_print_args, py_print_frame): Remove some
10590         uses of is_mi_like_p.
10591
10592 2018-04-30  Tom Tromey  <tom@tromey.com>
10593
10594         * ui-out.c: Update.
10595         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10596         * ui-out.h (ui_out::is_mi_like_p): Now const.
10597         (ui_out::do_is_mi_like_p): Now const.
10598         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10599
10600 2018-04-30  Tom Tromey  <tom@tromey.com>
10601
10602         * varobj.c (varobj_set_visualizer): Use new_reference.
10603         * python/python.c (gdbpy_decode_line): Use new_reference.
10604         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10605         new_reference.
10606
10607 2018-04-30  Tom Tromey  <tom@tromey.com>
10608
10609         * varobj.c (install_new_value): Use new_reference.
10610         * value.h (value_incref): Return void.  Swap intro comment with
10611         value_decref.
10612         * value.c (set_value_parent): Use new_reference.
10613         (value_incref): Return void.  Update intro comment.
10614         (release_value): Use new_reference.
10615         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10616
10617 2018-04-30  Tom Tromey  <tom@tromey.com>
10618
10619         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10620         * gdb_bfd.h (new_bfd_ref): Remove.
10621         (gdb_bfd_open): Update comment.
10622         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10623         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10624         (gdb_bfd_fdopenr): Use new_reference.
10625         * exec.c (exec_file_attach): Use new_reference.
10626
10627 2018-04-30  Tom Tromey  <tom@tromey.com>
10628
10629         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10630         method.
10631
10632 2018-04-30  Tom Tromey  <tom@tromey.com>
10633
10634         * jit.c (jit_read_code_entry): Use type_align.
10635         * i386-tdep.c (i386_gdbarch_init): Don't call
10636         set_gdbarch_long_long_align_bit.
10637         * gdbarch.sh: Remove long_long_align_bit.
10638         * gdbarch.c, gdbarch.h: Rebuild.
10639         * arc-tdep.c (arc_type_align): New function.
10640         (arc_gdbarch_init): Use arc_type_align.  Don't call
10641         set_gdbarch_long_long_align_bit.
10642
10643 2018-04-30  Tom Tromey  <tom@tromey.com>
10644
10645         * rust-lang.c (rust_type_alignment): Remove.
10646         (rust_composite_type): Use type_align.
10647
10648 2018-04-30  Tom Tromey  <tom@tromey.com>
10649
10650         * NEWS: Mention Type.align.
10651         * python/py-type.c (typy_get_alignof): New function.
10652         (type_object_getset): Add "alignof".
10653
10654 2018-04-30  Tom Tromey  <tom@tromey.com>
10655
10656         PR exp/17095:
10657         * NEWS: Update.
10658         * std-operator.def (UNOP_ALIGNOF): New operator.
10659         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10660         New.
10661         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10662         * c-lang.c (c_op_print_tab): Add alignof.
10663         * c-exp.y (ALIGNOF): New token.
10664         (exp): Add "ALIGNOF" production.
10665         (ident_tokens): Add _Alignof and alignof.
10666
10667 2018-04-30  Tom Tromey  <tom@tromey.com>
10668
10669         * i386-tdep.c (i386_type_align): New function.
10670         (i386_gdbarch_init): Update.
10671         * gdbarch.sh (type_align): New method.
10672         * gdbarch.c, gdbarch.h: Rebuild.
10673         * arch-utils.h (default_type_align): Declare.
10674         * arch-utils.c (default_type_align): New function.
10675         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10676         (struct type) <align_log2>: New field.
10677         <instance_flags>: Now a bitfield.
10678         (TYPE_RAW_ALIGN): New macro.
10679         (type_align, type_raw_align, set_type_align): Declare.
10680         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10681         functions.
10682         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10683         (get_alignment, maybe_set_alignment): New functions.
10684         (read_structure_type, read_enumeration_type, read_array_type)
10685         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10686         (read_subrange_type, read_base_type): Set type alignment.
10687
10688 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10689
10690         * dwarf2read.c (read_index_from_section): Use bool.
10691
10692 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10693
10694         PR gdb/22950
10695         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10696         with #ifdef.
10697
10698 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10699
10700         PR build/22873
10701         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10702         last step, and do it atomically.
10703
10704 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10705
10706         * compile/compile-c-types.c (convert_int, convert_float):
10707         Update for C FE v1.
10708
10709 2018-04-27  Tom Tromey  <tom@tromey.com>
10710
10711         PR rust/22545:
10712         * rust-lang.c (rust_inclusive_range_type_p): New function.
10713         (rust_range): Handle inclusive ranges.
10714         (rust_compute_range): Likewise.
10715         * rust-exp.y (struct rust_op) <inclusive>: New field.
10716         (DOTDOTEQ): New constant.
10717         (range_expr): Add "..=" productions.
10718         (operator_tokens): Add "..=" token.
10719         (ast_range): Add "inclusive" parameter.
10720         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10721         ranges.
10722         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10723         bounds values.
10724         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10725         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10726         Update comments.
10727         * expprint.c (print_subexp_standard): Handle new bounds values.
10728         (dump_subexp_body_standard): Likewise.
10729
10730 2018-04-27  Tom Tromey  <tom@tromey.com>
10731
10732         * configure: Rebuild.
10733         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10734         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10735         "OVERRIDE".
10736         (class symbol_needs_eval_context): Likewise.
10737         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10738         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10739         "virtual".
10740         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10741         "override".
10742         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10743         * aarch64-tdep.c (instruction_reader::read): Use "override".
10744         (instruction_reader_test::read): Likewise.
10745         * arm-tdep.c (instruction_reader::read): Use "override".
10746         (instruction_reader_thumb::read): Likewise.
10747
10748 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10749
10750         PR remote/9665
10751         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10752         instead of remote_send.
10753         (remote_send): Remove.
10754
10755 2018-04-26  Pedro Alves  <palves@redhat.com>
10756
10757         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10758         find_function_start_sal instead of find_pc_line.
10759
10760 2018-04-26  Pedro Alves  <palves@redhat.com>
10761
10762         * breakpoint.c (set_breakpoint_location_function): Handle
10763         mst_data_gnu_ifunc.
10764         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10765         * elfread.c (elf_symtab_read): Give data symbols with
10766         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10767         (elf_rel_plt_read): Update comment.
10768         * linespec.c (convert_linespec_to_sals): Handle
10769         mst_data_gnu_ifunc.
10770         (minsym_found): Handle mst_data_gnu_ifunc.
10771         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10772         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10773         * parse.c (find_minsym_type_and_address): Handle
10774         mst_data_gnu_ifunc.
10775         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10776         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10777         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10778         comment.
10779         <mst_data_gnu_ifunc>: New enumerator.
10780
10781 2018-04-26  Pedro Alves  <palves@redhat.com>
10782
10783         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10784         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10785         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10786         Handle it.
10787         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10788         (lookup_minimal_symbol_by_pc): Adjust.
10789         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10790         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10791         * minsyms.h (lookup_msym_prefer): New enum.
10792         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10793         parameter by a lookup_msym_prefer parameter.
10794
10795 2018-04-26  Pedro Alves  <palves@redhat.com>
10796
10797         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10798         ends in "@plt" instead of looking at the symbol's section.
10799
10800 2018-04-26  Pedro Alves  <palves@redhat.com>
10801
10802         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10803         all references.
10804         (find_pc_partial_function_gnu_ifunc): Rename to ...
10805         (find_pc_partial_function): ... this, and remove references to
10806         'is_gnu_ifunc_p'.
10807         (find_pc_partial_function): Delete old implementation.
10808         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10809
10810 2018-04-26  Pedro Alves  <palves@redhat.com>
10811
10812         * linespec.c (struct bound_minimal_symbol_search_key): New.
10813         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10814         skip first line if we found a GNU ifunc minimal symbol by name.
10815         (compare_msymbols): Change parameters to work with a destructured
10816         lhs minsym.
10817         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10818         functions.
10819
10820 2018-04-26  Pedro Alves  <palves@redhat.com>
10821
10822         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10823         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10824         address/name.
10825         (add_location_to_breakpoint): Store the minsym and the objfile in
10826         the breakpoint location.
10827         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10828         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10829         Record the minsym in the sal.
10830         * symtab.h (symtab_and_line) <msymbol>: New field.
10831
10832 2018-04-26  Pedro Alves  <palves@redhat.com>
10833
10834         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10835         unless we actually resolved the ifunc.
10836
10837 2018-04-26  Pedro Alves  <palves@redhat.com>
10838
10839         * c-exp.y (variable production): Prefer ifunc minsyms over
10840         regular function symbols.
10841         * symtab.c (find_gnu_ifunc): New function.
10842         * minsyms.h (lookup_msym_prefer): New enum.
10843         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10844         parameter by a lookup_msym_prefer parameter.
10845         * symtab.h (find_gnu_ifunc): New declaration.
10846
10847 2018-04-26  Pedro Alves  <palves@redhat.com>
10848
10849         * blockframe.c (find_gnu_ifunc_target_type): New function.
10850         (find_function_type): New.
10851         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10852         return a value with a memory address.
10853         (eval_call): For calls to GNU ifunc functions, try to find the
10854         type of the target function from the type that the resolver
10855         returns.
10856         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10857         symbols.
10858         * infcall.c (find_function_return_type): Delete.
10859         (find_function_addr): Add 'function_type' parameter.  For calls to
10860         GNU ifunc functions, try to find the type of the target function
10861         from the type that the resolver returns, and return it via
10862         FUNCTION_TYPE.
10863         (call_function_by_hand_dummy): Adjust to use the function type
10864         returned by find_function_addr.
10865         (find_function_addr): Add 'function_type' parameter and move
10866         description here.
10867         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10868         declarations.
10869
10870 2018-04-26  Pedro Alves  <palves@redhat.com>
10871
10872         * c-exp.y (variable production): Skip finding an alias for ifunc
10873         symbols.
10874
10875 2018-04-26  Pedro Alves  <palves@redhat.com>
10876
10877         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10878
10879 2018-04-25  Pedro Alves  <palves@redhat.com>
10880
10881         * infcmd.c (kill_command): Print the pid as string, not the whole
10882         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10883         message.
10884         * remote.c (remote_detach_1): Print the pid as string, not the
10885         whole thread's ptid.
10886
10887 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10888             Sergio Durigan Junior  <sergiodj@redhat.com>
10889             Pedro Alves  <palves@redhat.com>
10890
10891         * infcmd.c (kill_command): Print message when inferior has
10892         been killed.
10893         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10894         '1'.
10895         (add_inferior): Improve message printed when
10896         'print_inferior_events' is on.
10897         (exit_inferior): Remove message printed when
10898         'print_inferior_events' is on.
10899         (detach_inferior): Improve message printed when
10900         'print_inferior_events' is on.
10901         (initialize_inferiors): Use 'add_inferior_silent' to set
10902         'current_inferior_'.
10903         * inferior.h (print_inferior_events): Declare here as
10904         'extern'.
10905         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10906         '[Detaching...]' messages when 'print_inferior_events' is on.
10907         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10908         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10909         'Detaching after fork from child...', replace it by '... from
10910         parent...'.
10911         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10912         prefix/suffix when printing 'Detaching...' messages.  Print
10913         them when 'print_inferior_events' is on.
10914         * remote.c (remote_detach_1): Print message when detaching
10915         from inferior and '!is_fork_parent'.
10916
10917 2018-04-24  Tom Tromey  <tom@tromey.com>
10918
10919         * cli-out.h: Reindent.
10920
10921 2018-04-24  Tom Tromey  <tom@tromey.com>
10922
10923         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10924         (cli_ui_out::do_field_string): Use fputs_filtered.
10925         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10926
10927 2018-04-23  Tom Tromey  <tom@tromey.com>
10928
10929         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10930         gdb::unique_xmalloc_ptr.
10931
10932 2018-04-23  Tom Tromey  <tom@tromey.com>
10933
10934         * configure: Rebuild.
10935
10936 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10937
10938         PR gdb/23095
10939         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10940         prepare_for_testing.  Set normal_bp to r_debug_state if target
10941         is bsd.
10942
10943 2018-04-21  Pedro Alves  <palves@redhat.com>
10944             Rajendra SY  <rajendra.sy@gmail.com>
10945
10946         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10947         * remote.c (extended_remote_attach): In all-stop mode, mark the
10948         thread as executing.
10949
10950 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10951
10952         * thread.c (thread_apply_all_command): Fix comment.
10953         (thread_command): Fix comment.
10954
10955 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10956
10957         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10958         parameter.
10959         * features/aarch64-core.c (create_feature_aarch64_core):
10960         Regenerate.
10961         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10962         Likewise.
10963         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10964         Likewise.
10965         * features/i386/32bit-avx512.c
10966         (create_feature_i386_32bit_avx512): Likewise.
10967         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10968         Likewise.
10969         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10970         Likewise.
10971         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10972         Likewise.
10973         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10974         Likewise.
10975         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10976         Likewise.
10977         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10978         Likewise.
10979         * features/i386/64bit-avx512.c
10980         (create_feature_i386_64bit_avx512): Likewise.
10981         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10982         Likewise.
10983         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10984         Likewise.
10985         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10986         Likewise.
10987         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10988         Likewise.
10989         * features/i386/64bit-segments.c
10990         (create_feature_i386_64bit_segments): Likewise.
10991         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10992         Likewise.
10993         * features/i386/x32-core.c
10994         (create_feature_i386_x32_core): Likewise.
10995         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10996         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10997         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10998         * target-descriptions.c: In generated code, don't pass xml
10999         filename.
11000
11001 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11002
11003         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11004         (print_xml_feature::visit_post): Likewise.
11005         (print_xml_feature::visit): Likewise.
11006         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11007         (print_xml_feature): Add new class.
11008         * regformats/regdat.sh: Null xmltarget on feature targets.
11009         * target-descriptions.c (struct target_desc): Add xmltarget.
11010         (maintenance_check_tdesc_xml_convert): Add unittest function.
11011         (tdesc_get_features_xml): Add function to get xml.
11012         (maintenance_check_xml_descriptions): Test xml generation.
11013         * xml-tdesc.c (string_read_description_xml): Add function.
11014         * xml-tdesc.h (string_read_description_xml): Add declaration.
11015
11016 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11017
11018         * features/Makefile: Add feature marker to targets with new style
11019         target descriptions.
11020         * regformats/aarch64.dat: Regenerate.
11021         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11022         * regformats/i386/amd64-avx-linux.dat: Likewise.
11023         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11024         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11025         * regformats/i386/amd64-linux.dat: Likewise.
11026         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11027         * regformats/i386/amd64.dat: Likewise.
11028         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11029         * regformats/i386/i386-avx-linux.dat: Likewise.
11030         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11031         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11032         * regformats/i386/i386-linux.dat: Likewise.
11033         * regformats/i386/i386-mmx-linux.dat: Likewise.
11034         * regformats/i386/i386-mpx-linux.dat: Likewise.
11035         * regformats/i386/i386.dat: Likewise.
11036         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11037         * regformats/i386/x32-avx-linux.dat: Likewise.
11038         * regformats/i386/x32-linux.dat: Likewise.
11039         * regformats/tic6x-c62x-linux.dat: Likewise.
11040         * regformats/tic6x-c64x-linux.dat: Likewise.
11041         * regformats/tic6x-c64xp-linux.dat: Likewise.
11042         * regformats/regdat.sh: Parse feature marker.
11043
11044 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11045
11046         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11047         (tdesc_osabi_name): Likewise.
11048         * target-descriptions.c (tdesc_architecture_name): Add new
11049         function.
11050         (tdesc_osabi_name): Likewise.
11051
11052 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11053
11054         * common/tdesc.c (tdesc_predefined_type): Move to here.
11055         (tdesc_named_type): Likewise.
11056         (tdesc_create_vector): Likewise.
11057         (tdesc_create_struct): Likewise.
11058         (tdesc_set_struct_size): Likewise.
11059         (tdesc_create_union): Likewise.
11060         (tdesc_create_flags): Likewise.
11061         (tdesc_create_enum): Likewise.
11062         (tdesc_add_field): Likewise.
11063         (tdesc_add_typed_bitfield): Likewise.
11064         (tdesc_add_bitfield): Likewise.
11065         (tdesc_add_flag): Likewise.
11066         (tdesc_add_enum_value): Likewise.
11067         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11068         (struct tdesc_type_vector): Likewise.
11069         (struct tdesc_type_field): Likewise.
11070         (struct tdesc_type_with_fields): Likewise.
11071         (tdesc_create_enum): Add declaration.
11072         (tdesc_add_typed_bitfield): Likewise.
11073         (tdesc_add_enum_value): Likewise.
11074         * target-descriptions.c (tdesc_type_field): Move from here.
11075         (tdesc_type_builtin): Likewise.
11076         (tdesc_type_vector): Likewise.
11077         (tdesc_type_with_fields): Likewise.
11078         (tdesc_predefined_types): Likewise.
11079         (tdesc_named_type): Likewise.
11080         (tdesc_create_vector): Likewise.
11081         (tdesc_create_struct): Likewise.
11082         (tdesc_set_struct_size): Likewise.
11083         (tdesc_create_union): Likewise.
11084         (tdesc_create_flags): Likewise.
11085         (tdesc_create_enum): Likewise.
11086         (tdesc_add_field): Likewise.
11087         (tdesc_add_typed_bitfield): Likewise.
11088         (tdesc_add_bitfield): Likewise.
11089         (tdesc_add_flag): Likewise.
11090         (tdesc_add_enum_value): Likewise.
11091         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11092         (tdesc_add_typed_bitfield): Likewise.
11093         (tdesc_add_enum_value): Likewise.
11094
11095 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11096
11097         * common/tdesc.c (tdesc_feature::accept): Move to here.
11098         (tdesc_feature::operator==): Likewise.
11099         (tdesc_create_reg): Likewise.
11100         * common/tdesc.h (tdesc_type_kind): Likewise.
11101         (struct tdesc_type): Likewise.
11102         (struct tdesc_feature): Likewise.
11103         * regformats/regdat.sh: Create a feature.
11104         * target-descriptions.c (tdesc_type_kind): Move from here.
11105         (tdesc_type): Likewise.
11106         (tdesc_type_up): Likewise.
11107         (tdesc_feature): Likewise.
11108         (tdesc_create_reg): Likewise.
11109
11110 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11111
11112         * Makefile.in: Add arch/tdesc.c
11113         * common/tdesc.c: New file.
11114         * common/tdesc.h (tdesc_element_visitor): Move to here.
11115         (tdesc_element): Likewise.
11116         (tdesc_reg): Likewise.
11117         (tdesc_reg_up): Likewise.
11118         * regformats/regdef.h (reg): Add offset to constructors.
11119         * target-descriptions.c (tdesc_element_visitor): Move from here.
11120         (tdesc_element): Likewise.
11121         (tdesc_reg): Likewise.
11122         (tdesc_reg_up): Likewise.
11123
11124 2018-04-17  Tom Tromey  <tom@tromey.com>
11125
11126         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11127         discriminant field.
11128
11129 2018-04-17  Tom Tromey  <tom@tromey.com>
11130
11131         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11132
11133 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11134
11135         * symtab.c (print_symbol_info): Skip printing filename and line
11136         number when `last' is NULL.
11137         (symtab_symbol_info): Use empty string instead of NULL for first
11138         invocation of print_symbol_info.
11139         (rbreak_command): Pass NULL to `last' parameter of
11140         print_symbol_info.
11141
11142 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11143
11144         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11145         instead of nullptr.
11146
11147 2018-04-16  Pedro Alves  <palves@redhat.com>
11148
11149         * MAINTAINERS (sh): Remove.
11150         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11151         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11152         (ALLDEPFILES): Remove sh64-tdep.c.
11153         * NEWS: Mentions that support for SH-5/SH64 is removed.
11154         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11155         (sh*-*-openbsd*): Ditto.
11156         (sh64-*-elf*): Remove.
11157         (sh*): Remove.
11158         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11159         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11160         * sh-tdep.c: No longer include "sh64-tdep.h".
11161         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11162         * sh64-tdep.c, sh64-tdep.h: Remove files.
11163
11164 2018-04-16  Pedro Alves  <palves@redhat.com>
11165
11166         * MAINTAINERS: Remove m88k.
11167         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11168         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11169         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11170         * NEWS: Mention that support for m88k was removed.
11171         * configure.host (m88*-*-*): Remove support.
11172         * configure.nat (m88k-*-*): Remove support.
11173         * configure.tgt (m88*-*-openbsd*): Remove.
11174         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11175
11176 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11177
11178         * configure.tgt (x86_tobjs): New variable.
11179         (amd64_tobjs, i386_tobjs): Use it.
11180
11181 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11182
11183         * symtab.c (print_symbol_info): Precede the symbol definition by
11184         the line number when available.
11185         * NEWS: Advertise this enhancement.
11186
11187 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11188
11189         * NEWS (New options): announce set/show record btrace cpu.
11190         * btrace.c: Include record-btrace.h.
11191         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11192         the vendor is unknown.
11193         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11194         Maybe overwrite the btrace configuration's cpu.
11195         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11196         (btrace_fetch): Add cpu parameter.  Update callers.
11197         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11198         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11199         errata workarounds if the vendor is unknown.
11200         * python/py-record-btrace.c: Include record-btrace.h.
11201         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11202         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11203         * record-btrace.c (record_btrace_cpu_state_kind): New.
11204         (record_btrace_cpu): New.
11205         (set_record_btrace_cpu_cmdlist): New.
11206         (record_btrace_get_cpu): New.
11207         (require_btrace_thread, record_btrace_info)
11208         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11209         (cmd_set_record_btrace_cpu_none): New.
11210         (cmd_set_record_btrace_cpu_auto): New.
11211         (cmd_set_record_btrace_cpu): New.
11212         (cmd_show_record_btrace_cpu): New.
11213         (_initialize_record_btrace): Initialize set/show record btrace cpu
11214         commands.
11215         * record-btrace.h (record_btrace_get_cpu): New.
11216
11217 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11218
11219         * record.c (set_record_command): Fix typo in message.
11220
11221 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11222
11223         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11224
11225 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11226
11227         * infrun.c (process_event_stop_test): Call
11228         gdbarch_in_indirect_branch_thunk.
11229         * gdbarch.sh (in_indirect_branch_thunk): New.
11230         * gdbarch.c: Regenerated.
11231         * gdbarch.h: Regenerated.
11232         * x86-tdep.h: New.
11233         * x86-tdep.c: New.
11234         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11235         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11236         (ALLDEPFILES): Add x86-tdep.c.
11237         * arch-utils.h (default_in_indirect_branch_thunk): New.
11238         * arch-utils.c (default_in_indirect_branch_thunk): New.
11239         * i386-tdep: Include x86-tdep.h.
11240         (i386_in_indirect_branch_thunk): New.
11241         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11242         function.
11243         * amd64-tdep: Include x86-tdep.h.
11244         (amd64_in_indirect_branch_thunk): New.
11245         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11246
11247 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11248
11249         PR gdb/23053
11250         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11251         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11252         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11253         regression.
11254
11255 2018-04-12  Tom Tromey  <tom@tromey.com>
11256
11257         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11258         (rust_evaluate_subexp): Likewise.
11259
11260 2018-04-12  Pedro Alves  <palves@redhat.com>
11261
11262         * procfs.c (procfs_detach): Make forward declaration's prototype
11263         match definition's protototype.
11264         (proc_get_LDT_entry): Remove stale do_cleanups call.
11265
11266 2018-04-12  Pedro Alves  <palves@redhat.com>
11267
11268         * target.h (target_ops::to_has_exited): Delete.
11269         (target_has_exited): Delete.
11270         * target-delegates.c: Regenerate.
11271
11272 2018-04-11  Pedro Alves  <palves@redhat.com>
11273
11274         * target.c (fileio_fh_t::t): Add comment.
11275         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11276         (target_fileio_close): Handle a NULL target.
11277         (invalidate_fileio_fh): New.
11278         (target_close): Call it.
11279         * remote.c (remote_hostio_send_command): No longer check whether
11280         remote_desc is open.
11281
11282 2018-04-11  Pedro Alves  <palves@redhat.com>
11283
11284         * target.c (fileio_fh_t): Make it a named struct instead of a
11285         typedef.
11286         (fileio_fh_t::is_closed): New method.
11287         (DEF_VEC_O (fileio_fh_t)): Remove.
11288         (fileio_fhandles): Now a std::vector.
11289         (is_closed_fileio_fh): Delete.
11290         (acquire_fileio_fd): Adjust.  Rename parameters.
11291         (release_fileio_fd): Adjust.
11292         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11293         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11294         (target_fileio_close): Adjust.
11295
11296 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11297
11298         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11299         index.
11300
11301 2018-04-10  Pedro Alves  <palves@redhat.com>
11302
11303         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11304         (scoped_finish_thread_state): New class.
11305         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11306         cleanup.
11307         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11308         (fetch_inferior_event, normal_stop): Likewise.
11309         * thread.c (finish_thread_state_cleanup): Delete.
11310
11311 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11312             Pedro Alves  <palves@redhat.com>
11313
11314         * value.c: Include "selftest.h" and "common/array-view.h".
11315         (struct range) <operator ==>: New.
11316         (test_ranges_contain): New.
11317         (check_ranges_vector): New.
11318         (test_insert_into_bit_range_vector): New.
11319         (_initialize_values): Register selftests.
11320         * common/array-view.h (operator==, operator!=): New.
11321
11322 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11323
11324         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11325         an iterator.
11326         * inline-frame.c: Include <algorithm>.
11327         (struct inline_state): Add constructor.
11328         (inline_state_s): Remove.
11329         (DEF_VEC_O(inline_state_s)): Remove.
11330         (inline_states): Change type to std::vector.
11331         (find_inline_frame_state): Adjust to std::vector.
11332         (allocate_inline_frame_state): Remove.
11333         (clear_inline_frame_state): Adjust to std::vector.
11334         (skip_inline_frames): Adjust to std::vector.
11335
11336 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11337
11338         * tracepoint.h (struct trace_state_variable): Add constructor.
11339         <name>: Change type to std::string.
11340         * tracepoint.c (tsv_s): Remove.
11341         (DEF_VEC_O(tsv_s)): Remove.
11342         (tvariables): Change to std::vector.
11343         (create_trace_state_variable): Adjust to std::vector.
11344         (find_trace_state_variable): Likewise.
11345         (find_trace_state_variable_by_number): Likewise.
11346         (delete_trace_state_variable): Likewise.
11347         (trace_variable_command): Adjust to std::string.
11348         (delete_trace_variable_command): Likewise.
11349         (tvariables_info_1): Adjust to std::vector.
11350         (save_trace_state_variables): Likewise.
11351         (start_tracing): Likewise.
11352         (merge_uploaded_trace_state_variables): Adjust to std::vector
11353         and std::string.
11354         * target.h (struct target_ops)
11355         <to_download_trace_state_variable>: Pass reference to
11356         trace_state_variable.
11357         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11358         * target-delegates.c: Re-generate.
11359         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11360         (mi_tsv_deleted): Likewise.
11361         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11362         * remote.c (remote_download_trace_state_variable): Change
11363         pointer to reference and adjust.
11364         * make-target-delegates (parse_argtypes): Handle references.
11365         (write_function_header): Likewise.
11366         (munge_type): Likewise.
11367
11368 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11369
11370         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11371         string_view-selftests.c.
11372         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11373         testsuite.
11374         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11375         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11376         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11377         * unittests/basic_string_view/element_access/char/1.cc:
11378         Likewise.
11379         * unittests/basic_string_view/element_access/char/empty.cc:
11380         Likewise.
11381         * unittests/basic_string_view/element_access/char/front_back.cc:
11382         Likewise.
11383         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11384         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11385         Likewise.
11386         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11387         Likewise.
11388         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11389         Likewise.
11390         * unittests/basic_string_view/operations/compare/char/1.cc:
11391         Likewise.
11392         * unittests/basic_string_view/operations/compare/char/13650.cc:
11393         Likewise.
11394         * unittests/basic_string_view/operations/copy/char/1.cc:
11395         Likewise.
11396         * unittests/basic_string_view/operations/data/char/1.cc:
11397         Likewise.
11398         * unittests/basic_string_view/operations/find/char/1.cc:
11399         Likewise.
11400         * unittests/basic_string_view/operations/find/char/2.cc:
11401         Likewise.
11402         * unittests/basic_string_view/operations/find/char/3.cc:
11403         Likewise.
11404         * unittests/basic_string_view/operations/find/char/4.cc:
11405         Likewise.
11406         * unittests/basic_string_view/operations/rfind/char/1.cc:
11407         Likewise.
11408         * unittests/basic_string_view/operations/rfind/char/2.cc:
11409         Likewise.
11410         * unittests/basic_string_view/operations/rfind/char/3.cc:
11411         Likewise.
11412         * unittests/basic_string_view/operations/substr/char/1.cc:
11413         Likewise.
11414         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11415         * unittests/string_view-selftests.c: New file.
11416
11417 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11418
11419         * unittests/basic_string_view/capacity/1.cc: New file.
11420         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11421         * unittests/basic_string_view/cons/char/1.cc: New file.
11422         * unittests/basic_string_view/cons/char/2.cc: New file.
11423         * unittests/basic_string_view/cons/char/3.cc: New file.
11424         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11425         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11426         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11427         * unittests/basic_string_view/element_access/char/1.cc: New file.
11428         * unittests/basic_string_view/element_access/char/2.cc: New file.
11429         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11430         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11431         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11432         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11433         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11434         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11435         * unittests/basic_string_view/include.cc: New file.
11436         * unittests/basic_string_view/inserters/char/1.cc: New file.
11437         * unittests/basic_string_view/inserters/char/2.cc: New file.
11438         * unittests/basic_string_view/inserters/char/3.cc: New file.
11439         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11440         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11441         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11442         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11443         * unittests/basic_string_view/literals/types.cc: New file.
11444         * unittests/basic_string_view/literals/values.cc: New file.
11445         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11446         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11447         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11448         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11449         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11450         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11451         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11452         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11453         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11454         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11455         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11456         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11457         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11458         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11459         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11460         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11461         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11462         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11463         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11464         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11465         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11466         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11467         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11468         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11469         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11470         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11471         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11472         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11473         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11474         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11475         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11476         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11477         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11478         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11479         * unittests/basic_string_view/operators/char/2.cc: New file.
11480         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11481         * unittests/basic_string_view/range_access/char/1.cc: New file.
11482         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11483         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11484         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11485         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11486         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11487         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11488         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11489         * unittests/basic_string_view/typedefs.cc: New file.
11490         * unittests/basic_string_view/types/1.cc: New file.
11491
11492 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11493
11494         * common/gdb_string_view.h: Remove libstdc++ implementation
11495         details, adjust to gdb reality.
11496         * common/gdb_string_view.tcc: Likewise.
11497         * cli/cli-script.c (struct string_view): Remove.
11498         (user_args) <m_args>: Change element type to gdb::string_view.
11499         (user_args::insert_args): Adjust.
11500
11501 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11502
11503         * common/gdb_string_view.h: New file.
11504         * common/gdb_string_view.tcc: New file.
11505
11506 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11507
11508         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11509         * configure: Re-generate.
11510
11511 2018-04-09  Pedro Alves  <palves@redhat.com>
11512
11513         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11514         (set_target_gdbarch): Call
11515         gdb::observers::architecture_changed.notify instead of
11516         observer_notify_architecture_changed.
11517
11518 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11519
11520         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11521         (do_restore_current_traceframe_cleanup): Remove.
11522         (restore_current_traceframe_cleanup_dtor): Remove.
11523         (make_cleanup_restore_current_traceframe): Remove.
11524         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11525         New.
11526         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11527         * infrun.c (fetch_inferior_event): Use
11528         scoped_restore_current_traceframe.
11529
11530 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11531
11532         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11533         Remove.
11534         <n_allocated_type_units>: Remove.
11535         <all_type_units>: Change to std::vector.
11536         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11537         to std::vector change.
11538         (dwarf2_per_objfile::get_cutu): Likewise.
11539         (dwarf2_per_objfile::get_tu): Likewise.
11540         (create_signatured_type_table_from_index): Likewise.
11541         (create_signatured_type_table_from_debug_names): Likewise.
11542         (dw2_symtab_iter_next): Likewise.
11543         (dw2_print_stats): Likewise.
11544         (dw2_expand_all_symtabs): Likewise.
11545         (dw2_expand_marked_cus): Likewise.
11546         (dw2_debug_names_iterator::next): Likewise.
11547         (dwarf2_initialize_objfile): Likewise.
11548         (add_signatured_type_cu_to_table): Likewise.
11549         (create_all_type_units): Likewise.
11550         (add_type_unit): Likewise.
11551         (struct tu_abbrev_offset): Add constructor.
11552         (build_type_psymtabs_1): Adjust to std::vector change.
11553         (print_tu_stats): Likewise.
11554         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11555         (write_debug_names): Likewise.
11556
11557 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11558
11559         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11560         Make an std::vector.
11561         <n_comp_units>: Remove.
11562         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11563         to std::vector change.
11564         (dwarf2_per_objfile::get_cutu): Likewise.
11565         (dwarf2_per_objfile::get_cu): Likewise.
11566         (create_cus_from_index): Likewise.
11567         (create_addrmap_from_index): Likewise.
11568         (create_addrmap_from_aranges): Likewise.
11569         (dwarf2_read_index): Likewise.
11570         (dw2_find_last_source_symtab): Likewise.
11571         (dw2_map_symtabs_matching_filename): Likewise.
11572         (dw2_symtab_iter_next): Likewise.
11573         (dw2_print_stats): Likewise.
11574         (dw2_expand_all_symtabs): Likewise.
11575         (dw2_expand_symtabs_with_fullname): Likewise.
11576         (dw2_expand_marked_cus): Likewise.
11577         (dw2_map_symbol_filenames): Likewise.
11578         (create_cus_from_debug_names): Likewise.
11579         (dwarf2_read_debug_names): Likewise.
11580         (dw2_debug_names_iterator::next): Likewise.
11581         (dwarf2_initialize_objfile): Likewise.
11582         (set_partial_user): Likewise.
11583         (dwarf2_build_psymtabs_hard): Likewise.
11584         (read_comp_units_from_section): Remove arguments, adjust to
11585         std::vector change.
11586         (create_all_comp_units): Adjust to std::vector and
11587         read_comp_units_from_section changes.
11588         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11589         change.
11590         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11591         (psyms_seen_size): Likewise.
11592         (write_gdbindex): Likewise.
11593         (write_debug_names): Likewise.
11594
11595 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11596
11597         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11598         with dwarf2_per_objfile.
11599         (create_cus_from_index): Likewise.
11600         (create_signatured_type_table_from_index): Likewise.
11601         (dwarf2_read_index): Likewise.
11602         (dwarf2_initialize_objfile): Likewise.
11603         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11604         per_cu rather than get_dwarf2_per_objfile.
11605
11606 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11607
11608         * dwarf2read.h (struct signatured_type): Forward declare.
11609         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11610         New methods.
11611         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11612         (dw2_get_cutu): ...this.
11613         (dwarf2_per_objfile::get_cu): Rename from...
11614         (dw2_get_cu): ...this.
11615         (dwarf2_per_objfile::get_tu): New.
11616         (create_addrmap_from_index): Adjust.
11617         (create_addrmap_from_aranges): Adjust.
11618         (dw2_find_last_source_symtab): Adjust.
11619         (dw2_map_symtabs_matching_filename): Adjust.
11620         (dw2_symtab_iter_next): Adjust.
11621         (dw2_print_stats): Adjust.
11622         (dw2_expand_all_symtabs): Adjust.
11623         (dw2_expand_symtabs_with_fullname): Adjust.
11624         (dw2_expand_marked_cus): Adjust.
11625         (dw_expand_symtabs_matching_file_matcher): Adjust.
11626         (dw2_map_symbol_filenames): Adjust.
11627         (dw2_debug_names_iterator::next): Adjust.
11628         (dwarf2_initialize_objfile): Adjust.
11629         (set_partial_user): Adjust.
11630         (dwarf2_build_psymtabs_hard): Adjust.
11631
11632 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11633
11634         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11635         Remove unused variables.
11636         (dw2_map_symtabs_matching_filename): Likewise.
11637         (dwarf2_record_block_ranges): Likewise.
11638         (dwarf2_read_addr_index): Likewise.
11639         (follow_die_offset): Likewise.
11640
11641 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11642
11643         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11644         to symbol_file_add_main.
11645
11646 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11647
11648         PR mi/22299
11649         * mi/mi-console.c (do_fputc_async_safe): New.
11650         (mi_console_file::write_async_safe): New.
11651         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11652         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11653         New.
11654         * ui-file.c (ui_file::putstrn): Adjust call to
11655         fputstrn_unfiltered.
11656         * utils.c (printchar): Replace do_fputs and do_fprintf
11657         parameters by do_fputc.
11658         (fputstr_filtered): Adjust call to printchar.
11659         (fputstr_unfiltered): Likewise.
11660         (fputstrn_filtered): Likewise.
11661         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11662         printchar.
11663         * utils.h (do_fputc_ftype): New typedef.
11664         (fputstrn_unfiltered): Add do_fputc parameter.
11665
11666 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11667
11668         * regformats/i386/i386-avx.dat: Remove.
11669
11670 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11671
11672         PR gdb/22979
11673         * amd64-tdep.c (amd64_none_init_abi): New function.
11674         (amd64_x32_none_init_abi): New function.
11675         (_initialize_amd64_tdep): Register handlers for x86-64 and
11676         x64_32 with GDB_OSABI_NONE.
11677         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11678         GDB_OSABI_NONE osabi.
11679
11680 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11681
11682         PR gdb/22980
11683         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11684         GDB_OSABI_NONE.
11685         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11686         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11687
11688 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11689
11690         * common/byte-vector.h (char_vector): New type.
11691         * target.h (target_read_alloc): Return
11692         gdb::optional<byte_vector>.
11693         (target_read_stralloc): Return gdb::optional<char_vector>.
11694         (target_get_osdata): Return gdb::optional<char_vector>.
11695         * target.c (target_read_alloc_1): Templatize.  Replacement
11696         manual memory management with vector.
11697         (target_read_alloc): Change return type, adjust.
11698         (target_read_stralloc): Change return type, adjust.
11699         (target_get_osdata): Change return type, adjust.
11700         * auxv.c (struct auxv_info) <length>: Remove.
11701         <data>: Change type to gdb::optional<byte_vector>.
11702         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11703         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11704         (target_auxv_search): Adjust.
11705         (fprint_target_auxv): Adjust.
11706         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11707         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11708         (linux_make_corefile_notes): Adjust.
11709         * osdata.c (get_osdata): Adjust.
11710         * remote.c (remote_get_threads_with_qxfer): Adjust.
11711         (remote_memory_map): Adjust.
11712         (remote_traceframe_info): Adjust.
11713         (btrace_read_config): Adjust.
11714         (remote_read_btrace): Adjust.
11715         (remote_pid_to_exec_file): Adjust.
11716         * solib-aix.c (solib_aix_get_library_list): Adjust.
11717         * solib-dsbt.c (decode_loadmap): Don't free buf.
11718         (dsbt_get_initial_loadmaps): Adjust.
11719         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11720         * solib-target.c (solib_target_current_sos): Adjust.
11721         * tracepoint.c (sdata_make_value): Adjust.
11722         * xml-support.c (xinclude_start_include): Adjust.
11723         (xml_fetch_content_from_file): Adjust.
11724         * xml-support.h (xml_fetch_another): Change return type.
11725         (xml_fetch_content_from_file): Change return type.
11726         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11727         * xml-tdesc.c (file_read_description_xml): Adjust.
11728         (fetch_available_features_from_target): Change return type.
11729         (target_fetch_description_xml): Adjust.
11730         (target_read_description_xml): Adjust.
11731
11732 2018-04-06  Tom Tromey  <tom@tromey.com>
11733
11734         * value.c (~value): Update.
11735         (struct value) <contents>: Now unique_xmalloc_ptr.
11736         (value_contents_bits_eq, allocate_value_contents)
11737         (value_contents_raw, value_contents_all_raw)
11738         (value_contents_for_printing, value_contents_for_printing_const)
11739         (set_value_enclosing_type): Update.
11740
11741 2018-04-06  Tom Tromey  <tom@tromey.com>
11742
11743         * value.c (range_s): Remove typedef, VEC.
11744         (struct range): Add operator<.
11745         (range_lessthan): Remove.
11746         (ranges_contain): Change type.
11747         (~value): Update.
11748         (struct value) <unavailable, optimized_out>: Now std::vector.
11749         (value_entirely_available)
11750         (value_entirely_covered_by_range_vector)
11751         (value_entirely_unavailable, value_entirely_optimized_out):
11752         Update.
11753         (insert_into_bit_range_vector): Change argument type.
11754         (find_first_range_overlap): Likewise.
11755         (struct ranges_and_idx, value_contents_bits_eq)
11756         (require_not_optimized_out, require_available): Update.
11757         (ranges_copy_adjusted): Change argument types.
11758         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11759
11760 2018-04-06  Tom Tromey  <tom@tromey.com>
11761
11762         * value.c (~value): Update.
11763         (struct value) <parent>: Now a value_ref_ptr.
11764         (value_parent, set_value_parent, value_address, value_copy):
11765         Update.
11766
11767 2018-04-06  Tom Tromey  <tom@tromey.com>
11768
11769         * value.c (struct value): Add constructor, destructor, and member
11770         initializers.
11771         (allocate_value_lazy, value_decref): Update.
11772
11773 2018-04-06  Tom Tromey  <tom@tromey.com>
11774
11775         * value.c (struct value) <released, next>: Remove.
11776         (all_values): Now a std::vector.
11777         (allocate_value_lazy): Update.
11778         (value_next): Remove.
11779         (value_mark, value_free_to_mark, release_value)
11780         (value_release_to_mark): Update.
11781
11782 2018-04-06  Tom Tromey  <tom@tromey.com>
11783
11784         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11785         (free_value_chain): Remove.
11786         * value.c (free_value_chain): Remove.
11787         (value_release_to_mark): Return a std::vector.
11788         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11789         std::vector.
11790         (check_condition): Update.
11791         * eval.c (fetch_subexp_value): Change "val_chain" to a
11792         std::vector.
11793         * breakpoint.c (update_watchpoint): Update.
11794         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11795
11796 2018-04-06  Tom Tromey  <tom@tromey.com>
11797
11798         * value.h (free_all_values): Remove.
11799         * value.c (free_all_values): Remove.
11800
11801 2018-04-06  Tom Tromey  <tom@tromey.com>
11802
11803         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11804         (value_history_chain, value_history_count): Remove.
11805         (value_history): New global.
11806         (record_latest_value, access_value_history, show_values)
11807         (preserve_values): Update.
11808
11809 2018-04-06  Tom Tromey  <tom@tromey.com>
11810
11811         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11812         * varobj.c (varobj_set_display_format, varobj_set_value)
11813         (install_default_visualizer, construct_visualizer)
11814         (install_new_value, ~varobj, varobj_get_value_type)
11815         (my_value_of_variable, varobj_editable_p): Update.
11816         * c-varobj.c (c_describe_child, c_value_of_variable)
11817         (cplus_number_of_children, cplus_describe_child): Update.
11818         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11819         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11820         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11821
11822 2018-04-06  Tom Tromey  <tom@tromey.com>
11823
11824         * printcmd.c (last_examine_address): Change type to
11825         value_ref_ptr.
11826         (do_examine, x_command): Update.
11827
11828 2018-04-06  Tom Tromey  <tom@tromey.com>
11829
11830         * value.c (release_value): Update.
11831         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11832         (struct bpstats) <val>: Now a value_ref_ptr.
11833         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11834         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11835         (~watchpoint, print_it_watchpoint, watch_command_1)
11836         (invalidate_bp_value_on_memory_change): Update.
11837
11838 2018-04-06  Tom Tromey  <tom@tromey.com>
11839
11840         * varobj.c (varobj_clear_saved_item)
11841         (update_dynamic_varobj_children, install_new_value, ~varobj):
11842         Update.
11843         * value.h (value_incref): Move declaration earlier.
11844         (value_decref): Rename from value_free.
11845         (struct value_ref_policy): New.
11846         (value_ref_ptr): New typedef.
11847         (struct value_deleter): Remove.
11848         (gdb_value_up): Remove typedef.
11849         (release_value): Change return type.
11850         (release_value_or_incref): Remove.
11851         * value.c (set_value_parent): Update.
11852         (value_incref): Change return type.
11853         (value_decref): Rename from value_free.
11854         (value_free_to_mark, free_all_values, free_value_chain): Update.
11855         (release_value): Return value_ref_ptr.
11856         (release_value_or_incref): Remove.
11857         (record_latest_value, set_internalvar, clear_internalvar):
11858         Update.
11859         * stack.c (info_frame_command): Don't call value_free.
11860         * python/py-value.c (valpy_dealloc, valpy_new)
11861         (value_to_value_object): Update.
11862         * printcmd.c (do_examine): Update.
11863         * opencl-lang.c (lval_func_free_closure): Update.
11864         * mi/mi-main.c (register_changed_p): Don't call value_free.
11865         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11866         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11867         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11868         value_free.
11869         * guile/scm-value.c (vlscm_free_value_smob)
11870         (vlscm_scm_from_value): Update.
11871         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11872         (frame_unwind_register_unsigned, get_frame_register_bytes)
11873         (put_frame_register_bytes): Don't call value_free.
11874         * findvar.c (address_from_register): Don't call value_free.
11875         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11876         * dwarf2loc.c (entry_data_value_free_closure)
11877         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11878         (dwarf2_evaluate_loc_desc_full): Update.
11879         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11880         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11881         (~watchpoint, watch_command_1)
11882         (invalidate_bp_value_on_memory_change): Update.
11883         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11884
11885 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11886
11887         PR gdb/23022
11888         * warning.m4: Add -Wno-error=deprecated-register.
11889         * configure: Re-generate.
11890
11891 2018-04-05  Tom Tromey  <tom@tromey.com>
11892
11893         * linespec.h: Remove include of "vec.h".
11894
11895 2018-04-05  Tom Tromey  <tom@tromey.com>
11896
11897         * linespec.c (typep): Remove typedef.
11898         (find_methods, find_superclass_methods): Take a std::vector.
11899         (find_method): Use std::vector.
11900
11901 2018-04-05  Tom Tromey  <tom@tromey.com>
11902
11903         * utils.c (compare_strings): Remove.
11904         * utils.h (compare_strings): Remove.
11905         * objc-lang.h (find_imps): Update.
11906         * objc-lang.c (find_methods): Take a std::vector.
11907         (uniquify_strings, find_imps): Likewise.
11908         * linespec.c (find_methods): Take a std::vector.
11909         (decode_objc): Use std::vector.
11910         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11911         a std::vector.
11912         (find_method, find_function_symbols): Use std::vector.
11913
11914 2018-04-05  Tom Tromey  <tom@tromey.com>
11915
11916         * completer.c (completion_tracker::completion_tracker): Remove
11917         cast.
11918         (completion_tracker::discard_completions): Likewise.
11919         * breakpoint.c (ambiguous_names_p): Remove cast.
11920         * ada-lang.c (_initialize_ada_language): Remove cast.
11921         * utils.h (streq): Update.
11922         (streq_hash): Add new declaration.
11923         * utils.c (streq): Return bool.
11924         (streq_hash): New function.
11925
11926 2018-04-05  Tom Tromey  <tom@tromey.com>
11927
11928         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11929         Remove a string copy.
11930
11931 2018-04-05  Tom Tromey  <tom@tromey.com>
11932
11933         * linespec.c (filter_results): Use std::vector.
11934         (decode_line_2, decode_line_full): Update.
11935
11936 2018-04-05  Tom Tromey  <tom@tromey.com>
11937
11938         * linespec.c (canonical_to_fullform): Return std::string.
11939         (filter_results): Update.
11940         (struct decode_line_2_item): Add constructor.
11941         <fullform, displayform>: Now std::string.
11942         (decode_line_2_compare_items): Now a std::sort comparator.
11943         (decode_line_2): Update.
11944
11945 2018-04-05  Tom Tromey  <tom@tromey.com>
11946
11947         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11948         (unexpected_linespec_error): Update.
11949         (linespec_parse_basic, parse_linespec): Update.
11950
11951 2018-04-05  Tom Tromey  <tom@tromey.com>
11952
11953         * linespec.c (linespec_parse_basic): Reindent.
11954
11955 2018-04-05  Tom Tromey  <tom@tromey.com>
11956
11957         * minsyms.h (iterate_over_minimal_symbols): Update.
11958         * minsyms.c (iterate_over_minimal_symbols): Take a
11959         gdb::function_view.
11960         * linespec.c (struct collect_minsyms): Remove.
11961         (compare_msyms): Now a std::sort comparator.
11962         (add_minsym): Add parameters.
11963         (search_minsyms_for_name): Update.  Use std::vector.
11964
11965 2018-04-03  Tom Tromey  <tom@tromey.com>
11966
11967         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11968         gdb::byte_vector.
11969
11970 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11971
11972         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11973
11974 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11975
11976         PR gdb/16959
11977         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11978         printing static type.
11979
11980 2018-04-01  Tom Tromey  <tom@tromey.com>
11981
11982         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11983         (rs6000_xfer_shared_libraries): Update.
11984
11985 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11986
11987         * common/gdb_vecs.h (char_ptr): Remove.
11988         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11989
11990 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11991
11992         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11993         with std::vector.
11994         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11995
11996 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11997
11998         * tracepoint.h (struct uploaded_tp): Initialize fields.
11999         <actions, step_actions, cmd_strings>: Change type to
12000         std::vector<char *>.
12001         * tracepoint.c (get_uploaded_tp): Allocate with new.
12002         (free_uploaded_tps): Free with delete.
12003         (parse_tracepoint_definition): Adjust to std::vector change.
12004         * breakpoint.c (read_uploaded_action): Likewise.
12005         (create_tracepoint_from_upload): Likewise.
12006         * ctf.c (ctf_write_uploaded_tp): Likewise.
12007         (SET_ARRAY_FIELD): Likewise.
12008         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12009
12010 2018-03-30  Tom Tromey  <tom@tromey.com>
12011
12012         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12013         std::unique_ptr.
12014         (svr4_keep_data_in_core): Update.
12015         (svr4_read_so_list): Update.
12016
12017 2018-03-30  Tom Tromey  <tom@tromey.com>
12018
12019         * windows-nat.c (handle_output_debug_string, handle_exception):
12020         Update.
12021         * target.h (target_read_string): Update.
12022         * target.c (target_read_string): Change "string" to
12023         unique_xmalloc_ptr.
12024         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12025         Update.
12026         * solib-frv.c (frv_current_sos): Update.
12027         * solib-dsbt.c (dsbt_current_sos): Update.
12028         * solib-darwin.c (darwin_current_sos): Update.
12029         * linux-thread-db.c (inferior_has_bug): Update.
12030         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12031         Update.  Remove alloca.
12032         * ada-lang.c (ada_main_name): Update.
12033
12034 2018-03-30  Tom Tromey  <tom@tromey.com>
12035
12036         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12037         (struct dwo_file_deleter): New.
12038         (dwo_file_up): New typedef.
12039         (open_and_init_dwo_file): Use dwo_file_up.
12040         (free_dwo_file_cleanup): Remove.
12041
12042 2018-03-30  Tom Tromey  <tom@tromey.com>
12043
12044         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12045         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12046
12047 2018-03-30  Tom Tromey  <tom@tromey.com>
12048
12049         * dwarf2read.c (class free_cached_comp_units): New class.
12050         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12051         (free_cached_comp_units): Remove function.
12052
12053 2018-03-30  Tom Tromey  <tom@tromey.com>
12054
12055         * utils.h (make_cleanup_unpush_target): Remove.
12056         * inf-ptrace.c (struct target_unpusher): New.
12057         (target_unpush_up) New typedef.
12058         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12059         target_unpush_up.
12060         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12061
12062 2018-03-27  Tom Tromey  <tom@tromey.com>
12063
12064         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12065
12066 2018-03-27  Pedro Alves  <palves@redhat.com>
12067             Tom Tromey  <tom@tromey.com>
12068
12069         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12070         destructor.  Now a class.
12071         (gdb_readline_wrapper_cleanup): Remove function.
12072         (gdb_readline_wrapper): Remove cleanups.
12073
12074 2018-03-27  Tom Tromey  <tom@tromey.com>
12075
12076         * typeprint.h (struct type_print_options) <local_typedefs,
12077         global_typedefs>: Remove "struct" keyword.
12078         (class typedef_hash_table): New class.
12079         (recursively_update_typedef_hash, add_template_parameters)
12080         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12081         (find_typedef_in_hash): Don't declare.
12082         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12083         (typedef_hash_table::recursively_update): Rename from
12084         recursively_update_typedef_hash.  Now a member.
12085         (typedef_hash_table::add_template_parameters): Rename from
12086         add_template_parameters.  Now a member.
12087         (typedef_hash_table::typedef_hash_table): Now a constructor;
12088         rename from create_typedef_hash.
12089         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12090         rename from free_typedef_hash.
12091         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12092         (do_free_global_table): Remove.
12093         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12094         from copy_type_recursive.
12095         (create_global_typedef_table): Remove.
12096         (typedef_hash_table::find_global_typedef): Now a member of
12097         typedef_hash_table.
12098         (typedef_hash_table::find_typedef): Rename from
12099         find_typedef_in_hash; now a member.
12100         (whatis_exp): Update.
12101         * extension.h (struct ext_lang_type_printers): Add constructor and
12102         destructor.
12103         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12104         declare.
12105         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12106         Now a constructor; rename from start_ext_lang_type_printers.
12107         (ext_lang_type_printers): Now a destructor; rename from
12108         free_ext_lang_type_printers.
12109         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12110         Update.
12111         (c_type_print_base_struct_union): Update.  Remove cleanups.
12112
12113 2018-03-27  Tom Tromey  <tom@tromey.com>
12114
12115         * dwarf-index-write.c: Include <cmath>.
12116
12117 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12118
12119         * NEWS: Add entry describing new "set|show varsize-limit" command.
12120         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12121         command.
12122         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12123         "set variable".
12124
12125 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12126
12127         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12128         dwarf-index-write.c
12129         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12130         * dwarf-index-common.c: New file.
12131         * dwarf-index-common.h: New file.
12132         * dwarf-index-write.c: New file.
12133         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12134         (struct dwarf2_section_info): Move from here.
12135         (dwarf2_section_info_def): Likewise.
12136         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12137         (offset_type): Likewise.
12138         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12139         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12140         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12141         (byte_swap): Likewise.
12142         (MAYBE_SWAP): Likewise.
12143         (dwarf2_per_cu_ptr): Likewise.
12144         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12145         (struct tu_stats): Likewise.
12146         (struct dwarf2_per_objfile): Likewise.
12147         (struct dwarf2_per_cu_data): Likewise.
12148         (struct signatured_type): Likewise.
12149         (sig_type_ptr): Likewise.
12150         (DEF_VEC_P (sig_type_ptr)): Likewise.
12151         (INDEX4_SUFFIX): Likewise.
12152         (INDEX5_SUFFIX): Likewise.
12153         (DEBUG_STR_SUFFIX): Likewise.
12154         (dwarf2_read_section): Make non-static.
12155         (mapped_index_string_hash): Move from here.
12156         (dwarf5_djb_hash): Likewise.
12157         (file_write): Likewise.
12158         (class data_buf): Likewise.
12159         (struct symtab_index_entry): Likewise.
12160         (struct mapped_symtab): Likewise.
12161         (find_slot): Likewise.
12162         (hash_expand): Likewise.
12163         (add_index_entry): Likewise.
12164         (uniquify_cu_indices): Likewise.
12165         (class c_str_view): Likewise.
12166         (class c_str_view_hasher): Likewise.
12167         (class vector_hasher): Likewise.
12168         (write_hash_table): Likewise.
12169         (psym_index_map): Likewise.
12170         (struct addrmap_index_data): Likewise.
12171         (add_address_entry): Likewise.
12172         (add_address_entry_worker): Likewise.
12173         (write_address_map): Likewise.
12174         (symbol_kind): Likewise.
12175         (write_psymbols): Likewise.
12176         (struct signatured_type_index_data): Likewise.
12177         (write_one_signatured_type): Likewise.
12178         (recursively_count_psymbols): Likewise.
12179         (recursively_write_psymbols): Likewise.
12180         (class debug_names): Likewise.
12181         (check_dwarf64_offsets): Likewise.
12182         (psyms_seen_size): Likewise.
12183         (write_gdbindex): Likewise.
12184         (write_debug_names): Likewise.
12185         (assert_file_size): Likewise.
12186         (write_psymtabs_to_index): Likewise.
12187         (save_gdb_index_command): Likewise.
12188         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12189         command.
12190         * dwarf2read.h: New file.
12191
12192 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12193
12194         PR gdb/22670
12195         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12196         symbol name if the CU's language stores symbol names in linkage
12197         format.
12198         * language.h (struct language_defn)
12199         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12200         all instances of this struct.
12201
12202 2018-03-26  Tom Tromey  <tom@tromey.com>
12203
12204         * stack.c (backtrace_command_1): Remove verbose code.
12205
12206 2018-03-26  Tom Tromey  <tom@tromey.com>
12207
12208         * python/py-framefilter.c (py_print_type): Don't catch
12209         exceptions.  Return void.
12210         (py_print_value): Likewise.
12211         (py_print_single_arg): Likewise.
12212         (enumerate_args): Don't catch exceptions.
12213         (py_print_args): Likewise.
12214         (py_print_frame): Likewise.
12215         (gdbpy_apply_frame_filter): Catch exceptions here.
12216
12217 2018-03-26  Tom Tromey  <tom@tromey.com>
12218
12219         * stack.c (_initialize_stack): Remove trailing newlines from help
12220         text.  Add "Usage" line to "backtrace" help.
12221
12222 2018-03-26  Tom Tromey  <tom@tromey.com>
12223
12224         PR python/16486:
12225         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12226
12227 2018-03-26  Tom Tromey  <tom@tromey.com>
12228
12229         * python/py-framefilter.c (py_print_single_arg): Return
12230         EXT_LANG_BT_ERROR from catch.
12231
12232 2018-03-26  Tom Tromey  <tom@tromey.com>
12233
12234         PR backtrace/15584:
12235         * stack.c (backtrace_command_1): Move some code into no-filters
12236         "if".
12237
12238 2018-03-26  Tom Tromey  <tom@tromey.com>
12239
12240         * python/py-framefilter.c (throw_quit_or_print_exception): New
12241         function.
12242         (gdbpy_apply_frame_filter): Use it.
12243
12244 2018-03-26  Tom Tromey  <tom@tromey.com>
12245
12246         PR cli/17716:
12247         * python/py-framefilter.c (py_print_type, py_print_value)
12248         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12249         RETURN_MASK_ERROR.
12250
12251 2018-03-26  Tom Tromey  <tom@tromey.com>
12252
12253         * python/py-framefilter.c (enumerate_args): Use
12254         gdb::unique_xmalloc_ptr.
12255
12256 2018-03-26  Tom Tromey  <tom@tromey.com>
12257
12258         * python/py-framefilter.c (py_print_frame): Return
12259         EXT_LANG_BT_OK.
12260         (gdbpy_apply_frame_filter): Update comment.
12261         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12262         Remove.
12263         <EXT_LANG_BT_NO_FILTERS>: Change value.
12264
12265 2018-03-26  Tom Tromey  <tom@tromey.com>
12266
12267         PR backtrace/15582:
12268         * stack.c (backtrace_command): Parse "hide" argument.
12269         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12270         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12271         constant.
12272
12273 2018-03-26  Tom Tromey  <tom@tromey.com>
12274
12275         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12276         add "flags".
12277         (backtrace_command): Remove "fulltrace", add "flags".
12278
12279 2018-03-26  Tom Tromey  <tom@tromey.com>
12280
12281         * stack.c (backtrace_command): Rewrite command line parsing.
12282
12283 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12284
12285         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12286
12287 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12288
12289         * filename-seen-cache.h: Add include guard.
12290
12291 2018-03-26  Keith Seitz  <keiths@redhat.com>
12292
12293         * symfile.c (place_section): Remove "struct" from section_addr_info
12294         in comment.
12295         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12296         "struct" keyword from section_addr_info.
12297
12298 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12299
12300         * regformats/regdef.h (reg): Add constructors.
12301
12302 2018-03-25  Pedro Alves  <palves@redhat.com>
12303
12304         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12305         if then/else bodies in var_func_name extraction.
12306
12307 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12308
12309         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12310         lookup_minimal_symbol() to find symbol entry.
12311         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12312
12313 2018-03-23  Keith Seitz  <keiths@redhat.com>
12314
12315         PR c++/22968
12316         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12317         nested type definitions for C++, too.
12318
12319 2018-03-23  Tom Tromey  <tom@tromey.com>
12320
12321         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12322         a typedef.
12323         (macho_register_oso): Remove.
12324         (macho_symtab_read): Take a std::vector.
12325         (oso_el_compare_name): Now a std::sort comparator.
12326         (macho_symfile_read_all_oso): Take a std::vector.
12327         (macho_symfile_read): Use std::vector.  Remove cleanups.
12328
12329 2018-03-22  Tom Tromey  <tom@tromey.com>
12330
12331         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12332         (record_full_goto_bookmark): Use std::string.
12333
12334 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12335
12336         PR tdep/18295
12337         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12338         a single mask.
12339
12340 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12341
12342         * rs6000-tdep.c (store_insn_p): New function.
12343         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12344         and cr_reg to their unshifted values. Use store_insn_p to
12345         match LR saves using either R1 or fdata->alloca_reg. Use
12346         store_insn_p to match CR saves. Set alloca_reg_offset
12347         when alloca_reg and framep are set. Remove lr_reg shift
12348         when assigning to fdata->lr_register.
12349
12350 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12351
12352         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12353         command line args instead of emitting a warning.
12354
12355 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12356
12357         * tracepoint.h (struct static_tracepoint_marker): Initialize
12358         fields, define default constructor, move constructor and move
12359         assignment, disable the rest.
12360         <str_id, extra>: Make std::string.
12361         (release_static_tracepoint_marker): Remove.
12362         (free_current_marker): Remove.
12363         * tracepoint.c (free_current_marker): Remove.
12364         (parse_static_tracepoint_marker_definition): Adjust to
12365         std::string, use new hex2str overload.
12366         (release_static_tracepoint_marker): Remove.
12367         (print_one_static_tracepoint_marker): Get marker by reference
12368         and adjust to std::string.
12369         (info_static_tracepoint_markers_command): Adjust to std::vector
12370         changes
12371         * target.h (static_tracepoint_marker_p): Remove typedef.
12372         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12373         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12374         bool.
12375         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12376         * target-debug.h
12377         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12378         (target_debug_print_std_vector_static_tracepoint_marker): New.
12379         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12380         to...
12381         (target_debug_print_static_tracepoint_marker_p): ... this.
12382         * target-delegates.c: Re-generate.
12383         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12384         Make std::string.
12385         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12386         (decode_static_tracepoint_spec): Adjust to std::vector.
12387         (tracepoint_print_one_detail): Adjust to std::string.
12388         (strace_marker_decode_location): Adjust to std::string.
12389         (update_static_tracepoint): Adjust to std::string, remove call
12390         to release_static_tracepoint_marker.
12391         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12392         Adjust to std::vector.
12393         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12394         (remote_static_tracepoint_markers_by_strid): Adjust to
12395         std::vector.
12396         * common/rsp-low.h (hex2str): New overload with explicit count
12397         of bytes.
12398         * common/rsp-low.c (hex2str): New overload with explicit count
12399         of bytes.
12400         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12401         (_initialize_rsp_low_selftests): Add test_hex2str test.
12402         * unittests/tracepoint-selftests.c
12403         (test_parse_static_tracepoint_marker_definition): Adjust to
12404         std::string.
12405
12406 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12407
12408         * tracepoint.c (parse_static_tracepoint_marker_definition):
12409         Consider case where the definition is followed by more
12410         definitions.
12411         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12412         tracepoint-selftests.c.
12413         * unittests/tracepoint-selftests.c: New.
12414
12415 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12416
12417         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12418         Carvalho.
12419
12420 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12421
12422         * symtab.c (find_pc_sect_line): fixed indentation.
12423
12424 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12425
12426         * symtab.c (find_pc_sect_line): now uses binary search.
12427
12428 2018-03-19  Tom Tromey  <tom@tromey.com>
12429
12430         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12431         "IDENT" production.
12432
12433 2018-03-19  Pedro Alves  <palves@redhat.com>
12434             Tom Tromey  <tom@tromey.com>
12435
12436         * unittests/observable-selftests.c: New file.
12437         * common/observable.h: New file.
12438         * observable.h: New file.
12439         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12440         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12441         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12442         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12443         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12444         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12445         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12446         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12447         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12448         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12449         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12450         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12451         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12452         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12453         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12454         tui/tui-interp.c, valops.c: Update all users.
12455         * tui/tui-hooks.c (tui_bp_created_observer)
12456         (tui_bp_deleted_observer, tui_bp_modified_observer)
12457         (tui_inferior_exit_observer, tui_before_prompt_observer)
12458         (tui_normal_stop_observer, tui_register_changed_observer):
12459         Remove.
12460         (tui_observers_token): New global.
12461         (attach_or_detach, tui_attach_detach_observers): New functions.
12462         (tui_install_hooks, tui_remove_hooks): Use
12463         tui_attach_detach_observers.
12464         * record-btrace.c (record_btrace_thread_observer): Remove.
12465         (record_btrace_thread_observer_token): New global.
12466         * observer.sh: Remove.
12467         * observer.c: Rename to observable.c.
12468         * observable.c (namespace gdb_observers): Define new objects.
12469         (observer_debug): Move into gdb_observers namespace.
12470         (struct observer, struct observer_list, xalloc_observer_list_node)
12471         (xfree_observer_list_node, generic_observer_attach)
12472         (generic_observer_detach, generic_observer_notify): Remove.
12473         (_initialize_observer): Update.
12474         Don't include observer.inc.
12475         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12476         (clean mostlyclean): Likewise.
12477         (observer.h, observer.inc): Remove targets.
12478         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12479         (COMMON_SFILES): Use observable.c, not observer.c.
12480         * .gitignore: Remove observer.h.
12481
12482 2018-03-18  Tom Tromey  <tom@tromey.com>
12483
12484         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12485         gdb::def_vector.
12486         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12487
12488 2018-03-17  Tom Tromey  <tom@tromey.com>
12489
12490         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12491
12492 2018-03-17  Tom Tromey  <tom@tromey.com>
12493
12494         * target.c (class scoped_target_fd): New.
12495         (target_fileio_close_cleanup): Remove.
12496         (target_fileio_read_alloc_1): Use scoped_target_fd.
12497
12498 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12499
12500         * silent-rules.mk: New.
12501         * Makefile.in: Include silent-rules.mk
12502         (srcdir, VPATH, top_srcdir): Move up.
12503         (COMPILE): Add ECHO_CXX.
12504         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12505         (init.c): Add ECHO_INIT_C.
12506         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12507         (version.c): Add ECHO_GEN.
12508         (printcmd.o): Add ECHO_CXX.
12509         (target-float.o): Add ECHO_CXX.
12510         (ada-exp.o): Add ECHO_CXX.
12511         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12512         (insight$(EXEEXT)): Add ECHO_CXXLD.
12513         * gnulib/configure.ac: Add AM_SILENT_RULES.
12514         * gnulib/aclocal.m4: Re-generate.
12515         * gnulib/configure: Re-generate.
12516         * gnulib/import/Makefile.in: Re-generate.
12517
12518 2018-03-16  Tom Tromey  <tom@tromey.com>
12519
12520         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12521         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12522         * utils.c (do_free_section_addr_info)
12523         (make_cleanup_free_section_addr_info): Remove.
12524         * symfile.h (struct other_sections): Add constructor.
12525         (struct section_addr_info): Remove.
12526         (section_addr_info): New typedef.
12527         (struct sym_fns) <sym_offsets>: Change type of parameter.
12528         (build_section_addr_info_from_objfile)
12529         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12530         (default_symfile_offsets, symbol_file_add)
12531         (symbol_file_add_from_bfd)
12532         (build_section_addr_info_from_section_table): Update.
12533         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12534         * symfile.c (alloc_section_addr_info): Remove.
12535         (build_section_addr_info_from_section_table): Change return type.
12536         Update.
12537         (build_section_addr_info_from_bfd)
12538         (build_section_addr_info_from_objfile): Likewise.
12539         (free_section_addr_info): Remove.
12540         (relative_addr_info_to_section_offsets): Change type of "addrs".
12541         (addrs_section_compar): Now a std::sort comparator.
12542         (addrs_section_sort): Change return type.
12543         (addr_info_make_relative): Change type of "addrs".  Update.
12544         (default_symfile_offsets, syms_from_objfile_1)
12545         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12546         (symbol_file_add_separate): Update.
12547         (symbol_file_add): Change type of "addrs".  Update.
12548         (add_symbol_file_command): Update.  Remove cleanups.
12549         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12550         cleanups.
12551         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12552         * solib.c (solib_read_symbols): Update.
12553         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12554         * machoread.c (macho_symfile_offsets): Update.
12555         * jit.c (jit_bfd_try_read_symtab): Update.
12556
12557 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12558
12559         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12560         unittests/utils-selftests.c.
12561         * unittests/utils-selftests.c: New file.
12562
12563 2018-03-14  Tom Tromey  <tom@tromey.com>
12564
12565         PR cli/14977:
12566         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12567         for NULL.
12568
12569 2018-03-14  Tom Tromey  <tom@tromey.com>
12570
12571         PR cli/19918:
12572         * printcmd.c (printf_pointer): Allow "-" in format.
12573
12574 2018-03-14  Tom Tromey  <tom@tromey.com>
12575
12576         * printcmd.c (_initialize_printcmd): Add usage to printf.
12577
12578 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12579
12580         * MAINTAINERS: Update my email address.
12581
12582 2018-03-13  Tom Tromey  <tom@tromey.com>
12583
12584         * machoread.c (macho_check_dsym): Change filenamep to a
12585         std::string*.
12586         (macho_symfile_read): Update.
12587         * symfile.c (load_command): Use std::string.
12588
12589 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12590
12591         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12592         to error message string.
12593         (riscv_register_name): Use xsnprintf instead of sprintf.
12594         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12595         internal_error.
12596         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12597         error.
12598         (riscv_push_dummy_call): Likewise.
12599
12600 2018-03-12  Tom Tromey  <tom@tromey.com>
12601
12602         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12603         Use gdb::byte_vector.
12604         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12605
12606 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12607
12608         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12609         parameter type to readable_regcache.
12610         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12611         the declaration.
12612
12613 2018-03-11  Tom Tromey  <tom@tromey.com>
12614
12615         * dwarf2read.c (struct nextfield): Add initializers.
12616         (struct nextfnfield): Remove.
12617         (struct fnfieldlist): Add initializers.  Remove "length" and
12618         "head", use std::vector.
12619         (struct decl_field_list): Remove.
12620         (struct field_info): Add initializers.
12621         <fields, baseclasses>: Now std::vector.
12622         <nbaseclasses, nfnfields, typedef_field_list_count,
12623         nested_types_list_count>: Remove.
12624         (dwarf2_add_field, dwarf2_add_type_defn)
12625         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12626         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12627         (process_structure_scope): Update.
12628
12629 2018-03-11  Tom Tromey  <tom@tromey.com>
12630
12631         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12632         for use by std::sort.
12633         (build_type_psymtabs_1): Use std::vector.
12634
12635 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12636
12637         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12638         and LIBMPFR in the printed configuration.
12639
12640 2018-03-08  Tom Tromey  <tom@tromey.com>
12641
12642         * source.c (get_filename_and_charpos): Use scoped_fd.
12643         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12644         (procfs_pidlist): Likewise.
12645         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12646         (iterate_over_mappings): Likewise.
12647
12648 2018-03-08  Tom Tromey  <tom@tromey.com>
12649
12650         * infcall.c (struct call_return_meta_info)
12651         <stack_temporaries_enabled>: Remove.
12652         (get_call_return_value, call_function_by_hand_dummy): Update.
12653         * thread.c (disable_thread_stack_temporaries): Remove.
12654         (enable_thread_stack_temporaries): Remove.
12655         (thread_stack_temporaries_enabled_p): Return bool.
12656         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12657         (get_last_thread_stack_temporary): Update.
12658         * eval.c (evaluate_subexp): Update.
12659         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12660         class, not a function.
12661         (value_ptr, value_vec): Remove typedefs.
12662         (class thread_info) <stack_temporaries_enabled>: Now bool.
12663         <stack_temporaries>: Now a std::vector.
12664         (thread_stack_temporaries_enabled_p)
12665         (value_in_thread_stack_temporaries): Return bool.
12666
12667 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12668
12669         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12670         (getpkt_or_notif_sane_1): Likewise.
12671
12672 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12673
12674         * build-id.c (build_id_to_debug_bfd): Use std::string.
12675
12676 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12677
12678         * build-id.c (find_separate_debug_file_by_buildid): Return
12679         std::string.
12680         * build-id.h (find_separate_debug_file_by_buildid): Return
12681         std::string.
12682         * coffread.c (coff_symfile_read): Adjust to std::string.
12683         * elfread.c (elf_symfile_read): Adjust to std::string.
12684         * symfile.c (separate_debug_file_exists): Change parameter to
12685         std::string.
12686         (find_separate_debug_file): Return std::string.
12687         (find_separate_debug_file_by_debuglink): Return std::string.
12688         * symfile.h (find_separate_debug_file_by_debuglink): Return
12689         std::string.
12690
12691 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12692
12693         * common/xml-utils.c (xml_escape_text): Move code to...
12694         (xml_escape_text_append): ... this new function.
12695         * common/xml-utils.h (xml_escape_text_append): New declaration.
12696         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12697         New function.
12698         (_initialize_xml_utils): register test_xml_escape_text_append as
12699         a selftest.
12700
12701 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12702
12703         * defs.h: Remove MAX_REGISTER_SIZE.
12704         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12705         asserts.
12706         * python/py-unwind.c (pyuw_sniffer): Likewise.
12707
12708 2018-03-07  Tom Tromey  <tom@tromey.com>
12709
12710         * linux-tdep.c (linux_info_proc): Update.
12711         * target.h (struct target_ops) <to_fileio_readlink>: Return
12712         optional<string>.
12713         (target_fileio_readlink): Return optional<string>.
12714         * remote.c (remote_hostio_readlink): Return optional<string>.
12715         * inf-child.c (inf_child_fileio_readlink): Return
12716         optional<string>.
12717         * target.c (target_fileio_readlink): Return optional<string>.
12718
12719 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12720
12721         * regcache.c (cooked_read_test): Add riscv to the list of
12722         architectures that have a save_reggroup.
12723
12724 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12725
12726         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12727         value is not a dynamic class object.
12728
12729 2018-03-06  Tom Tromey  <tom@tromey.com>
12730
12731         * rust-exp.y: Formatting fixes.
12732
12733 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12734
12735         * riscv-tdep.c (riscv_register_name): Remove target description
12736         support.
12737         (riscv_gdbarch_init): Remove target description check.
12738
12739 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12740
12741         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12742         comment.
12743         * riscv-tdep.h: Likewise.
12744
12745 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12746
12747         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12748         (riscv_pseudo_register_write): Delete.
12749         (riscv_gdbarch_init): Remove all use of pseudo registers.
12750
12751 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12752
12753         * record-btrace.c (btrace_print_lines): Replace cleanup
12754         parameter with RAII equivalents.
12755         (btrace_insn_history): Replace cleanup with RAII equivalents.
12756         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12757         make_cleanup_ui_out_tuple_begin_end): Remove.
12758         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12759         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12760         make_cleanup_ui_out_list_begin_end): Remove.
12761
12762 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12763
12764         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12765         parameter types to std::vector.  Use bool.
12766         (record_btrace_wait): Replace VEC(tp_t) with
12767         std::vector<thread_info *>.
12768         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12769
12770 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12771
12772         * record-btrace.c (record_btrace_disable_callback): Remove.
12773         (struct scoped_btrace_disable): New.
12774         (record_btrace_open): Use scoped_btrace_disable.
12775
12776 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12777
12778         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12779         reading values from registers.
12780
12781 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12782
12783         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12784         where appropriate.
12785
12786 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12787
12788         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12789         change parameter type.  Use GDB's print functions, and use
12790         core_addr_to_string where appropriate.
12791         (riscv_push_dummy_call): Use core_addr_to_string where
12792         appropriate, update call to riscv_print_arg_location, and reindent
12793         a few lines.
12794         (riscv_return_value): Update call to riscv_print_arg_location.
12795
12796 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12797             Tim Newsome <tim@sifive.com>
12798             Albert Ou <a0u@eecs.berkeley.edu>
12799             Darius Rad <darius@bluespec.com>
12800
12801         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12802         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12803         (ALLDEPFILES): Add riscv-tdep.c
12804         * configure.tgt: Add riscv support.
12805         * riscv-tdep.c: New file.
12806         * riscv-tdep.h: New file.
12807         * NEWS: Mention new target.
12808         * MAINTAINERS: Add entry for riscv.
12809
12810 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12811
12812         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12813         fields within aggregates.
12814
12815 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12816
12817         * record-btrace.c (btrace_print_lines): Change type of flags to
12818         gdb_disassembly_flags.
12819
12820 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12821
12822         * fbsd-nat.c: Include "inf-ptrace.h".
12823         (USE_SIGTRAP_SIGINFO): Conditionally define.
12824         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12825         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12826         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12827         function.
12828         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12829         Likewise.
12830         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12831         Likewise.
12832         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12833         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12834         "supports_stopped_by_hw_breakpoint" target methods.
12835
12836 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12837
12838         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12839         * fbsd-nat.c (debug_fbsd_nat): New variable.
12840         (show_fbsd_nat_debug): New function.
12841         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12842         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12843
12844 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12845
12846         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12847         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12848         prototype.
12849         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12850         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12851         method.
12852
12853 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12854
12855         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12856         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12857
12858 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12859
12860         * charset.c (struct charset_vector): New.
12861         (charsets): Change type to charset_vector.
12862         (find_charset_names): Adjust.
12863         (add_one): Adjust.
12864         (_initialize_charset): Adjust.
12865
12866 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12867
12868         * progspace.h (struct program_space) <deleted_solibs>: Change
12869         type to std::vector<std::string>.
12870         * progspace.c (clear_program_space_solib_cache): Adjust.
12871         * breakpoint.c (print_solib_event): Adjust.
12872         (check_status_catch_solib): Adjust.
12873         * solib.c (update_solib_list): Adjust.
12874         * ui-out.h (class ui_out) <field_string>: New overload.
12875         * ui-out.c (ui_out::field_string): New overload.
12876
12877 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12878
12879         * progspace.h (struct program_space): Add constructor and
12880         destructor, initialize fields.
12881         (add_program_space): Remove.
12882         * progspace.c (add_program_space): Rename to...
12883         (program_space::program_space): ... this.
12884         (release_program_space): Rename to...
12885         (program_space::~program_space): ... this.
12886         (delete_program_space): Use delete to delete program_space.
12887         (initialize_progspace): Use new to allocate program_space.
12888         * inferior.c (add_inferior_with_spaces): Likewise.
12889         (clone_inferior_command): Likewise.
12890         * infrun.c (follow_fork_inferior): Likewise.
12891         (handle_vfork_child_exec_or_exit): Likewise.
12892
12893 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12894
12895         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12896         (delim_string_to_char_ptr_vec): Return std::vector of
12897         gdb::unique_xmalloc_ptr.
12898         (dirnames_to_char_ptr_vec_append): Take std::vector of
12899         gdb::unique_xmalloc_ptr.
12900         (dirnames_to_char_ptr_vec): Return std::vector of
12901         gdb::unique_xmalloc_ptr.
12902         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12903         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12904         (delim_string_to_char_ptr_vec): Return an std::vector of
12905         gdb::unique_xmalloc_ptr, adjust the code.
12906         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12907         gdb::unique_xmalloc_ptr, adjust the code.
12908         (dirnames_to_char_ptr_vec): Return an std::vector of
12909         gdb::unique_xmalloc_ptr, adjust the code.
12910         * auto-load.c (auto_load_safe_path_vec): Change type to
12911         std::vector of gdb::unique_xmalloc_ptr.
12912         (auto_load_expand_dir_vars): Return an std::vector of
12913         gdb::unique_xmalloc_ptr, adjust the code.
12914         (auto_load_safe_path_vec_update): Adjust.
12915         (filename_is_in_auto_load_safe_path_vec): Adjust.
12916         (auto_load_objfile_script_1): Adjust.
12917         * build-id.c (build_id_to_debug_bfd): Adjust.
12918         * linux-thread-db.c (thread_db_load_search): Adjust.
12919         * source.c (add_path): Adjust.
12920         (openp): Adjust.
12921         * symfile.c (find_separate_debug_file): Adjust.
12922         * utils.c (do_free_char_ptr_vec): Remove.
12923         (make_cleanup_free_char_ptr_vec): Remove.
12924
12925 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12926
12927         PR gdb/22907
12928         * common/pathstuff.c: Conditionally include "<windows.h>".
12929
12930 2018-03-01  Georg Sauthoff  <mail@georg.so>
12931
12932         PR gdb/22888
12933         * gcore.in: Quote variables and switch interpreter to bash.
12934
12935 2018-03-01  Tom Tromey  <tom@tromey.com>
12936
12937         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12938         assertion.  Add assertion for discriminant_index.
12939         (quirk_rust_enum): Use correct base type name in univariant case.
12940
12941 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12942
12943         * record.c (get_call_history_modifiers): Return a
12944         record_print_flags.
12945         (cmd_record_call_history): Adjust.
12946         * record-btrace.c (record_btrace_call_history): Adjust.
12947         (record_btrace_call_history_range): Adjust.
12948         (record_btrace_call_history_from): Adjust.
12949         * target-debug.h (target_debug_print_record_print_flags): New.
12950         * target-delegates.c: Re-generate.
12951         * target.c (target_call_history): Change flags type.
12952         (target_call_history_from): Likewise.
12953         (target_call_history_range): Likewise.
12954         * target.h (struct target_ops) <target_call_history>: Likewise.
12955         (target_call_history_from): Likewise.
12956         (target_call_history_range): Likewise.
12957
12958 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12959             Simon Marchi  <simon.marchi@polymtl.ca>
12960
12961         * common/common-utils.c: Include "sys/stat.h".
12962         (is_regular_file): Move here from "source.c"; change return
12963         type to "bool".
12964         * common/common-utils.h (is_regular_file): New prototype.
12965         * common/pathstuff.c (contains_dir_separator): New function.
12966         * common/pathstuff.h (contains_dir_separator): New prototype.
12967         * source.c: Don't include "sys/stat.h".
12968         (is_regular_file): Move to "common/common-utils.c".
12969
12970 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12971
12972         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12973         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12974         * auto-load.c: Include "common/pathstuff.h".
12975         * common/common-def.h (current_directory): Move here.
12976         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12977         function.
12978         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12979         prototype.
12980         * common/pathstuff.c: New file.
12981         * common/pathstuff.h: New file.
12982         * compile/compile.c: Include "common/pathstuff.h".
12983         * defs.h (current_directory): Move to "common/common-defs.h".
12984         * dwarf2read.c: Include "common/pathstuff.h".
12985         * exec.c: Likewise.
12986         * guile/scm-safe-call.c: Likewise.
12987         * linux-thread-db.c: Likewise.
12988         * main.c: Likewise.
12989         * nto-tdep.c: Likewise.
12990         * objfiles.c: Likewise.
12991         * source.c: Likewise.
12992         * symtab.c: Likewise.
12993         * utils.c: Include "common/pathstuff.h".
12994         (gdb_realpath): Move to "common/pathstuff.c".
12995         (gdb_realpath_keepfile): Likewise.
12996         (gdb_abspath): Likewise.
12997         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12998         (gdb_realpath_keepfile): Likewise.
12999         (gdb_abspath): Likewise.
13000
13001 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13002
13003         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13004         wildcard process pid for super_resume for kernels with a
13005         specific bug.
13006
13007 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13008
13009         * compile/compile.c (get_args): Add additional comments
13010         explaining function.
13011
13012 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13013             Tom Tromey  <tom@tromey.com>
13014
13015         * target.h (memory_write_request_s): Remove typedef.  Don't define
13016         VEC.
13017         (target_write_memory_blocks): Change argument to std::vector.
13018         (struct memory_write_request): Add constructor.
13019         * target-memory.c (compare_block_starting_address): Return bool.
13020         Change argument types.
13021         (claim_memory): Change arguments to use std::vector.
13022         (split_regular_and_flash_blocks, blocks_to_erase)
13023         (compute_garbled_blocks): Likewise.
13024         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13025         (target_write_memory_blocks): Change argument to std::vector.
13026         * symfile.c (struct load_section_data): Add constructor and
13027         destructor.  Use std::vector for "requests".
13028         (struct load_progress_data): Add initializers.
13029         (load_section_callback): Update.  Use "new".
13030         (clear_memory_write_data): Remove.
13031         (generic_load): Update.
13032
13033 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13034
13035         * arch/aarch64.h: Use common/tdesc.h.
13036
13037 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13038
13039         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13040         architecture with a 64-bit ABI.
13041
13042 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13043
13044         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13045         ahead of target description loading.
13046
13047 2018-02-26  Tom Tromey  <tom@tromey.com>
13048
13049         * stack.c (backtrace_command_1): Update.
13050         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13051         of "flags".
13052         * python/py-framefilter.c (py_print_frame)
13053         (gdbpy_apply_frame_filter): Change type of "flags".
13054         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13055         of "flags".
13056         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13057         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13058         * extension.h (enum frame_filter_flag): Rename from
13059         frame_filter_flags.
13060         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13061         (apply_ext_lang_frame_filter): Change type of "flags".
13062         * extension.c (apply_ext_lang_frame_filter): Change type of
13063         "flags".
13064         * extension-priv.h (struct extension_language_ops)
13065         <apply_frame_filter>: Change type of "flags".
13066
13067 2018-02-26  Tom Tromey  <tom@tromey.com>
13068
13069         PR python/16497:
13070         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13071         off-by-one in py_end computation.
13072         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13073         PRINT_MORE_FRAMES.
13074         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13075         constant.
13076
13077 2018-02-26  Tom Tromey  <tom@tromey.com>
13078
13079         * dwarf2read.c (struct variant_field): New.
13080         (struct nextfield) <variant>: New field.
13081         (dwarf2_add_field): Handle DW_TAG_variant_part.
13082         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13083         discriminated union.
13084         (read_structure_type): Handle DW_TAG_variant_part.
13085         (handle_struct_member_die): New function, extracted from
13086         process_structure_scope.  Handle DW_TAG_variant.
13087         (process_structure_scope): Handle discriminated unions.  Call
13088         handle_struct_member_die.
13089
13090 2018-02-26  Tom Tromey  <tom@tromey.com>
13091
13092         * rust-lang.h (rust_last_path_segment): Declare.
13093         * rust-lang.c (rust_last_path_segment): Now public.  Change
13094         contract.
13095         (struct disr_info): Remove.
13096         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13097         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13098         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13099         (rust_enum_p, rust_enum_variant): New function.
13100         (rust_underscore_fields): Remove "offset" parameter.
13101         (rust_print_enum): New function.
13102         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13103         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13104         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13105         enums.
13106         (rust_internal_print_type): New function, from rust_print_type.
13107         Remove enum code.
13108         (rust_print_type): Call rust_internal_print_type.
13109         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13110         Update enum handling.
13111         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13112         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13113         (rust_union_quirks): New functions.
13114         (process_full_comp_unit, process_full_type_unit): Call
13115         rust_union_quirks.
13116         (process_structure_scope): Update rust_unions if necessary.
13117
13118 2018-02-26  Tom Tromey  <tom@tromey.com>
13119
13120         * value.h (value_union_variant): Declare.
13121         * valops.c (value_union_variant): New function.
13122         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13123         (struct discriminant_info): New.
13124         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13125         enumerator.
13126         (struct main_type) <flag_discriminated_union>: New field.
13127
13128 2018-02-26  Tom Tromey  <tom@tromey.com>
13129
13130         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13131         unittests/unpack-selftests.c.
13132         * unittests/unpack-selftests.c: New file.
13133         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13134
13135 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13136
13137         * dwarf2read.c (struct partial_die_info) <read>: New method.
13138         (read_partial_die): Remove the declaration.
13139         (load_partial_dies): Update.
13140         (partial_die_info::partial_die_info):
13141         (read_partial_die): Change it to partial_die_info::read.
13142
13143 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13144
13145         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13146         (fixup_partial_die): Remove declaration.
13147         (scan_partial_symbols): Update.
13148         (partial_die_parent_scope): Likewise.
13149         (partial_die_full_name): Likewise.
13150         (fixup_partial_die): Change it to partial_die_info::fixup.
13151
13152 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13153
13154         * dwarf2read.c (read_partial_die): Update the declaration.
13155         (load_partial_dies): Caller update.
13156         (read_partial_die): Remove one argument abbrev_len.
13157
13158 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13159
13160         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13161         assignment operator.
13162         (load_partial_dies): Use ctor and copy ctor.
13163         (read_partial_die): Update.
13164         (dwarf2_cu::find_partial_die): Use ctor.
13165
13166 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13167
13168         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13169         (find_partial_die_in_comp_unit): Change it to
13170         dwarf2_cu::find_partial_die.
13171         (find_partial_die): Update.
13172
13173 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13174
13175         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13176         is NULL.
13177
13178 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13179
13180         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13181
13182 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13183
13184         * arch/amd64.h: Use common/tdesc.h.
13185         * arch/i386.c: Likewise.
13186         * arch/i386.h: Likewise.
13187         * arch/tic6x.c: Likewise.
13188         * arch/tdesc.h: Move file from here...
13189         * common/tdesc.h: ...to here.
13190         * features/aarch64-core.c: Regenerate.
13191         * features/aarch64-fpu.c: Regenerate.
13192         * features/i386/32bit-avx.c: Regenerate.
13193         * features/i386/32bit-avx512.c: Regenerate.
13194         * features/i386/32bit-core.c: Regenerate.
13195         * features/i386/32bit-linux.c: Regenerate.
13196         * features/i386/32bit-mpx.c: Regenerate.
13197         * features/i386/32bit-pkeys.c: Regenerate.
13198         * features/i386/32bit-sse.c: Regenerate.
13199         * features/i386/64bit-avx.c: Regenerate.
13200         * features/i386/64bit-avx512.c: Regenerate.
13201         * features/i386/64bit-core.c: Regenerate.
13202         * features/i386/64bit-linux.c: Regenerate.
13203         * features/i386/64bit-mpx.c: Regenerate.
13204         * features/i386/64bit-pkeys.c: Regenerate.
13205         * features/i386/64bit-segments.c: Regenerate.
13206         * features/i386/64bit-sse.c: Regenerate.
13207         * features/i386/x32-core.c: Regenerate.
13208         * features/tic6x-c6xp.c: Regenerate.
13209         * features/tic6x-core.c: Regenerate.
13210         * features/tic6x-gp.c: Regenerate.
13211         * target-descriptions.c: Use common/tdesc.h.
13212         * target-descriptions.h: Likewise.
13213
13214 2018-02-24  Tom Tromey  <tom@tromey.com>
13215
13216         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13217         (try_thread_db_load_from_dir, thread_db_load_search): Use
13218         std::string.
13219         (info_auto_load_libthread_db_compare): Return bool.  Change
13220         argument types.
13221         (info_auto_load_libthread_db): Use std::vector, std::string.
13222         Remove cleanups.
13223
13224 2018-02-24  Tom Tromey  <tom@tromey.com>
13225
13226         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13227         std::string.
13228         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13229         std::string*.
13230         * gdbarch.c: Rebuild.
13231         * gdbarch.h: Rebuild.
13232         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13233         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13234         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13235         std::string*.
13236
13237 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13238
13239         * gdbtypes.h (sect_offset): Change type to uint64_t.
13240         (sect_offset_str): New function.
13241         * dwarf2read.c (create_addrmap_from_aranges): Use
13242         sect_offset_str.
13243         (error_check_comp_unit_head): Likewise.
13244         (create_debug_type_hash_table): Likewise.
13245         (read_cutu_die_from_dwo): Likewise.
13246         (init_cutu_and_read_dies): Likewise.
13247         (init_cutu_and_read_dies_no_follow): Likewise.
13248         (process_psymtab_comp_unit_reader): Likewise.
13249         (partial_die_parent_scope): Likewise.
13250         (peek_die_abbrev): Likewise.
13251         (process_queue): Likewise.
13252         (dwarf2_physname): Likewise.
13253         (read_namespace_alias): Likewise.
13254         (read_import_statement): Likewise.
13255         (create_dwo_cu_reader): Likewise.
13256         (create_cus_hash_table): Likewise.
13257         (lookup_dwo_cutu): Likewise.
13258         (inherit_abstract_dies): Likewise.
13259         (read_func_scope): Likewise.
13260         (read_call_site_scope): Likewise.
13261         (dwarf2_add_member_fn): Likewise.
13262         (read_common_block): Likewise.
13263         (read_module_type): Likewise.
13264         (read_typedef): Likewise.
13265         (read_subrange_type): Likewise.
13266         (load_partial_dies): Likewise.
13267         (read_partial_die): Likewise.
13268         (find_partial_die): Likewise.
13269         (read_str_index): Likewise.
13270         (dwarf2_string_attr): Likewise.
13271         (build_error_marker_type): Likewise.
13272         (lookup_die_type): Likewise.
13273         (dump_die_shallow): Likewise.
13274         (follow_die_ref): Likewise.
13275         (dwarf2_fetch_die_loc_sect_off): Likewise.
13276         (dwarf2_fetch_constant_bytes): Likewise.
13277         (follow_die_sig): Likewise.
13278         (get_signatured_type): Likewise.
13279         (get_DW_AT_signature_type): Likewise.
13280         (dwarf2_find_containing_comp_unit): Likewise.
13281         (set_die_type): Likewise.
13282
13283 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13284
13285         * arch/aarch64.c: Include "common-defs.h".
13286         * arch/amd64.c: Likewise.
13287         * arch/i386.c: Likewise.
13288
13289 2018-02-21  Tom Tromey  <tom@tromey.com>
13290
13291         * value.h: (extract_field_op): Update.
13292         * eval.c (extract_field_op): Return a const char *.
13293         * expression.h (parse_expression_for_completion): Update.
13294         * completer.c (complete_expression): Update.
13295         (add_struct_fields): Make fieldname const.
13296         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13297         (mark_completion_tag, parse_exp_in_context_1): Update.
13298         (parse_expression_for_completion): Change "name" to
13299         unique_xmalloc_ptr*.
13300
13301 2018-02-21  Tom Tromey  <tom@tromey.com>
13302
13303         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13304
13305 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13306
13307         * avr-tdep.c (avr_read_pc): Change parameter type to
13308         readable_regcache.
13309         * gdbarch.sh (read_pc): Likewise.
13310         * gdbarch.c: Re-generated.
13311         * gdbarch.h: Re-generated.
13312         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13313         readable_regcache.
13314         * ia64-tdep.c (ia64_read_pc): Likewise.
13315         * mips-tdep.c (mips_read_pc): Likewise.
13316         * spu-tdep.c (spu_read_pc): Likewise.
13317
13318 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13319
13320         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13321         * regcache-dump.c: New file.
13322         * regcache.c: Move register_dump to regcache-dump.c.
13323         (maintenance_print_registers): Likewise.
13324         (maintenance_print_raw_registers): Likewise.
13325         (maintenance_print_cooked_registers): Likewise.
13326         (maintenance_print_register_groups): Likewise.
13327         (maintenance_print_remote_registers): Likewise.
13328         (_initialize_regcache): Likewise.
13329         * regcache.h (register_dump): Moved from regcache.c.
13330
13331 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13332
13333         * regcache.c (regcache::regcache): Update.
13334         (regcache::invalidate): Move it to detached_regcache::invalidate.
13335         (get_thread_arch_aspace_regcache): Update.
13336         (regcache::raw_update): Update.
13337         (regcache::cooked_read): Remove some code.
13338         (regcache::cooked_read_value): Likewise.
13339         (regcache::raw_write): Remove assert on m_readonly_p.
13340         (regcache::raw_supply_integer): Move it to
13341         detached_regcache::raw_supply_integer.
13342         (regcache::raw_supply_zeroed): Likewise.
13343         * regcache.h (detached_regcache) <raw_supply_integer>: New
13344         declaration.
13345         <raw_supply_zeroed, invalidate>: Likewise.
13346         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13347         <invalidate>: Likewise.
13348         <m_readonly_p>: Removed.
13349
13350 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13351
13352         * infcmd.c (get_return_value): Let stop_regs point to
13353         get_current_regcache.
13354         * regcache.c (regcache::regcache): Remove.
13355         (register_dump_reg_buffer): New class.
13356         (regcache_print): Adjust.
13357         * regcache.h (regcache): Remove constructors.
13358
13359 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13360
13361         * regcache.c (class register_dump): New class.
13362         (register_dump_regcache, register_dump_none): New class.
13363         (register_dump_remote, register_dump_groups): New class.
13364         (regcache_print): Update.
13365         * regcache.h (regcache_dump_what): Move it to regcache.c.
13366         (regcache) <dump>: Remove.
13367
13368 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13369
13370         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13371          reg_buffer_rw *.
13372         (jit_unwind_reg_set_impl): Call raw_supply.
13373         (jit_frame_sniffer): Use reg_buffer_rw.
13374         * record-full.c (record_full_core_regbuf): Change its type.
13375         (record_full_core_open_1): Use reg_buffer_rw.
13376         (record_full_close): Likewise.
13377         (record_full_core_fetch_registers): Use regcache->raw_supply.
13378         (record_full_core_store_registers): Likewise.
13379         * regcache.c (regcache::get_register_status): Move it to
13380         reg_buffer.
13381         (regcache_raw_set_cached_value): Remove.
13382         (regcache::raw_set_cached_value): Remove.
13383         (regcache::raw_write): Call raw_supply.
13384         (regcache::raw_supply): Move it to reg_buffer_rw.
13385         * regcache.h (regcache_raw_set_cached_value): Remove.
13386         (reg_buffer_rw): New class.
13387
13388 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13389
13390         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13391         readonly_detached_regcache.
13392         (dummy_frame_prev_register): Use regcache->cooked_read.
13393         * frame.c (frame_save_as_regcache): Change return type.
13394         (frame_pop): Update.
13395         * frame.h (frame_save_as_regcache): Update declaration.
13396         * inferior.h (get_infcall_suspend_state_regcache): Update
13397         declaration.
13398         * infrun.c (infcall_suspend_state) <registers>: use
13399         readonly_detached_regcache.
13400         (save_infcall_suspend_state): Don't use regcache_dup.
13401         (get_infcall_suspend_state_regcache): Change return type.
13402         * linux-fork.c (struct fork_info) <savedregs>: Change to
13403         readonly_detached_regcache.
13404         <pc>: New field.
13405         (fork_save_infrun_state): Don't use regcache_dup.
13406         (info_checkpoints_command): Adjust.
13407         * mi/mi-main.c (register_changed_p): Update declaration.
13408         (mi_cmd_data_list_changed_registers): Use
13409         readonly_detached_regcache.
13410         (register_changed_p): Change parameter type to
13411         readonly_detached_regcache.
13412         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13413         readonly_detached_regcache.
13414         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13415         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13416         New.
13417         (regcache::save): Move it to reg_buffer.
13418         (regcache::restore): Change parameter type.
13419         (regcache_dup): Remove.
13420         * regcache.h (reg_buffer) <save>: New method.
13421         (readonly_detached_regcache): New class.
13422         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13423         readonly_detached_regcache.
13424         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13425
13426 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13427
13428         * frame.c (frame_save_as_regcache): Use regcache method save.
13429         (frame_pop): Use regcache method restore.
13430         * infrun.c (restore_infcall_suspend_state): Likewise.
13431         * linux-fork.c (fork_load_infrun_state): Likewise.
13432         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13433         save.
13434         * regcache.c (regcache_save): Remove.
13435         (regcache::restore): More asserts.
13436         (regcache_cpy): Remove.
13437         * regcache.h (regcache_save): Remove the declaration.
13438         (regcache::restore): Move from private to public.
13439         Remove the friend declaration of regcache_cpy.
13440         (regcache_cpy): Remove declaration.
13441
13442 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13443
13444         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13445         parameter type to 'readable_regcache *'.
13446         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13447         * arm-tdep.c (arm_neon_quad_read): Likewise.
13448         (arm_pseudo_read): Likewise.
13449         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13450         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13451         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13452         * gdbarch.c: Re-generated.
13453         * gdbarch.h: Re-generated.
13454         * gdbarch.sh (pseudo_register_read): Change parameter type to
13455         'readable_regcache *'.
13456         (pseudo_register_read_value): Likewise.
13457         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13458         (h8300_pseudo_register_read): Likewise.
13459         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13460         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13461         (i386_pseudo_register_read_into_value): Likewise.
13462         (i386_pseudo_register_read_value): Likewise.
13463         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13464         declaration.
13465         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13466         * m32c-tdep.c (m32c_raw_read): Likewise.
13467         (m32c_read_flg): Likewise.
13468         (m32c_banked_register): Likewise.
13469         (m32c_banked_read): Likewise.
13470         (m32c_sb_read): Likewise.
13471         (m32c_part_read): Likewise.
13472         (m32c_cat_read): Likewise.
13473         (m32c_r3r2r1r0_read): Likewise.
13474         (m32c_pseudo_register_read): Likewise.
13475         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13476         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13477         (mep_pseudo_cr64_read): Likewise.
13478         (mep_pseudo_register_read): Likewise.
13479         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13480         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13481         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13482         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13483         (regcache::cooked_read): Likewise.
13484         (regcache::cooked_read_value): Likewise.
13485         (regcache_cooked_read_signed):
13486         (regcache::cooked_read): Likewise.
13487         * regcache.h (readable_regcache): New class.
13488         (regcache): Inherit readable_regcache.  Move some methods to
13489         readable_regcache.
13490         * rl78-tdep.c (rl78_pseudo_register_read): Change
13491         parameter type to 'readable_regcache *'.
13492         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13493         (e500_pseudo_register_read): Change parameter type to
13494         'readable_regcache *'.
13495         (dfp_pseudo_register_read): Likewise.
13496         (vsx_pseudo_register_read): Likewise.
13497         (efpr_pseudo_register_read): Likewise.
13498         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13499         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13500         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13501         (sh64_pseudo_register_read): Likewise.
13502         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13503         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13504         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13505         (spu_pseudo_register_read): Likewise.
13506         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13507         (xtensa_pseudo_register_read): Likewise.
13508
13509 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13510
13511         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13512         (regcache::arch): Move it to reg_buffer::arch.
13513         (regcache::register_buffer): Likewise.
13514         (regcache::assert_regnum): Likewise.
13515         (regcache::num_raw_registers): Likewise.
13516         * regcache.h (reg_buffer): New class.
13517         (regcache): Inherit reg_buffer.
13518
13519 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13520
13521         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13522         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13523
13524 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13525
13526         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13527
13528 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13529
13530         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13531         (SFILES): Remove common/*.c files.
13532         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13533         * common/common.host: Add common reference.
13534         * configure.ac: Likewise.
13535         * configure: Regenerate.
13536
13537 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13538
13539         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13540         (block_initialize_namespace): Use new.
13541         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13542         (dwarf2_free_objfile): Use delete.
13543         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13544         (copy_type_recursive): Use new.
13545         * gdb_obstack.h (allocate_on_obstack): New.
13546
13547 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13548
13549         PR gdb/22849
13550         * inferior.c (exit_inferior_1): Reset inf->control.
13551
13552 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13553
13554         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13555         declaration.
13556
13557 2018-02-14  Pedro Alves  <palves@redhat.com>
13558
13559         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13560         frame_cleanup_after_sniffer on exception.
13561
13562 2018-02-14  Tom Tromey  <tom@tromey.com>
13563
13564         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13565         const.
13566         (solib_bfd_open): Make pathname const.
13567         * solib.c (solib_bfd_open): Make pathname const.
13568         * solib-spu.c (spu_bfd_fopen): Make name const.
13569         (spu_bfd_open): Make pathname const.
13570         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13571         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13572
13573 2018-02-14  Tom Tromey  <tom@tromey.com>
13574
13575         * symfile.c (symfile_bfd_open): Update.
13576         * source.h (openp, source_full_path_of, find_and_open_source):
13577         Change argument type to unique_xmalloc_ptr.
13578         * source.c (openp): Take a unique_xmalloc_ptr.
13579         (source_full_path_of, find_and_open_source): Likewise.
13580         (open_source_file, symtab_to_fullname): Update.
13581         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13582         unique_xmalloc_ptr.
13583         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13584         (exec_file_find): Update.
13585         * psymtab.c (psymtab_to_fullname): Update.
13586         * nto-tdep.h (nto_find_and_open_solib): Update.
13587         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13588         unique_xmalloc_ptr.
13589         * exec.c (exec_file_attach): Update.
13590         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13591         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13592
13593 2018-02-14  Tom Tromey  <tom@tromey.com>
13594
13595         * solib.c: Include source.h.
13596         * nto-tdep.c: Include source.h.
13597         * mi/mi-cmd-env.c: Include source.h.
13598         * infcmd.c: Include source.h.
13599         * exec.c: Include source.h.
13600         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13601         (add_path, directory_switch, source_path, init_source_path): Move
13602         declarations...
13603         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13604         (add_path, directory_switch, source_path, init_source_path):
13605         ...here.
13606
13607 2018-02-14  Tom Tromey  <tom@tromey.com>
13608
13609         * solist.h (exec_file_find, solib_find): Return
13610         unique_xmalloc_ptr.
13611         (solib_bfd_fopen): Take a const char *.
13612         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13613         (exec_file_find, solib_find): Likewise.
13614         (solib_bfd_fopen): Do not take ownership of "pathname".
13615         (solib_bfd_open): Use unique_xmalloc_ptr.
13616         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13617         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13618         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13619         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13620
13621 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13622
13623         * ada-lang.c (name_match_type_from_name): Remove reference to
13624         ada_name_for_lookup in function's documentation.
13625         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13626
13627 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13628
13629         * defs.h (enum openp_flags): New enum.
13630         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13631         Move to enum openp_flags.
13632         (openp_flags): New enum flags.
13633         (openp): Change parameter type to openp_flags.
13634         * source.c (openp): Change parameter type to openp_flags.
13635         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13636         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13637
13638 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13639
13640         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13641         per-command.
13642
13643 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13644
13645         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13646         into...
13647         (class dwarf2_queue_guard): ...the destructor of this new class.
13648         (dw2_do_instantiate_symtab): Create instance of the new class
13649         dwarf2_queue_guard, remove cleanup.
13650
13651 2018-02-09  Tom Tromey  <tom@tromey.com>
13652
13653         * source.c (find_source_lines): Don't reference past the end of
13654         the vector.
13655
13656 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13657
13658         * remote.c (remote_btrace_maybe_reopen): Change error message.
13659         * btrace.c (btrace_enable): Likewise.
13660         (parse_xml_btrace): Likewise.
13661         (parse_xml_btrace_conf): Likewise.
13662
13663 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13664
13665         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13666         (linux_enable_pt, linux_enable_bts): Call
13667         diagnose_perf_event_open_fail.
13668
13669 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13670
13671         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13672         Remove parameter and change return type.  Update callers.  Move it.
13673         (linux_enable_bts, linux_enable_pt): Improve error message.
13674         (linux_enable_pt): Remove zero buffer size check.
13675         (linux_enable_btrace): Improve error messages.  Remove NULL return
13676         check.
13677
13678 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13679
13680         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13681         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13682         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13683         (linux_supports_pt, linux_supports_btrace): Remove.
13684         (linux_enable_bts): Call cpu_supports_bts.
13685         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13686         * remote.c (remote_supports_btrace): Remove.
13687         (init_remote_ops): Remove remote_supports_btrace.
13688         * target-delegates.c: Regenerated.
13689         * target.c (target_supports_btrace): Remove.
13690         * target.h (target_ops) <to_supports_btrace>: Remove
13691         (target_supports_btrace): Remove.
13692         * x86-linux-nat.c (x86_linux_create_target): Remove
13693         linux_supports_btrace.
13694
13695 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13696
13697         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13698         btrace failed.
13699         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13700         exception and use message in own exception.
13701
13702 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13703
13704         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13705         (perf_event_pt_event_type): Use gdb_file_up.
13706         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13707         scoped_fd, and scoped_mmap.
13708
13709 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13710
13711         * common/scoped_mmap.h: New.
13712         * unittests/scoped_mmap-selftest.c: New.
13713         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13714         unittests/scoped_mmap-selftest.c.
13715
13716 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13717
13718         * common/scoped_fd.h: New.
13719         * unittests/scoped_fd-selftest.c: New.
13720         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13721         unittests/scoped_fd-selftest.c.
13722
13723 2018-02-09  Tom Tromey  <tom@tromey.com>
13724
13725         * auto-load.c (auto_load_section_scripts): Use
13726         gdb::unique_xmalloc_ptr.
13727
13728 2018-02-09  Tom Tromey  <tom@tromey.com>
13729
13730         * auto-load.c (execute_script_contents): Use std::string.
13731
13732 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13733
13734         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13735         Python function, rather than a new command.
13736
13737 2018-02-08  Tom Tromey  <tom@tromey.com>
13738
13739         * solib.c (solib_find_1): Use std::string.
13740         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13741
13742 2018-02-08  Tom Tromey  <tom@tromey.com>
13743
13744         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13745
13746 2018-02-08  Tom Tromey  <tom@tromey.com>
13747
13748         * source.c (find_source_lines): Use gdb::def_vector.
13749
13750 2018-02-08  Tom Tromey  <tom@tromey.com>
13751
13752         * macrocmd.c (struct temporary_macro_definition): New.
13753         (macro_define_command): Use temporary_macro_definition.  Remove
13754         cleanups.
13755         (free_macro_definition_ptr): Remove.
13756
13757 2018-02-08  Tom Tromey  <tom@tromey.com>
13758
13759         * macroexp.c (maybe_expand): Use std::string.
13760
13761 2018-02-08  Tom Tromey  <tom@tromey.com>
13762
13763         * macroexp.c (struct macro_buffer): Add initializers for some
13764         members.
13765         (init_buffer, init_shared_buffer, free_buffer)
13766         (free_buffer_return_text): Remove.
13767         (macro_buffer): New constructors.
13768         (~macro_buffer): New destructor.
13769         (macro_buffer::set_shared): New method.
13770         (macro_buffer::resize_buffer, macro_buffer::appendc)
13771         (macro_buffer::appendmem): Now methods, not free functions.
13772         (set_token, append_tokens_without_splicing, stringify)
13773         (macro_stringify): Update.
13774         (gather_arguments): Change return type.  Remove argc_p argument,
13775         add args_ptr argument.  Use std::vector.
13776         (substitute_args): Remove argc argument.  Accept std::vector.
13777         (expand): Update.  Use std::vector.
13778         (scan, macro_expand, macro_expand_next): Update.
13779
13780 2018-02-08  Tom Tromey  <tom@tromey.com>
13781
13782         * symtab.c (default_collect_symbol_completion_matches_break_on):
13783         Use unique_xmalloc_ptr.
13784         * macroscope.h: (sal_macro_scope, user_macro_scope)
13785         (default_macro_scope): Return unique_xmalloc_ptr.
13786         * macroscope.c (sal_macro_scope, user_macro_scope)
13787         (default_macro_scope): Return unique_xmalloc_ptr.
13788         * macroexp.h (macro_expand, macro_expand_once): Return
13789         unique_xmalloc_ptr.
13790         * macroexp.c (macro_expand, macro_expand_once): Return
13791         unique_xmalloc_ptr.
13792         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13793         (info_macro_command, info_macros_command): Use
13794         unique_xmalloc_ptr.
13795         * compile/compile-c-support.c (write_macro_definitions): Use
13796         unique_xmalloc_ptr.
13797         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13798
13799 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13800
13801         * value.c (value_static_field): Assign field type instead of
13802         containing type when returning an optimized out value.
13803
13804 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13805
13806         * ft32-tdep.c (ft32_read_pc): Remove.
13807         (ft32_write_pc): Remove.
13808         (ft32_gdbarch_init): Update.
13809         * m32r-tdep.c (m32r_read_pc): Remove.
13810         (m32r_gdbarch_init): Update.
13811         * mep-tdep.c (mep_read_pc): Remove.
13812         (mep_gdbarch_init): Update.
13813         * microblaze-tdep.c (microblaze_write_pc): Remove.
13814         (microblaze_gdbarch_init): Update.
13815         * mn10300-tdep.c (mn10300_read_pc): Remove.
13816         (mn10300_write_pc): Remove.
13817         (mn10300_gdbarch_init): Update.
13818         * moxie-tdep.c (moxie_read_pc): Remove.
13819         (moxie_write_pc): Remove.
13820         (moxie_gdbarch_init): Update.
13821
13822 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13823
13824         * expprint.c (print_subexp_standard): Handle
13825         OP_F77_UNDETERMINED_ARGLIST.
13826         (dump_subexp_body_standard): Likewise.
13827
13828 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13829
13830         * target-descriptions.c (tdesc_element_visitor) Add empty
13831         implementations.
13832         (tdesc_type): Move make_gdb_type from here.
13833         (tdesc_type_builtin): Likewise.
13834         (tdesc_type_vector): Likewise.
13835         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13836         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13837         (make_gdb_type_union): Likewise.
13838         (make_gdb_type_flags): Likewise.
13839         (make_gdb_type_enum): Likewise.
13840         (make_gdb_type): New function.
13841         (tdesc_register_type): Use static make_gdb_type.
13842
13843 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13844
13845         * infcmd.c (default_print_one_register_info): Align natural-format
13846         column values consistently one under another.
13847         (pad_to_column): New function.
13848
13849 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13850
13851         * dwarf2read.c (dwarf2_physname): Move commment.
13852
13853 2018-02-01  Leszek Swirski  <leszeks@google.com>
13854
13855         * varobj.c (varobj_formatted_print_options): Allow recursive
13856         pretty printing if pretty printing is enabled.
13857
13858 2018-02-01  Leszek Swirski  <leszeks@google.com>
13859
13860         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13861         names after a structop as a filename.
13862
13863 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13864
13865         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13866         (arm_record_coproc_data_proc): Likewise.
13867
13868 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13869
13870         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13871
13872 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13873
13874         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13875         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13876
13877 2018-01-31  Pedro Alves  <palves@redhat.com>
13878
13879         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13880         * inflow.c (child_terminal_save_inferior): Wrap reference to
13881         tcgetpgrp in HAVE_TERMIOS_H.
13882         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13883         _WIN32.
13884         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13885         always iterate over all inferiors.
13886         (gdbsim_cntrl_c): Adjust.
13887         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13888
13889 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13890
13891         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13892         index type is objfile-owned if the element type is as well.
13893
13894 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13895
13896         GDB 8.1 released.
13897
13898 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13899
13900         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13901         "features/s390x-linux64.c".
13902         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13903         s390_linux32 and s390x_linux64.
13904         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13905         default tdesc.
13906         * s390-tdep.c: Include "features/s390-linux32.c" and
13907         "features/s390x-linux64.c".
13908         (s390_tdesc_valid): Add check for tdesc_has_registers.
13909         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13910         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13911         tdesc_s390x_linux64.
13912         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13913         tdesc_s390x_linux64 to...
13914         * s390-tdep.h: ...here.
13915
13916 2018-01-30  Pedro Alves  <palves@redhat.com>
13917
13918         PR gdb/13211
13919         * config.in, configure: Regenerate.
13920         * configure.ac: Check for getpgid.
13921         * go32-nat.c (go32_pass_ctrlc): New.
13922         (go32_target): Install it.
13923         * inf-child.c (inf_child_target): Install
13924         child_terminal_save_inferior, child_pass_ctrlc and
13925         child_interrupt.
13926         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13927         (inf_ptrace_target): No longer install it.
13928         * infcmd.c (interrupt_target_1): Adjust.
13929         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13930         (child_interrupt): Declare.
13931         (inferior::terminal_state): New.
13932         * inflow.c (struct terminal_info): Update comments.
13933         (inferior_process_group): Delete.
13934         (terminal_is_ours): Delete.
13935         (gdb_tty_state): New.
13936         (child_terminal_init): Adjust.
13937         (is_gdb_terminal, sharing_input_terminal_1)
13938         (sharing_input_terminal): New functions.
13939         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13940         Set the process's actual process group in the foreground if
13941         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13942         mark terminal as the inferior's if not sharing GDB's terminal.
13943         Don't check attach_flag.
13944         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13945         pass down a target_terminal_state.
13946         (child_terminal_save_inferior): New, factored out from ...
13947         (child_terminal_ours_1): ... this.  Handle
13948         target_terminal_state::is_ours_for_output.
13949         (child_interrupt, child_pass_ctrlc): New.
13950         (inflow_inferior_exit): Clear the inferior's terminal_state.
13951         (copy_terminal_info): Copy the inferior's terminal state.
13952         (_initialize_inflow): Remove reference to terminal_is_ours.
13953         * inflow.h (inferior_process_group): Delete.
13954         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13955         * procfs.c (procfs_target): Don't install procfs_interrupt.
13956         (procfs_interrupt): Delete.
13957         * remote.c (remote_serial_quit_handler): Adjust.
13958         (remote_interrupt): Remove ptid parameter.  Adjust.
13959         * target-delegates.c: Regenerate.
13960         * target.c: Include "terminal.h".
13961         (target_terminal::terminal_state): Rename to ...
13962         (target_terminal::m_terminal_state): ... this.
13963         (target_terminal::init): Adjust.
13964         (target_terminal::inferior): Adjust to per-inferior
13965         terminal_state.
13966         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13967         (target_terminal::ours, target_terminal::ours_for_output): Use
13968         target_terminal_is_ours_kind.
13969         (target_interrupt): Remove ptid parameter.  Adjust.
13970         (default_target_pass_ctrlc): Adjust.
13971         * target.h (target_ops::to_terminal_save_inferior): New field.
13972         (target_ops::to_interrupt): Remove ptid_t parameter.
13973         (target_interrupt): Remove ptid_t parameter.  Update comment.
13974         (target_pass_ctrlc): Update comment.
13975         * target/target.h (target_terminal_state): New scoped enum,
13976         factored out of ...
13977         (target_terminal::terminal_state): ... here.
13978         (target_terminal::inferior): Update comments.
13979         (target_terminal::restore_inferior): New.
13980         (target_terminal::is_inferior, target_terminal::is_ours)
13981         (target_terminal::is_ours_for_output): Adjust.
13982         (target_terminal::scoped_restore_terminal_state): Adjust to
13983         rename, and call restore_inferior() instead of inferior().
13984         (target_terminal::scoped_restore_terminal_state::m_state): Change
13985         type.
13986         (target_terminal::terminal_state): Rename to ...
13987         (target_terminal::m_terminal_state): ... this and change type.
13988
13989 2018-01-30  Pedro Alves  <palves@redhat.com>
13990
13991         * linux-nat.c (wait_for_signal): New function.
13992         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13993         directly.
13994         (async_terminal_is_ours)
13995         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13996         (linux_nat_add_target): Don't override
13997         to_terminal_inferior/to_terminal_ours.
13998
13999 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14000
14001         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14002
14003 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14004
14005         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14006         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14007         dwarf2_per_objfile_free here.
14008         (dwarf2_per_objfile_free): Remove.
14009         (_initialize_dwarf2_read): Don't register
14010         dwarf2_per_objfile_free as a registry cleanup.
14011
14012 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14013
14014         Avoid compilation errors in MinGW native builds
14015
14016         The error is triggered by including python-internal.h, and the
14017         error message is:
14018
14019              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14020                       from build-gnulib/import/math.h:27,
14021                       from d:/usr/Python26/include/pyport.h:235,
14022                       from d:/usr/Python26/include/Python.h:58,
14023                       from python/python-internal.h:94,
14024                       from python/py-arch.c:24:
14025              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14026         using ::hypot;
14027                 ^~~~~
14028
14029         This happens because Python headers define 'hypot' to expand t
14030         '_hypot' in the Windows builds.
14031         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14032         'hypoth'.  This avoids a compilation error.
14033
14034 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14035
14036         * MAINTAINERS (Write After Approval): Fix ordering.
14037
14038 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14039
14040         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14041
14042 2018-01-26  Alan Modra  <amodra@gmail.com>
14043
14044         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14045         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14046         Remove nop.  Make const.  Comment.
14047         (powerpc32_plt_stub_so_2): New.
14048         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14049         Correct count.  Update uses.
14050         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14051         Move common code reading PLT entry word.  Correct
14052         powerpc32_plt_stub PLT address calculation.
14053         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14054         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14055         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14056         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14057         (ppc64_standard_linkage8): Likewise.
14058         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14059         Correct insns description.
14060         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14061
14062 2018-01-24  Pedro Alves  <palves@redhat.com>
14063
14064         GCC PR libstdc++/83906
14065         * gdbtypes.c (operator==(const dynamic_prop &,
14066         const dynamic_prop &)): New.
14067         (operator==(const range_bounds &, const range_bounds &)): New.
14068         (check_types_equal): Use them instead of memcmp.
14069         * gdbtypes.h (operator==(const dynamic_prop &,
14070         const dynamic_prop &)): Declare.
14071         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14072         (operator==(const range_bounds &, const range_bounds &)): Declare.
14073         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14074
14075 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14076
14077         * s390-linux-tdep.c (s390_record_address_mask)
14078         (s390_record_calc_disp_common, s390_record_calc_disp)
14079         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14080         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14081         (s390_process_record): Move to s390-tdep.c.
14082         (s390_linux_init_abi_any): Adjust.
14083         * s390-tdep.c (s390_record_address_mask)
14084         (s390_record_calc_disp_common, s390_record_calc_disp)
14085         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14086         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14087         (s390_process_record): Moved from s390-linux-tdep.c
14088         (s390_gdbarch_init): Adjust.
14089
14090 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14091
14092         * s390-linux-nat.c (s390-tdep.h): New include.
14093         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14094         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14095         (ALLDEPFILES): Add s390-tdep.c.
14096         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14097         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14098         * s390-tdep.h: ...this.  New file.
14099         * s390-linux-tdep.c (s390-tdep.h): New include.
14100         (_initialize_s390_tdep): Rename to...
14101         (_initialize_s390_linux_tdep): ...this and adjust.
14102         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14103         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14104         s390-tdep.h.
14105         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14106         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14107         (s390_is_partial_instruction, s390_software_single_step)
14108         (is_non_branch_ril, s390_displaced_step_copy_insn)
14109         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14110         (s390_prologue_data, s390_addr, s390_store, s390_load)
14111         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14112         (s390_register_call_saved, s390_guess_tracepoint_registers)
14113         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14114         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14115         (s390_pseudo_register_name, s390_pseudo_register_type)
14116         (s390_pseudo_register_read, s390_pseudo_register_write)
14117         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14118         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14119         (s390_addr_bits_remove, s390_address_class_type_flags)
14120         (s390_address_class_type_flags_to_name)
14121         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14122         (s390_function_arg_float, s390_function_arg_vector)
14123         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14124         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14125         (s390_frame_align, s390_register_return_value, s390_return_value)
14126         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14127         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14128         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14129         (s390_trad_frame_prev_register, s390_unwind_cache)
14130         (s390_prologue_frame_unwind_cache)
14131         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14132         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14133         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14134         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14135         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14136         (s390_frame_base_address, s390_local_base_address)
14137         (s390_frame_base, s390_gcc_target_options)
14138         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14139         (s390_validate_reg_range, s390_tdesc_valid)
14140         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14141         * s390-tdep.c: ...this.  New file.
14142
14143 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14144
14145         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14146         (s390_process_record, s390_gdbarch_tdep_alloc)
14147         (s390_linux_init_abi_any): Use/set new hook.
14148
14149 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14150
14151         * s390-linux-tdep.c (osabi.h): New include.
14152         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14153         (s390_linux_init_abi_any): New functions.
14154         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14155
14156 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14157
14158         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14159         tdesc_has_registers check
14160
14161 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14162
14163         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14164         (s390_validate_reg_range): New macro.
14165         (s390_gdbarch_init): Adjust.
14166
14167 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14168
14169         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14170         (s390_gdbarch_tdep_alloc): Adjust.
14171         (s390_gdbarch_init): Adjust.
14172
14173 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14174
14175         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14176         <have_tdb>: Change type to bool.
14177         (s390_gdbarch_tdep_alloc): Adjust.
14178         (s390_gdbarch_init): Adjust.
14179
14180 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14181
14182         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14183         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14184         (s390_gdbarch_tdep_alloc): New function.
14185         (s390_gdbarch_init): Allocate tdep at start and use its fields
14186         instead of separate variables.
14187
14188 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14189
14190         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14191         when looking for cached gdbarch and add comment for remaining.
14192
14193 2018-01-22  Pedro Alves  <palves@redhat.com>
14194             Sergio Durigan Junior  <sergiodj@redhat.com>
14195
14196         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14197         case.
14198
14199 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14200
14201         * MAINTAINERS: Update my company e-mail address.
14202
14203 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14204
14205         * regcache.c (cooked_write_test): New function.
14206         (_initialize_regcache): Register the test.
14207
14208 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14209
14210         * ia64-tdep.c (ia64_pseudo_register_read): Call
14211         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14212         * m32c-tdep.c (m32c_cat_read): Likewise.
14213         (m32c_r3r2r1r0_read): Likewise.
14214         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14215         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14216
14217 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14218
14219         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14220         method raw_read instead of regcache_raw_read.
14221         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14222         * arm-tdep.c (arm_neon_quad_read): Likewise.
14223         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14224         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14225         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14226         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14227         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14228         (i386_pseudo_register_read_into_value): Likewise.
14229         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14230         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14231         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14232         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14233         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14234         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14235         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14236         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14237         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14238
14239 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14240
14241         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14242         * configure.tgt: Remove target mt.
14243         * mt-tdep.c: Remove.
14244         * regcache.c (cooked_read_test): Remove the check for mt.
14245
14246 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14247
14248         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14249         instead of gdbarch_pseudo_register_read_value.
14250
14251 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14252
14253         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14254         language is Ada.
14255
14256 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14257
14258         * linespec.c (create_sals_line_offset): Remove code that preserved
14259         the symtab_and_line's line number.
14260
14261 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14262
14263         * varobj.c (varobj_create): Don't set valid_block when creating a
14264         floating varobj.
14265
14266 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14267
14268         * varobj.c (varobj_create): Remove out of date comment.
14269
14270 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14271
14272         PR mi/20395
14273         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14274         updating innermost block.
14275         * parse.c (innermost_block_tracker::update): Take extra type
14276         parameter, and check types match before updating innermost block.
14277         (write_dollar_variable): Update innermost block for registers.
14278         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14279         (innermost_block_tracker::innermost_block_tracker): Initialise
14280         m_types member.
14281         (innermost_block_tracker::reset): Take type parameter.
14282         (innermost_block_tracker::update): Take type parameter, and pass
14283         type through as needed.
14284         (innermost_block_tracker::m_types): New member.
14285         * varobj.c (varobj_create): Pass type when reseting innermost
14286         block.
14287
14288 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14289
14290         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14291         * ada-lang.c (resolve_subexp): Likewise.
14292         * breakpoint.c (set_breakpoint_condition) Likewise.
14293         (watch_command_1) Likewise.
14294         * c-exp.y (variable): Likewise.
14295         * d-exp.y (PrimaryExpression): Likewise.
14296         * f-exp.y (variable): Likewise.
14297         * go-exp.y (variable): Likewise.
14298         * m2-exp.y (variable): Likewise.
14299         * objfiles.c (objfile::~objfile): Likewise.
14300         * p-exp.y (variable): Likewise.
14301         * parse.c (innermost_block): Change type.
14302         * parser-defs.h (class innermost_block_tracker): New.
14303         (innermost_block): Change to innermost_block_tracker.
14304         * printcmd.c (display_command): Switch to innermost_block API.
14305         (do_one_display): Likewise.
14306         * rust-exp.y (do_one_display): Likewise.
14307         * symfile.c (clear_symtab_users): Likewise.
14308         * varobj.c (varobj_create): Switch to innermost_block API, replace
14309         use of innermost_block with block stored on varobj object.
14310
14311 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14312
14313         * expression.h (innermost_block): Remove declaration.
14314         * varobj.c: Add 'parser-defs.h' include.
14315
14316 2018-01-19  Tom Tromey  <tom@tromey.com>
14317
14318         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14319         symbols in the static and global blocks.
14320
14321 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14322
14323         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14324         gdb_ptrace.h, and move including gdb_wait.h ...
14325         * nat/linux-ptrace.h: ... to here.
14326
14327 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14328
14329         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14330         inf_ptrace_detach_success.
14331         (inf_ptrace_detach_success): Add inferior parameter, use it
14332         instead of inferior_ptid, pass it to detach_inferior.
14333         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14334         parameter.
14335         * inferior.c (detach_inferior): Add overload that takes an
14336         inferior object.
14337         * inferior.h (detach_inferior): Likewise.
14338         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14339         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14340         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14341
14342 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14343
14344         * target.h (struct target_ops) <to_detach>: Add inferior
14345         parameter.
14346         (target_detach): Likewise.
14347         * target.c (dispose_inferior): Pass inferior down.
14348         (target_detach): Pass inferior down.  Assert that it is equal to
14349         the current inferior.
14350         * aix-thread.c (aix_thread_detach): Pass inferior down.
14351         * corefile.c (core_file_command): Pass current_inferior() down.
14352         * corelow.c (core_detach): Add inferior parameter.
14353         * darwin-nat.c (darwin_detach): Likewise.
14354         * gnu-nat.c (gnu_detach): Likewise.
14355         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14356         * infcmd.c (detach_command): Pass current_inferior() down to
14357         target_detach.
14358         * infrun.c (follow_fork_inferior): Pass parent_inf to
14359         target_detach.
14360         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14361         target_detach.
14362         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14363         * linux-thread-db.c (thread_db_detach): Likewise.
14364         * nto-procfs.c (procfs_detach): Likewise.
14365         * procfs.c (procfs_detach): Likewise.
14366         * record.c (record_detach): Likewise.
14367         * record.h (struct inferior): Forward-declare.
14368         (record_detach): Add inferior parameter.
14369         * remote-sim.c (gdbsim_detach): Likewise.
14370         * remote.c (remote_detach_1): Likewise.
14371         (remote_detach): Likewise.
14372         (extended_remote_detach): Likewise.
14373         * sol-thread.c (sol_thread_detach): Likewise.
14374         * target-debug.h (target_debug_print_inferior_p): New macro.
14375         * target-delegates.c: Re-generate.
14376         * top.c (kill_or_detach): Pass inferior down to target_detach.
14377         * windows-nat.c (windows_detach): Add inferior parameter.
14378
14379 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14380
14381         * target.h (struct target_ops) <to_detach>: Remove args
14382         parameter.
14383         (target_detach): Likewise.
14384         * target.c (dispose_inferior): Adjust.
14385         (target_detach): Remove args parameter, adjust.
14386         * aix-thread.c (aix_thread_detach): Adjust.
14387         * corefile.c (core_file_command): Adjust.
14388         * corelow.c (core_detach): Adjust.
14389         * darwin-nat.c (darwin_detach): Adjust.
14390         * gnu-nat.c (gnu_detach): Adjust.
14391         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14392         * infcmd.c (detach_command): Adjust
14393         * infrun.c (follow_fork_inferior): Adjust.
14394         (handle_vfork_child_exec_or_exit): Adjust.
14395         * linux-fork.c (linux_fork_detach): Remove args parameter.
14396         * linux-fork.h (linux_fork_detach): Likewise.
14397         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14398         * linux-thread-db.c (thread_db_detach): Likewise.
14399         * nto-procfs.c (procfs_detach): Likewise.
14400         * procfs.c (procfs_detach): Likewise.
14401         (do_detach): Remove signo parameter.
14402         * record.c (record_detach): Remove args parameter.
14403         * record.h (record_detach): Likewise.
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-delegates.c: Re-generate.
14410         * top.c (struct qt_args) <args>: Remove field.
14411         (kill_or_detach): Don't pass args.
14412         (quit_force): Don't set args.
14413         * windows-nat.c (windows_detach): Remove args parameter.
14414
14415 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14416
14417         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14418         (arm_linux_init_abi): Install it.
14419
14420 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14421
14422         * osabi.c (gdb_osabi_names): Extend the regexp for
14423         arm-linux-gnueabihf.
14424
14425 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14426
14427         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14428         m_abbrevs.
14429         (abbrev_table::add_abbrev): Update.
14430         (abbrev_table::lookup_abbrev): Update.
14431
14432 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14433
14434         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14435
14436 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14437
14438         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14439         to "std::string".
14440
14441 2018-01-17  Tom Tromey  <tom@tromey.com>
14442
14443         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14444
14445 2018-01-17  Tom Tromey  <tom@tromey.com>
14446
14447         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14448         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14449         (create_array_type_with_stride): Update.
14450         * dwarf2read.c (set_die_type): Update.
14451
14452 2018-01-17  Tom Tromey  <tom@tromey.com>
14453
14454         * dwarf2read.c (delayed_method_info): Remove typedef.
14455         (dwarf2_cu::method_info): Now a std::vector.
14456         (add_to_method_list): Update.
14457         (free_delayed_list): Remove.
14458         (compute_delayed_physnames): Update.
14459         (process_full_comp_unit, process_full_type_unit): Clear the method
14460         list.  Remove cleanups.
14461         (psymtab_include_file_name): Add name_holder parameter.  Use
14462         unique_xmalloc_ptr.
14463         (dwarf_decode_lines): Update.
14464
14465 2018-01-17  Tom Tromey  <tom@tromey.com>
14466             Simon Marchi  <simon.marchi@ericsson.com>
14467
14468         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14469         (dwarf2_per_objfile::free_cached_comp_units)
14470         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14471         (init_cutu_and_read_dies_no_follow): Update.
14472         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14473         (dwarf2_cu::~dwarf2_cu): New.
14474         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14475         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14476
14477 2018-01-17  Tom Tromey  <tom@tromey.com>
14478             Simon Marchi  <simon.marchi@ericsson.com>
14479
14480         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14481         (struct die_reader_specs) <abbrev_table>: New member.
14482         (struct abbrev_table): Add constructor.
14483         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14484         <abbrev_obstack>: Now an auto_obstack.
14485         (abbrev_table_up): New typedef.
14486         (init_cu_die_reader): Add abbrev_table parameter.
14487         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14488         Add result_dwo_abbrev_table.
14489         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14490         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14491         Update.
14492         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14493         parameter.
14494         (skip_children): Update.
14495         (abbrev_table::alloc_abbrev): Rename from
14496         abbrev_table_alloc_abbrev.
14497         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14498         (abbrev_table::lookup_abbrev): Rename from
14499         abbrev_table_lookup_abbrev.
14500         (abbrev_table_read_table): Return abbrev_table_up.
14501         (abbrev_table_free, abbrev_table_free_cleanup)
14502         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14503         (load_partial_dies): Update.
14504
14505 2018-01-17  Tom Tromey  <tom@tromey.com>
14506
14507         * dwarf2read.c (dwarf2_compute_name): Update comment.
14508         (read_func_scope, read_variable): Update.
14509         (new_symbol): Remove.
14510         (new_symbol_full): Rename to new_symbol.
14511
14512 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14513
14514         PR gdb/16577
14515         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14516         a warning instead of throwing an error, set section size to 0 and return
14517         NULL.
14518         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14519
14520 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14521
14522         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14523         std::string.
14524         (linux_ptrace_attach_fail_reason_string): Likewise.
14525         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14526         Likewise.
14527         (linux_ptrace_attach_fail_reason_string): Likewise.
14528         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14529
14530 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14531
14532         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14533
14534 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14535
14536         PR gdb/21559
14537         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14538         checking for fs_base/gs_base fields in struct user_regs_struct.
14539         * configure: Regenerate.
14540
14541 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14542
14543         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14544         function.
14545         (aarch64_linux_init_abi): Install it to gdbarch hook
14546         gcc_target_options.
14547
14548 2018-01-15  Pedro Alves  <palves@redhat.com>
14549
14550         * common/signals-state-save-restore.c
14551         (save_original_signals_state): Fix typos.
14552
14553 2017-01-12  Tom Tromey  <tom@tromey.com>
14554             Sergio Durigan Junior  <sergiodj@redhat.com>
14555
14556         * Makefile.in (install-only): Install gdb-add-index.
14557
14558 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14559
14560         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14561
14562 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14563
14564         * infrun.c (keep_going_pass_signal): Clear step-over info when
14565         insert_breakpoints fails.
14566
14567 2018-01-11  Pedro Alves  <palves@redhat.com>
14568
14569         PR gdb/22583
14570         * infrun.c (resume): Rename to ...
14571         (resume_1): ... this.
14572         (resume): Reimplement as wrapper around resume_1.
14573
14574 2018-01-11  Pedro Alves  <palves@redhat.com>
14575
14576         PR remote/22597
14577         * remote.c (remote_parse_stop_reply): Default to the last-set
14578         general thread instead of to 'magic_null_ptid'.
14579
14580 2018-01-10  Pedro Alves  <palves@redhat.com>
14581
14582         * language.h (language_get_symbol_name_matcher): Rename ...
14583         (get_symbol_name_matcher): ... this.
14584         * language.c (language_get_symbol_name_matcher): Ditto.
14585         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14586         callers adjusted.
14587
14588 2018-01-10  Pedro Alves  <palves@redhat.com>
14589
14590         PR gdb/22670
14591         * dwarf2read.c
14592         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14593         Adjust to use language_get_symbol_name_matcher instead of
14594         language_defn::la_get_symbol_name_matcher.
14595         * language.c (language_get_symbol_name_matcher): If in Ada mode
14596         and the lookup name is a verbatim match, return Ada's matcher.
14597         * language.h (language_get_symbol_name_matcher): Adjust comment.
14598         (ada_lookup_name_info::verbatim_p):: New method.
14599
14600 2018-01-10  Pedro Alves  <palves@redhat.com>
14601
14602         PR gdb/22670
14603         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14604         minsym's language is language_auto or language_cplus, pass down
14605         language_ada instead.
14606         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14607
14608 2018-01-10  Pedro Alves  <palves@redhat.com>
14609
14610         PR gdb/22670
14611         * minsyms.c (linkage_name_str): New function.
14612         (iterate_over_minimal_symbols): Use it.
14613
14614 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14615
14616         * NEWS: Document that 'info proc' now works on FreeBSD.
14617
14618 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14619
14620         * configure.ac: Check for kinfo_getfile in libutil.
14621         * configure: Regenerate.
14622         * config.in: Regenerate.
14623         * fbsd-nat.c: Include "fbsd-tdep.h".
14624         (fbsd_fetch_cmdline): New.
14625         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14626         rather than calling error.
14627         (fbsd_info_proc): New.
14628         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14629         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14630         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14631
14632 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14633
14634         * fbsd-nat.c (struct free_deleter): Remove.
14635         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14636
14637 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14638
14639         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14640         NULL for an empty pathname.
14641
14642 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14643
14644         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14645         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14646         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14647         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14648         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14649         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14650         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14651         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14652         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14653         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14654         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14655         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14656         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14657         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14658         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14659
14660 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14661
14662         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14663         (gnu_xfer_auxv): New function.
14664         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14665         TARGET_OBJECT_AUXV.
14666
14667 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14668             Simon Marchi  <simon.marchi@ericsson.com>
14669
14670         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14671         common/selftest.c.
14672         (COMMON_OBS): Remove selftest.o.
14673         * configure.ac: Append selftest-arch.c and common/selftest.c to
14674         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14675         * configure: Re-generated.
14676         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14677         GDB_SELF_TEST.
14678         (maintenance_info_selftests): Likewise.
14679
14680 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14681
14682         * ada-valprint.c (val_print_packed_array_elements): Use
14683         proper number of elements when printing an array indexed
14684         by an enumeration type.
14685
14686 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14687
14688         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14689         (dw2_get_file_names_reader): Adjust.
14690         (lookup_dwo_signatured_type): Adjust.
14691         (lookup_dwp_signatured_type): Adjust.
14692         (lookup_signatured_type): Adjust.
14693         (create_type_unit_group): Adjust.
14694         (get_type_unit_group): Adjust.
14695         (process_psymtab_comp_unit_reader): Adjust.
14696         (build_type_psymtabs_reader): Adjust.
14697         (scan_partial_symbols): Adjust.
14698         (add_partial_symbol): Adjust.
14699         (add_partial_subprogram): Adjust.
14700         (peek_die_abbrev): Adjust.
14701         (fixup_go_packaging): Adjust.
14702         (process_imported_unit_die): Adjust.
14703         (dwarf2_compute_name): Adjust.
14704         (dwarf2_physname): Adjust.
14705         (read_import_statement): Adjust.
14706         (handle_DW_AT_stmt_list): Adjust.
14707         (read_file_scope): Adjust.
14708         (read_func_scope): Adjust.
14709         (read_lexical_block_scope): Adjust.
14710         (read_call_site_scope): Adjust.
14711         (read_variable): Adjust.
14712         (dwarf2_rnglists_process): Adjust.
14713         (dwarf2_ranges_process): Adjust.
14714         (dwarf2_ranges_read): Adjust.
14715         (dwarf2_get_pc_bounds): Adjust.
14716         (dwarf2_record_block_ranges): Adjust.
14717         (dwarf2_add_field): Adjust.
14718         (dwarf2_add_member_fn): Adjust.
14719         (read_structure_type): Adjust.
14720         (process_structure_scope): Adjust.
14721         (read_enumeration_type): Adjust.
14722         (read_array_type): Adjust.
14723         (mark_common_block_symbol_computed): Adjust.
14724         (read_common_block): Adjust.
14725         (read_namespace_type): Adjust.
14726         (read_namespace): Adjust.
14727         (read_module_type): Adjust.
14728         (read_tag_pointer_type): Adjust.
14729         (read_tag_ptr_to_member_type): Adjust.
14730         (read_tag_string_type): Adjust.
14731         (read_subroutine_type): Adjust.
14732         (read_typedef): Adjust.
14733         (read_base_type): Adjust.
14734         (attr_to_dynamic_prop): Adjust.
14735         (read_subrange_type): Adjust.
14736         (read_unspecified_type): Adjust.
14737         (dwarf2_read_abbrevs): Adjust.
14738         (load_partial_dies): Adjust.
14739         (read_partial_die): Adjust.
14740         (find_partial_die): Adjust.
14741         (guess_partial_die_structure_name): Adjust.
14742         (fixup_partial_die): Adjust.
14743         (read_attribute_value): Adjust.
14744         (read_addr_index): Adjust.
14745         (read_addr_index_from_leb128): Adjust.
14746         (read_str_index): Adjust.
14747         (dwarf2_string_attr): Adjust.
14748         (get_debug_line_section): Adjust.
14749         (dwarf_decode_line_header): Adjust.
14750         (lnp_state_machine::check_line_address): Adjust.
14751         (dwarf_decode_lines_1): Adjust.
14752         (dwarf_decode_lines): Adjust.
14753         (dwarf2_start_symtab): Adjust.
14754         (var_decode_location): Adjust.
14755         (new_symbol_full): Adjust.
14756         (dwarf2_const_value_data): Adjust.
14757         (dwarf2_const_value_attr): Adjust.
14758         (dwarf2_const_value): Adjust.
14759         (die_type): Adjust.
14760         (die_containing_type): Adjust.
14761         (build_error_marker_type): Adjust.
14762         (lookup_die_type): Adjust.
14763         (guess_full_die_structure_name): Adjust.
14764         (anonymous_struct_prefix): Adjust.
14765         (determine_prefix): Adjust.
14766         (dwarf2_name): Adjust.
14767         (follow_die_ref_or_sig): Adjust.
14768         (follow_die_offset): Adjust.
14769         (follow_die_ref): Adjust.
14770         (follow_die_sig_1): Adjust.
14771         (follow_die_sig): Adjust.
14772         (get_signatured_type): Adjust.
14773         (get_DW_AT_signature_type): Adjust.
14774         (decode_locdesc): Adjust.
14775         (dwarf_decode_macros): Adjust.
14776         (cu_debug_loc_section): Adjust.
14777         (fill_in_loclist_baton): Adjust.
14778         (dwarf2_symbol_mark_computed): Adjust.
14779         (init_one_comp_unit): Don't assign
14780         dwarf2_cu::dwarf2_per_objfile.
14781         (set_die_type): Adjust.
14782
14783 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14784
14785         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14786         <dwarf2_per_objfile>: New field.
14787         (dwarf2_per_objfile): Remove global.
14788         (get_dwarf2_per_objfile): New function.
14789         (set_dwarf2_per_objfile): New function.
14790         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14791         dwarf2_per_objfile.
14792         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14793         (read_abbrev_offset): Likewise.
14794         (read_indirect_string): Likewise.
14795         (read_indirect_line_string): Likewise.
14796         (read_indirect_string_at_offset): Likewise.
14797         (read_indirect_string_from_dwz): Likewise.
14798         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14799         dwarf2_per_objfile.
14800         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14801         (create_all_comp_units): Change objfile parameter to
14802         dwarf2_per_objfile.
14803         (create_all_type_units): Likewise.
14804         (process_queue): Add dwarf2_per_objfile parameter.
14805         (read_and_check_comp_unit_head): Likewise.
14806         (lookup_dwo_unit_in_dwp): Likewise.
14807         (get_dwp_file): Likewise.
14808         (process_cu_includes): Likewise.
14809         (struct free_dwo_file_cleanup_data): New struct.
14810         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14811         set_dwarf2_per_objfile.
14812         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14813         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14814         context, adjust calls.
14815         (dw2_instantiate_symtab): Likewise.
14816         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14817         (dw2_get_cu): Likewise.
14818         (create_cu_from_index_list): Change objfile parameter to
14819         dwarf2_per_objfile.
14820         (create_cus_from_index_list): Get dwarf2_per_objfile from
14821         context, adjust calls.
14822         (create_cus_from_index): Likewise.
14823         (create_signatured_type_table_from_index): Change objfile
14824         parameter to dwarf2_per_objfile.
14825         (create_signatured_type_table_from_debug_names): Change objfile
14826         parameter to dwarf2_per_objfile.
14827         (create_addrmap_from_index): Likewise.
14828         (create_addrmap_from_aranges): Likewise.
14829         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14830         (dw2_setup): Remove.
14831         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14832         context.
14833         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14834         get_dwarf2_per_objfile.
14835         (dw2_forget_cached_source_info): Likewise.
14836         (dw2_map_symtabs_matching_filename): Likewise.
14837         (struct dw2_symtab_iterator) <index>: Remove.
14838         <dwarf2_per_objfile>: New field.
14839         (dw2_symtab_iter_init): Replace index parameter with
14840         dwarf2_per_objfile.
14841         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14842         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14843         (dw2_print_stats): Likewise.
14844         (dw2_dump): Likewise.
14845         (dw2_expand_symtabs_for_function): Likewise.
14846         (dw2_expand_all_symtabs): Likewise.
14847         (dw2_expand_symtabs_with_fullname): Likewise.
14848         (dw2_expand_marked_cus): Replace index and objfile parameters
14849         with dwarf2_per_objfile.
14850         (dw_expand_symtabs_matching_file_matcher): Add
14851         dwarf2_per_objfile parameter and adjust calls.
14852         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14853         adjust calls.
14854         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14855         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14856         adjust calls.
14857         (create_cus_from_debug_names_list): Replace objfile parameter
14858         with dwarf2_per_objfile and adjust calls.
14859         (create_cus_from_debug_names): Likewise.
14860         (dwarf2_read_debug_names): Likewise.
14861         (mapped_debug_names::namei_to_name): Adjust call.
14862         (dw2_debug_names_iterator::next): Likewise.
14863         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14864         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14865         (dw2_debug_names_dump): Likewise.
14866         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14867         (dw2_debug_names_expand_symtabs_matching): Likewise.
14868         (dwarf2_initialize_objfile): Likewise.
14869         (dwarf2_build_psymtabs): Likewise.
14870         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14871         this_cu.
14872         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14873         (read_and_check_comp_unit_head): Likewise.
14874         (read_abbrev_offset): Likewise.
14875         (create_debug_type_hash_table): Likewise.
14876         (create_debug_types_hash_table): Likewise.
14877         (create_all_type_units): Replace objfile parameter with
14878         dwarf2_per_objfile.
14879         (add_type_unit): Add dwarf2_per_objfile parameter.
14880         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14881         with dwarf2_per_objfile.
14882         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14883         (lookup_dwp_signatured_type): Likewise.
14884         (lookup_signatured_type): Likewise.
14885         (read_cutu_die_from_dwo): Likewise.
14886         (init_tu_and_read_dwo_dies): Likewise.
14887         (init_cutu_and_read_dies): Likewise.
14888         (init_cutu_and_read_dies_no_follow): Likewise.
14889         (allocate_type_unit_groups_table): Add objfile parameter.
14890         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14891         (get_type_unit_group): Likewise.
14892         (process_psymtab_comp_unit): Update call.
14893         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14894         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14895         (print_tu_stats): Likewise.
14896         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14897         in void* parameter.
14898         (build_type_psymtabs): Change objfile parameter to
14899         dwarf2_per_objfile.
14900         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14901         passed in void* parameter.
14902         (process_skeletonless_type_units): Change objfile parameter to
14903         dwarf2_per_objfile.
14904         (set_partial_user): Likewise.
14905         (dwarf2_build_psymtabs_hard): Likewise.
14906         (read_comp_units_from_section): Likewise.
14907         (create_all_comp_units): Likewise.
14908         (scan_partial_symbols): Update calls.
14909         (add_partial_symbol): Likewise.
14910         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14911         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14912         (process_queue): Add dwarf2_per_objfile parameter.
14913         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14914         (compute_compunit_symtab_includes): Likewise.
14915         (process_cu_includes): Add dwarf2_per_objfile parameter.
14916         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14917         (process_full_type_unit): Likewise.
14918         (process_imported_unit_die): Update call.
14919         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14920         (read_file_scope): Likewise.
14921         (allocate_dwo_file_hash_table): Add objfile parameter.
14922         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14923         (create_cus_hash_table): Likewise.
14924         (create_dwp_hash_table): Likewise.
14925         (create_dwo_unit_in_dwp_v1): Likewise.
14926         (create_dwp_v2_section): Likewise.
14927         (create_dwo_unit_in_dwp_v2): Likewise.
14928         (lookup_dwo_unit_in_dwp): Likewise.
14929         (try_open_dwop_file): Likewise.
14930         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14931         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14932         cleanup to include a reference to dwarf2_per_objfile.
14933         (open_dwp_file): Add dwarf2_per_objfile parameter.
14934         (open_and_init_dwp_file): Likewise.
14935         (get_dwp_file): Likewise.
14936         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14937         (queue_and_load_all_dwo_tus): Update call.
14938         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14939         data.
14940         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14941         (dwarf2_ranges_process): Likewise.
14942         (dwarf2_get_pc_bounds): Likewise.
14943         (mark_common_block_symbol_computed): Likewise.
14944         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14945         (dwarf2_read_abbrevs): Update call.
14946         (read_partial_die): Use dwarf2_per_objfile from cu.
14947         (find_partial_die): Likewise.
14948         (fixup_partial_die): Likewise.
14949         (read_attribute_value): Likewise.
14950         (read_indirect_string_at_offset_from): Add objfile parameter.
14951         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14952         parameter.
14953         (read_indirect_string_from_dwz): Add objfile parameter.
14954         (read_indirect_string): Add objfile parameter.
14955         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14956         (read_addr_index): Use dwarf2_per_objfile from cu.
14957         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14958         call dw2_setup.
14959         (read_str_index): Use dwarf2_per_objfile from cu.
14960         (get_debug_line_section): Likewise.
14961         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14962         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14963         (new_symbol_full): Use dwarf2_per_objfile from cu.
14964         (build_error_marker_type): Likewise.
14965         (lookup_die_type): Likewise.
14966         (determine_prefix): Likewise.
14967         (follow_die_offset): Likewise.
14968         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14969         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14970         (dwarf2_fetch_die_type_sect_off): Likewise.
14971         (dwarf2_get_die_type): Likewise.
14972         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14973         (get_signatured_type): Likewise.
14974         (get_DW_AT_signature_type): Likewise.
14975         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14976         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14977         (cu_debug_loc_section): Likewise.
14978         (fill_in_loclist_baton): Likewise.
14979         (dwarf2_symbol_mark_computed): Likewise.
14980         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14981         dwarf2_per_objfile.
14982         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14983         parameter.
14984         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14985         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14986         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14987         (set_die_type): Use dwarf2_free_objfile from cu.
14988         (get_die_type_at_offset): Likewise.
14989         (dwarf2_per_objfile_free): Don't assign global variable.
14990         (debug_names) <constructor>: Add dwarf2_per_objfile
14991         parameter, update m_debugstrlookup construction.
14992         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14993         parameter.
14994         <m_dwarf2_per_objfile>: New field.
14995         <lookup>: Use m_dwarf2_per_objfile.
14996         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14997         (psyms_seen_size): Likewise.
14998         (write_gdbindex): Replace objfile parameter with
14999         dwarf2_per_objfile.
15000         (write_debug_names): Likewise.
15001         (write_psymtabs_to_index): Likewise.
15002         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15003         calls.
15004
15005 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15006
15007         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15008         <dwarf2_per_objfile>: New field.
15009         (struct dwarf2_per_cu_data) <objfile>: Remove.
15010         <dwarf2_per_objfile>: New field.
15011         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15012         of objfile.
15013         (create_signatured_type_table_from_index): Likewise.
15014         (create_debug_type_hash_table): Likewise.
15015         (fill_in_sig_entry_from_dwo_entry): Likewise.
15016         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15017         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15018         objfile.
15019         (create_partial_symtab): Access objfile through
15020         dwarf2_per_objfile.
15021         (process_psymtab_comp_unit_reader): Likewise.
15022         (read_comp_units_from_section): Likewise.
15023         (scan_partial_symbols): Likewise.
15024         (add_partial_symbol): Likewise.
15025         (add_partial_subprogram): Likewise.
15026         (peek_die_abbrev): Likewise.
15027         (fixup_go_packaging): Likewise.
15028         (process_full_comp_unit): Likewise.
15029         (process_full_type_unit): Likewise.
15030         (process_imported_unit_die): Likewise.
15031         (dwarf2_compute_name): Likewise.
15032         (dwarf2_physname): Likewise.
15033         (read_import_statement): Likewise.
15034         (create_cus_hash_table): Assign dwarf2_physname instead of
15035         objfile.
15036         (read_func_scope): Access objfile through dwarf2_per_objfile.
15037         (read_lexical_block_scope): Likewise.
15038         (read_call_site_scope): Likewise.
15039         (read_variable): Likewise.
15040         (dwarf2_rnglists_process): Likewise.
15041         (dwarf2_ranges_process): Likewise.
15042         (dwarf2_ranges_read): Likewise.
15043         (dwarf2_record_block_ranges): Likewise.
15044         (dwarf2_add_field): Likewise.
15045         (dwarf2_add_member_fn): Likewise.
15046         (read_structure_type): Likewise.
15047         (process_structure_scope): Likewise.
15048         (read_enumeration_type): Likewise.
15049         (read_array_type): Likewise.
15050         (read_common_block): Likewise.
15051         (read_namespace_type): Likewise.
15052         (read_namespace): Likewise.
15053         (read_module_type): Likewise.
15054         (read_tag_pointer_type): Likewise.
15055         (read_tag_ptr_to_member_type): Likewise.
15056         (read_tag_string_type): Likewise.
15057         (read_subroutine_type): Likewise.
15058         (read_typedef): Likewise.
15059         (read_base_type): Likewise.
15060         (attr_to_dynamic_prop): Likewise.
15061         (read_subrange_type): Likewise.
15062         (read_unspecified_type): Likewise.
15063         (load_partial_dies): Likewise.
15064         (read_partial_die): Likewise.
15065         (find_partial_die): Likewise.
15066         (guess_partial_die_structure_name): Likewise.
15067         (fixup_partial_die): Likewise.
15068         (read_attribute_value): Likewise.
15069         (read_addr_index_from_leb128): Likewise.
15070         (dwarf2_read_addr_index): Likewise.
15071         (dwarf2_string_attr): Likewise.
15072         (lnp_state_machine::check_line_address): Likewise.
15073         (dwarf_decode_lines_1): Likewise.
15074         (dwarf_decode_lines): Likewise.
15075         (dwarf2_start_symtab): Likewise.
15076         (var_decode_location): Likewise.
15077         (new_symbol_full): Likewise.
15078         (dwarf2_const_value_data): Likewise.
15079         (dwarf2_const_value_attr): Likewise.
15080         (dwarf2_const_value): Likewise.
15081         (die_type): Likewise.
15082         (die_containing_type): Likewise.
15083         (lookup_die_type): Likewise.
15084         (guess_full_die_structure_name): Likewise.
15085         (anonymous_struct_prefix): Likewise.
15086         (dwarf2_name): Likewise.
15087         (follow_die_ref_or_sig): Likewise.
15088         (follow_die_offset): Likewise.
15089         (follow_die_ref): Likewise.
15090         (dwarf2_fetch_die_loc_sect_off): Likewise.
15091         (dwarf2_fetch_constant_bytes): Likewise.
15092         (dwarf2_fetch_die_type_sect_off): Likewise.
15093         (dwarf2_get_die_type): Likewise.
15094         (follow_die_sig): Likewise.
15095         (decode_locdesc): Likewise.
15096         (dwarf2_per_cu_objfile): Likewise.
15097         (dwarf2_per_cu_text_offset): Likewise.
15098         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15099         objfile.
15100         (set_die_type): Access objfile through
15101         dwarf2_per_objfile.
15102
15103 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15104
15105         * valprint.c (converted_character_d): Remove typedef.
15106         (DEF_VEC_O (converted_character_d)): Remove.
15107         (count_next_character): Use std::vector.
15108         (print_converted_chars_to_obstack): Likewise.
15109         (generic_printstr): Likewise.
15110
15111 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15112
15113         * xml-support.h (struct gdb_xml_value): Add constructor.
15114         <value>: Change type to unique_xmalloc_ptr.
15115         (gdb_xml_value_s): Remove typedef.
15116         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15117         (gdb_xml_element_start_handler): Change parameter type to
15118         std::vector.
15119         (xml_find_attribute): Likewise.
15120         * xml-support.c (xml_find_attribute): Change parameter type to
15121         std::vector and adjust.
15122         (gdb_xml_values_cleanup): Remove.
15123         (gdb_xml_parser::start_element): Adjust to std::vector.
15124         (xinclude_start_include): Change paraeter type to std::vector
15125         and adjust.
15126         * btrace.c (check_xml_btrace_version): Likewise.
15127         (parse_xml_btrace_block): Likewise.
15128         (parse_xml_btrace_pt_config_cpu): Likewise.
15129         (parse_xml_btrace_pt): Likewise.
15130         (parse_xml_btrace_conf_bts): Likewise.
15131         (parse_xml_btrace_conf_pt): Likewise.
15132         * memory-map.c (memory_map_start_memory): Likewise.
15133         (memory_map_start_property): Likewise.
15134         * osdata.c (osdata_start_osdata): Likewise.
15135         (osdata_start_item): Likewise.
15136         (osdata_start_column): Likewise.
15137         * remote.c (start_thread): Likewise.
15138         * solib-aix.c (library_list_start_library): Likewise.
15139         (library_list_start_list): Likewise.
15140         * solib-svr4.c (library_list_start_library): Likewise.
15141         (svr4_library_list_start_list): Likewise.
15142         * solib-target.c (library_list_start_segment): Likewise.
15143         (library_list_start_section): Likewise.
15144         (library_list_start_library): Likewise.
15145         (library_list_start_list): Likewise.
15146         * tracepoint.c (traceframe_info_start_memory): Likewise.
15147         (traceframe_info_start_tvar): Likewise.
15148         * xml-syscall.c (syscall_start_syscall): Likewise.
15149         * xml-tdesc.c (tdesc_start_target): Likewise.
15150         (tdesc_start_feature): Likewise.
15151         (tdesc_start_reg): Likewise.
15152         (tdesc_start_union): Likewise.
15153         (tdesc_start_struct): Likewise.
15154         (tdesc_start_flags): Likewise.
15155         (tdesc_start_enum): Likewise.
15156         (tdesc_start_field): Likewise.
15157         (tdesc_start_enum_value): Likewise.
15158         (tdesc_start_vector): Likewise.
15159
15160 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15161
15162         * extension.h (struct xmethod_worker) <clone>: Remove.
15163         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15164         Remove.
15165         (python_xmethod_worker::clone): Remove.
15166         * valops.c (find_overload_match): Use std::move instead of
15167         clone.
15168
15169 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15170
15171         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15172         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15173         <free_xmethod_worker_data>: Remove.
15174         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15175         <get_xmethod_arg_types>: Remove.
15176         <get_xmethod_result_type>: Remove.
15177         <invoke_xmethod>: Remove.
15178         * extension.c (new_xmethod_worker): Remove.
15179         (clone_xmethod_worker): Remove.
15180         (get_matching_xmethod_workers): Return void, pass std::vector by
15181         pointer.
15182         (get_xmethod_arg_types): Rename to...
15183         (xmethod_worker::get_arg_types): ... this, and adjust.
15184         (get_xmethod_result_type): Rename to...
15185         (xmethod_worker::get_result_type): ... this, and adjust.
15186         (invoke_xmethod): Remove.
15187         (free_xmethod_worker): Remove.
15188         (free_xmethod_worker_vec): Remove.
15189         * extension.h (enum ext_lang_rc): Move here from
15190         extension-priv.h.
15191         (struct xmethod_worker): Add constructor and destructor.
15192         <data>: Remove.
15193         <value>: Remove.
15194         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15195         virtual pure methods.
15196         <get_arg_types, get_result_type>: New methods.
15197         (xmethod_worker_ptr): Remove typedef.
15198         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15199         (xmethod_worker_vec): Remove typedef.
15200         (xmethod_worker_up): New typedef.
15201         (invoke_xmethod): Remove.
15202         (clone_xmethod_worker): Remove.
15203         (free_xmethod_worker): Remove.
15204         (free_xmethod_worker_vec): Remove.
15205         (get_xmethod_arg_types): Remove.
15206         (get_xmethod_result_type): Remove.
15207         * valops.c (find_method_list): Use std::vector, don't use
15208         intermediate vector.
15209         (value_find_oload_method_list): Use std::vector.
15210         (find_overload_match): Use std::vector.
15211         (find_oload_champ): Use std::vector.
15212         * value.c (value_free): Use operator delete.
15213         (value_of_xmethod): Rename to...
15214         (value_from_xmethod): ... this.  Don't assign
15215         xmethod_worker::value, take rvalue-reference.
15216         (result_type_of_xmethod): Adjust.
15217         (call_xmethod): Adjust.
15218         * value.h: Include extension.h.
15219         (struct xmethod_worker): Don't forward-declare.
15220         (value_of_xmethod): Rename to...
15221         (value_from_xmethod): ... this, take rvalue-reference.
15222         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15223         (struct python_xmethod_worker): ... this, add constructor and
15224         destructor.
15225         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15226         (gdbpy_free_xmethod_worker_data): Rename to...
15227         (python_xmethod_worker::~python_xmethod_worker): ... this and
15228         adjust.
15229         (gdbpy_clone_xmethod_worker_data): Rename to...
15230         (python_xmethod_worker::clone): ... this and adjust.
15231         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15232         temporary vector.
15233         (gdbpy_get_xmethod_arg_types): Rename to...
15234         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15235         (gdbpy_get_xmethod_result_type): Rename to...
15236         (python_xmethod_worker::do_get_result_type): ... this and
15237         adjust.
15238         (gdbpy_invoke_xmethod): Rename to...
15239         (python_xmethod_worker::invoke): ... this and adjust.
15240         (new_python_xmethod_worker): Rename to...
15241         (python_xmethod_worker::python_xmethod_worker): ... this and
15242         adjust.
15243         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15244         Remove.
15245         (gdbpy_free_xmethod_worker_data): Remove.
15246         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15247         (gdbpy_get_xmethod_arg_types): Remove.
15248         (gdbpy_get_xmethod_result_type): Remove.
15249         (gdbpy_invoke_xmethod): Remove.
15250         * python/python.c (python_extension_ops): Remove obsolete
15251         callbacks.
15252
15253 2018-01-05  Pedro Alves  <palves@redhat.com>
15254
15255         PR gdb/18653
15256         * common/signals-state-save-restore.c
15257         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15258         find a custom handler preinstalled, instead of internal erroring.
15259         But only warn if !quiet.
15260         * common/signals-state-save-restore.h
15261         (save_original_signals_state): New parameter 'quiet'.
15262         * main.c (captured_main_1): Move save_original_signals_state call
15263         after option handling, and pass QUIET.
15264
15265 2018-01-05  Pedro Alves  <palves@redhat.com>
15266
15267         * spu-tdep.c (spu_catch_start): Pass
15268         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15269
15270 2018-01-05  Pedro Alves  <palves@redhat.com>
15271
15272         PR gdb/22670
15273         * ada-lang.c (literal_symbol_name_matcher): New function.
15274         (ada_get_symbol_name_matcher): Use it for
15275         symbol_name_match_type::SEARCH_NAME.
15276         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15277         it down instead of assuming symbol_name_match_type::FULL.
15278         * block.h (block_lookup_symbol): New parameter 'match_type'.
15279         * c-valprint.c (print_unpacked_pointer): Use
15280         lookup_symbol_search_name instead of lookup_symbol.
15281         * compile/compile-object-load.c (get_out_value_type): Pass down
15282         symbol_name_match_type::SEARCH_NAME.
15283         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15284         symbol_name_match_type::FULL.
15285         * cp-support.c (cp_get_symbol_name_matcher): Handle
15286         symbol_name_match_type::SEARCH_NAME.
15287         * infrun.c (insert_exception_resume_breakpoint): Use
15288         lookup_symbol_search_name.
15289         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15290         * psymtab.c (maintenance_check_psymtabs): Use
15291         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15292         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15293         SYMBOL_SEARCH_NAME.
15294         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15295         if symbol_name_match_type::SEARCH_NAME.
15296         (lookup_symbol_in_language): Pass down
15297         symbol_name_match_type::FULL.
15298         (lookup_symbol_search_name): New.
15299         (lookup_language_this): Pass down
15300         symbol_name_match_type::SEARCH_NAME.
15301         (lookup_symbol_aux, lookup_local_symbol): New parameter
15302         'match_type'.  Pass it down.
15303         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15304         (lookup_symbol_search_name): New declaration.
15305         (lookup_symbol_in_block): New 'match_type' parameter.
15306
15307 2018-01-05  Pedro Alves  <palves@redhat.com>
15308
15309         PR gdb/22670
15310         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15311         ada_lookup_symbol.
15312         (ada_lookup_symbol): Reimplement in terms of
15313         ada_lookup_symbol_list, bits factored out from
15314         ada_lookup_encoded_symbol.
15315
15316 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15317
15318         * ada-exp.y (write_object_renaming): When subscripting an array
15319         using a symbol as the index, pass the block in call to
15320         ada_lookup_encoded_symbol when looking that symbol up.
15321
15322 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15323
15324         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15325         TYPE_INDEX_TYPE.
15326
15327 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15328
15329         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15330         the case where VALUE_LVAL (val0) is not lval_memory.
15331
15332 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15333
15334         * ada-valprint.c (print_optional_low_bound): Handle
15335         character-indexed array printing like boolean-indexed array
15336         printing.
15337
15338 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15339
15340         * NEWS: Create a new section for the next release branch.
15341         Rename the section of the current branch, now that it has
15342         been cut.
15343
15344 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15345
15346         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15347         * version.in: Bump version to 8.1.50.DATE-git.
15348
15349 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15350
15351         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15352         Add field.
15353         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15354         Add field.
15355         (default_exception_support_info) <catch_handlers_sym>: Add field.
15356         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15357         (ada_exception_name_addr_1): Add "catch handlers" handling.
15358         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15359         Update all callers.
15360         (create_excep_cond_exprs) <ex>: Add parameter.
15361         (re_set_exception): Update create_excep_cond_exprs call.
15362         (print_it_exception, print_one_exception, print_mention_exception)
15363         (print_recreate_exception): Add "catch handler" handling.
15364         (allocate_location_catch_handlers, re_set_catch_handlers)
15365         (check_status_catch_handlers, print_it_catch_handlers)
15366         (print_one_catch_handlers, print_mention_catch_handlers)
15367         (print_recreate_catch_handlers): New function.
15368         (catch_handlers_breakpoint_ops): New variable.
15369         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15370         Add parameter.  Add "catch handler" handling.
15371         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15372         Add "catch handler" handling.
15373         (ada_exception_catchpoint_cond_string): Add "catch handler"
15374         handling.
15375         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15376         call.
15377         (catch_ada_handlers_command): New function.
15378         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15379         operations structure.
15380         (_initialize_ada_language): Add "catch handlers" command entry.
15381         * NEWS: Document "catch handlers" feature.
15382
15383 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15384
15385         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15386         account when creating the array type of the slice.
15387         (ada_value_slice): Likewise.
15388
15389 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15390
15391         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15392         New enum value.
15393         (create_array_type_with_stride): Add byte_stride_prop parameter.
15394         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15395         New parameter.  Update all callers in this file.
15396         (array_type_has_dynamic_stride): New function.
15397         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15398         of arrays with dynamic byte strides.
15399         * dwarf2read.c (read_array_type): Add support for dynamic
15400         DW_AT_byte_stride attributes.
15401
15402 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15403
15404         * dwarf2read.c (read_unspecified_type): Treat
15405         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15406
15407 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15408
15409         Update copyright year range in all GDB files.
15410
15411 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15412
15413         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15414         and gdb/testsuite/gdb.base/step-line.c.
15415
15416 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15417
15418         * copyright.py (main): Dump the contents of
15419         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15420         even if BY_HAND is empty.
15421
15422 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15423
15424         * top.c (print_gdb_version): Update Copyright year in version
15425         message.
15426
15427 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15428
15429         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15430
15431 For older changes see ChangeLog-2017.
15432 \f
15433 Local Variables:
15434 mode: change-log
15435 left-margin: 8
15436 fill-column: 74
15437 version-control: never
15438 coding: utf-8
15439 End: