QUIET flag initialization missing in 2 places.
[external/binutils.git] / gdb / ChangeLog
1 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
2
3         * symtab.c (info_functions_command): Initialize quiet flag.
4         * stack.c (info_args_command): Likewise.
5
6 2018-11-01  Jim Wilson  <jimw@sifive.com>
7
8         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
9         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
10         debugging messages.
11
12 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
13
14         * ada-lang.c (ada_watch_location_expression): New function.
15         (ada_language_defn): Set la_watch_location_expression to
16         ada_watch_location_expression.
17
18 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
19
20         * print-utils.c (int_string): Remove unnecessary trailing spaces.
21
22 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
23
24         * rs6000-tdep.c (skip_prologue): Fix potential negative left
25         shifting.
26
27 2018-11-01  Jerome Guitton  <guitton@adacore.com>
28             Joel Brobecker  <brobecker@adacore.com>
29
30         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
31         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
32         * arm-pikeos-tdep.c: New file.
33         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
34         embedded system.
35         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
36
37 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
38
39         * common/pathstuff.c (get_standard_temp_dir): New.
40         * common/pathstuff.h (get_standard_temp_dir): New.
41         * config.in: Re-generate.
42         * configure: Re-generate.
43         * configure.ac: Don't check for mkdtemp.
44         * gnulib/aclocal-m4-deps.mk: Re-generate.
45         * gnulib/aclocal.m4: Re-generate.
46         * gnulib/config.in: Re-generate.
47         * gnulib/configure: Re-generate.
48         * gnulib/import/Makefile.am: Re-generate.
49         * gnulib/import/Makefile.in: Re-generate.
50         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
51         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
52         * gnulib/import/m4/mkdtemp.m4: New file.
53         * gnulib/import/mkdtemp.c: New file.
54         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
55         Add mkdtemp module.
56         * unittests/mkdir-recursive-selftests.c (test): Use
57         get_standard_temp_dir.
58         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
59         ifdef.
60         * compile/compile.c (get_compile_file_tempdir): Likewise.
61
62 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
63
64         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
65         (SIG_FRAME_LR_OFFSET64): New define.
66         (SIG_FRAME_FP_OFFSET64): New define.
67         (aix_sighandle_frame_cache): New Function.
68         (aix_sighandle_frame_this_id): New Function.
69         (aix_sighandle_frame_prev_register): New Function.
70         (aix_sighandle_frame_sniffer): New Function.
71         (aix_sighandle_frame_unwind): New global variable.
72         (rs6000_aix_init_osabi): Install new frame unwinder.
73
74 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
75
76         PR gdb/23835
77         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
78         already defined.
79
80 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
81
82         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
83
84 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
85
86         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
87         (producer_is_icc): New function.
88         (check_producer): Set producer_is_icc field on dwarf2_cu.
89         (dwarf2_init_integer_type): New function.
90         (read_base_type): Call dwarf2_init_integer_type instead of
91         init_integer_type in all cases.
92         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
93         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
94         LEN is greater than 0.
95
96 2018-10-30  Tom Tromey  <tom@tromey.com>
97
98         * main.c (captured_main_1): Check return value of bfd_init.
99
100 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
101
102         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
103         Adjust comments.
104
105 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
106
107         * procfs.c: Include common/pathstuff.h.
108
109 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
110
111         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
112         Add missing braces.  No functional change.
113
114 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
115
116         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
117         to report a bad option and fix indentation.
118         * demangle.c (demangle_command): Use report_unrecognized_option_error
119         to report a bad option and correctly report the bad option.
120
121 2018-10-27  Tom Tromey  <tom@tromey.com>
122
123         PR cli/23364:
124         * darwin-nat.c (copied_shell): New global.
125         (may_have_sip): Rename from should_disable_startup_with_shell.
126         (copy_shell_to_cache, maybe_cache_shell): New functions.
127         (darwin_nat_target::create_inferior): Update.  Use
128         copied_shell.
129
130 2018-10-27  Tom Tromey  <tom@tromey.com>
131
132         * unittests/scoped_fd-selftests.c (test_to_file): New function.
133         (run_tests): Call test_to_file.
134         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
135         temporary files.
136         * common/scoped_fd.h (scoped_fd::to_file): New method.
137
138 2018-10-27  Tom Tromey  <tom@tromey.com>
139
140         * unittests/scoped_mmap-selftests.c (test_normal): Use
141         gdb_mkostemp_cloexec.
142         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
143         Use gdb_mkostemp_cloexec.
144         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
145         gnulib/config.in, gnulib/configure,
146         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
147         gnulib/import/m4/gnulib-cache.m4,
148         gnulib/import/m4/gnulib-comp.m4: Update.
149         * gnulib/import/m4/mkostemp.m4: New file.
150         * gnulib/import/m4/mkstemp.m4: Remove.
151         * gnulib/import/mkostemp.c: New file.
152         * gnulib/import/mkstemp.m4: Remove.
153         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
154         mkstemp, add mkostemp.  Apply new patch.
155         * gnulib/import/stdlib.in.h: Apply patch.
156         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
157         New file.
158         * dwarf-index-write.c (write_psymtabs_to_index): Use
159         gdb_mkostemp_cloexec.
160         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
161
162 2018-10-27  Tom Tromey  <tom@tromey.com>
163
164         * unittests/mkdir-recursive-selftests.c: New file.
165         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
166         unittests/mkdir-recursive-selftests.c.
167         * dwarf-index-cache.c (mkdir_recursive): Move to
168         common/filestuff.c.
169         (index_cache::store): Check return value of mkdir_recursive.
170         (create_dir_and_check, test_mkdir_recursive): Move to new file.
171         (_initialize_index_cache): Don't register test.
172         * common/filestuff.h (mkdir_recursive): Declare.
173         * common/filestuff.c (mkdir_recursive): Move from
174         dwarf-index-cache.c.  Return bool.
175
176 2018-10-27  Tom Tromey  <tom@tromey.com>
177
178         * dwarf-index-write.c (write_psymtabs_to_index): Move
179         make_temp_filename to common/pathstuff.c.
180         * common/pathstuff.h (make_temp_filename): Declare.
181         * common/pathstuff.c (make_temp_filename): New function, moved
182         from dwarf-index-write.c.
183
184 2018-10-27  Tom Tromey  <tom@tromey.com>
185
186         * procfs.c (procfs_target::create_inferior): Use get_shell.
187         * cli/cli-cmds.c (shell_escape): Use get_shell.
188         * windows-nat.c (windows_nat_target::create_inferior): Use
189         get_shell.
190         * common/pathstuff.c (get_shell): New function.
191         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
192         (fork_inferior): Use get_shell.
193         * common/pathstuff.h (get_shell): Declare.
194
195 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
196
197         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
198
199 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
200
201         * stack.c (print_variable_and_value_data): Add preg and treg.
202         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
203         and update callers.
204         (print_frame_arg_vars): Likewise.
205         (prepare_reg): New function.
206         (info_locals_command): Extract info print args and use them.
207         (info_args_command): Likewise.
208         (_initialize_stack): Modify on-line help.
209         * symtab.c (treg_matches_sym_type_name): New function.
210         (search_symbols): New arg t_regexp.
211         (symtab_symbol_info): New args quiet, regexp, t_regexp.
212         (info_variables_command): Extract info print args and use them.
213         (info_functions_command): Likewise.
214         (info_types_command): Update call to symtab_symbol_info.
215         (_initialize_symtab): Modify on-line help.
216         * symtab.h (treg_matches_sym_type_name): New function.
217         (search_symbols): New t_regexp arg.
218
219 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
220
221         * cli-utils.c (extract_arg_maybe_quoted): New function.
222         (extract_info_print_args): New function.
223         (info_print_args_help): New function.
224         (report_unrecognized_option_error): New function.
225         * cli-utils.h (extract_arg_maybe_quoted): New function.
226         (extract_info_print_args): New function.
227         (info_print_args_help): New function.
228         (report_unrecognized_option_error): New function.
229
230 2018-10-26  Tom Tromey  <tom@tromey.com>
231
232         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
233         (compute_compunit_symtab_includes): Update.
234         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
235         (compunit_symtab_ptr): Likewise.
236
237 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
238
239         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
240         default_print_auxv_entry for specific tag values.
241
242 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
243
244         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
245
246 2018-10-26  Jim Wilson  <jimw@sifive.com>
247
248         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
249         (riscv_linux_sigframe_init): Declare.
250         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
251         (riscv_linux_sigframe): New.
252         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
253         (riscv_linux_sigframe_init): Define.
254         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
255
256         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
257         (riscv_isa_flen): Likewise.  Drop static.
258         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
259         (riscv_isa_flen): Likewise.  Declare.
260
261 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
262             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
263
264         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
265         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
266         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
267         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
268         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
269         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
270         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
271         Define.
272         (struct ppc_linux_features) <htm>: New field.
273         (ppc_linux_no_features): Add initializer for htm field.
274         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
275         new tdescs.
276         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
277         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
278         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
279         Define if not already defined.
280         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
281         and rs6000/powerpc-isa207-htm-vsx64l.
282         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
283         rs6000/powerpc-isa207-htm-vsx64l.xml.
284         * features/rs6000/power-htm-spr.xml: New file.
285         * features/rs6000/power-htm-core.xml: New file.
286         * features/rs6000/power64-htm-core.xml: New file.
287         * features/rs6000/power-htm-fpu.xml: New file.
288         * features/rs6000/power-htm-altivec.xml: New file.
289         * features/rs6000/power-htm-vsx.xml: New file.
290         * features/rs6000/power-htm-ppr.xml: New file.
291         * features/rs6000/power-htm-dscr.xml: New file.
292         * features/rs6000/power-htm-tar.xml: New file.
293         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
294         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
295         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
296         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
297         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
298         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
299         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
300         fetch_regset with HTM regsets.
301         (store_register, store_ppc_registers): Call store_regset with HTM
302         regsets.
303         (ppc_linux_nat_target::read_description): Set htm field in the
304         features struct if needed.
305         * ppc-linux-tdep.c: Include
306         features/rs6000/powerpc-isa207-htm-vsx32l.c and
307         features/rs6000/powerpc-isa207-htm-vsx64l.c.
308         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
309         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
310         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
311         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
312         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
313         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
314         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
315         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
316         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
317         (ppc32_linux_ctarregset): New globals.
318         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
319         (ppc_linux_collect_core_cpgrregset): New function.
320         (ppc_linux_iterate_over_regset_sections): Call back with the htm
321         regsets.
322         (ppc_linux_core_read_description): Check if the tm spr section is
323         present and set htm in the features struct.
324         (_initialize_ppc_linux_tdep): Call
325         initialize_tdesc_powerpc_isa207_htm_vsx32l and
326         initialize_tdesc_powerpc_isa207_htm_vsx64l.
327         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
328         Declare.
329         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
330         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
331         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
332         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
333         New fields.
334         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
335         Likewise.
336         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
337         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
338         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
339         New enum fields.
340         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
341         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
342         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
343         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
344         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
345         <PPC_CTAR_REGNUM>: Likewise.
346         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
347         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
348         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
349         (IS_CEFP_PSEUDOREG): Define.
350         (rs6000_register_name): Hide the upper halves of checkpointed VSX
351         registers.  Return names for the checkpointed DFP, VSX, and EFP
352         pseudo registers.
353         (rs6000_pseudo_register_type): Remove initial assert and raise an
354         internal error in the else clause instead.  Return types for the
355         checkpointed DFP, VSX, and EFP pseudo registers.
356         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
357         checkpointed DFP pseudo registers.
358         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
359         checkpointed VSX pseudo registers.
360         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
361         from efpr_pseudo_register_read and
362         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
363         registers.
364         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
365         Handle checkpointed DFP, VSX, and EFP registers.
366         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
367         (efp_ax_pseudo_register_collect): New functions.
368         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
369         register logic to new functions.  Handle checkpointed DFP, VSX,
370         and EFP pseudo registers.
371         (rs6000_gdbarch_init): Look for and validate the htm features.
372         Include checkpointed DFP, VSX and EFP pseudo-registers.
373         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
374         HTM registers.
375
376 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
377
378         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
379         without altivec or fpu.
380
381 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
382             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
383
384         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
385         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
386         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
387         Define if not already defined.
388         * features/rs6000/power-ebb.xml: New file.
389         * features/rs6000/power-linux-pmu.xml: New file.
390         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
391         features.
392         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
393         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
394         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
395         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
396         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
397         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
398         fetch_regset with ebb and pmu regsets.
399         (store_register, store_ppc_registers): Call store_regset with ebb
400         and pmu regsets.
401         (ppc_linux_nat_target::read_description): Set isa207 field in the
402         features struct if ebb and pmu are avaiable.
403         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
404         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
405         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
406         and pmu regsets.
407         (ppc_linux_core_read_description): Check if the pmu section is
408         present and set isa207 in the features struct.
409         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
410         (ppc32_linux_pmuregset): Declare.
411         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
412         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
413         <ppc_sier_regnum>: New field.
414         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
415         New enum values.
416         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
417         values.
418         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
419         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
420         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
421         ebb and pmu features.
422
423 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
424             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
425
426         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
427         (tdesc_powerpc_isa207_vsx64l): Declare.
428         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
429         (struct ppc_linux_features) <isa207>: New field.
430         (ppc_linux_no_features): Add initializer for isa207 field.
431         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
432         new tdescs.
433         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
434         (NT_PPC_TAR): Define if not already defined.
435         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
436         rs6000/powerpc-isa207-vsx64l.
437         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
438         rs6000/powerpc-isa207-vsx64l.xml.
439         * features/rs6000/power-tar.xml: New file.
440         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
441         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
442         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
443         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
444         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
445         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
446         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
447         fetch_regset with the TAR regset.
448         (store_register, store_ppc_registers): Call store_regset with the
449         TAR regset.
450         (ppc_linux_nat_target::read_description): Set isa207 field in the
451         features struct if needed.
452         * ppc-linux-tdep.c: Include
453         features/rs6000/powerpc-isa207-vsx32l.c and
454         features/rs6000/powerpc-isa207-vsx64l.c.
455         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
456         (ppc_linux_iterate_over_regset_sections): Call back with the tar
457         regset.
458         (ppc_linux_core_read_description): Check if the tar section is
459         present and set isa207 in the features struct.
460         (_initialize_ppc_linux_tdep): Call
461         initialize_tdesc_powerpc_isa207_vsx32l and
462         initialize_tdesc_powerpc_isa207_vsx64l.
463         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
464         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
465         (enum) <PPC_TAR_REGNUM>: New enum value.
466         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
467         feature.
468         (ppc_process_record_op31): Record changes to TAR.
469
470 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
471             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
472
473         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
474         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
475         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
476         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
477         (struct ppc_linux_features) <ppr_dscr>: New field.
478         (ppc_linux_no_features): Add initializer for ppr_dscr field.
479         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
480         new tdescs.
481         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
482         Define if not already defined.
483         * features/Makefile (WHICH): Add
484         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
485         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
486         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
487         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
488         * features/rs6000/power-dscr.xml: New file.
489         * features/rs6000/power-ppr.xml: New file.
490         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
491         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
492         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
493         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
494         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
495         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
496         * ppc-linux-nat.c: Include <sys/uio.h>.
497         (fetch_regset, store_regset, check_regset): New functions.
498         (fetch_register, fetch_ppc_registers): Call fetch_regset with
499         DSCR and PPR regsets.
500         (store_register, store_ppc_registers): Call store_regset with
501         DSCR and PPR regsets.
502         (ppc_linux_get_hwcap2): New function.
503         (ppc_linux_nat_target::read_description): Call
504         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
505         features struct if needed.
506         * ppc-linux-tdep.c: Include
507         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
508         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
509         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
510         (ppc32_linux_dscrregset): New globals.
511         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
512         and dscr regsets.
513         (ppc_linux_core_read_description): Check if the ppr and dscr
514         sections are present and set ppr_dscr in the features struct.
515         (_initialize_ppc_linux_tdep): Call
516         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
517         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
518         * ppc-linux-tdep.h (ppc32_linux_pprregset)
519         (ppc32_linux_dscrregset): Declare.
520         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
521         <ppc_dscr_regnum>: New field.
522         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
523         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
524         and dscr features.
525         (ppc_process_record_op31): Record changes to PPR and DSCR.
526
527 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
528
529         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
530         second initializer line for the have_* variables.  Initialize
531         have_fpu to 0 instead of 1.
532
533 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
534
535         * arch/ppc-linux-common.c (ppc_linux_match_description):
536         Parenthesize tdesc assignements and indent them properly.
537
538 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
539
540         * ppc-linux-nat.c (fetch_register): Change if statement to else
541         if.
542         (store_register): Likewise.
543
544 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
545
546         * rs6000-tdep.c: Remove reggroups.h include.
547         (rs6000_pseudo_register_reggroup_p): Remove.
548         (rs6000_gdbarch_init): Remove call to
549         set_tdesc_pseudo_register_reggroup_p.
550
551 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
552
553         * reggroups.c (default_register_reggroup_p): Return true for
554         decfloat registers and float_reggroup.
555
556 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
557
558         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
559         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
560         ppc_linux_collect_vrregset by regcache_collect_regset.
561
562 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
563
564         * linux-tdep.c (linux_collect_regset_section_cb): Use
565         std::vector<gdb_byte> instead of char * and malloc for buf.
566         Remove xfree.
567
568 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
569
570         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
571         symtab_start instead of always using language_unknown.
572
573 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
574
575         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
576         READ_P parameter, catch and ignore register access errors from
577         either the old or new MISA location.
578         (riscv_has_feature): Update call to riscv_read_misa_reg.
579
580 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
581
582         * python/py-function.c (convert_values_to_python): Return
583         gdbpy_ref<>.  Add header comment.
584         (fnpy_call): Adjust.
585
586 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
587
588         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
589         (cmdpy_completer_handle_brkchars): Adjust.
590         (cmdpy_completer): Adjust.
591
592 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
593
594         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
595         Pass correct regnum to raw_supply_zeroed.
596
597 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
598
599         * regcache.c (cooked_read_test): Add CSKY to the list of
600         architectures with a save_reggroup
601
602 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
603
604         PR gdb/23368
605         * infrun.c (follow_exec): In the follow_exec_mode_new case,
606         transfer terminal state from old new new inferior.
607         * terminal.h (swap_terminal_info): New function.
608         * inflow.c (swap_terminal_info): New function.
609
610 2018-10-23  Tom Tromey  <tom@tromey.com>
611
612         * record-btrace.c (get_thread_current_frame_id): Rename from
613         get_thread_current_frame.  Return a frame_id.
614         (record_btrace_start_replaying): Update.
615
616 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
617
618         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
619         for CSRs.
620
621 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
622
623         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
624         have_nonsteppable_watchpoint attribute to 1.
625
626 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
627
628         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
629         register names.
630         (struct register_alias): Rename to...
631         (struct riscv_register_alias): ...this, and update comment.
632         (riscv_register_aliases): Update type, and alias names.  Remove
633         CSR names from this list.
634         (riscv_register_name): Use riscv_gdb_reg_names for int and float
635         register names.  Add an extra assertion.
636         (riscv_is_regnum_a_named_csr): New function.
637         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
638
639 2018-10-22  Jim Wilson  <jimw@sifive.com>
640
641         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
642         FP reg smaller than FP reg size, and fill with -1 instead of 0.
643
644         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
645         (riscv_register_type): Use them.
646         (riscv_print_one_register_info): Handle union of floats same as float.
647         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
648         riscv_fpreg_q_type fields.
649
650 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
651
652         * gdbarch.sh (gdbarch_num_cooked_regs): New.
653         * gdbarch.h: Re-generate.
654         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
655         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
656         * eval.c (evaluate_subexp_standard): Likewise.
657         * findvar.c (value_of_register): Likewise.
658         (value_of_register_lazy): Likewise.
659         (address_from_register): Likewise.
660         * frame.c (get_frame_register_bytes): Likewise.
661         * gdbarch-selftests.c (register_to_value_test): Likewise.
662         * h8300-tdep.c (h8300_register_type): Likewise.
663         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
664         (i386_svr4_reg_to_regnum): Likewise.
665         * infcmd.c (default_print_registers_info): Likewise.
666         (registers_info): Likewise.
667         (print_vector_info): Likewise.
668         (default_print_float_info): Likewise.
669         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
670         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
671         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
672         (mi_cmd_data_list_changed_registers): Likewise.
673         (mi_cmd_data_list_register_values): Likewise.
674         (mi_cmd_data_write_register_values): Likewise.
675         (mi_cmd_trace_frame_collected): Likewise.
676         * mips-tdep.c (print_gp_register_row): Likewise.
677         (mips_print_registers_info): Likewise.
678         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
679         * regcache.c (init_regcache_descr): Likewise.
680         (register_size): Likewise.
681         (register_dump::dump): Likewise.
682         (cooked_read_test): Likewise.
683         (cooked_write_test): Likewise.
684         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
685         (rs6000_gdbarch_init): Likewise.
686         * stabsread.c (stab_reg_to_regnum): Likewise.
687         * stack.c (info_frame_command): Likewise.
688         * target-descriptions.c (tdesc_register_name): Likewise.
689         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
690         * tui/tui-regs.c (tui_show_register_group): Likewise.
691         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
692         (user_reg_map_regnum_to_name): Likewise.
693         (value_of_user_reg): Likewise.
694         (maintenance_print_user_registers): Likewise.
695         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
696         (xtensa_register_name): Likewise.
697         (xtensa_register_type): Likewise.
698         (xtensa_reg_to_regnum): Likewise.
699         (xtensa_pseudo_register_read): Likewise.
700         (xtensa_pseudo_register_write): Likewise.
701
702 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
703
704         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
705         correctly-sized buffer with raw_read.
706         (amd64_pseudo_register_write): Use correctly-sized buffer for
707         raw_read/raw_write.
708
709 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
710
711         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
712         in add_prefix_cmd of set print type.
713
714 2018-10-19  Tom Tromey  <tom@tromey.com>
715
716         PR tui/18388:
717         * NEWS: Mention tabset deprecation.
718         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
719         (update_tab_width): New function.
720         (tui_set_tab_width, tui_show_tab_width): New functions.
721         (tui_set_tab_width_command): Use update_tab_width.
722         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
723         Add new "set tui tab-width" command.
724         * tui/tui-source.c (tui_set_source_content): Update.
725         * tui/tui-disasm.c (tui_set_disassem_content): Update.
726         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
727         Don't declare.
728         (tui_tab_width): Declare.
729         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
730         (tui_set_default_tab_len): Remove.
731
732 2018-10-19  Tom Tromey  <tom@tromey.com>
733
734         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
735         (key_is_backspace, tui_getc): Don't declare.
736         * tui/tui-io.c (key_is_start_sequence): Now static.
737         (key_is_end_sequence, key_is_backspace): Remove.
738         (tui_getc): Now static.
739
740 2018-10-19  Tom Tromey  <tom@tromey.com>
741
742         * symfile.c (reread_symbols): Clear "static_links".
743
744 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
745
746         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
747         define.
748         (aarch64_linux_sigframe_init): Extra boundary checks.
749
750 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
751
752         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
753         the possibly non-existent tdesc type 'vec128', but the type of raw
754         register v16 instead.
755
756 2018-10-19  Gary Benson <gbenson@redhat.com>
757
758         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
759
760 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
761
762         PR cli/23785
763         * cli/cli-dump.c (restore_binary_file): Check if "file" is
764         NULL.
765
766 2018-10-17  Paul Koning  <paul_koning@dell.com>
767
768         * charset.c (convert_between_encodings): Fix unsigned overflow.
769
770 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
771
772         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
773         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
774         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
775         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
776         New functions.
777         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
778         and fbsd_info_proc_mappings_header.
779         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
780         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
781         New.
782
783 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
784
785         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
786         Solaris Maintainer.
787
788 2018-10-15  Tom Tromey  <tom@tromey.com>
789
790         * tui/tui.c (strcat_to_buf): Remove casts.
791         * tui/tui-winsource.c (tui_show_source_line)
792         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
793         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
794         * tui/tui-windata.c (tui_first_data_item_displayed)
795         (tui_delete_data_content_windows, tui_erase_data_content)
796         (tui_display_all_data, tui_display_data_from)
797         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
798         * tui/tui-win.c (tui_set_win_height)
799         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
800         casts.
801         * tui/tui-win.c (tui_resize_all): Remove casts.
802         (tui_scroll_backward_command, tui_set_focus)
803         (tui_set_tab_width_command): Likewise.
804         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
805         * tui/tui-regs.c (tui_show_register_group): Remove cast.
806         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
807         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
808         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
809         Remove casts.
810
811 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
812
813         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
814         AArch64/ARM maintainer.
815
816 2018-10-11  Gary Benson <gbenson@redhat.com>
817
818         * interps.h (interp::m_name): Make private and mutable.
819         * interps.c (interp::~interp): Free m_name.
820
821 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
822             Simon Marchi <simark@simark.ca>
823
824         * README (`configure' options): Add documentation for new
825         "--enable-unit-tests" option.
826         * acinclude.m4: Include "selftest.m4".
827         * configure: Regenerate.
828         * configure.ac: Use "GDB_AC_SELFTEST".
829         * maint.c (maintenance_selftest): Update message informing
830         that selftests have been disabled.
831         (maintenance_info_selftests): Likewise.
832         * selftest.m4: New file.
833
834 2018-10-10  Gary Benson <gbenson@redhat.com>
835
836         * remote.c (remote_target::remote_send_printf): Add
837         missing va_end found by Coverity.
838
839 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
840
841         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
842
843 2018-10-09  Tom Tromey  <tom@tromey.com>
844
845         * configure: Rebuild.
846         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
847         * NEWS: Update --enable-ubsan documentation.
848
849 2018-10-09  Gary Benson <gbenson@redhat.com>
850
851         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
852         found by Coverity.
853
854 2018-10-08  Tom Tromey  <tom@tromey.com>
855
856         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
857         variable.
858         (riscv_fbsd_init_abi): Likewise.
859
860 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
861         * valops.c (value_struct_elt_for_reference): Rename local variable
862         to work around the shadowing a previous local warning.
863
864 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
865
866         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
867         * NEWS: Mention new FreeBSD/riscv native configuration.
868         * configure.host: Add riscv*-*-freebsd*.
869         * configure.nat: Likewise.
870         * riscv-fbsd-nat.c: New file.
871
872 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
873
874         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
875         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
876         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
877         * NEWS: Mention new FreeBSD/riscv target.
878         * configure.tgt: Add riscv*-*-freebsd*.
879         * riscv-fbsd-tdep.c: New file.
880         * riscv-fbsd-tdep.h: New file.
881
882 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
883
884         * regcache.h (struct regcache_map_entry): Note that this type can
885         be used with traditional frame caches.
886         * trad-frame.c (trad_frame_set_reg_regmap): New.
887         * trad-frame.h (trad_frame_set_reg_regmap): New.
888
889 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
890
891         PR c++/16841
892         * valops.c (get_virtual_base_offset): New function.
893         (value_struct_elt_for_reference): Use it to get virtual base offset
894         and add it in calculating class member address.
895
896 2018-10-08   John Darrington <john@darrington.wattle.id.au>
897
898     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
899       (check_producer): Check if the producer is codewarrior.
900       (producer_is_codewarrior): New function.
901       (lnp_state_machine::record_line): Ignore is_stmt flag for records
902        produced by codewarrior.
903       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
904
905 2018-10-06  Tom Tromey  <tom@tromey.com>
906
907         PR python/19399:
908         * python/py-inferior.c: Add "architecture" entry.
909         (infpy_architecture): New function.
910
911 2018-10-06  Tom Tromey  <tom@tromey.com>
912
913         PR python/21765:
914         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
915         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
916         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
917         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
918
919 2018-10-06  Tom Tromey  <tom@tromey.com>
920
921         PR build/17077:
922         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
923         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
924         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
925         #include.
926
927 2018-10-06  Tom Tromey  <tom@tromey.com>
928
929         * python/py-breakpoint.c (bppy_get_location): Handle a
930         bp_breakpoint without a location.
931
932 2018-10-06  Tom Tromey  <tom@tromey.com>
933
934         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
935         (_RegEx): Reformat help text.
936         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
937         (AnyCallerIs, AnyCallerMatches): Reformat help text.
938         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
939         text.
940         * python/lib/gdb/command/xmethods.py (InfoXMethod)
941         (EnableXMethod, DisableXMethod): Remove help indentation.
942         Capitalize meta-syntactic variables.
943         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
944         (EnableUnwinder, DisableUnwinder): Remove help indentation.
945         Capitalize meta-syntactic variables.
946         * python/lib/gdb/command/explore.py (ExploreCommand)
947         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
948         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
949         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
950         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
951         Remove help indentation.
952         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
953         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
954         (DisableFrameFilter, SetFrameFilterPriority)
955         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
956
957 2018-10-06  Tom Tromey  <tom@tromey.com>
958
959         PR tui/28819:
960         * tui/tui-io.c (gdb_wgetch): New function.
961         (tui_mld_getc, tui_getc): Use it.
962
963 2018-10-05  Tom Tromey  <tom@tromey.com>
964
965         * sol-thread.c (sol_thread_target::wait): Rename inner
966         "save_ptid".
967
968 2018-10-04  Tom Tromey  <tom@tromey.com>
969
970         * configure: Rebuild.
971         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
972
973 2018-10-04  Tom Tromey  <tom@tromey.com>
974
975         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
976         declaration of "block".
977
978 2018-10-04  Tom Tromey  <tom@tromey.com>
979
980         * common/filestuff.c (fdwalk): Remove inner declaration of
981         "result".
982
983 2018-10-04  Tom Tromey  <tom@tromey.com>
984
985         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
986         "structs_addr" and hoist declaration.
987
988 2018-10-04  Tom Tromey  <tom@tromey.com>
989
990         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
991         variable "size".
992
993 2018-10-04  Tom Tromey  <tom@tromey.com>
994
995         * mdebugread.c (parse_partial_symbols): Use std::string.
996
997 2018-10-04  Tom Tromey  <tom@tromey.com>
998
999         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1000         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1001         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1002         header.
1003         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1004         more inner scope.
1005         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1006         * varobj.c (varobj_update): Rename inner "newobj",
1007         "type_changed".
1008         * valprint.c (generic_emit_char): Rename inner "buf".
1009         * valops.c (find_overload_match): Rename inner "temp".
1010         (value_struct_elt_for_reference): Declare "v" in more inner
1011         scope.
1012         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1013         * unittests/array-view-selftests.c (run_tests): Rename inner
1014         "vec".
1015         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1016         header.
1017         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1018         "tsv" in more inner scope.
1019         (print_one_static_tracepoint_marker): Rename inner
1020         "tuple_emitter".
1021         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1022         (tic6x_push_dummy_call): Don't redeclare "addr".
1023         * target-float.c: Declare "dto" lower.
1024         * symtab.c (lookup_local_symbol): Rename inner "sym".
1025         (find_pc_sect_line): Rename inner "pc".
1026         * stack.c (print_frame): Don't redeclare "gdbarch".
1027         (return_command): Rename inner "gdbarch".
1028         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1029         "sp".
1030         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1031         header.
1032         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1033         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1034         scope.
1035         * remote.c (remote_target::update_thread_list): Don't redeclare
1036         "tp".
1037         (remote_target::process_initial_stop_replies): Rename inner
1038         "thread".
1039         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1040         (remote_target::wait_as): Don't redeclare "stop_reply".
1041         (remote_target::get_thread_local_address): Rename inner
1042         "result".
1043         (remote_target::get_tib_address): Likewise.
1044
1045         * regcache.c (cooked_read_test): Rename "regnum".
1046         * record-btrace.c (cmd_record_btrace_start): Rename inner
1047         "exception".
1048         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1049         loop header.
1050         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1051         header.
1052         (ppu2spu_sniffer): Rename inner "buf".
1053         * parse.c (operator_check_standard): Rename inner "type",
1054         "objfile".
1055         * p-valprint.c (pascal_val_print): Introduce new scope for
1056         "low_bound", "high_bound".
1057         * p-exp.y (yylex): Declare "i" in loop header.
1058         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1059         Lower declaration of "s".
1060         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1061         header.
1062         (nios2_push_dummy_call): Rename "len".
1063         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1064         "buf".
1065         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1066         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1067         (linux_xfer_osdata_modules): Likewise.
1068         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1069         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1070         (mips_o64_push_dummy_call): Likewise.
1071         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1072         "op".
1073         * mi/mi-main.c (list_available_thread_groups): Rename inner
1074         "tuple_emitter".
1075         (mi_cmd_data_read_memory): Rename inner "opts".
1076         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1077         "tuple_emitter".
1078         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1079         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1080         more inner scope.
1081         (parse_partial_symbols): Rename inner "pst", "p", "name"
1082         * main.c (captured_main_1): Rename inner "i"s.
1083         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1084         "oso2".
1085         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1086         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1087         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1088         (handle_signal_stop): Rename inner "gdbarch".
1089         (handle_command): Declare "signum" in loop header.
1090         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1091         "status".
1092         (examine_prologue): Rename inner "sol" and "sof".
1093         (ia64_extract_return_value): Rename inner "val".  Declare another
1094         "val" in a more inner scope.
1095         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1096         inner scope.
1097         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1098         "except".
1099         * findvar.c (default_read_var_value): Don't redeclare "addr".
1100         * f-exp.y (yylex): Declare "i" in loop header.
1101         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1102         Rename inner "type", "expect_type".
1103         (evaluate_subexp_for_sizeof): Rename inner "pc".
1104         * elfread.c (elf_symfile_read): Rename inner "abfd".
1105         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1106         "bytes_read".
1107         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1108         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1109         (dwarf_decode_line_header): Rename inner "lh".
1110         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1111         "offset".  Declare "i" in loop header.
1112         (disassemble_dwarf_expression): Rename inner "addr_size".
1113         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1114         inner "result".
1115         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1116         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1117         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1118         "inner_list_emitter".
1119         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1120         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1121         declaration in a block.
1122         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1123         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1124         "obstack_final_size".
1125         * cp-support.c (inspect_type): Declare "i" in loop header.
1126         * compile/compile.c (compile_instance::insert_symbol_error):
1127         Rename inner "e".
1128         * common/agent.c (agent_run_command): Remove inner "ret"
1129         declaration.
1130         * coffread.c (coff_symfile_read): Rename inner "name".
1131         (coff_symfile_read): Rename inner "abfd".
1132         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1133         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1134         "high".
1135         * c-exp.y (lex_one_token): Move "len" declaration lower.
1136         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1137         "gdbarch".
1138         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1139         "b".
1140         (watch_command_1): Declare "mark" later.
1141         (clear_command): Don't shadow "a" or "b".
1142         (delete_command): Rename inner "b".
1143         (delete_trace_command): Likewise.
1144         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1145         "op".
1146         (arm_gdbarch_init): Remove inner "e_flags".
1147         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1148         "offset" in inner blocks.
1149
1150 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1151
1152         * dwarf-index-write.c (file_write): Don't write if the vector is
1153         empty.
1154
1155 2018-10-05  Tom de Vries  <tdevries@suse.de>
1156
1157         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1158         PyArg_ParseTuple call.
1159
1160 2018-10-05  Tom de Vries  <tdevries@suse.de>
1161
1162         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1163         PyArg_ParseTuple call.
1164
1165 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1166
1167         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1168         to avoid exceeding 80 characters per line limit.
1169
1170 2018-10-04  Tom Tromey  <tom@tromey.com>
1171
1172         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1173         (reread_symbols): Update.
1174         * complaints.h (clear_complaints): Remove argument.
1175         * complaints.c (enum complaint_series): Remove.
1176         (series): Remove global.
1177         (complaint_internal): Update.
1178         (clear_complaints): Remove argument.
1179
1180 2018-10-04  Tom Tromey  <tom@tromey.com>
1181
1182         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1183         debugging symbols" message if there is a separate debug objfile.
1184
1185 2018-10-04  Tom Tromey  <tom@tromey.com>
1186
1187         PR cli/19551:
1188         * symfile.c (symbol_file_add_with_addrs): Update output.
1189         * psymtab.c (require_partial_symbols): Update output.
1190
1191 2018-10-04  Tom Tromey  <tom@tromey.com>
1192
1193         PR cli/22234:
1194         * complaints.c: Emit \n.
1195
1196 2018-10-04  Tom Tromey  <tom@tromey.com>
1197
1198         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1199         (separate_debug_file_exists, find_separate_debug_file)
1200         (add_symbol_file_command, reread_symbols, allocate_symtab)
1201         (allocate_compunit_symtab): Use filtered printing, not
1202         unfiltered.
1203         * psymtab.c (require_partial_symbols, dump_psymtab)
1204         (allocate_psymtab): Use filtered printing, not unfiltered.
1205
1206 2018-10-04  Tom Tromey  <tom@tromey.com>
1207
1208         * complaints.c (complaint_internal): Correctly check complaint
1209         count.
1210
1211 2018-10-04  Tom Tromey  <tom@tromey.com>
1212
1213         * complaints.h (struct complaints): Remove declaration.
1214         * complaints.c (clear_complaints): Remove an unused variable.
1215
1216 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1217
1218         * MAINTAINERS (Write After Approval): Add self.
1219
1220 2018-10-03  Tom Tromey  <tom@tromey.com>
1221
1222         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1223         "buffer_contents".
1224         * coffread.c (coff_symtab_read): Initialize "newobj".
1225
1226 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1227
1228         * dwarf2read.c (read_func_scope): Remove struct keyword in
1229         range-based for.
1230
1231 2018-10-03  Tom Tromey  <tom@tromey.com>
1232
1233         * README: Mention --enable-ubsan.
1234         * NEWS: Mention --enable-ubsan.
1235         * acinclude.m4: Include sanitize.m4.
1236         * configure: Rebuild.
1237         * configure.ac: Call AM_GDB_UBSAN.
1238         * sanitize.m4: New file.
1239
1240 2018-10-03  Tom Tromey  <tom@tromey.com>
1241
1242         * expression.h (enum exp_opcode): Use uint8_t as base type.
1243         * expprint.c (op_name): Handle invalid opcodes.
1244
1245 2018-10-03  Tom Tromey  <tom@tromey.com>
1246
1247         * parse.c (prefixify_expression): Add assert.
1248         (parse_exp_in_context_1): Throw exception if the expression is
1249         empty.
1250
1251 2018-10-03  Tom Tromey  <tom@tromey.com>
1252
1253         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1254
1255 2018-10-03  Tom Tromey  <tom@tromey.com>
1256
1257         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1258
1259 2018-10-03  Tom Tromey  <tom@tromey.com>
1260
1261         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1262         unsigned.
1263
1264 2018-10-03  Tom Tromey  <tom@tromey.com>
1265
1266         * findvar.c (extract_integer): Do work in an unsigned type.
1267
1268 2018-10-03  Tom Tromey  <tom@tromey.com>
1269
1270         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1271         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1272         base type.
1273         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1274         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1275         type.
1276         * c-lang.h (enum c_string_type_values): Use unsigned as base
1277         type.
1278         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1279
1280 2018-10-03  Tom Tromey  <tom@tromey.com>
1281
1282         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1283         <~dwarf2_frame_state_reg_info>: Update.
1284         <dwarf2_frame_state_reg_info>: Update.
1285         <alloc_regs>: Add assertion.  Update.
1286         <reg>: Now a std::vector.
1287         <num_regs>: Remove.
1288         <swap>: Update.
1289         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1290         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1291
1292 2018-10-03  Tom Tromey  <tom@tromey.com>
1293
1294         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1295
1296 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1297
1298         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1299
1300 2018-10-02  Tom Tromey  <tom@tromey.com>
1301
1302         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1303
1304 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1305
1306         * NEWS: Mention changed commands.
1307         * ser-uds.c: New file.
1308         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1309         * configure: Regenerate.
1310         * Makefile.in: Add new file.
1311         * serial.c (serial_open): Check if filename is a socket
1312           and lookup the appropriate interface accordingly.
1313
1314 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1315
1316         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1317         define.
1318         (AARCH64_EXTRA_MAGIC): Likewise.
1319         (AARCH64_FPSIMD_MAGIC): Likewise.
1320         (AARCH64_SVE_MAGIC): Likewise.
1321         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1322         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1323         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1324         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1325         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1326         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1327         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1328         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1329         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1330         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1331         (read_aarch64_ctx): Add function.
1332         (aarch64_linux_sigframe_init): Detect FP registers.
1333
1334 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1335
1336         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1337         (AARCH64_D0_REGNUM): Likewise.
1338         (AARCH64_S0_REGNUM): Likewise.
1339         (AARCH64_H0_REGNUM): Likewise.
1340         (AARCH64_B0_REGNUM): Likewise.
1341         (AARCH64_SVE_V0_REGNUM): Likewise.
1342         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1343         (AARCH64_D0_REGNUM): Likewise.
1344         (AARCH64_S0_REGNUM): Likewise.
1345         (AARCH64_H0_REGNUM): Likewise.
1346         (AARCH64_B0_REGNUM): Likewise.
1347         (AARCH64_SVE_V0_REGNUM): Likewise.
1348
1349 2018-10-01  Gary Benson <gbenson@redhat.com>
1350
1351         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1352         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1353         prfpregset_t instead of gdb_prfpregset_t.
1354         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1355         * configure, config.in: Rebuild.
1356
1357 2018-10-01  Gary Benson <gbenson@redhat.com>
1358
1359         * common/gdb_proc_service.h: New file, factored out from...
1360         * gdb_proc_service.h: Moved common code to the above file.
1361         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1362
1363 2018-10-01  Gary Benson <gbenson@redhat.com>
1364
1365         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1366         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1367
1368 2018-10-01  Gary Benson <gbenson@redhat.com>
1369
1370         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1371         (AC_CHECK_HEADERS): Check for linux/elf.h.
1372         * configure, config.in: Rebuild.
1373         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1374         doesn't define elf_fpregset_t.
1375
1376 2018-10-01  Gary Benson <gbenson@redhat.com>
1377
1378         * gdb_proc_service.h: Whitespace change.
1379
1380 2018-10-01  Tom Tromey  <tom@tromey.com>
1381
1382         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1383         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1384         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1385
1386 2018-10-01  Tom Tromey  <tom@tromey.com>
1387
1388         * README: Minor change.
1389
1390 2018-09-30  Pedro Alves  <palves@redhat.com>
1391
1392         * darwin-nat-info.c (darwin_debug_regions_recurse)
1393         (info_mach_exceptions_command): Remove unused local variables.
1394         * darwin-nat.c (darwin_decode_notify_message)
1395         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1396         (darwin_stop_inferior, darwin_setup_exceptions)
1397         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1398         (darwin_nat_target::attach, darwin_nat_target::detach)
1399         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1400         local variables.
1401         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1402         variables.
1403
1404 2018-09-29  Tom Tromey  <tom@tromey.com>
1405
1406         * README: Remove some leftover text.
1407
1408 2018-09-29  Tom Tromey  <tom@tromey.com>
1409
1410         * PROBLEMS: Rewrite.
1411         * README: Update.
1412
1413 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1414
1415         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1416         case with explicit breakpoint kind.
1417         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1418         'additional_info' and related logic.
1419         (riscv_debug_breakpoints): New variable.
1420         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1421         instruction to determine the breakpoint kind.
1422         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1423         flag.  Update description of 'set/show riscv
1424         use-compressed-breakpoints' flag.
1425
1426 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1427
1428         (NEWS): Mention changes to frame related commands.
1429         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1430         (add_prefix_cmd_suppress_notification): New function.
1431         (add_com_suppress_notification): Call
1432         add_cmd_suppress_notification.
1433         * command.h (add_cmd_suppress_notification): Declare.
1434         (add_prefix_cmd_suppress_notification): Declare.
1435         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1436         (parse_frame_specification): Moved from stack.c, with
1437         simplification to handle a single argument.
1438         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1439         switch to the selected frame.  Add a header comment.
1440         * stack.c: Remove 'safe-ctype.h' include.
1441         (find_frame_for_function): Add declaration.
1442         (find_frame_for_address): New function.
1443         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1444         (frame_selection_by_function_completer): New function.
1445         (info_frame_command): Rename to...
1446         (info_frame_command_core): ...this, and update parameter types.
1447         (select_frame_command): Rename to...
1448         (select_frame_command_core): ...this, and update parameter types.
1449         (frame_command): Rename to...
1450         (frame_command_core): ...this, and update parameter types.
1451         (class frame_command_helper): New class to wrap implementations of
1452         frame related sub-commands.
1453         (frame_apply_cmd_list): New static global.
1454         (frame_cmd_list): Make static.
1455         (select_frame_cmd_list): New global for sub-commands.
1456         (info_frame_cmd_list): New global for sub-commands.
1457         (_initialize_stack): Register sub-commands for 'frame',
1458         'select-frame', and 'info frame'.  Update 'frame apply' commands
1459         to use frame_apply_cmd_list.  Move function local static
1460         frame_apply_list to file static frame_apply_cmd_list for
1461         consistency.
1462         * stack.h (select_frame_command): Delete declarationn.
1463         (select_frame_for_mi): Declare new function.
1464
1465 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1466
1467         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1468         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1469         and NOP.
1470
1471 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1472
1473         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1474
1475 2018-09-26  Tom Tromey  <tom@tromey.com>
1476
1477         * valops.c (auto_abandon): Remove dead code.
1478
1479 2018-09-26  Tom Tromey  <tom@tromey.com>
1480
1481         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1482
1483 2018-09-24  Tom Tromey  <tom@tromey.com>
1484
1485         * common/pathstuff.c (get_standard_cache_dir): Make
1486         "xdg_cache_home" and "home" const.
1487         * top.c (init_history): Make "tmpenv" const.
1488         * main.c (get_init_files): Make "homedir" const.
1489
1490 2018-09-23  Tom Tromey  <tom@tromey.com>
1491
1492         PR python/18852:
1493         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1494
1495 2018-09-23  Tom Tromey  <tom@tromey.com>
1496
1497         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1498         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1499         * python/python-internal.h (gdbpy_handle_exception): Declare.
1500         * python/py-utils.c (gdbpy_handle_exception): New function.
1501
1502 2018-09-23  Tom Tromey  <tom@tromey.com>
1503
1504         PR python/17284:
1505         * python/py-type.c (typy_template_argument): Check for negative
1506         argument number.
1507
1508 2018-09-23  Tom Tromey  <tom@tromey.com>
1509
1510         PR python/14062:
1511         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1512
1513 2018-09-23  Tom Tromey  <tom@tromey.com>
1514
1515         PR python/18170:
1516         * python/py-value.c (valpy_int): Allow conversion from pointer
1517         type.
1518
1519 2018-09-23  Tom Tromey  <tom@tromey.com>
1520
1521         PR python/20126:
1522         * python/py-value.c (valpy_int): Respect type sign.
1523
1524 2018-09-23  Tom Tromey  <tom@tromey.com>
1525
1526         PR python/18352;
1527         * python/py-value.c (valpy_float): Allow conversions from int or
1528         char.
1529         (valpy_int, valpy_long): Allow conversions from float.
1530
1531 2018-09-23  Tom Tromey  <tom@tromey.com>
1532
1533         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1534         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1535
1536 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1537
1538         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1539         __sighndlr.
1540         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1541
1542 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1543
1544         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1545         target_terminal::ours().
1546
1547 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1548
1549         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1550         of vl to ULONGEST.
1551
1552 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1553
1554         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1555         redundant condition.
1556
1557 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1558
1559         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1560
1561         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1562         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1563         * sol-thread.c (ps_pdmodel): Don't guard definition.
1564
1565         * procfs.c: Fix formatting.
1566
1567         * procfs.c (sysset_t_alloc): Remove.
1568         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1569         (procfs_debug_inferior): Likewise.
1570         (procfs_set_exec_trap): Likewise.
1571         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1572         (proc_set_traced_sysexit): Likewise.
1573
1574         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1575         (dead_procinfo): Likewise.
1576         (proc_warn): Likewise.
1577         (proc_error): Likewise.
1578         (proc_get_LDT_entry): Likewise.
1579         (do_attach): Likewise.
1580         (procfs_target::pid_to_str): Likewise.
1581         (iterate_over_mappings): Likewise.
1582
1583         * procfs.c (create_procinfo): Fix ARI warning.
1584         (proc_get_status): Likewise.
1585         (proc_stop_process): Likewise.
1586         (proc_run_process): Likewise.
1587         (proc_kill): Likewise.
1588         (proc_get_LDT_entry): Likewise.
1589         (procfs_find_LDT_entry): Likewise.
1590         (proc_update_threads): Likewise.
1591         (proc_iterate_over_threads): Likewise.
1592         (do_attach): Likewise.
1593         (procfs_xfer_memory): Likewise.
1594         (invalidate_cache): Likewise.
1595         (procfs_target::resume): Likewise.
1596         (procfs_init_inferior): Likewise.
1597         (procfs_set_exec_trap): Likewise.
1598         (procfs_target::thread_alive): Likewise.
1599         (procfs_target::pid_to_exec_file): Likewise.
1600         (iterate_over_mappings): Likewise.
1601         (procfs_target::make_corefile_notes): Likewise.
1602         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1603
1604         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1605         (procfs_find_LDT_entry): Likewise.
1606         * sol-thread.c (ps_lgetLDT): Likewise.
1607
1608 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1609
1610         PR tdep/17903
1611         * procfs.c (procfs_target): Declare pid_to_exec_file.
1612         (procfs_target::pid_to_exec_file): New.
1613
1614 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1615
1616         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1617         renaming.
1618         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1619         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1620
1621 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1622
1623         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1624         (supply_fpregset, fill_fpregset): Move ...
1625         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1626         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1627         Remove references to ioctl-based procfs.
1628         Include <sys/reg.h>.
1629         Remove PR_MODEL_NATIVE guards.
1630         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1631         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1632
1633 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1634
1635         PR gdb/20981:
1636         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1637         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1638         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1639
1640 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1641
1642         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1643         (fbsd_print_sockaddr_in6): Likewise.
1644
1645 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1646             Chris January  <chris.january@arm.com>
1647
1648         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1649         (evaluate_subexp_standard): Return a dummy type when
1650         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1651         OP_F77_UNDETERMINED_ARGLIST case.
1652         * expression.h (enum noside): Update comment.
1653
1654 2018-09-19  George Vasick <george.vasick@oracle.com>
1655
1656         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1657
1658 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1659             April Chin <april.chin@oracle.com>
1660             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1661
1662         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1663         uint_t lwpid_t.
1664         (create_procinfo): Print pids in /proc without leading zeros.
1665
1666 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1667
1668         * nios2-tdep.c (nios2_gcc_target_options): New.
1669         (nios2_gdb_arch_init): Install new hook.
1670
1671 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1672
1673         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1674         New file.
1675         * update-gnulib.sh: Apply patch.
1676         * configure: Re-generate.
1677
1678 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1679
1680         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1681         description.  Make "info proc" command descriptions more
1682         consistent.
1683
1684 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1685
1686         * NEWS: Mention 'info proc files' command.
1687
1688 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1689
1690         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1691         descriptors for IP_FILES and IP_ALL.
1692
1693 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1694
1695         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1696         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1697         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1698         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1699         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1700         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1701         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1702         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1703         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1704         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1705         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1706         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1707         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1708         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1709         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1710         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1711         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1712         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1713         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1714         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1715         (struct fbsd_sockaddr_un): New types.
1716         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1717         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1718         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1719         (fbsd_core_info_proc_files): New functions.
1720         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1721         IP_ALL.
1722         * fbsd-tdep.h (fbsd_info_proc_files_header)
1723         (fbsd_info_proc_files_entry): New.
1724
1725 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1726
1727         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1728         * infcmd.c (info_proc_cmd_files): New function.
1729         (_initialize_infcmd): Register 'info proc files' command.
1730
1731 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1732
1733         * gnulib/aclocal-m4-deps.mk: Re-generate.
1734         * gnulib/aclocal.m4: Re-generate.
1735         * gnulib/config.in: Re-generate.
1736         * gnulib/configure: Re-generate.
1737         * gnulib/import/Makefile.am: Re-generate.
1738         * gnulib/import/Makefile.in: Re-generate.
1739         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1740         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1741         * gnulib/import/arpa_inet.in.h: New file.
1742         * gnulib/import/inet_ntop.c: New file.
1743         * gnulib/import/m4/arpa_inet_h.m4: New file.
1744         * gnulib/import/m4/inet_ntop.m4: New file.
1745         * gnulib/import/m4/netinet_in_h.m4: New file.
1746         * gnulib/import/m4/socklen.m4: New file.
1747         * gnulib/import/m4/sockpfaf.m4: New file.
1748         * gnulib/import/m4/stdalign.m4: New file.
1749         * gnulib/import/m4/sys_uio_h.m4: New file.
1750         * gnulib/import/netinet_in.in.h: New file.
1751         * gnulib/import/stdalign.in.h: New file.
1752         * gnulib/import/sys_socket.c: New file.
1753         * gnulib/import/sys_socket.in.h: New file.
1754         * gnulib/import/sys_uio.in.h: New file.
1755         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1756         module.
1757
1758 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1759
1760         * gnulib/aclocal-m4-deps.mk: New file.
1761         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1762         deterministically.
1763
1764 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1765
1766         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1767         KVE_PATH.
1768
1769 2018-09-18  Tom Tromey  <tom@tromey.com>
1770
1771         * compile/compile-object-load.c (struct
1772         link_hash_table_cleanup_data): Add constructor and destructor.
1773         Use DISABLE_COPY_AND_ASSIGN.
1774         (~link_hash_table_cleanup_data): Rename from
1775         link_hash_table_free.  Now a destructor.
1776         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1777
1778 2018-09-18  Tom Tromey  <tom@tromey.com>
1779
1780         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1781         * compile/compile-object-load.c (struct munmap_list): Move to
1782         header file.
1783         (munmap_list::add): Rename from munmap_list_add; rewrite.
1784         (munmap_list::~munmap_list): Rename from munmap_list_free.
1785         (munmap_listp_free_cleanup): Remove.
1786         (compile_object_load): Update.
1787         * compile/compile-object-load.h (struct munmap_list): Move from
1788         compile-object-load.c.  Rewrite.
1789
1790 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1791
1792         * aarch64-tdep.c (pass_in_v): Use register size.
1793         (aarch64_extract_return_value): Likewise.
1794         (aarch64_store_return_value): Likewise.
1795
1796 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1797
1798         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1799         rlim_t.
1800
1801 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1802
1803         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1804         Fix short help line.
1805
1806 2018-09-17  Tom Tromey  <tom@tromey.com>
1807
1808         PR python/20445:
1809         * configure: Rebuild.
1810         * configure.ac: Conditionally use -DNDEBUG for Python.
1811
1812 2018-09-17  Tom Tromey  <tom@tromey.com>
1813
1814         * configure: Rebuild.
1815         * configure.ac: Use gmp as a library dependency when checking for
1816         mpfr.
1817
1818 2018-09-17  Pedro Alves  <palves@redhat.com>
1819
1820         * python/py-inferior.c (find_inferior_object): Delete.
1821
1822 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1823
1824         * compile/compile-cplus-types.c
1825         (compile_cplus_instance::enter_scope): Don't use new_scope after
1826         std::move.
1827
1828 2018-09-17  Tom Tromey  <tom@tromey.com>
1829
1830         * common/pathstuff.c (get_standard_cache_dir): Use
1831         ~/Library/Caches on macOS.
1832         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1833
1834 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1835
1836         PR python/23669
1837         * breakpoint.c (commands_cmd_element): New.
1838         (_initialize_breakpoint): Assign commands_cmd_element.
1839         * breakpoint.h (commands_cmd_element): New.
1840         * cli/cli-script.c (while_cmd_element, if_command,
1841         define_cmd_element): New.
1842         (command_name_equals): Remove.
1843         (process_next_line): Compare commands by pointer, not by name.
1844         (_initialize_cli_script): Assign the various cmd_list_element
1845         variables.
1846         * compile/compile.c (compile_cmd_element): New.
1847         (_initialize_compile): Assign compile_cmd_element.
1848         * compile/compile.h (compile_cmd_element): New.
1849         * guile/guile.c (guile_cmd_element): New.
1850         (install_gdb_commands): Assign guile_cmd_element.
1851         * guile/guile.h (guile_cmd_element): New.
1852         * python/python.c (python_cmd_element): New.
1853         (_initialize_python): Assign python_cmd_element.
1854         * python/python.h (python_cmd_element): New.
1855         * tracepoint.c (while_stepping_cmd_element): New.
1856         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1857         * tracepoint.h (while_stepping_cmd_element): New.
1858
1859 2018-09-17  Tom Tromey  <tom@tromey.com>
1860
1861         * infrun.c (save_infcall_suspend_state): Return
1862         infcall_suspend_state_up.
1863         (save_infcall_control_state): Return infcall_control_state_up.
1864         * inferior.h (save_infcall_suspend_state)
1865         (save_infcall_control_state): Declare later.  Return unique
1866         pointers.
1867
1868 2018-09-17  Tom Tromey  <tom@tromey.com>
1869
1870         * infrun.c (struct stop_context): Declare constructor,
1871         destructor, "changed" method.
1872         (stop_context::stop_context): Rename from save_stop_context.
1873         (stop_context::~stop_context): Rename from
1874         release_stop_context_cleanup.
1875         (normal_stop): Update.
1876         (stop_context::changed): Rename from stop_context_changed.  Return
1877         bool.
1878
1879 2018-09-17  Tom Tromey  <tom@tromey.com>
1880
1881         * inferior.h (struct infcall_suspend_state_deleter): New.
1882         (infcall_suspend_state_up): New typedef.
1883         (struct infcall_control_state_deleter): New.
1884         (infcall_control_state_up): New typedef.
1885         (make_cleanup_restore_infcall_suspend_state)
1886         (make_cleanup_restore_infcall_control_state): Don't declare.
1887         * infcall.c (call_function_by_hand_dummy): Update.
1888         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1889         (make_cleanup_restore_infcall_suspend_state): Remove.
1890         (do_restore_infcall_control_state_cleanup)
1891         (make_cleanup_restore_infcall_control_state): Remove.
1892
1893 2018-09-17  Tom Tromey  <tom@tromey.com>
1894
1895         * gdbthread.h (struct thread_control_state): Add initializer.
1896         (class thread_info) <control>: Remove initializer.
1897         * inferior.h (struct inferior_control_state): Add initializer.
1898         (class inferior) <control>: Remove initializer.
1899         (exit_inferior_1): Update.
1900         * infrun.c (struct infcall_control_state): Add constructors.
1901         (save_infcall_control_state): Use new.
1902         (restore_infcall_control_state, discard_infcall_control_state):
1903         Use delete.
1904
1905 2018-09-17  Tom Tromey  <tom@tromey.com>
1906
1907         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1908         unique_ptr.
1909         <siginfo_data>: Now a unique_xmalloc_ptr.
1910         (save_infcall_suspend_state, restore_infcall_suspend_state)
1911         (discard_infcall_suspend_state)
1912         (get_infcall_suspend_state_regcache): Update.
1913
1914 2018-09-17  Tom Tromey  <tom@tromey.com>
1915
1916         * gdbthread.h (struct thread_suspend_state): Add initializers.
1917         (class thread_info) <suspend>: Remove initializer.
1918         * infrun.c (struct infcall_suspend_state): Add initializers.
1919         (save_infcall_suspend_state): Use new.
1920         (discard_infcall_suspend_state): Use delete.
1921
1922 2018-09-16  Tom Tromey  <tom@tromey.com>
1923
1924         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1925         Remove.
1926         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1927         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1928         (py_varobj_iter_new): Likewise.
1929         (py_varobj_get_iterator): Use gdbpy_ref.
1930
1931 2018-09-16  Tom Tromey  <tom@tromey.com>
1932
1933         * python/py-threadevent.c (py_get_event_thread): Simplify.
1934         * python/py-inferior.c (infpy_thread_from_thread_handle):
1935         Return immediately after calling thread_to_thread_object.  Use
1936         Py_RETURN_NONE.
1937         (thread_to_thread_object): Set the exception on a NULL return.
1938
1939 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1940
1941         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1942
1943 2018-09-16  Tom Tromey  <tom@tromey.com>
1944
1945         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1946         Remove.
1947
1948 2018-09-16  Tom Tromey  <tom@tromey.com>
1949
1950         * python/python-internal.h (thread_to_thread_object): Change
1951         return type.
1952         * python/py-inferior.c (thread_to_thread_object): Return a new
1953         reference.
1954         (infpy_thread_from_thread_handle): Update.
1955         * python/py-infthread.c (gdbpy_selected_thread): Update.
1956         * python/py-stopevent.c (create_stop_event_object): Update.
1957         * python/py-threadevent.c (py_get_event_thread): Return a new
1958         reference.
1959         (py_get_event_thread): Update.
1960         * python/py-event.h (py_get_event_thread): Change return type.
1961         * python/py-continueevent.c (create_continue_event_object):
1962         Update.
1963
1964 2018-09-16  Tom Tromey  <tom@tromey.com>
1965
1966         * python/py-progspace.c (pspy_get_objfiles): Update.
1967         * python/python-internal.h (objfile_to_objfile_object): Change
1968         return type.
1969         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1970         Update.
1971         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1972         Update.
1973         * python/python.c (gdbpy_get_current_objfile): Update.
1974         (gdbpy_objfiles): Update.
1975         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1976         Update.
1977         (objfile_to_objfile_object): Return a new reference.
1978         * python/py-symtab.c (stpy_get_objfile): Update.
1979         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1980         Update.
1981
1982 2018-09-16  Tom Tromey  <tom@tromey.com>
1983
1984         * python/py-inferior.c (infpy_get_progspace): Update.
1985         * python/python-internal.h (pspace_to_pspace_object): Change
1986         return type.
1987         * python/py-newobjfileevent.c
1988         (create_clear_objfiles_event_object): Update.
1989         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1990         Update.
1991         * python/python.c (gdbpy_get_current_progspace): Update.
1992         (gdbpy_progspaces): Update.
1993         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1994         reference.
1995         * python/py-objfile.c (objfpy_get_progspace): Update.
1996         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1997         Update.
1998
1999 2018-09-16  Tom Tromey  <tom@tromey.com>
2000
2001         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2002         (solib_name, block_for_pc, find_pc_line): New functions.
2003         (execute_unwinders): Update.
2004         * python/py-block.c (gdbpy_block_for_pc): Remove.
2005         * python/py-inferior.c (infpy_get_progspace): New function.
2006         (inferior_object_getset) <progspace>: Add.
2007         * python/py-progspace.c (pspy_objfiles): Rewrite.
2008         (pspy_solib_name, pspy_block_for_pc)
2009         (pspy_find_pc_line, pspy_is_valid): New functions.
2010         (progspace_object_methods): Add entries for solib_name,
2011         block_for_pc, find_pc_line, is_valid.
2012         * python/python-internal.h (gdbpy_block_for_pc)
2013         (build_objfiles_list): Don't declare.
2014         * python/python.c: Don't include solib.h.
2015         (gdbpy_solib_name, gdbpy_find_pc_line)
2016         (gdbpy_get_current_progspace, build_objfiles_list)
2017         (gdbpy_objfiles): Remove.
2018         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2019         solib_name, find_pc_line>: Remove entries.
2020
2021 2018-09-16  Tom Tromey  <tom@tromey.com>
2022
2023         * top.c (new_ui_command): Use GNU style for metasyntactic
2024         variables.
2025         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2026         variables.
2027         * maint.c (maintenance_translate_address): Remove "<>" around
2028         text.
2029         * interps.c (interpreter_exec_cmd): Use GNU style for
2030         metasyntactic variables.
2031         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2032         metasyntactic variables.
2033         * tracepoint.c (tfind_range_command): Use GNU style for
2034         metasyntactic variables.
2035         (tfind_outside_command): Likewise.
2036         (_initialize_tracepoint): Likewise.
2037         * remote.c (extended_remote_target::create_inferior): Use GNU
2038         style for metasyntactic variables.
2039         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2040         metasyntactic variables.
2041         (adi_assign_command): Likewise.
2042
2043 2018-09-16  Tom Tromey  <tom@tromey.com>
2044
2045         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2046         metasyntactic variables.  Print message if no disassembler options
2047         are available.
2048
2049 2018-09-15  Tom Tromey  <tom@tromey.com>
2050
2051         * infcmd.c (get_inferior_args): Return const char *.
2052         * inferior.h (get_inferior_args): Return type now const.
2053         * linux-tdep.c (linux_fill_prpsinfo): Update.
2054         * procfs.c (procfs_target::make_corefile_notes): Update.
2055
2056 2018-09-07  Tom Tromey  <tom@tromey.com>
2057
2058         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2059         inside the TRY.
2060
2061 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2062
2063         * nios2-tdep.c (nios2_type_align): New.
2064         (nios2_gdb_arch_init): Install type_align hook.
2065
2066 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2067
2068         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2069         type that is neither object file owned, nor gdbarch owned.
2070         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2071         gdbarch is non-NULL.
2072         (alloc_type_instance): Allocate non-objfile owned types on the
2073         gdbarch obstack.
2074         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2075         using TYPE_ALLOC to ensure memory is allocated on the correct
2076         obstack.
2077         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2078         obstack, or the gdbarch obstack.
2079         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2080
2081 2018-09-14  Tom Tromey  <tom@tromey.com>
2082
2083         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2084         block.
2085
2086 2018-09-14  Tom Tromey  <tom@tromey.com>
2087
2088         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2089
2090 2018-09-13  Tom Tromey  <tom@tromey.com>
2091
2092         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2093         static.
2094
2095 2018-09-13  Tom Tromey  <tom@tromey.com>
2096
2097         * exec.c (try_open_exec_file): Use std::string.
2098
2099 2018-09-13  Tom Tromey  <tom@tromey.com>
2100
2101         * utils.h (gdb_bfd_errmsg): Return std::string.
2102         * exec.c (exec_file_attach): Update.
2103         * compile/compile-object-load.c (compile_object_load): Update.
2104         * utils.c (gdb_bfd_errmsg): Return std::string.
2105
2106 2018-09-13  Tom Tromey  <tom@tromey.com>
2107
2108         * procfs.c (struct procinfo_deleter): New.
2109         (procinfo_up): New typedef.
2110         (do_destroy_procinfo_cleanup): Remove.
2111         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2112
2113 2018-09-13  Tom Tromey  <tom@tromey.com>
2114
2115         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2116
2117 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2118 2018-09-13  Tom Tromey  <tom@tromey.com>
2119
2120         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2121         (pspy_get_objfiles): New function.
2122         (progspace_object_methods): New.
2123         (pspace_object_type): Add tp_methods callback.
2124         * python/python-internal.h (build_objfiles_list): New
2125         declaration.
2126         * python/python.c (build_objfiles_list): New function.
2127         (gdbpy_objfiles): Implement using build_objfiles_list.
2128         * NEWS: Mention the Progspace.objfiles method.
2129
2130 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2131
2132         * python/py-inferior.c (infpy_get_progspace): New function.
2133         (inferior_object_getset): Add progspace property.
2134         * NEWS: Mention the new property.
2135
2136 2018-09-13  Tom Tromey  <tom@tromey.com>
2137
2138         PR rust/23650:
2139         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2140
2141 2018-09-13  Tom Tromey  <tom@tromey.com>
2142
2143         PR rust/23626:
2144         * rust-lang.c (rust_enum_variant): Now static.
2145         (rust_empty_enum_p): New function.
2146         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2147         Handle empty enum.
2148
2149 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2150
2151         * python/py-inferior.c (infpy_repr): New.
2152         (inferior_object_type): Register infpy_repr.
2153         * python/py-objfile.c (objfpy_repr): New.
2154         (objfile_object_type): Register objfpy_repr.
2155
2156 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2157
2158         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2159
2160 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2161
2162         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2163         typo.
2164
2165 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2166
2167         * common/common-utils.c: Don't include '<sys/stat.h>'.
2168         (is_regular_file): Move to...
2169         * common/filestuff.c (is_regular_file): ... here.
2170         * common/common-utils.h (is_regular_file): Move to...
2171         * common/filestuff.h (is_regular_file): ... here.
2172
2173 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2174
2175         * skip.c (debug_skip): New variable.
2176         (skiplist_entry::do_skip_file_p): Add debug output.
2177         (skiplist_entry::do_skip_gfile_p): Likewise.
2178         (skiplist_entry::skip_function_p): Likewise.
2179         (_initialize_step_skip): Create debug command.
2180         * NEWS: Mention set/show debug skip.
2181
2182 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2183
2184         * darwin-nat.c (should_disable_startup_with_shell):
2185         New function.
2186         (darwin_nat_target::create_inferior): Add call.
2187
2188 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2189
2190         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2191         inf_port, msg_state>: Initialize.
2192         (struct darwin_thread_info) <signaled, single_step>: Change
2193         type and initialize.
2194         (struct darwin_thread_info) <event>: Initialize.
2195
2196 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2197
2198         PR gdb/23555
2199         PR gdb/23558
2200         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2201         guesses.
2202
2203 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2204
2205         Revert:
2206         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2207
2208         PR gdb/23555
2209         PR gdb/23558
2210         * gnulib/aclocal.m4: Regenerate.
2211         * gnulib/config.in: Regenerate.
2212         * gnulib/configure: Regenerate.
2213         * gnulib/import/Makefile.am: Update.
2214         * gnulib/import/Makefile.in: Update.
2215         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2216         * gnulib/import/_Noreturn.h: ... this.
2217         * gnulib/import/alloca.in.h: Update.
2218         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2219         * gnulib/import/arg-nonnull.h: ... this.
2220         * gnulib/import/assure.h: Update.
2221         * gnulib/import/at-func.c: Update.
2222         * gnulib/import/basename-lgpl.c: Update.
2223         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2224         * gnulib/import/c++defs.h: ... this.
2225         * gnulib/import/canonicalize-lgpl.c: Update.
2226         * gnulib/import/cdefs.h: Update.
2227         * gnulib/import/chdir-long.c: Update.
2228         * gnulib/import/chdir-long.h: Update.
2229         * gnulib/import/cloexec.c: Update.
2230         * gnulib/import/cloexec.h: Update.
2231         * gnulib/import/close.c: Update.
2232         * gnulib/import/closedir.c: Update.
2233         * gnulib/import/config.charset: Update.
2234         * gnulib/import/dirent-private.h: Update.
2235         * gnulib/import/dirent.in.h: Update.
2236         * gnulib/import/dirfd.c: Update.
2237         * gnulib/import/dirname-lgpl.c: Update.
2238         * gnulib/import/dirname.h: Update.
2239         * gnulib/import/dosname.h: Update.
2240         * gnulib/import/dup-safer-flag.c: Update.
2241         * gnulib/import/dup-safer.c: Update.
2242         * gnulib/import/dup.c: Update.
2243         * gnulib/import/dup2.c: Update.
2244         * gnulib/import/errno.in.h: Update.
2245         * gnulib/import/error.c: Update.
2246         * gnulib/import/error.h: Update.
2247         * gnulib/import/exitfail.c: Update.
2248         * gnulib/import/exitfail.h: Update.
2249         * gnulib/import/extra/update-copyright: Update.
2250         * gnulib/import/fchdir.c: Update.
2251         * gnulib/import/fcntl.c: Update.
2252         * gnulib/import/fcntl.in.h: Update.
2253         * gnulib/import/fd-hook.c: Update.
2254         * gnulib/import/fd-hook.h: Update.
2255         * gnulib/import/fd-safer-flag.c: Update.
2256         * gnulib/import/fd-safer.c: Update.
2257         * gnulib/import/fdopendir.c: Update.
2258         * gnulib/import/filename.h: Update.
2259         * gnulib/import/filenamecat-lgpl.c: Update.
2260         * gnulib/import/filenamecat.h: Update.
2261         * gnulib/import/flexmember.h: Update.
2262         * gnulib/import/float+.h: Update.
2263         * gnulib/import/float.c: Update.
2264         * gnulib/import/float.in.h: Update.
2265         * gnulib/import/fnmatch.c: Update.
2266         * gnulib/import/fnmatch.in.h: Update.
2267         * gnulib/import/fnmatch_loop.c: Update.
2268         * gnulib/import/fpucw.h: Update.
2269         * gnulib/import/frexp.c: Update.
2270         * gnulib/import/frexpl.c: Update.
2271         * gnulib/import/fstat.c: Update.
2272         * gnulib/import/fstatat.c: Update.
2273         * gnulib/import/getcwd-lgpl.c: Update.
2274         * gnulib/import/getcwd.c: Update.
2275         * gnulib/import/getdtablesize.c: Update.
2276         * gnulib/import/getlogin_r.c: Update.
2277         * gnulib/import/getprogname.c: Update.
2278         * gnulib/import/getprogname.h: Update.
2279         * gnulib/import/gettext.h: Update.
2280         * gnulib/import/gettimeofday.c: Update.
2281         * gnulib/import/glob-libc.h: Update.
2282         * gnulib/import/glob.c: Update.
2283         * gnulib/import/glob.in.h: Update.
2284         * gnulib/import/glob_internal.h: Update.
2285         * gnulib/import/glob_pattern_p.c: Update.
2286         * gnulib/import/globfree.c: Update.
2287         * gnulib/import/hard-locale.c: Update.
2288         * gnulib/import/hard-locale.h: Update.
2289         * gnulib/import/intprops.h: Update.
2290         * gnulib/import/inttypes.in.h: Update.
2291         * gnulib/import/isnan.c: Update.
2292         * gnulib/import/isnand-nolibm.h: Update.
2293         * gnulib/import/isnand.c: Update.
2294         * gnulib/import/isnanl-nolibm.h: Update.
2295         * gnulib/import/isnanl.c: Update.
2296         * gnulib/import/itold.c: Update.
2297         * gnulib/import/libc-config.h: Update.
2298         * gnulib/import/limits.in.h: Update.
2299         * gnulib/import/localcharset.c: Update.
2300         * gnulib/import/localcharset.h: Update.
2301         * gnulib/import/localtime-buffer.c: Update.
2302         * gnulib/import/localtime-buffer.h: Update.
2303         * gnulib/import/lstat.c: Update.
2304         * gnulib/import/m4/00gnulib.m4: Update.
2305         * gnulib/import/m4/__inline.m4: Update.
2306         * gnulib/import/m4/absolute-header.m4: Update.
2307         * gnulib/import/m4/alloca.m4: Update.
2308         * gnulib/import/m4/builtin-expect.m4: Update.
2309         * gnulib/import/m4/canonicalize.m4: Update.
2310         * gnulib/import/m4/chdir-long.m4: Update.
2311         * gnulib/import/m4/close.m4: Update.
2312         * gnulib/import/m4/closedir.m4: Update.
2313         * gnulib/import/m4/configmake.m4: Update.
2314         * gnulib/import/m4/d-ino.m4: Update.
2315         * gnulib/import/m4/d-type.m4: Update.
2316         * gnulib/import/m4/dirent_h.m4: Update.
2317         * gnulib/import/m4/dirfd.m4: Update.
2318         * gnulib/import/m4/dirname.m4: Update.
2319         * gnulib/import/m4/double-slash-root.m4: Update.
2320         * gnulib/import/m4/dup.m4: Update.
2321         * gnulib/import/m4/dup2.m4: Update.
2322         * gnulib/import/m4/eealloc.m4: Update.
2323         * gnulib/import/m4/environ.m4: Update.
2324         * gnulib/import/m4/errno_h.m4: Update.
2325         * gnulib/import/m4/error.m4: Update.
2326         * gnulib/import/m4/exponentd.m4: Update.
2327         * gnulib/import/m4/exponentl.m4: Update.
2328         * gnulib/import/m4/extensions.m4: Update.
2329         * gnulib/import/m4/extern-inline.m4: Update.
2330         * gnulib/import/m4/fchdir.m4: Update.
2331         * gnulib/import/m4/fcntl-o.m4: Update.
2332         * gnulib/import/m4/fcntl.m4: Update.
2333         * gnulib/import/m4/fcntl_h.m4: Update.
2334         * gnulib/import/m4/fdopendir.m4: Update.
2335         * gnulib/import/m4/filenamecat.m4: Update.
2336         * gnulib/import/m4/flexmember.m4: Update.
2337         * gnulib/import/m4/float_h.m4: Update.
2338         * gnulib/import/m4/fnmatch.m4: Update.
2339         * gnulib/import/m4/fnmatch_h.m4: Update.
2340         * gnulib/import/m4/fpieee.m4: Update.
2341         * gnulib/import/m4/frexp.m4: Update.
2342         * gnulib/import/m4/frexpl.m4: Update.
2343         * gnulib/import/m4/fstat.m4: Update.
2344         * gnulib/import/m4/fstatat.m4: Update.
2345         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2346         * gnulib/import/m4/getcwd-path-max.m4: Update.
2347         * gnulib/import/m4/getcwd.m4: Update.
2348         * gnulib/import/m4/getdtablesize.m4: Update.
2349         * gnulib/import/m4/getlogin.m4: Update.
2350         * gnulib/import/m4/getlogin_r.m4: Update.
2351         * gnulib/import/m4/getpagesize.m4: Update.
2352         * gnulib/import/m4/getprogname.m4: Update.
2353         * gnulib/import/m4/gettimeofday.m4: Update.
2354         * gnulib/import/m4/glibc21.m4: Update.
2355         * gnulib/import/m4/glob.m4: Update.
2356         * gnulib/import/m4/glob_h.m4: Update.
2357         * gnulib/import/m4/gnulib-cache.m4: Update.
2358         * gnulib/import/m4/gnulib-common.m4: Update.
2359         * gnulib/import/m4/gnulib-comp.m4: Update.
2360         * gnulib/import/m4/gnulib-tool.m4: Update.
2361         * gnulib/import/m4/hard-locale.m4: Update.
2362         * gnulib/import/m4/include_next.m4: Update.
2363         * gnulib/import/m4/inttypes-pri.m4: Update.
2364         * gnulib/import/m4/inttypes.m4: Update.
2365         * gnulib/import/m4/isnand.m4: Update.
2366         * gnulib/import/m4/isnanl.m4: Update.
2367         * gnulib/import/m4/largefile.m4: Update.
2368         * gnulib/import/m4/limits-h.m4: Update.
2369         * gnulib/import/m4/localcharset.m4: Update.
2370         * gnulib/import/m4/locale-fr.m4: Update.
2371         * gnulib/import/m4/locale-ja.m4: Update.
2372         * gnulib/import/m4/locale-zh.m4: Update.
2373         * gnulib/import/m4/localtime-buffer.m4: Update.
2374         * gnulib/import/m4/longlong.m4: Update.
2375         * gnulib/import/m4/lstat.m4: Update.
2376         * gnulib/import/m4/malloc.m4: Update.
2377         * gnulib/import/m4/malloca.m4: Update.
2378         * gnulib/import/m4/math_h.m4: Update.
2379         * gnulib/import/m4/mbrtowc.m4: Update.
2380         * gnulib/import/m4/mbsinit.m4: Update.
2381         * gnulib/import/m4/mbsrtowcs.m4: Update.
2382         * gnulib/import/m4/mbstate_t.m4: Update.
2383         * gnulib/import/m4/memchr.m4: Update.
2384         * gnulib/import/m4/memmem.m4: Update.
2385         * gnulib/import/m4/mempcpy.m4: Update.
2386         * gnulib/import/m4/memrchr.m4: Update.
2387         * gnulib/import/m4/mkdir.m4: Update.
2388         * gnulib/import/m4/mkstemp.m4: Update.
2389         * gnulib/import/m4/mmap-anon.m4: Update.
2390         * gnulib/import/m4/mode_t.m4: Update.
2391         * gnulib/import/m4/msvc-inval.m4: Update.
2392         * gnulib/import/m4/msvc-nothrow.m4: Update.
2393         * gnulib/import/m4/multiarch.m4: Update.
2394         * gnulib/import/m4/nocrash.m4: Update.
2395         * gnulib/import/m4/off_t.m4: Update.
2396         * gnulib/import/m4/onceonly.m4: Update.
2397         * gnulib/import/m4/open-cloexec.m4: Update.
2398         * gnulib/import/m4/open.m4: Update.
2399         * gnulib/import/m4/openat.m4: Update.
2400         * gnulib/import/m4/opendir.m4: Update.
2401         * gnulib/import/m4/pathmax.m4: Update.
2402         * gnulib/import/m4/rawmemchr.m4: Update.
2403         * gnulib/import/m4/readdir.m4: Update.
2404         * gnulib/import/m4/readlink.m4: Update.
2405         * gnulib/import/m4/realloc.m4: Update.
2406         * gnulib/import/m4/rename.m4: Update.
2407         * gnulib/import/m4/rewinddir.m4: Update.
2408         * gnulib/import/m4/rmdir.m4: Update.
2409         * gnulib/import/m4/save-cwd.m4: Update.
2410         * gnulib/import/m4/secure_getenv.m4: Update.
2411         * gnulib/import/m4/setenv.m4: Update.
2412         * gnulib/import/m4/signal_h.m4: Update.
2413         * gnulib/import/m4/ssize_t.m4: Update.
2414         * gnulib/import/m4/stat-time.m4: Update.
2415         * gnulib/import/m4/stat.m4: Update.
2416         * gnulib/import/m4/std-gnu11.m4: Update.
2417         * gnulib/import/m4/stdbool.m4: Update.
2418         * gnulib/import/m4/stddef_h.m4: Update.
2419         * gnulib/import/m4/stdint.m4: Update.
2420         * gnulib/import/m4/stdio_h.m4: Update.
2421         * gnulib/import/m4/stdlib_h.m4: Update.
2422         * gnulib/import/m4/strchrnul.m4: Update.
2423         * gnulib/import/m4/strdup.m4: Update.
2424         * gnulib/import/m4/strerror.m4: Update.
2425         * gnulib/import/m4/string_h.m4: Update.
2426         * gnulib/import/m4/strstr.m4: Update.
2427         * gnulib/import/m4/strtok_r.m4: Update.
2428         * gnulib/import/m4/sys_socket_h.m4: Update.
2429         * gnulib/import/m4/sys_stat_h.m4: Update.
2430         * gnulib/import/m4/sys_time_h.m4: Update.
2431         * gnulib/import/m4/sys_types_h.m4: Update.
2432         * gnulib/import/m4/tempname.m4: Update.
2433         * gnulib/import/m4/time_h.m4: Update.
2434         * gnulib/import/m4/unistd-safer.m4: Update.
2435         * gnulib/import/m4/unistd_h.m4: Update.
2436         * gnulib/import/m4/warn-on-use.m4: Update.
2437         * gnulib/import/m4/wchar_h.m4: Update.
2438         * gnulib/import/m4/wchar_t.m4: Update.
2439         * gnulib/import/m4/wctype_h.m4: Update.
2440         * gnulib/import/m4/wint_t.m4: Update.
2441         * gnulib/import/malloc.c: Update.
2442         * gnulib/import/malloc/scratch_buffer.h: Update.
2443         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2444         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2445         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2446         * gnulib/import/malloca.c: Update.
2447         * gnulib/import/malloca.h: Update.
2448         * gnulib/import/malloca.valgrind: Update.
2449         * gnulib/import/math.in.h: Update.
2450         * gnulib/import/mbrtowc.c: Update.
2451         * gnulib/import/mbsinit.c: Update.
2452         * gnulib/import/mbsrtowcs-impl.h: Update.
2453         * gnulib/import/mbsrtowcs-state.c: Update.
2454         * gnulib/import/mbsrtowcs.c: Update.
2455         * gnulib/import/memchr.c: Update.
2456         * gnulib/import/memmem.c: Update.
2457         * gnulib/import/mempcpy.c: Update.
2458         * gnulib/import/memrchr.c: Update.
2459         * gnulib/import/mkdir.c: Update.
2460         * gnulib/import/mkstemp.c: Update.
2461         * gnulib/import/msvc-inval.c: Update.
2462         * gnulib/import/msvc-inval.h: Update.
2463         * gnulib/import/msvc-nothrow.c: Update.
2464         * gnulib/import/msvc-nothrow.h: Update.
2465         * gnulib/import/open.c: Update.
2466         * gnulib/import/openat-die.c: Update.
2467         * gnulib/import/openat-priv.h: Update.
2468         * gnulib/import/openat-proc.c: Update.
2469         * gnulib/import/openat.c: Update.
2470         * gnulib/import/openat.h: Update.
2471         * gnulib/import/opendir.c: Update.
2472         * gnulib/import/pathmax.h: Update.
2473         * gnulib/import/pipe-safer.c: Update.
2474         * gnulib/import/rawmemchr.c: Update.
2475         * gnulib/import/readdir.c: Update.
2476         * gnulib/import/readlink.c: Update.
2477         * gnulib/import/realloc.c: Update.
2478         * gnulib/import/ref-add.sin: Update.
2479         * gnulib/import/ref-del.sin: Update.
2480         * gnulib/import/rename.c: Update.
2481         * gnulib/import/rewinddir.c: Update.
2482         * gnulib/import/rmdir.c: Update.
2483         * gnulib/import/same-inode.h: Update.
2484         * gnulib/import/save-cwd.c: Update.
2485         * gnulib/import/save-cwd.h: Update.
2486         * gnulib/import/scratch_buffer.h: Update.
2487         * gnulib/import/secure_getenv.c: Update.
2488         * gnulib/import/setenv.c: Update.
2489         * gnulib/import/signal.in.h: Update.
2490         * gnulib/import/stat-time.c: Update.
2491         * gnulib/import/stat-time.h: Update.
2492         * gnulib/import/stat-w32.c: Update.
2493         * gnulib/import/stat-w32.h: Update.
2494         * gnulib/import/stat.c: Update.
2495         * gnulib/import/stdbool.in.h: Update.
2496         * gnulib/import/stddef.in.h: Update.
2497         * gnulib/import/stdint.in.h: Update.
2498         * gnulib/import/stdio.in.h: Update.
2499         * gnulib/import/stdlib.in.h: Update.
2500         * gnulib/import/str-two-way.h: Update.
2501         * gnulib/import/strchrnul.c: Update.
2502         * gnulib/import/strdup.c: Update.
2503         * gnulib/import/streq.h: Update.
2504         * gnulib/import/strerror-override.c: Update.
2505         * gnulib/import/strerror-override.h: Update.
2506         * gnulib/import/strerror.c: Update.
2507         * gnulib/import/string.in.h: Update.
2508         * gnulib/import/stripslash.c: Update.
2509         * gnulib/import/strnlen1.c: Update.
2510         * gnulib/import/strnlen1.h: Update.
2511         * gnulib/import/strstr.c: Update.
2512         * gnulib/import/strtok_r.c: Update.
2513         * gnulib/import/sys_stat.in.h: Update.
2514         * gnulib/import/sys_time.in.h: Update.
2515         * gnulib/import/sys_types.in.h: Update.
2516         * gnulib/import/tempname.c: Update.
2517         * gnulib/import/tempname.h: Update.
2518         * gnulib/import/time.in.h: Update.
2519         * gnulib/import/unistd--.h: Update.
2520         * gnulib/import/unistd-safer.h: Update.
2521         * gnulib/import/unistd.in.h: Update.
2522         * gnulib/import/unsetenv.c: Update.
2523         * gnulib/import/verify.h: Update.
2524         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2525         * gnulib/import/wchar.in.h: Update.
2526         * gnulib/import/wctype.in.h: Update.
2527         * gnulib/import/xalloc-oversized.h: Update.
2528         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2529         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2530
2531 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2532
2533         * record-btrace.c (get_thread_current_frame): Remove
2534         old_inferior_ptid.
2535
2536 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2537
2538         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2539         with check_tag to 1 if and only if the type is tagged and the
2540         component being searched cannot been found in the current
2541         view. Otherwise, always call ada_to_fixed_type with
2542         check_tag to 0.
2543
2544 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2545
2546         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2547         declaration.
2548         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2549         * ada-varobj.c (ada_varobj_get_number_of_children,
2550         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2551
2552 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2553
2554         * ada-valprint.c (ada_value_print): Use type instead of
2555         enclosing type.
2556
2557 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2558
2559         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2560         an array of access to unconstrained array.
2561
2562 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2563
2564         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2565         (ada_check_typedef): Use it.
2566
2567 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2568
2569         * ada-varobj.c (ada_varobj_describe_struct_child)
2570         (ada_varobj_describe_child): Handle union case like struct one.
2571
2572 2018-09-10  Tom Tromey  <tom@tromey.com>
2573
2574         PR python/18380:
2575         * python/python.c (_initialize_python): Make example in "python"
2576         help work in Python 3.
2577
2578 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2579
2580         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2581         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2582         $(EXEEXT) to the script, as it is not a program.
2583
2584 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2585
2586         * python/py-prettyprint.c (pretty_print_one_value): Return
2587         gdbpy_ref<>.
2588         (print_string_repr): Adjust.
2589         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2590         * python/python-internal.h (apply_varobj_pretty_printer): Return
2591         gdbpy_ref<>.
2592         * varobj.c (varobj_value_get_print_value): Adjust.
2593
2594 2018-09-08  Tom Tromey  <tom@tromey.com>
2595
2596         PR python/16047:
2597         * python/py-prettyprint.c (pretty_print_one_value): Check for
2598         to_string method.
2599
2600 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2601
2602         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2603         replace_operator_with_call.
2604
2605 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2606
2607         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2608
2609 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2610
2611         * ada-typeprint.c (print_range): Print the bounds using TYPE
2612         rather than its TYPE_TARGET_TYPE.
2613
2614 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2615
2616         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2617         call to ada_to_fixed_value_create.
2618
2619 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2620
2621         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2622
2623 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2624
2625         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2626         by calls to error.
2627
2628 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2629
2630         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2631         Move update of loop variable "fi".
2632
2633 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2634
2635         * ada-lang.c (value_assign_to_component): In the case of
2636         big-endian targets, extract the bits of the given VAL
2637         using an src_offset of zero if container is not a scalar.
2638
2639 2018-09-06  Simon Ser  <contact@emersion.fr>
2640
2641         PR gdb/23105
2642         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2643         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2644         * fbsd-tdep.c (fbsd_make_note_desc): New.
2645         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2646         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2647         * target.h (enum target_object) Add FreeBSD-specific
2648         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2649
2650 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2651
2652         * compile/compile-c.h (generate_c_for_variable_locations):
2653         Change reference to pointer.
2654         * compile/compile-c-support.c (compile_program) <compute>:
2655         Likewise.
2656         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2657         (generate_c_for_for_one_variable): Likewise
2658         (generate_c_for_variable_locations): Likewise
2659         * compile/compile-c-types.c (compile_c_instance::convert_type):
2660         Likewise
2661         * compile/compile-cplus-symbols.c (convert_one_symbol):
2662         std::move the scope passed to enter_scope.
2663         * compile/compile-cplus-types.c
2664         (compile_cplus_instance::enter_scope): Make parameter
2665         rvalue-reference.
2666         (compile_cplus_instance::new_scope): Change reference to
2667         pointer.
2668         (compile_cplus_instance::convert_type): Likewise
2669         (compile_cplus_convert_typedef): std::move the scope passed to
2670         enter_scope.
2671         (compile_cplus_convert_struct_or_union): Likewise.
2672         (compile_cplus_convert_enum): Likewise.
2673         (compile_cplus_convert_namespace): Likewise.
2674         * compile/compile-cplus.h (compile_cplus_instance)
2675         <enter_scope>: Make parameter rvalue-reference.
2676         * compile/compile-internal.h (compile_instance)
2677         <get_cached_type>: Likewise
2678         * compile/compile-loc2c.c (push): Likewise
2679         (pushf): Likewise
2680         (unary): Likewise
2681         (binary): Likewise
2682         (print_label): Likewise
2683         (pushf_register_address): Likewise
2684         (pushf_register): Likewise
2685         (do_compile_dwarf_expr_to_c): Likewise
2686         (compile_dwarf_expr_to_c): Likewise
2687         (compile_dwarf_bounds_to_c): Likewise
2688         * compile/compile.c (compile_instance::get_cached_type):
2689         Likewise
2690         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2691         (compile_dwarf_bounds_to_c): Likewise
2692         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2693         (dwarf2_compile_property_to_c): Likewise
2694         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2695         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2696         Likewise
2697
2698 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2699
2700         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2701         * tui/tui-data.c (init_content_element): Don't initialize it.
2702
2703 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2704
2705         * tui/tui-data.h (struct tui_win_info)
2706         <detail::opaque>: Remove.
2707         * tui/tui-data.c (init_win_info): Remove assignment.
2708
2709 2018-09-05  Tom Tromey  <tom@tromey.com>
2710
2711         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2712         -Wformat-nonliteral.
2713         * target-float.c (host_float_ops<T>::to_string)
2714         (host_float_ops<T>::from_string): Use
2715         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2716         * configure: Rebuild.
2717
2718 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2719
2720         * printcmd.c (printf_c_string): Use
2721         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2722         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2723
2724 2018-09-05  Tom Tromey  <tom@tromey.com>
2725
2726         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2727
2728 2018-09-05  Tom de Vries  <tdevries@suse.de>
2729
2730         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2731         with resolve_abstract_p == true.
2732         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2733         defaulting to false. Propagate resolve_abstract_p to
2734         dwarf2_fetch_die_loc_sect_off.
2735         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2736         parameter, defaulting to false.
2737         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2738         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2739         parameter.
2740         * dwarf2read.h (struct die_info): Forward-declare.
2741         (die_info_ptr): New typedef.
2742         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2743
2744 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2745
2746         GDB 8.2 released.
2747
2748 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2749             Pedro Alves  <palves@redhat.com>
2750
2751         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2752         "aclocal-m4-deps.mk".  Include file here.
2753         $(srcdir)/aclocal.m4: Add "configure.ac".
2754         * gnulib/aclocal-m4-deps.mk: New file.
2755         * gnulib/update-gnulib.sh: Automatically update
2756         "aclocal-m4-deps.mk".
2757
2758 2018-09-04  Tom Tromey  <tom@tromey.com>
2759
2760         * configure: Rebuild.
2761         * configure.ac: Remove multi-ice code.
2762
2763 2018-09-04  Tom Tromey  <tom@tromey.com>
2764
2765         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2766         (ada-exp.o): Update.
2767
2768 2018-09-04  Tom Tromey  <tom@tromey.com>
2769
2770         * Makefile.in (printcmd.o, target-float.o): Remove.
2771         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2772
2773 2018-09-04  Tom Tromey  <tom@tromey.com>
2774
2775         * gnulib/Makefile.in: Remove obsolete comment.
2776         * Makefile.in: Remove obsolete comment.
2777
2778 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2779
2780         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2781         line with '+'.
2782
2783 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2784
2785         * riscv-tdep.c: Add 'prologue-value.h' include.
2786         (struct riscv_unwind_cache): New struct.
2787         (riscv_debug_unwinder): New global.
2788         (riscv_scan_prologue): Update arguments, capture register details
2789         from prologue scan.
2790         (riscv_skip_prologue): Reformat arguments line, move end of
2791         prologue calculation into riscv_scan_prologue.
2792         (riscv_frame_cache): Update return type, create
2793         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2794         details.
2795         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2796         (riscv_frame_prev_register): Use the trad_frame within the
2797         riscv_unwind_cache.
2798         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2799         flag.
2800
2801 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2802
2803         * trad-frame.h (trad_frame_set_realreg): Declare.
2804         (trad_frame_set_addr): Declare.
2805         * trad-frame.c (trad_frame_set_realreg): Define new function.
2806         (trad_frame_set_addr): Define new function.
2807         (trad_frame_set_reg_realreg): Use new function.
2808         (trad_frame_set_reg_addr): Use new function.
2809
2810 2018-09-01  Keith Seitz  <keiths@redhat.com>
2811
2812         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2813         pulongest instead of "%lld".
2814         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2815         ATTRIBUTE_UNUSED.
2816
2817 2018-08-31  Tom Tromey  <tom@tromey.com>
2818
2819         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2820         variant part type.
2821
2822 2018-08-31  Pedro Alves  <palves@redhat.com>
2823
2824         * gdbarch.h: Regenerate.
2825
2826 2018-08-31  Pedro Alves  <palves@redhat.com>
2827
2828         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2829         * target.h (Hardware watchpoint interfaces): Describe
2830         continuable/steppable/non-steppable watchpoints.
2831         * gdbarch.h, gdbarch.c: Regenerate.
2832
2833 2018-08-31  Pedro Alves  <palves@redhat.com>
2834
2835         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2836         Delete.
2837         * s390-linux-nat.c
2838         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2839         * target.h (target_ops::have_continuable_watchpoint): Delete.
2840         (target_have_continuable_watchpoint): Delete.
2841         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2842         * target-delegates.c: Regenerate.
2843
2844 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2845
2846         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2847         the files present in "gnulib/import/m4/".
2848
2849 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2850
2851         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2852         c.sw, c.swsp, and c.sdsp.
2853
2854 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2855
2856         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2857         (riscv_read_misa_reg): Don't cache value read into inferior data.
2858         (riscv_new_inferior_data): Delete.
2859         (riscv_inferior_data_cleanup): Delete.
2860         (riscv_inferior_data): Delete.
2861         (riscv_invalidate_inferior_data): Delete.
2862         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2863
2864 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2865
2866         * compile/compile-cplus-types.c
2867         (compile_cplus_instance::leave_scope): Take the address of scope
2868         object.
2869         (compile_cplus_instance::convert_qualified_base): Compare quals
2870         to 0.
2871
2872 2018-08-30  Keith Seitz  <keiths@redhat.com>
2873
2874         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2875         Use "%s" and host_address_to_string instead of "%p" in printf.
2876
2877 2018-08-29  Keith Seitz  <keiths@redhat.com>
2878
2879         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2880         and compile-cplus-types.c.
2881         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2882         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2883         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2884         Declare.
2885         * compile/compile-c-support.c: Include compile-cplus.h.
2886         (load_libcompile): Templatize.
2887         (get_compile_context): "New" function.
2888         (c_get_compile_context): Use get_compile_context.
2889         (cplus_get_compile_context): New function.
2890         (cplus_push_user_expression, cplus_pop_user_expression)
2891         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2892         (cplus_compute_program): Define new structs/functions.
2893         * compile/compile-cplus-symmbols.c: New file.
2894         * compile/compile-cplus-types.c: New file.
2895         * compile/compile-cplus.h: New file.
2896         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2897         Declare.
2898         * compile/compile-object-load.c (get_out_value_type): Use
2899         strncmp_iw when comparing symbol names.
2900         (compile_object_load): Add mst_bss and mst_data.
2901         * compile/compile.c (_initialize_compile): Remove
2902         -Wno-implicit-function-declaration from `compile_args'.
2903         * compile/gcc-cp-plugin.h: New file.
2904         * NEWS: Mention C++ compile support and new debug options.
2905
2906 2018-08-29  Keith Seitz  <keiths@redhat.com>
2907
2908         * linespec.c (collect_info::add_symbol): Make virtual.
2909         (struct symbol_searcher_collect_info): New struct.
2910         (symbol_searcher::find_all_symbols): New method.
2911         * symtab.h (class symbol_searcher): New class.
2912
2913 2018-08-29  Keith Seitz  <keiths@redhat.com>
2914
2915         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2916         Change to vector of block_symbol.  Update all users.
2917         (struct collect_info) <symbols>: Likewise.
2918         (collect_info::add_symbol): Take block_symbol as argument.
2919         Update all callers.
2920         (decode_compound_collector) <m_symbols>: Change type to vector
2921         of block_symbol.  Update all users.
2922         (decode_compound_collector::operator ()): Change parameter type
2923         to block_symbol.
2924         (find_method, find_function_symbols, find_linespec_symbols)
2925         (find_label_symbols_in_block, find_label_symbols): Change symbol
2926         vectors to block_symbol vectors.
2927         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2928         block_symbol.
2929
2930 2018-08-29  Keith Seitz  <keiths@redhat.com>
2931
2932         * linespec.c (symbolp): Remove typedef and VEC definitions.
2933         (bound_minimal_symbol_d): Likewise.
2934
2935 2018-08-29  Keith Seitz  <keiths@redhat.com>
2936
2937         * linespec.c (decode_compound_collector::decode_compound_collector):
2938         Remove initialization for `m_symtabs'.
2939         (decode_compound_collector::release_symbols): Change return type
2940         to std::vector.  Update all callers.
2941         (class decode_compound_collector) <m_symbols>: Change type to
2942         std::vector.
2943         (lookup_prefix_sym): Change return type to std::vector.  Update all
2944         callers.
2945         (compare_symbols): Remove.
2946         (std_compare_symbols): Rename to `compare_symbols'.
2947         (find_method): Change `sym_classes' parameter to std::vector.
2948         Update all callers.  Use std::sort to sort sym_classes.
2949         (find_linespec_symbols): Remove cleanup.
2950
2951 2018-08-29  Keith Seitz  <keiths@redhat.com>
2952
2953         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2954         std::vector.  Update all users.
2955         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2956         (struct collect_info) <minimal_symbols>: Likewise.
2957         (compare_msymbols): Return bool.  Change parameters to const
2958         bound_minimal_symbol references.
2959         (find_method, find_function_symbols, find_linespec_symbols): Change
2960         `minsyms' parameter to std::vector.  Update all callers.
2961
2962 2018-08-29  Keith Seitz  <keiths@redhat.com>
2963
2964         * linespec.c (struct linespec) <label_symbols>: Change type to
2965         std::vector.  Update all users.
2966         (find_label_symbols_in_block): Change `result' parameter to
2967         std::vector.  Update all callers.
2968         (find_label_symbols): Return std::vector.  Update all callers.
2969
2970 2018-08-29  Keith Seitz  <keiths@redhat.com>
2971
2972         * linespec.c (struct linespec) <function_symbols>: Change type to
2973         std::vector.  Update all users.
2974         (struct collect_info) <function_symbols>: Likewise.
2975         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2976         (std_compare_symbols): New function.
2977         (find_method, find_function_symbols, find_linespec_symbols)
2978         (find_label_symbols_in_block): Change `symbols' parameter to
2979         std::vector.  Update all callers.
2980         (find_label_symbols): Likewise for `function_symbols' and
2981         `label_funcs_ret'.
2982
2983 2018-08-29  Keith Seitz  <keiths@redhat.com>
2984
2985         * linespec.c (symtab_vector_up): Define.
2986         (struct linespec) <file_symtabs>: Change type to std::vector *.
2987         Update all uses.
2988         (struct collect_info) <file_symtabs>: Likewise.
2989         (collect_symtabs_from_filename): Return symtab_vector_up.
2990         Update all callers.
2991         (decode_objc): Remove cleanup.
2992         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2993         (symtab_collector::release_symtabs): Return symtab_vector_up.
2994         Update all callers.
2995         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2996         Update all users.
2997         (collect_symtabs_from_filename, symtabs_from_filename): Return
2998         symtab_vector_up.  Update all callers.
2999
3000 2018-08-29  Tom Tromey  <tom@tromey.com>
3001
3002         * csky-tdep.c (csky_analyze_prologue): Use
3003         core_addr_to_string_nz.
3004
3005 2018-08-29  Tom Tromey  <tom@tromey.com>
3006
3007         * windows-nat.c (struct xlate_exception) <them>: Change type to
3008         DWORD.
3009         (xlate): Fix formatting.  Remove last entry.
3010         (struct xlate_exception, xlate): Comment out.
3011         (windows_nat_target::resume): Use ranged for.
3012
3013 2018-08-29  Jim Wilson  <jimw@sifive.com>
3014
3015         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3016         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3017         of NT_PRFPREG.
3018         (riscv_linux_nat_target::store_registers): Likewise.
3019
3020 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3021
3022         PR gdb/23555
3023         PR gdb/23558
3024         * gnulib/aclocal.m4: Regenerate.
3025         * gnulib/config.in: Regenerate.
3026         * gnulib/configure: Regenerate.
3027         * gnulib/import/Makefile.am: Update.
3028         * gnulib/import/Makefile.in: Update.
3029         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3030         * gnulib/import/_Noreturn.h: ... this.
3031         * gnulib/import/alloca.in.h: Update.
3032         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3033         * gnulib/import/arg-nonnull.h: ... this.
3034         * gnulib/import/assure.h: Update.
3035         * gnulib/import/at-func.c: Update.
3036         * gnulib/import/basename-lgpl.c: Update.
3037         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3038         * gnulib/import/c++defs.h: ... this.
3039         * gnulib/import/canonicalize-lgpl.c: Update.
3040         * gnulib/import/cdefs.h: Update.
3041         * gnulib/import/chdir-long.c: Update.
3042         * gnulib/import/chdir-long.h: Update.
3043         * gnulib/import/cloexec.c: Update.
3044         * gnulib/import/cloexec.h: Update.
3045         * gnulib/import/close.c: Update.
3046         * gnulib/import/closedir.c: Update.
3047         * gnulib/import/config.charset: Update.
3048         * gnulib/import/dirent-private.h: Update.
3049         * gnulib/import/dirent.in.h: Update.
3050         * gnulib/import/dirfd.c: Update.
3051         * gnulib/import/dirname-lgpl.c: Update.
3052         * gnulib/import/dirname.h: Update.
3053         * gnulib/import/dosname.h: Update.
3054         * gnulib/import/dup-safer-flag.c: Update.
3055         * gnulib/import/dup-safer.c: Update.
3056         * gnulib/import/dup.c: Update.
3057         * gnulib/import/dup2.c: Update.
3058         * gnulib/import/errno.in.h: Update.
3059         * gnulib/import/error.c: Update.
3060         * gnulib/import/error.h: Update.
3061         * gnulib/import/exitfail.c: Update.
3062         * gnulib/import/exitfail.h: Update.
3063         * gnulib/import/extra/update-copyright: Update.
3064         * gnulib/import/fchdir.c: Update.
3065         * gnulib/import/fcntl.c: Update.
3066         * gnulib/import/fcntl.in.h: Update.
3067         * gnulib/import/fd-hook.c: Update.
3068         * gnulib/import/fd-hook.h: Update.
3069         * gnulib/import/fd-safer-flag.c: Update.
3070         * gnulib/import/fd-safer.c: Update.
3071         * gnulib/import/fdopendir.c: Update.
3072         * gnulib/import/filename.h: Update.
3073         * gnulib/import/filenamecat-lgpl.c: Update.
3074         * gnulib/import/filenamecat.h: Update.
3075         * gnulib/import/flexmember.h: Update.
3076         * gnulib/import/float+.h: Update.
3077         * gnulib/import/float.c: Update.
3078         * gnulib/import/float.in.h: Update.
3079         * gnulib/import/fnmatch.c: Update.
3080         * gnulib/import/fnmatch.in.h: Update.
3081         * gnulib/import/fnmatch_loop.c: Update.
3082         * gnulib/import/fpucw.h: Update.
3083         * gnulib/import/frexp.c: Update.
3084         * gnulib/import/frexpl.c: Update.
3085         * gnulib/import/fstat.c: Update.
3086         * gnulib/import/fstatat.c: Update.
3087         * gnulib/import/getcwd-lgpl.c: Update.
3088         * gnulib/import/getcwd.c: Update.
3089         * gnulib/import/getdtablesize.c: Update.
3090         * gnulib/import/getlogin_r.c: Update.
3091         * gnulib/import/getprogname.c: Update.
3092         * gnulib/import/getprogname.h: Update.
3093         * gnulib/import/gettext.h: Update.
3094         * gnulib/import/gettimeofday.c: Update.
3095         * gnulib/import/glob-libc.h: Update.
3096         * gnulib/import/glob.c: Update.
3097         * gnulib/import/glob.in.h: Update.
3098         * gnulib/import/glob_internal.h: Update.
3099         * gnulib/import/glob_pattern_p.c: Update.
3100         * gnulib/import/globfree.c: Update.
3101         * gnulib/import/hard-locale.c: Update.
3102         * gnulib/import/hard-locale.h: Update.
3103         * gnulib/import/intprops.h: Update.
3104         * gnulib/import/inttypes.in.h: Update.
3105         * gnulib/import/isnan.c: Update.
3106         * gnulib/import/isnand-nolibm.h: Update.
3107         * gnulib/import/isnand.c: Update.
3108         * gnulib/import/isnanl-nolibm.h: Update.
3109         * gnulib/import/isnanl.c: Update.
3110         * gnulib/import/itold.c: Update.
3111         * gnulib/import/libc-config.h: Update.
3112         * gnulib/import/limits.in.h: Update.
3113         * gnulib/import/localcharset.c: Update.
3114         * gnulib/import/localcharset.h: Update.
3115         * gnulib/import/localtime-buffer.c: Update.
3116         * gnulib/import/localtime-buffer.h: Update.
3117         * gnulib/import/lstat.c: Update.
3118         * gnulib/import/m4/00gnulib.m4: Update.
3119         * gnulib/import/m4/__inline.m4: Update.
3120         * gnulib/import/m4/absolute-header.m4: Update.
3121         * gnulib/import/m4/alloca.m4: Update.
3122         * gnulib/import/m4/builtin-expect.m4: Update.
3123         * gnulib/import/m4/canonicalize.m4: Update.
3124         * gnulib/import/m4/chdir-long.m4: Update.
3125         * gnulib/import/m4/close.m4: Update.
3126         * gnulib/import/m4/closedir.m4: Update.
3127         * gnulib/import/m4/configmake.m4: Update.
3128         * gnulib/import/m4/d-ino.m4: Update.
3129         * gnulib/import/m4/d-type.m4: Update.
3130         * gnulib/import/m4/dirent_h.m4: Update.
3131         * gnulib/import/m4/dirfd.m4: Update.
3132         * gnulib/import/m4/dirname.m4: Update.
3133         * gnulib/import/m4/double-slash-root.m4: Update.
3134         * gnulib/import/m4/dup.m4: Update.
3135         * gnulib/import/m4/dup2.m4: Update.
3136         * gnulib/import/m4/eealloc.m4: Update.
3137         * gnulib/import/m4/environ.m4: Update.
3138         * gnulib/import/m4/errno_h.m4: Update.
3139         * gnulib/import/m4/error.m4: Update.
3140         * gnulib/import/m4/exponentd.m4: Update.
3141         * gnulib/import/m4/exponentl.m4: Update.
3142         * gnulib/import/m4/extensions.m4: Update.
3143         * gnulib/import/m4/extern-inline.m4: Update.
3144         * gnulib/import/m4/fchdir.m4: Update.
3145         * gnulib/import/m4/fcntl-o.m4: Update.
3146         * gnulib/import/m4/fcntl.m4: Update.
3147         * gnulib/import/m4/fcntl_h.m4: Update.
3148         * gnulib/import/m4/fdopendir.m4: Update.
3149         * gnulib/import/m4/filenamecat.m4: Update.
3150         * gnulib/import/m4/flexmember.m4: Update.
3151         * gnulib/import/m4/float_h.m4: Update.
3152         * gnulib/import/m4/fnmatch.m4: Update.
3153         * gnulib/import/m4/fnmatch_h.m4: Update.
3154         * gnulib/import/m4/fpieee.m4: Update.
3155         * gnulib/import/m4/frexp.m4: Update.
3156         * gnulib/import/m4/frexpl.m4: Update.
3157         * gnulib/import/m4/fstat.m4: Update.
3158         * gnulib/import/m4/fstatat.m4: Update.
3159         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3160         * gnulib/import/m4/getcwd-path-max.m4: Update.
3161         * gnulib/import/m4/getcwd.m4: Update.
3162         * gnulib/import/m4/getdtablesize.m4: Update.
3163         * gnulib/import/m4/getlogin.m4: Update.
3164         * gnulib/import/m4/getlogin_r.m4: Update.
3165         * gnulib/import/m4/getpagesize.m4: Update.
3166         * gnulib/import/m4/getprogname.m4: Update.
3167         * gnulib/import/m4/gettimeofday.m4: Update.
3168         * gnulib/import/m4/glibc21.m4: Update.
3169         * gnulib/import/m4/glob.m4: Update.
3170         * gnulib/import/m4/glob_h.m4: Update.
3171         * gnulib/import/m4/gnulib-cache.m4: Update.
3172         * gnulib/import/m4/gnulib-common.m4: Update.
3173         * gnulib/import/m4/gnulib-comp.m4: Update.
3174         * gnulib/import/m4/gnulib-tool.m4: Update.
3175         * gnulib/import/m4/hard-locale.m4: Update.
3176         * gnulib/import/m4/include_next.m4: Update.
3177         * gnulib/import/m4/inttypes-pri.m4: Update.
3178         * gnulib/import/m4/inttypes.m4: Update.
3179         * gnulib/import/m4/isnand.m4: Update.
3180         * gnulib/import/m4/isnanl.m4: Update.
3181         * gnulib/import/m4/largefile.m4: Update.
3182         * gnulib/import/m4/limits-h.m4: Update.
3183         * gnulib/import/m4/localcharset.m4: Update.
3184         * gnulib/import/m4/locale-fr.m4: Update.
3185         * gnulib/import/m4/locale-ja.m4: Update.
3186         * gnulib/import/m4/locale-zh.m4: Update.
3187         * gnulib/import/m4/localtime-buffer.m4: Update.
3188         * gnulib/import/m4/longlong.m4: Update.
3189         * gnulib/import/m4/lstat.m4: Update.
3190         * gnulib/import/m4/malloc.m4: Update.
3191         * gnulib/import/m4/malloca.m4: Update.
3192         * gnulib/import/m4/math_h.m4: Update.
3193         * gnulib/import/m4/mbrtowc.m4: Update.
3194         * gnulib/import/m4/mbsinit.m4: Update.
3195         * gnulib/import/m4/mbsrtowcs.m4: Update.
3196         * gnulib/import/m4/mbstate_t.m4: Update.
3197         * gnulib/import/m4/memchr.m4: Update.
3198         * gnulib/import/m4/memmem.m4: Update.
3199         * gnulib/import/m4/mempcpy.m4: Update.
3200         * gnulib/import/m4/memrchr.m4: Update.
3201         * gnulib/import/m4/mkdir.m4: Update.
3202         * gnulib/import/m4/mkstemp.m4: Update.
3203         * gnulib/import/m4/mmap-anon.m4: Update.
3204         * gnulib/import/m4/mode_t.m4: Update.
3205         * gnulib/import/m4/msvc-inval.m4: Update.
3206         * gnulib/import/m4/msvc-nothrow.m4: Update.
3207         * gnulib/import/m4/multiarch.m4: Update.
3208         * gnulib/import/m4/nocrash.m4: Update.
3209         * gnulib/import/m4/off_t.m4: Update.
3210         * gnulib/import/m4/onceonly.m4: Update.
3211         * gnulib/import/m4/open-cloexec.m4: Update.
3212         * gnulib/import/m4/open.m4: Update.
3213         * gnulib/import/m4/openat.m4: Update.
3214         * gnulib/import/m4/opendir.m4: Update.
3215         * gnulib/import/m4/pathmax.m4: Update.
3216         * gnulib/import/m4/rawmemchr.m4: Update.
3217         * gnulib/import/m4/readdir.m4: Update.
3218         * gnulib/import/m4/readlink.m4: Update.
3219         * gnulib/import/m4/realloc.m4: Update.
3220         * gnulib/import/m4/rename.m4: Update.
3221         * gnulib/import/m4/rewinddir.m4: Update.
3222         * gnulib/import/m4/rmdir.m4: Update.
3223         * gnulib/import/m4/save-cwd.m4: Update.
3224         * gnulib/import/m4/secure_getenv.m4: Update.
3225         * gnulib/import/m4/setenv.m4: Update.
3226         * gnulib/import/m4/signal_h.m4: Update.
3227         * gnulib/import/m4/ssize_t.m4: Update.
3228         * gnulib/import/m4/stat-time.m4: Update.
3229         * gnulib/import/m4/stat.m4: Update.
3230         * gnulib/import/m4/std-gnu11.m4: Update.
3231         * gnulib/import/m4/stdbool.m4: Update.
3232         * gnulib/import/m4/stddef_h.m4: Update.
3233         * gnulib/import/m4/stdint.m4: Update.
3234         * gnulib/import/m4/stdio_h.m4: Update.
3235         * gnulib/import/m4/stdlib_h.m4: Update.
3236         * gnulib/import/m4/strchrnul.m4: Update.
3237         * gnulib/import/m4/strdup.m4: Update.
3238         * gnulib/import/m4/strerror.m4: Update.
3239         * gnulib/import/m4/string_h.m4: Update.
3240         * gnulib/import/m4/strstr.m4: Update.
3241         * gnulib/import/m4/strtok_r.m4: Update.
3242         * gnulib/import/m4/sys_socket_h.m4: Update.
3243         * gnulib/import/m4/sys_stat_h.m4: Update.
3244         * gnulib/import/m4/sys_time_h.m4: Update.
3245         * gnulib/import/m4/sys_types_h.m4: Update.
3246         * gnulib/import/m4/tempname.m4: Update.
3247         * gnulib/import/m4/time_h.m4: Update.
3248         * gnulib/import/m4/unistd-safer.m4: Update.
3249         * gnulib/import/m4/unistd_h.m4: Update.
3250         * gnulib/import/m4/warn-on-use.m4: Update.
3251         * gnulib/import/m4/wchar_h.m4: Update.
3252         * gnulib/import/m4/wchar_t.m4: Update.
3253         * gnulib/import/m4/wctype_h.m4: Update.
3254         * gnulib/import/m4/wint_t.m4: Update.
3255         * gnulib/import/malloc.c: Update.
3256         * gnulib/import/malloc/scratch_buffer.h: Update.
3257         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3258         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3259         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3260         * gnulib/import/malloca.c: Update.
3261         * gnulib/import/malloca.h: Update.
3262         * gnulib/import/malloca.valgrind: Update.
3263         * gnulib/import/math.in.h: Update.
3264         * gnulib/import/mbrtowc.c: Update.
3265         * gnulib/import/mbsinit.c: Update.
3266         * gnulib/import/mbsrtowcs-impl.h: Update.
3267         * gnulib/import/mbsrtowcs-state.c: Update.
3268         * gnulib/import/mbsrtowcs.c: Update.
3269         * gnulib/import/memchr.c: Update.
3270         * gnulib/import/memmem.c: Update.
3271         * gnulib/import/mempcpy.c: Update.
3272         * gnulib/import/memrchr.c: Update.
3273         * gnulib/import/mkdir.c: Update.
3274         * gnulib/import/mkstemp.c: Update.
3275         * gnulib/import/msvc-inval.c: Update.
3276         * gnulib/import/msvc-inval.h: Update.
3277         * gnulib/import/msvc-nothrow.c: Update.
3278         * gnulib/import/msvc-nothrow.h: Update.
3279         * gnulib/import/open.c: Update.
3280         * gnulib/import/openat-die.c: Update.
3281         * gnulib/import/openat-priv.h: Update.
3282         * gnulib/import/openat-proc.c: Update.
3283         * gnulib/import/openat.c: Update.
3284         * gnulib/import/openat.h: Update.
3285         * gnulib/import/opendir.c: Update.
3286         * gnulib/import/pathmax.h: Update.
3287         * gnulib/import/pipe-safer.c: Update.
3288         * gnulib/import/rawmemchr.c: Update.
3289         * gnulib/import/readdir.c: Update.
3290         * gnulib/import/readlink.c: Update.
3291         * gnulib/import/realloc.c: Update.
3292         * gnulib/import/ref-add.sin: Update.
3293         * gnulib/import/ref-del.sin: Update.
3294         * gnulib/import/rename.c: Update.
3295         * gnulib/import/rewinddir.c: Update.
3296         * gnulib/import/rmdir.c: Update.
3297         * gnulib/import/same-inode.h: Update.
3298         * gnulib/import/save-cwd.c: Update.
3299         * gnulib/import/save-cwd.h: Update.
3300         * gnulib/import/scratch_buffer.h: Update.
3301         * gnulib/import/secure_getenv.c: Update.
3302         * gnulib/import/setenv.c: Update.
3303         * gnulib/import/signal.in.h: Update.
3304         * gnulib/import/stat-time.c: Update.
3305         * gnulib/import/stat-time.h: Update.
3306         * gnulib/import/stat-w32.c: Update.
3307         * gnulib/import/stat-w32.h: Update.
3308         * gnulib/import/stat.c: Update.
3309         * gnulib/import/stdbool.in.h: Update.
3310         * gnulib/import/stddef.in.h: Update.
3311         * gnulib/import/stdint.in.h: Update.
3312         * gnulib/import/stdio.in.h: Update.
3313         * gnulib/import/stdlib.in.h: Update.
3314         * gnulib/import/str-two-way.h: Update.
3315         * gnulib/import/strchrnul.c: Update.
3316         * gnulib/import/strdup.c: Update.
3317         * gnulib/import/streq.h: Update.
3318         * gnulib/import/strerror-override.c: Update.
3319         * gnulib/import/strerror-override.h: Update.
3320         * gnulib/import/strerror.c: Update.
3321         * gnulib/import/string.in.h: Update.
3322         * gnulib/import/stripslash.c: Update.
3323         * gnulib/import/strnlen1.c: Update.
3324         * gnulib/import/strnlen1.h: Update.
3325         * gnulib/import/strstr.c: Update.
3326         * gnulib/import/strtok_r.c: Update.
3327         * gnulib/import/sys_stat.in.h: Update.
3328         * gnulib/import/sys_time.in.h: Update.
3329         * gnulib/import/sys_types.in.h: Update.
3330         * gnulib/import/tempname.c: Update.
3331         * gnulib/import/tempname.h: Update.
3332         * gnulib/import/time.in.h: Update.
3333         * gnulib/import/unistd--.h: Update.
3334         * gnulib/import/unistd-safer.h: Update.
3335         * gnulib/import/unistd.in.h: Update.
3336         * gnulib/import/unsetenv.c: Update.
3337         * gnulib/import/verify.h: Update.
3338         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3339         * gnulib/import/wchar.in.h: Update.
3340         * gnulib/import/wctype.in.h: Update.
3341         * gnulib/import/xalloc-oversized.h: Update.
3342         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3343         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3344
3345 2018-08-16  Gary Benson <gbenson@redhat.com>
3346
3347         PR gdb/13000:
3348         * gdb/main.c (captured_main_1): Exit with nonzero status
3349         in batch mode if the last command to be executed failed.
3350         * NEWS: Mention the above.
3351
3352 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3353
3354         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3355         end of warning message.
3356
3357 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3358
3359         PR gdb/22943:
3360         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3361         (aarch64_extract_return_value): Use
3362         aapcs_is_vfp_call_or_return_candidate.
3363         (aarch64_return_in_memory): Likewise.
3364         (aarch64_store_return_value): Likewise.
3365
3366 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3367
3368         * aarch64-tdep.c
3369         (aapcs_is_vfp_call_or_return_candidate): Make static
3370         (pass_in_v_or_stack): Remove function.
3371         (pass_in_v_vfp_candidate): New function.
3372         (aarch64_push_dummy_call): Check for float register candidates.
3373
3374 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3375
3376         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3377         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3378         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3379
3380 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3381
3382         PR build/23399
3383         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3384         (struct ipa_sym_addresses): Rename to...
3385         (struct ipa_sym_addresses_common): ... this.
3386         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3387
3388 2018-08-28  Tom Tromey  <tom@tromey.com>
3389
3390         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3391         (token_fifo): Now a std::vector.
3392         (yylex, c_parse): Update.
3393         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3394         (token_fifo): Now a std::vector.
3395         (yylex, d_parse): Update.
3396         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3397         (token_fifo): Now a std::vector.
3398         (yylex, go_parse): Update.
3399
3400 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3401
3402         * parser-defs.h (struct type_stack) <elements>: Change type to
3403         std::vector<union type_stack_elt>.
3404         <depth, size>: Remove.
3405         * parse.c (parse_exp_in_context_1): Adjust.
3406         (type_stack_reserve): Remove.
3407         (check_type_stack_depth): Remove.
3408         (insert_into_type_stack): Adjust to std::vector.
3409         (insert_type): Likewise.
3410         (push_type): Likewise.
3411         (push_type_int): Likewise.
3412         (insert_type_address_space): Likewise.
3413         (pop_type): Likewise.
3414         (pop_type_int): Likewise.
3415         (pop_typelist): Likewise.
3416         (pop_type_stack): Likewise.
3417         (append_type_stack): Likewise.
3418         (push_type_stack): Likewise.
3419         (get_type_stack): Likewise.
3420         (type_stack_cleanup): Likewise.
3421         (push_typelist): Likewise.
3422         (follow_types): Likewise.
3423         (_initialize_parse): Likewise.
3424
3425 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3426
3427         * NEWS: Mention csky target.
3428
3429 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3430             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3431             Don Breazeal  <donb@codesourcery.com>
3432
3433         * csky-linux-tdep.c: New file.
3434         * csky-tdep.c: Likewise.
3435         * csky-tdep.h: Likewise.
3436         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3437         csky-tdep.o.
3438         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3439         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3440         * configure.tgt: Add csky support.
3441
3442 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3443
3444         * python/py-framefilter.c (py_print_frame): Print frame architecture
3445         when printing on an MI output.
3446
3447 2018-08-27  Tom Tromey  <tom@tromey.com>
3448
3449         PR build/23087:
3450         * configure: Rebuild.
3451         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3452
3453 2018-08-27  Tom Tromey  <tom@tromey.com>
3454
3455         * aarch64-linux-tdep.c
3456         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3457         casts to int.
3458
3459 2018-08-27  Tom Tromey  <tom@tromey.com>
3460
3461         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3462         unsigned.
3463         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3464         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3465         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3466         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3467         unsigned.
3468
3469 2018-08-27  Tom Tromey  <tom@tromey.com>
3470
3471         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3472         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3473
3474 2018-08-27  Tom Tromey  <tom@tromey.com>
3475
3476         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3477         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3478         ULONGEST_MAX.
3479         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3480         ULONGEST_MAX.
3481         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3482         ULONGEST_MAX.
3483         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3484         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3485         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3486         ULONGEST_MAX.
3487         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3488         (ppc64_linux_sigaction_tramp_frame)
3489         (ppc32_linux_sighandler_tramp_frame)
3490         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3491         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3492         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3493         * mn10300-linux-tdep.c (am33_linux_sigframe)
3494         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3495         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3496         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3497         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3498         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3499         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3500         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3501         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3502         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3503         * microblaze-linux-tdep.c
3504         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3505         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3506         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3507         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3508         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3509         * common/common-types.h (ULONGEST_MAX): New define.
3510         (CORE_ADDR_MAX): Fix formatting.
3511         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3512         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3513         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3514         (arm_linux_rt_sigreturn_tramp_frame)
3515         (arm_eabi_linux_sigreturn_tramp_frame)
3516         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3517         (thumb2_eabi_linux_sigreturn_tramp_frame)
3518         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3519         (arm_linux_restart_syscall_tramp_frame)
3520         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3521         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3522         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3523         ULONGEST_MAX.
3524         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3525
3526 2018-08-27  Tom Tromey  <tom@tromey.com>
3527
3528         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3529         CORE_ADDR_MAX.
3530         * mips-tdep.c (mips_deal_with_atomic_sequence)
3531         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3532         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3533         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3534         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3535         CORE_ADDR_MAX.
3536         * aarch64-tdep.c (aarch64_software_single_step): Use
3537         CORE_ADDR_MAX.
3538
3539 2018-08-27  Tom Tromey  <tom@tromey.com>
3540
3541         * linespec.c (complete_linespec_component): Add cast to "char".
3542         * completer.c (completion_tracker::build_completion_result): Add
3543         cast to "char".
3544
3545 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3546
3547         * solist.h (struct solist, struct target_so_ops): Fix
3548         indentation.
3549
3550 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3551
3552         * ada-tasks.c (ada_task_info_s): Remove typedef.
3553         (DEF_VEC_O(ada_task_info_s)): Remove.
3554         (struct ada_tasks_inferior_data): Initialize fields.
3555         <task_list>: Make an std::vector.
3556         (get_ada_tasks_inferior_data): Allocate with new.
3557         (ada_get_task_number): Adjust.
3558         (get_task_number_from_id): Likewise.
3559         (valid_task_id): Likewise.
3560         (ada_get_task_info_from_ptid): Likewise.
3561         (iterate_over_live_ada_tasks): Likewise.
3562         (add_ada_task): Likewise.
3563         (read_known_tasks): Likewise.
3564         (ada_build_task_list): Likewise.
3565         (print_ada_task_info): Likewise.
3566         (info_task): Likewise.
3567         (task_command_1): Likewise.
3568
3569 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3570
3571         * ada-lang.c (add_angle_brackets): Return std::string.
3572
3573 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3574
3575         * python/py-threadevent.c (py_get_event_thread): Initialize
3576         pythread.
3577
3578 2018-08-24  Pedro Alves  <palves@redhat.com>
3579
3580         * python/py-bpevent.c (create_breakpoint_event_object): Use
3581         copy-initialization.
3582         * python/py-continueevent.c (emit_continue_event): Use
3583         copy-initialization.
3584         * python/py-exitedevent.c (create_exited_event_object): Return a
3585         gdbpy_ref<>.
3586         (emit_exited_event): Use copy-initialization.
3587         * python/py-inferior.c (python_new_inferior)
3588         (python_inferior_deleted, add_thread_object): Use
3589         copy-initialization.
3590         * python/py-infevents.c (create_inferior_call_event_object)
3591         (create_register_changed_event_object)
3592         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3593         (emit_inferior_call_event, emit_memory_changed_event)
3594         (emit_register_changed_event): Use copy-initialization.
3595         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3596         Return a gdbpy_ref<>.
3597         (emit_new_objfile_event): Use copy-initialization.
3598         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3599         (emit_clear_objfiles_event): Use copy-initialization.
3600         * python/py-signalevent.c (create_signal_event_object): Use
3601         copy-initialization.
3602         * python/py-threadevent.c (create_thread_event_object): Use
3603         copy-initialization.
3604
3605 2018-08-24  Pedro Alves  <palves@redhat.com>
3606             Simon Marchi  <simon.marchi@ericsson.com>
3607
3608         PR gdb/23379
3609         * python/py-continueevent.c: Include "gdbthread.h".
3610         (create_continue_event_object): Add intro comment.  Add 'ptid'
3611         parameter.  Use it to find thread to pass to
3612         create_thread_event_object.
3613         (emit_continue_event): Pass PTID down to
3614         create_continue_event_object.
3615         * python/py-event.h (py_get_event_thread): Declare.
3616         (create_thread_event_object): Remove default from 'thread'
3617         parameter.
3618         * python/py-stopevent.c (create_stop_event_object): Use
3619         py_get_event_thread.
3620         * python/py-threadevent.c (get_event_thread): Rename to ...
3621         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3622         and use it to find the thread.
3623         (create_thread_event_object): Assert that THREAD isn't null.
3624         Don't find the event thread here.
3625
3626 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3627
3628         * block.h (blockrange, blockranges): New struct declarations.
3629         (struct block): Add new field named `ranges'.
3630         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3631         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3632         macros for accessing ranges in struct block.
3633         (make_blockranges): New declaration.
3634         block.c (make_blockranges): New function.
3635         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3636         for block.
3637         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3638         * blockframe.c (cache_pc_function_block): New static global.
3639         (clear_pc_function_cache): Clear cache_pc_function_block.
3640         (find_pc_partial_function): Move comment to symtab.h.  Add
3641         support for non-contiguous blocks.
3642         * cli/cli-cmds.c (block.h): Include.
3643         (print_disassembly): Handle printing of non-contiguous blocks.
3644         (disassemble_current_function): Likewise.
3645         (disassemble_command): Likewise.
3646
3647         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3648         BLOCK_START.
3649         * blockframe.c (get_pc_function_start): Likewise.
3650         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3651         (gcc_symbol_address): Likewise.
3652         * compile/compile-object-run.c (compile_object_run): Likewise.
3653         * compile/compile.c (get_expr_block_and_pc): Likewise.
3654         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3655         (func_addr_to_tail_call_list): Likewise.
3656         * findvar.c (default_read_var_value): Likewise.
3657         * inline-frame.c (inline_frame_this_id): Likewise.
3658         (skip-inline_frames): Likewise.
3659         * infcmd.c (until_next_command): Likewise.
3660         * linespec.c (convert_linespec_to_sals): Likewise.
3661         * parse.c (parse_exp_in_context_1): Likewise.
3662         * printcmd.c (build_address_symbolic): likewise.
3663         (info_address_command): Likewise.
3664         symtab.c (find_function_start_sal): Likewise.
3665         (skip_prologue_sal): Likewise.
3666         (find_function_alias_target): Likewise.
3667         (find_gnu_ifunc): Likewise.
3668         * stack.c (find_frame_funname): Likewise.
3669         * symtab.c (fixup_symbol_section): Likewise.
3670         (find_function_start_sal): Likewise.
3671         (skip_prologue_sal): Likewsie.
3672         (find_function_alias_target): Likewise.
3673         (find_gnu_ifunc): Likewise.
3674         * tracepoint.c (info_scope_command): Likewise.
3675         * value.c (value_fn_field): Likewise.
3676
3677         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3678         in place of find_pc_partial_function.
3679         * blockframe.c (find_function_entry_range_from_pc): New function.
3680         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3681         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3682         for each range in a block.
3683
3684
3685 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3686
3687         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3688         incrementation.
3689
3690 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3691
3692         * solib-svr4.c (read_program_headers_from_bfd): Return
3693         gdb::optional<gdb::byte_vector>.
3694         (svr4_exec_displacement): Adjust.
3695
3696 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3697
3698         * solib-svr4.c (read_program_header): Return
3699         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3700         (find_program_interpreter): Return
3701         gdb::optional<gdb::byte_vector>.
3702         (scan_dyntag_auxv): Adjust.
3703         (enable_break): Adjust.
3704         (svr4_exec_displacement): Adjust.
3705
3706 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3707
3708         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3709         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3710
3711 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3712
3713         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3714         string_vprintf.
3715         * guile/scm-utils.c (gdbscm_printf): Likewise.
3716         * serial.c (serial_printf): Likewise.
3717         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3718
3719 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3720
3721         * stack.c (print_frame): Print frame architecture when printing on
3722         an MI output.
3723         * NEWS: Mention new "arch" attribute in frame output.
3724
3725 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3726
3727         * arch/aarch64.h (aarch64_regnum): Update comment.
3728
3729 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3730
3731         * NEWS: Add SVE to 8.2 section.
3732
3733 2018-08-21  Pedro Alves  <palves@redhat.com>
3734
3735         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3736         out from gdbscm_parse_function_args.
3737         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3738         gdbscm_parse_function_args_1.
3739
3740 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3741
3742         PR gdb/17816
3743         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3744         operator.
3745
3746 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3747
3748         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3749
3750 2018-08-19  Michael Spang  <spang@google.com>
3751
3752         PR gdb/11786
3753         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3754         for PT_TLS segments.
3755
3756 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3757
3758         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3759         dwarf_variable_value.
3760         * dwarf2-frame.c (class dwarf_expr_executor):
3761         Add override for dwarf_variable_value.
3762         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3763         (class symbol_needs_eval_context): Likewise.
3764         (indirect_synthetic_pointer): Add forward declaration.
3765         (sect_variable_value): New function.
3766         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3767         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3768         for DW_OP_GNU_variable_value.
3769
3770 2018-08-16  Tom Tromey  <tom@tromey.com>
3771
3772         * top.c (read_command_file): Update.
3773         (command_line_input): Remove "repeat" argument.
3774         * ada-lang.c (get_selections): Update.
3775         * linespec.c (decode_line_2): Update.
3776         * defs.h (command_line_input): Remove argument.
3777         * cli/cli-script.c (read_next_line): Update.
3778         * python/py-gdb-readline.c: Update.
3779
3780 2018-08-17  Tom Tromey  <tom@tromey.com>
3781
3782         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3783         command_line_input.
3784
3785 2018-08-15  Tom Tromey  <tom@tromey.com>
3786
3787         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3788
3789 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3790
3791         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3792         If used, use find_pc_partial_function to find address range
3793         to disassemble.
3794         * mi/mi-main.c (mi_cmd_list_features): Report
3795         "data-disassemble-a-option" feature.
3796         * NEWS: Mention new -data-disassemble option -a.
3797
3798 2018-08-13  Tom Tromey  <tom@tromey.com>
3799
3800         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3801
3802 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3803
3804         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3805         (aarch64_linux_collect_sve_regset): Likewise.
3806         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3807         * regcache.h (regcache_map_entry_size): New function.
3808
3809 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3810
3811         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3812         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3813         (SVE_HEADER_VL_LENGTH): Likewise.
3814         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3815         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3816         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3817         (SVE_HEADER_SIZE_OFFSET): Likewise.
3818         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3819         (SVE_HEADER_VL_OFFSET): Likewise.
3820         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3821         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3822         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3823         (SVE_HEADER_SIZE): Likewise.
3824         (aarch64_linux_core_read_vq): Add function.
3825         (aarch64_linux_core_read_description): Check for SVE section.
3826
3827 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3828
3829         * aarch64-fbsd-tdep.c
3830         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3831         collect_size.
3832         * aarch64-linux-tdep.c
3833         (aarch64_linux_iterate_over_regset_sections): Likewise.
3834         * alpha-linux-tdep.c
3835         (alpha_linux_iterate_over_regset_sections):
3836         * alpha-nbsd-tdep.c
3837         (alphanbsd_iterate_over_regset_sections): Likewise.
3838         * amd64-fbsd-tdep.c
3839         (amd64fbsd_iterate_over_regset_sections): Likewise.
3840         * amd64-linux-tdep.c
3841         (amd64_linux_iterate_over_regset_sections): Likewise.
3842         * arm-bsd-tdep.c
3843         (armbsd_iterate_over_regset_sections): Likewise.
3844         * arm-fbsd-tdep.c
3845         (arm_fbsd_iterate_over_regset_sections): Likewise.
3846         * arm-linux-tdep.c
3847         (arm_linux_iterate_over_regset_sections): Likewise.
3848         * corelow.c (get_core_registers_cb): Likewise.
3849         (core_target::fetch_registers): Likewise.
3850         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3851         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3852         * gdbarch.h (void): Regenerate.
3853         * gdbarch.sh: Add supply_size and collect_size.
3854         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3855         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3856         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3857         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3858         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3859         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3860         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3861         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3862         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3863         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3864         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3865         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3866         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3867         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3868         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3869         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3870         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3871         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3872         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3873         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3874         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3875         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3876         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3877         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3878         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3879         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3880         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3881         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3882         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3883         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3884
3885 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3886
3887         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3888         with string_printf.
3889
3890 2018-08-10  Keith Seitz  <keiths@redhat.com>
3891
3892         * compile/compile-c-support.c (add_code_header, add_code_footer):
3893         Move into policy class.
3894         (c_push_user_expression, pop_user_expression_nop)
3895         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3896         (compile_program): New host class.
3897         (c_compile_program): New typedef.
3898         (c_compute_porgram): Use c_compile_program.
3899
3900 2018-08-10  Keith Seitz  <keiths@redhat.com>
3901
3902         * compile/compile-internal.h (compile_instance::~compile_instance):
3903         Remove calls to htab_delete.
3904         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3905         * compile.c (compile_instance::compile_instance): Initialize
3906         htab unique pointers.
3907         (compile_instance::get_cached_type, compile_instance::insert_type)
3908         (compile_instance::error_symbol_once): Update for unique_ptr.
3909
3910 2018-08-10  Keith Seitz  <keiths@redhat.com>
3911
3912         * compile/compile-c-symbols.c (struct symbol_error)
3913         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3914         (compile_instance::insert_symbol_error)
3915         (compile_instance::error_symbol_once): Move to ...
3916         * compile/compile.c: ... here.
3917
3918 2018-08-10  Keith Seitz  <keiths@redhat.com>
3919
3920         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3921         instead of `new_compile_instance'.
3922         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3923         Update description.
3924         If the symbol error map is not initialized, create it.
3925         (generate_c_for_for_one_symbol): Do not check/initialize
3926         the symbol error map.
3927         * compile/compile-c-types.c (compile_c_instance): Make a class.
3928         Update all callers.
3929         (compile_instance::compile_instance): Initialize the type cache.
3930         (get_cached_type): New function.
3931         (insert_type): Update description.
3932         (compile_c_instance::m_default_cflags): Define.
3933         (convert_type): Update description.  Use get_cached_type.
3934         (delete_instance): Moved to destructor.
3935         (new_compile_instance): Moved to constructor.
3936         * compile/compile-c.h (compile_c_instance): Make class inheriting
3937         from compile_instance.
3938         <base>: Remove field.
3939         <type_map, symbol_err_map>: Move to base class.
3940         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3941         * compile/compile-internal.h (compile_instance): Make class.
3942         <type_map_t, symbol_err_map_t>: Define.
3943         <fe>: Rename to `m_gcc_fe'.
3944         <scope, block, gcc_target_options>: Add `m_' prefix.
3945         <m_type_map, m_symbol_err_map>: New fields, moved from
3946         compile_c_instance.
3947         <destroy>: Remove.
3948         (convert_type, new_compile_instance): Remove.
3949         * compile/compile.c (cleanup_compile_instance): Remove.
3950         (compile_to_object): Use unique_ptr to eliminate cleanups.
3951         (compile_instance::set_print_callback, compile_instance::version)
3952         (compile_instance::set_verbose)
3953         (compile_instance::set_driver_filename)
3954         (compile_instance::set_triplet_regexp)
3955         (compile_instance::set_arguments)
3956         (compile_instance::set_source_file)
3957         (compile_instance::compile): Define.
3958
3959 2018-08-10  Keith Seitz  <keiths@redhat.com>
3960
3961         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3962         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3963         gcc-c-fe.def to define C plugin.
3964         (delete_instance): Delete `c_plugin'.
3965         (new_compile_instance): Initialize `c_plugin'.
3966         * compile/compile-c.h: Include gcc_c_plugin.h.
3967         (struct compile_c_instance) <c_plugin>: New member.
3968         * gcc-c-plugin.h: New file.
3969         Update all callers with API change.
3970
3971 2018-08-10  Keith Seitz  <keiths@redhat.com>
3972
3973         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3974         (HFILES_NO_SRCDIR): ... to here.
3975         Add compile-internal.h and compile-c.h.
3976         * compile/compile-c-support.c: Include compile-c.h.
3977         * compile/compile-c-symbols.c: Include compile-c.h.
3978         (generate_c_for_variable_locations): Update comment.
3979         * compile/compile-c-types.c: Include compile-c.h.
3980         * compile/compile-c.h: New file -- moved C language declarations
3981         from other files here.
3982         * compile/compile-internal.h: Do not include hashtab.h or
3983         common/enum-flags.h.
3984         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3985         (gcc_convert_symbol, gcc_symbol_address)
3986         (generate_c_for_variable_locations, c_get_mode_for_size)
3987         (c_get_range_decl_name): Definitions moved to compile-c.h.
3988         * compile/compile-loc2c.c: Include compile-c.h.
3989
3990 2018-08-10  Keith Seitz  <keiths@redhat.com>
3991
3992         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3993         (c_symbol_substitution_name): ... this.
3994         Update all callers.
3995
3996 2018-08-10  Keith Seitz  <keiths@redhat.com>
3997
3998         * compile/compile-c-support.c (c_compute_program): Use
3999         unique_xmalloc_ptr to eliminate cleanup.
4000         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4001         Return a unique_xmalloc_ptr and eliminate cleanup.
4002         * compile/compile-internal.h (generate_c_for_variable_locations):
4003         Return unique_xmalloc_ptr and update description.
4004
4005 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4006
4007         * corelow.c (core_target::get_core_register_section): Rename
4008         min_size to section_min_size.
4009
4010 2018-08-09  Jim Wilson  <jimw@sifive.com>
4011
4012         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4013         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4014         * NEWS: Mention new GNU/Linux RISC-V target.
4015         * configure.host: Add riscv*-*-linux*.
4016         * configure.nat: Add riscv*.
4017         * configure.tgt: Add riscv*-*-linux*.
4018         * riscv-linux-nat.c: New file.
4019         * riscv-linux-tdep.c: New file.
4020
4021 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4022
4023         * infrun.c (resume): Make static, add forward declaration.
4024         (proceed): Update header comment.
4025         * infrun.h (resume): Delete declaration.
4026
4027 2018-08-09  Tom Tromey  <tom@tromey.com>
4028
4029         * riscv-tdep.h: Minor formatting fixes.
4030
4031 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4032
4033         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4034         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4035         (test_mkdir_recursive): Likewise.
4036         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4037
4038 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4039
4040         * valarith.c (value_subscripted_rvalue): If an array is not in
4041         memory, and we don't know the upper bound, then we can't know that
4042         the requested element exists or not.
4043
4044 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4045
4046         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4047         (target_options_to_string): Add comment.
4048
4049 2018-08-08  Tom Tromey  <tom@tromey.com>
4050
4051         * unittests/scoped_mmap-selftests.c: Check result of "write".
4052
4053 2018-08-08  Jim Wilson  <jimw@sifive.com>
4054
4055         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4056         (decode_register_index_short): New.
4057         (decode_j_type_insn, decode_cj_type_insn): New.
4058         (decode_b_type_insn, decode_cb_type_insn): New.
4059         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4060         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4061         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4062         is_c_sw_insn instead of is_sw_insn.
4063         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4064         (riscv_software_single_step): New.
4065         * riscv-tdep.h (riscv_software_single_step): Declare.
4066
4067         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4068         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4069
4070 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4071
4072         PR gdb/18050:
4073         * target.c (dispose_inferior): Don't dispose of inferiors that are
4074         already killed.
4075
4076 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4077
4078         * remote.c (remote_target::download_tracepoint): Change char* to
4079         const char*.
4080
4081 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4082
4083         * target.h (target_options_to_string): Return an std::string.
4084         * target.c (str_comma_list_concat_elem): Return void, use
4085         std::string.
4086         (do_option): Likewise.
4087         (target_options_to_string): Return an std::string.
4088         * linux-nat.c (linux_nat_target::wait): Adjust.
4089         * target-debug.h (target_debug_print_options): Adjust.
4090
4091 2018-08-07  Tom Tromey  <tom@tromey.com>
4092
4093         * Makefile.in (CPPFLAGS): New variable.
4094         (INTERNAL_CPPFLAGS): Use it.
4095
4096 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4097
4098         * NEWS: Mention the index cache.
4099
4100 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4101
4102         * common/pathstuff.h (get_standard_cache_dir): New.
4103         * common/pathstuff.c (get_standard_cache_dir): New.
4104         * build-id.h (build_id_to_string): New.
4105         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4106         DEBUG_STR_SUFFIX): Move to here.
4107         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4108         DEBUG_STR_SUFFIX): Move from there.
4109         (write_psymtabs_to_index): Make non-static, add basename
4110         parameter.  Write to temporary files, rename when done.
4111         (save_gdb_index_command): Adjust call to
4112         write_psymtabs_to_index.
4113         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4114         field.
4115         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4116         (get_gdb_index_contents_from_cache): New.
4117         (get_gdb_index_contents_from_cache_dwz): New.
4118         (dwarf2_initialize_objfile): Read index from cache.
4119         (dwarf2_build_psymtabs): Save to index.
4120         * dwarf-index-cache.h: New file.
4121         * dwarf-index-cache.c: New file.
4122         * dwarf-index-write.h: New file.
4123
4124 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4125
4126         * gnulib/aclocal.m4: Re-generate.
4127         * gnulib/config.in: Re-generate.
4128         * gnulib/configure: Re-generate.
4129         * gnulib/import/Makefile.am: Re-generate.
4130         * gnulib/import/Makefile.in: Re-generate.
4131         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4132         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4133         * gnulib/import/m4/mkdir.m4: New file.
4134         * gnulib/import/mkdir.c: New file.
4135         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4136         module.
4137
4138 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4139
4140         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4141         * common/scoped_mmap.c: New file.
4142         * common/scoped_mmap.h (destroy): New method.
4143         (~scoped_mmap, reset): Use destroy.
4144         (scoped_mmap): New move constructor.
4145         (mmap_file): New declaration.
4146         * unittests/scoped_mmap-selftests.c (test_normal,
4147         test_invalid_filename, run_tests): New functions.
4148         (_initialize_scoped_mmap_selftests): Register selftest.
4149
4150 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4151
4152         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4153         (read_gdb_index_from_buffer): ... this.  Remove section
4154         parameter, add buffer parameter.
4155         (get_gdb_index_contents_ftype,
4156         get_gdb_index_contents_dwz_ftype): New typedefs.
4157         (dwarf2_read_gdb_index): Add callback parameters to get the
4158         index contents.
4159         (get_gdb_index_contents_from_section): New.
4160         (dwarf2_initialize_objfile): Update call to
4161         dwarf2_read_gdb_index.
4162
4163 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4164
4165         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4166         (gdb_open_cloexec): Likewise.
4167         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4168         (commandline_from_pid): Likewise.
4169         (linux_xfer_osdata_threads): Likewise.
4170         (linux_xfer_osdata_fds): Likewise.
4171         * ada-lang.c (is_package_name): Likewise.
4172         * auxv.c (procfs_xfer_auxv): Likewise.
4173         * breakpoint.c (print_one_breakpoint_location): Use
4174         uiout::field_fmt.
4175         (print_one_catch_solib): Use string_printf.
4176         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4177         (add_pe_forwarded_sym): Likewise.
4178         * dwarf2read.c (create_type_unit_group): Likewise.
4179         (build_error_marker_type): Likewise.
4180         * infcall.c (get_function_name): Likewise.
4181         * valprint.c (print_converted_chars_to_obstack): Likewise.
4182         * xtensa-tdep.c (xtensa_register_type): Likewise.
4183
4184 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4185
4186         * remote.c (remote_target::download_tracepoint): Fix format
4187         string errors.
4188
4189 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4190
4191         * tracefile.c: Include common/byte-vector.h.
4192         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4193         with trace_regblock_size if needed.  Update uses of buf.
4194
4195 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4196
4197         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4198         std::vector<unsigned char>.
4199         * tracepoint.c (collection_list::collection_list): Remove
4200         m_regs_mask initializer from initializer list.  Resize
4201         m_regs_mask using the largest remote register number.
4202         (collection_list::add_remote_register): Remove size check on
4203         m_regs_mask.  Use at to access element.
4204         (collection_list::stringify): Change type of temp_buf to
4205         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4206         stringify the register mask.  Use pack_hex_byte for the register
4207         mask.
4208
4209 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4210
4211         * tracepoint.h (class collection_list) <add_register>: Remove.
4212         <add_remote_register, add_ax_registers, add_local_register>:
4213         Declare.
4214         <add_memrange>: Add scope parameter.
4215         * tracepoint.c (encode_actions_1): Likewise.
4216         (collection_list::add_register): Rename to ...
4217         (collection_list::add_remote_register): ... this.  Update
4218         comment.
4219         (collection_list::add_ax_registers, add_local_register): New
4220         methods.
4221         (collection_list::add_memrange): Add scope parameter.  Call
4222         add_local_register instead of add_register.
4223         (finalize_tracepoint_aexpr): New function.
4224         (collection_list::collect_symbol): Update calls to add_memrange.
4225         Call add_local_register instead of add_register.  Call
4226         add_ax_registers.  Call finalize_tracepoint_aexpr.
4227         (encode_actions_1): Get remote regnos for $reg action.  Call
4228         add_remote_register, add_ax_registers, and add_local_register.
4229         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4230         (validate_actionline): Call finalize_tracepoint_aexpr.
4231
4232 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4233
4234         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4235         Replace array buf with gdb::char_vector buf, of size
4236         get_remote_packet_size ().  Replace references to buf and
4237         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4238         and xsnprintf with snprintf.  Raise errors if the buffer is too
4239         small.
4240
4241 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4242
4243         * remote.c (remote_target::download_tracepoint): Fix the has_more
4244         predicate in the QTDP action list iteration.
4245
4246 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4247
4248         * remote.c (remote_target::download_tracepoint): Fix indentation
4249         in for block.
4250
4251 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4252
4253         * proc-api.c (_initialize_proc_api): Remove c, unused.
4254         * procfs.c (procfs_init_inferior): Remove signals, unused.
4255         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4256         unused.
4257
4258 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4259             Andrew Burgess  <andrew.burgess@embecosm.com>
4260
4261         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4262         'W_STOPCODE (0)' as this could be ambiguous.
4263
4264 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4265
4266         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4267         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4268         "ai_socktype").
4269
4270 2018-08-02  Tom Tromey  <tom@tromey.com>
4271
4272         PR symtab/16842.
4273         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4274         symbols.
4275         (process_structure_scope): Likewise.
4276
4277 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4278
4279         PR gdb/22629:
4280         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4281         kill inferior.
4282
4283 2018-08-02  Tom Tromey  <tom@tromey.com>
4284
4285         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4286         (darwin_suspend_inferior, darwin_resume_inferior)
4287         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4288         (darwin_check_new_threads): Check result of get_darwin_inferior.
4289
4290 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4291
4292         GDB 8.1.1 released.
4293
4294 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4295
4296         * varobj.c (varobj_get_path_expr_parent): Report an error if
4297         parent is a dynamic varobj.
4298
4299 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4300
4301         * gnulib/aclocal.m4: Re-generate.
4302         * gnulib/config.in: Re-generate.
4303         * gnulib/configure: Re-generate.
4304         * gnulib/import/Makefile.in: Re-generate.
4305         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4306         * gnulib/import/m4/onceonly.m4: Re-generate.
4307
4308 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4309
4310         * target-descriptions.c (struct xml_test_tdesc): New.
4311         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4312         (record_xml_tdesc): Update.
4313         (maintenance_check_xml_descriptions): Update.
4314         * target-descriptions.h (record_xml_tdesc): Update comment.
4315
4316 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4317
4318         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4319         checking array bounds are defined.
4320
4321 2018-07-30  Tom Tromey  <tom@tromey.com>
4322
4323         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4324         irreflexivity violation.
4325
4326 2018-07-30  Tom Tromey  <tom@tromey.com>
4327
4328         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4329         * value.c (unpack_long): Remove lint code.
4330         * valops.c (value_ind): Remove lint code.
4331         * valarith.c (value_x_binop, value_x_unop, value_equal)
4332         (value_pos): Remove lint code.
4333
4334 2018-07-28  Tom de Vries  <tdevries@suse.de>
4335
4336         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4337         with undefined upper bound as <optimized out>.
4338
4339 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4340
4341         * gcore.in: Rename variable "name" to "prefix".  Expand
4342         "usage" text.
4343
4344 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4345
4346         * windows-nat.c (windows_nat_target::create_inferior): Update to
4347         call close() in global namespace.
4348
4349 2018-07-26  Tom Tromey  <tom@tromey.com>
4350
4351         * dwarf-index-write.c (add_address_entry): Don't add objfile
4352         offsets.
4353         * dbxread.c (find_stab_function): Rename from
4354         find_stab_function_addr.  Return a bound_minimal_symbol.
4355         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4356         Don't add objfile offsets.
4357         (end_psymtab): Use raw_text_low, raw_text_high,
4358         MSYMBOL_VALUE_RAW_ADDRESS.
4359         (read_ofile_symtab): Update.
4360         (process_one_symbol): Update.
4361         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4362         offsets.
4363         (dw2_relocate): Remove.
4364         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4365         searching addrmap.
4366         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4367         Update.
4368         (process_psymtab_comp_unit_reader, add_partial_symbol)
4369         (add_partial_subprogram, dwarf2_ranges_read): Update.
4370         (load_partial_dies): Update.
4371         (add_address_entry): Don't add objfile offsets.
4372         (dwarf2_build_include_psymtabs): Update.
4373         (create_addrmap_from_aranges): Don't add objfile offsets.
4374         (dw2_find_pc_sect_compunit_symtab): Update.
4375         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4376         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4377         Update.
4378         (parse_partial_symbols): Don't add objfile offsets.  Use
4379         raw_text_low, raw_text_high.  Update.
4380         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4381         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4382         or call 'relocate' quick function.  Clear psymbol_map.
4383         * psympriv.h (struct partial_symbol) <address>: Add section
4384         offset.
4385         <set_unrelocated_address>: Rename from set_address.
4386         <raw_text_low, raw_text_high>: New methods.
4387         <text_low, text_high>: Add objfile parameter.
4388         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4389         set_unrelocated_address.
4390         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4391         (find_pc_psymbol): Update.
4392         (fixup_psymbol_section, relocate_psymtabs): Remove.
4393         (dump_psymtab, psym_functions): Update.
4394         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4395         parameter.
4396         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4397         (start_psymtab_common): Update.
4398         * symfile-debug.c (debug_qf_relocate): Remove.
4399         (debug_sym_quick_functions): Update.
4400         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4401         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4402         Update.
4403
4404 2018-07-26  Tom Tromey  <tromey@redhat.com>
4405
4406         * dbxread.c (end_psymtab): Use text_high_valid and
4407         text_low_valid.
4408         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4409         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4410         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4411         Update comment.
4412         <text_low_valid, text_high_valid>: New fields.
4413         <set_text_low, set_text_high>: Update.
4414         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4415
4416 2018-07-26  Tom Tromey  <tom@tromey.com>
4417
4418         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4419         Update.
4420         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4421         textlow and texthigh fields.
4422         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4423         Update.
4424         * mdebugread.c (parse_lines, parse_partial_symbols)
4425         (psymtab_to_symtab_1): Update.
4426         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4427         Rename fields.  Update comment.  Now private.
4428         <text_low, text_high, set_text_low, set_text_high>: New methods.
4429         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4430         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4431         (start_psymtab_common, maintenance_info_psymtabs)
4432         (maintenance_check_psymtabs): Update.
4433         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4434         texthigh fields.
4435         (scan_xcoff_symtab): Update.
4436
4437 2018-07-26  Tom Tromey  <tromey@redhat.com>
4438
4439         * psympriv.h (struct partial_symbol) <unrelocated_address,
4440         address, set_address>: New methods.
4441         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4442         (fixup_psymbol_section, relocate_psymtabs): Update.
4443         (print_partial_symbols): Add 'objfile' parameter.  Update.
4444         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4445         Update.
4446
4447 2018-07-26  Tom Tromey  <tom@tromey.com>
4448
4449         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4450         (debug_names::write_psymbols): Update.
4451         * psympriv.h (struct partial_symbol): Derive from
4452         general_symbol_info.
4453         <obj_section>: New method.
4454         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4455         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4456         (find_pc_sect_psymbol, fixup_psymbol_section)
4457         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4458         (print_partial_symbols, recursively_search_psymtabs)
4459         (compare_psymbols, psymbol_hash, psymbol_compare)
4460         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4461         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4462
4463 2018-07-26  Tom Tromey  <tromey@redhat.com>
4464
4465         * dbxread.c (end_psymtab): Remove dead code.
4466
4467 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4468
4469         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4470         DWARF unwinders are disabled.
4471         * dwarf2-frame.c: Add dwarf2read.h include.
4472         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4473         disabled.
4474         (dwarf2_frame_unwinders_enabled_p): Define.
4475         (show_dwarf_unwinders_enabled_p): New function.
4476         (_initialize_dwarf2_frame): Register switch to control DWARF
4477         unwinder use.
4478         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4479         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4480         (show_dwarf_cmdlist): Remove static keyword.
4481         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4482         (show_dwarf_cmdlist): Declare.
4483         * NEWS: Document new feature.
4484
4485 2018-07-26  Tom de Vries  <tdevries@suse.de>
4486
4487         PR breakpoints/23366
4488         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4489
4490 2018-07-26  Tom de Vries  <tdevries@suse.de>
4491
4492         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4493         DW_AT_count can't be translated to a dynamic prop.
4494
4495 2018-07-25  Tom de Vries  <tdevries@suse.de>
4496
4497         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4498         try/catch.
4499
4500 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4501
4502         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4503
4504 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4505
4506         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4507
4508 2018-07-24  Keith Seitz  <keiths@redhat.comt
4509
4510         PR symtab/23010
4511         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4512         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4513         instead of add_symbol_to_list.
4514         (read_file_scope): Call prepare_one_comp_unit before reading
4515         any other DIEs.
4516
4517 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4518
4519         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4520
4521 2018-07-24  Tom Tromey  <tom@tromey.com>
4522
4523         * utils.c (malloc, realloc, free): Don't declare.
4524         * configure, config.in: Rebuild.
4525         * configure.ac: Don't check for declarations of free, malloc, or
4526         realloc.
4527
4528 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4529
4530         * aarch64-linux-nat.c
4531         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4532         variable.
4533         * arm-linux-nat.c (fetch_regs): Likewise.
4534         (store_regs): Likewise.
4535         (fetch_vfp_regs): Likewise.
4536         (store_vfp_regs): Likewise.
4537         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4538         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4539         (arm_linux_nat_target::insert_watchpoint): Likewise.
4540         (arm_linux_nat_target::remove_watchpoint): Likewise.
4541         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4542         Likewise.
4543         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4544         Likewise.
4545         * ppc-linux-nat.c (fetch_register): Likewise.
4546         (fetch_all_gp_regs): Likewise.
4547         (fetch_ppc_registers): Likewise.
4548         (store_all_gp_regs): Likewise.
4549         (store_ppc_registers): Likewise.
4550         (hwdebug_insert_point): Likewise.
4551         (can_use_watchpoint_cond_accel): Likewise.
4552         * remote-sim.c (gdb_os_write_stdout): Likewise.
4553
4554 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4555             Tom Tromey  <tom@tromey.com>
4556
4557         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4558         test for it.
4559         * configure: Rebuild.
4560
4561 2018-07-22  Tom Tromey  <tom@tromey.com>
4562
4563         * regformats/regdat.sh: Define xmltarget_${name} inside
4564         #ifndef IN_PROCESS_AGENT.
4565
4566 2018-07-22  Tom Tromey  <tom@tromey.com>
4567
4568         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4569
4570 2018-07-22  Tom Tromey  <tom@tromey.com>
4571
4572         * symfile.c (reread_symbols): Notify iter, not objfile.
4573
4574 2018-07-22  Tom Tromey  <tom@tromey.com>
4575
4576         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4577         Use arch_ops.
4578         (ravenscar_thread_target::prepare_to_store): Likewise.
4579
4580 2018-07-22  Tom Tromey  <tom@tromey.com>
4581
4582         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4583         unused variable.  Call value_fetch_lazy when needed.
4584         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4585         Remove unused variable.  Call value_fetch_lazy when needed.
4586
4587 2018-07-22  Tom Tromey  <tom@tromey.com>
4588
4589         * m32c-tdep.c (mark_dma): Return void.
4590         (make_regs): Remove unused declarations.
4591
4592 2018-07-22  Tom Tromey  <tom@tromey.com>
4593
4594         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4595         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4596         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4597         bkscm_get_valid_block_smob_arg_unsafe for effect.
4598
4599 2018-07-22  Tom Tromey  <tom@tromey.com>
4600
4601         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4602         value_type.
4603
4604 2018-07-22  Tom Tromey  <tom@tromey.com>
4605
4606         * windows-nat.c (saved_context): Conditionally define.
4607         * remote.c (remote_target::remote_btrace_maybe_reopen):
4608         Conditionally declare "warned".
4609         * inflow.c (sigquit_ours): Conditionally define.
4610         (new_tty): Move "tty" declaration inside #if.
4611         * guile/guile.c (guile_datadir): Conditionally define.
4612         * charset.c (set_be_le_names): Move some declarations inside #if.
4613         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4614         #if.
4615         (parse_xml_btrace_conf): Likewise.
4616
4617 2018-07-22  Tom Tromey  <tom@tromey.com>
4618
4619         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4620
4621 2018-07-22  Tom Tromey  <tom@tromey.com>
4622
4623         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4624         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4625         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4626         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4627         * stack.c (frame_apply_level_command): Remove unused variable.
4628         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4629         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4630         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4631         unused variable.
4632         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4633         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4634         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4635         variable.
4636         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4637         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4638         variable.
4639         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4640         Remove unused variable.
4641         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4642         variable.
4643         * common/tdesc.c (print_xml_feature::visit): Remove unused
4644         variable.
4645         * compile/compile-object-load.c (store_regs): Remove unused
4646         variables.
4647         * complaints.c (clear_complaints): Remove unused variable.
4648         * corelow.c (core_target_open): Remove unused variable.
4649         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4650         variable.
4651         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4652         variable.
4653         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4654         variable.
4655         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4656         variable.
4657         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4658         variable.
4659         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4660         variable.
4661         * ia64-tdep.c (examine_prologue): Remove unused variable.
4662         * infcall.c (run_inferior_call): Remove unused variable.
4663         * inferior.c (exit_inferior): Remove unused variable.
4664         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4665         * linespec.c (decode_line_2): Remove unused variable.
4666         * linux-nat.c (super_close): Remove.
4667         * linux-tdep.c (linux_info_proc): Remove unused variable.
4668         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4669         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4670         Remove unused variable.
4671         * parse.c (find_minsym_type_and_address): Remove unused variable.
4672         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4673         variable.
4674         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4675         variable.
4676         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4677         variables.
4678         * record-btrace.c (record_btrace_target::store_registers): Remove
4679         unused variable.
4680         (cmd_show_record_btrace_cpu): Remove unused variable.
4681         * riscv-tdep.c (riscv_register_reggroup_p)
4682         (riscv_push_dummy_call, riscv_return_value): Remove unused
4683         variable.
4684         * rust-exp.y (literal): Remove unused variable.
4685         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4686         unused variable.
4687         <STRUCTOP_ANONYMOUS>: Likewise.
4688         * s390-linux-tdep.c (s390_linux_init_abi_31)
4689         (s390_linux_init_abi_64): Remove unused variable.
4690         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4691         (file_select_thread, net_windows_open, _initialize_ser_windows):
4692         Remove unused variables.
4693         * symtab.c (find_pc_sect_line): Remove unused variable.
4694         * target-memory.c (compute_garbled_blocks): Remove unused
4695         variable.
4696         (target_write_memory_blocks): Remove unused variable.
4697         * target.c (target_stack::unpush): Remove unused variables.
4698         * tracepoint.c (start_tracing, all_tracepoint_actions)
4699         (merge_uploaded_trace_state_variables)
4700         (print_one_static_tracepoint_marker): Remove unused variable.
4701         * unittests/basic_string_view/element_access/char/1.cc (test01):
4702         Remove unused variable.
4703         * windows-nat.c (windows_continue, windows_add_all_dlls)
4704         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4705         Remove unused variables.
4706
4707 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4708
4709         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4710         attr_profile in HAVE_ELF.
4711         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4712         HAVE_ELF.
4713
4714 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4715
4716         * frame.c (frame_register_unwind): Change parameter name.
4717         (frame_unwind_register): Likewise.
4718         (frame_unwind_register_value): Likewise.
4719         (frame_unwind_register_signed): Likewise.
4720         (frame_unwind_register_unsigned): Likewise.
4721         * frame.h (frame_register_unwind): Likewise.
4722         (frame_unwind_register): Likewise.
4723         (frame_unwind_register_value): Likewise.
4724         (frame_unwind_register_signed): Likewise.
4725         (frame_unwind_register_unsigned): Likewise.
4726         (frame_unwind_arch): Likewise.
4727
4728 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4729
4730         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4731         ISA maintenance.
4732
4733 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4734
4735         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4736         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4737         hand.
4738
4739 2018-07-20  Keith Seitz  <keiths@redhat.com>
4740
4741         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4742         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4743         m_compunit_symtab, m_language>: Add "m_" prefix.
4744         Update all uses.
4745         * buildsym.c: Update all uses.
4746
4747 2018-07-20  Tom Tromey  <tom@tromey.com>
4748
4749         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4750         * buildsym.h (record_line_ftype): Remove typedef.
4751
4752 2018-07-20  Tom Tromey  <tom@tromey.com>
4753
4754         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4755         (end_expandable_symtab): Likewise.
4756         (end_symtab_get_static_block): Likewise.
4757         (end_symtab_from_static_block): Likewise.
4758         * buildsym-legacy.c (augment_type_symtab): Remove.
4759         (end_expandable_symtab): Remove.
4760         (end_symtab_get_static_block): Remove.
4761         (end_symtab_from_static_block): Remove.
4762
4763 2018-07-20  Tom Tromey  <tom@tromey.com>
4764
4765         * dwarf2read.c: Include buildsym.h.
4766         (struct dwarf2_cu) <builder>: New method.
4767         (fixup_go_packaging): Update.
4768         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4769         use scoped_free_pendings.
4770         (using_directives): Add "cu" parameter, remove "language".
4771         (read_import_statement, setup_type_unit_groups, )
4772         (read_func_scope, read_lexical_block_scope)
4773         (dwarf2_record_block_ranges, read_namespace): Update.
4774         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4775         (lnp_state_machine::handle_end_sequence): Update.
4776         (class lnp_state_machine) <m_cu>: New member.
4777         <m_record_line_callback>: Remove.
4778         <m_currently_recording_lines>: New member.
4779         (lnp_state_machine::handle_set_file): Update.
4780         (noop_record_line): Remove.
4781         (dwarf_record_line_p): Add cu parameter.
4782         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4783         (lnp_state_machine::record_line)
4784         (lnp_state_machine::lnp_state_machine)
4785         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4786         (dwarf_decode_lines): Update.
4787         (dwarf2_start_subfile): Add cu parameter.
4788         (dwarf2_start_symtab, new_symbol): Update.
4789         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4790         Remove dwarf2_per_objfile parameter.
4791         (dwarf_decode_macros): Update.
4792
4793 2018-07-20  Tom Tromey  <tom@tromey.com>
4794
4795         * stabsread.c (define_symbol): Update.
4796         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4797         * dwarf2read.c (new_symbol): Update.
4798         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4799         * cp-namespace.c: Include buildsym.h.
4800         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4801         * buildsym-legacy.c (get_buildsym_compunit): New function.
4802
4803 2018-07-20  Tom Tromey  <tom@tromey.com>
4804
4805         * xcoffread.c: Include buildsym-legacy.h.
4806         * windows-nat.c: Include buildsym-legacy.h.
4807         * stabsread.c: Include buildsym-legacy.h.
4808         * mdebugread.c: Include buildsym-legacy.h.
4809         * buildsym-legacy.h: New file.
4810         * buildsym-legacy.c: New file, from buildsym.c.
4811         * go32-nat.c: Include buildsym-legacy.h.
4812         * dwarf2read.c: Include buildsym-legacy.h.
4813         * dbxread.c: Include buildsym-legacy.h.
4814         * cp-namespace.c: Include buildsym-legacy.h.
4815         * coffread.c: Include buildsym-legacy.h.
4816         * buildsym.h: Move some contents to buildsym-legacy.h.
4817         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4818         buildsym-legacy.c.
4819         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4820
4821 2018-07-20  Tom Tromey  <tom@tromey.com>
4822
4823         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4824         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4825         (buildsym_compunit::buildsym_compunit)
4826         (buildsym_compunit::~buildsym_compunit)
4827         (buildsym_compunit::get_macro_table): Define.
4828
4829 2018-07-20  Tom Tromey  <tom@tromey.com>
4830
4831         * buildsym.c (reset_symtab_globals): Remove.
4832         (buildsym_compunit::end_symtab_from_static_block): Update.
4833         (buildsym_compunit::augment_type_symtab): Update.
4834         (end_symtab_from_static_block): Call free_buildsym_compunit.
4835         (augment_type_symtab, end_symtab, end_expandable_symtab):
4836         Likewise.
4837
4838 2018-07-20  Tom Tromey  <tom@tromey.com>
4839
4840         * arch-utils.c: Do not include buildsym.h.
4841         * mipsread.c: Do not include buildsym.h.
4842         * machoread.c: Do not include buildsym.h.
4843         * elfread.c: Do not include buildsym.h.
4844
4845 2018-07-20  Tom Tromey  <tom@tromey.com>
4846
4847         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4848         initialization.
4849         (buildsym_compunit): Add new constructor.
4850         (struct buildsym_compunit) <get_last_source_file, finish_block,
4851         record_block_range, start_subfile, patch_subfile_names,
4852         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4853         set_last_source_start_addr, get_last_source_start_addr,
4854         get_local_using_directives, set_local_using_directives,
4855         get_global_using_directives, outermost_context_p,
4856         get_current_context_stack, get_context_stack_depth,
4857         get_current_subfile, get_local_symbols, get_file_symbols,
4858         get_global_symbols, record_debugformat, record_producer,
4859         push_context, pop_context, end_symtab_get_static_block,
4860         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4861         New public methods.
4862         <record_pending_block, finish_block_internal, make_blockvector,
4863         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4864         private methods.
4865         Update all users.
4866
4867 2018-05-22  Tom Tromey  <tom@tromey.com>
4868
4869         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4870         parameter.
4871         (finish_block_internal): Update.
4872
4873 2018-07-20  Tom Tromey  <tom@tromey.com>
4874
4875         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4876         parameter.
4877         (finish_block_internal): Update.
4878
4879 2018-07-20  Tom Tromey  <tom@tromey.com>
4880
4881         * buildsym.h (EXTERN): Don't define or undef.
4882         * buildsym.c (EXTERN): Don't define.
4883
4884 2018-07-20  Tom Tromey  <tom@tromey.com>
4885
4886         * buildsym.c: Remove TODO comment.
4887
4888 2018-07-20  Tom Tromey  <tom@tromey.com>
4889
4890         * coffread.c (coff_symtab_read): Update.
4891         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4892         (xcoff_new_init): Update.
4893         * mipsread.c (mipscoff_new_init): Update.
4894         * mdebugread.c (mdebug_build_psymtabs): Update.
4895         * elfread.c (elf_new_init): Update.
4896         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4897         Update.
4898         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4899         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4900         (stabsect_build_psymtabs): Update.
4901         * buildsym.h (buildsym_init): Don't declare.
4902         * buildsym.c: Update comment.
4903         (prepare_for_building): Remove.
4904         (start_symtab, restart_symtab): Update.
4905         (reset_symtab_globals): Update comment.
4906         (buildsym_init): Remove.
4907
4908 2018-07-20  Tom Tromey  <tom@tromey.com>
4909
4910         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4911         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4912         (read_enum_type, common_block_start, common_block_end)
4913         (cleanup_undefined_types_1, finish_global_stabs): Update.
4914         * mdebugread.c (psymtab_to_symtab_1): Update.
4915         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4916         (read_lexical_block_scope, new_symbol): Update.
4917         * dbxread.c (process_one_symbol): Update.
4918         * coffread.c (coff_symtab_read, process_coff_symbol)
4919         (coff_read_enum_type): Update.
4920         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4921         declare.
4922         (get_local_symbols, get_file_symbols, get_global_symbols): New
4923         functions.
4924         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4925         m_global_symbols.
4926         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4927         (~scoped_free_pendings): Update.
4928         (finish_block, prepare_for_building, reset_symtab_globals)
4929         (end_symtab_get_static_block, end_symtab_with_blockvector)
4930         (augment_type_symtab, push_context): Update.
4931         (get_local_symbols, get_file_symbols, get_global_symbols): New
4932         functions.
4933         (buildsym_init): Update.
4934
4935 2018-07-20  Tom Tromey  <tom@tromey.com>
4936
4937         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4938         (process_full_type_unit): Likewise.
4939         (dwarf2_start_symtab): Set list_in_scope.
4940
4941 2018-07-20  Tom Tromey  <tom@tromey.com>
4942
4943         * dwarf2read.c (process_psymtab_comp_unit_reader)
4944         (build_type_psymtabs_reader): Do not set list_in_scope.
4945
4946 2018-07-20  Tom Tromey  <tom@tromey.com>
4947
4948         * buildsym.c (free_pendings): Remove.
4949         (add_symbol_to_list, scoped_free_pendings)
4950         (finish_block_internal, buildsym_init): Update.
4951
4952 2018-07-20  Tom Tromey  <tom@tromey.com>
4953
4954         * xcoffread.c (read_xcoff_symtab): Update.
4955         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4956         Update.
4957         * dbxread.c (process_one_symbol): Update.
4958         * coffread.c (coff_symtab_read): Update.
4959         * buildsym.h (finish_block): Update.
4960         * buildsym.c (finish_block): Remove "listhead" argument.
4961         (end_symtab_get_static_block): Update.
4962
4963 2018-07-20  Tom Tromey  <tom@tromey.com>
4964
4965         * buildsym.h (class scoped_free_pendings): Remove constructor.
4966         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4967         method.
4968         <m_pending_block_obstack, m_pending_blocks>: New members.
4969         (pending_block_obstack, pending_blocks): Remove.
4970         (scoped_free_pendings::scoped_free_pendings): Default.
4971         (~scoped_free_pendings): Update.
4972         (free_pending_blocks): Remove.
4973         (finish_block_internal, record_pending_block, make_blockvector)
4974         (end_symtab_get_static_block, augment_type_symtab, push_context)
4975         (buildsym_init): Update.
4976
4977 2018-07-20  Tom Tromey  <tom@tromey.com>
4978
4979         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4980         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4981         members.
4982         (pending_addrmap, pending_addrmap_obstack)
4983         (pending_addrmap_interesting): Remove.
4984         (scoped_free_pendings, record_block_range, make_blockvector)
4985         (prepare_for_building, reset_symtab_globals, buildsym_init):
4986         Update.
4987
4988 2018-07-20  Tom Tromey  <tom@tromey.com>
4989
4990         * xcoffread.c (process_linenos): Update.
4991         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4992         * mdebugread.c (psymtab_to_symtab_1): Update.
4993         * dwarf2read.c (setup_type_unit_groups)
4994         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4995         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4996         * dbxread.c (process_one_symbol): Update.
4997         * coffread.c (coff_symtab_read, enter_linenos)
4998         (process_coff_symbol): Update.
4999         * buildsym.h (current_subfile): Don't declare.
5000         (get_current_subfile): Declare.
5001         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5002         member.
5003         (start_subfile, free_buildsym_compunit, push_subfile)
5004         (prepare_for_building, start_symtab): Update.
5005         (get_current_subfile): New function.
5006
5007 2018-07-20  Tom Tromey  <tom@tromey.com>
5008
5009         * coffread.c (coff_symtab_read): Update.
5010         * xcoffread.c (read_xcoff_symtab): Update.
5011         * dwarf2read.c (new_symbol): Update.
5012         (read_func_scope, read_lexical_block_scope): Update.
5013         * dbxread.c (process_one_symbol): Update.
5014         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5015         (outermost_context_p): Remove macro.
5016         (outermost_context_p, get_current_context_stack)
5017         (get_context_stack_depth): Declare.
5018         (pop_context): Return struct context_stack.
5019         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5020         member.
5021         (context_stack_size): Remove.
5022         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5023         (prepare_for_building, end_symtab_get_static_block)
5024         (augment_type_symtab, push_context): Update.
5025         (pop_context): Return struct context_stack.
5026         (outermost_context_p, get_current_context_stack)
5027         (get_context_stack_depth): New functions.
5028         (buildsym_init): Update.
5029
5030 2018-07-20  Tom Tromey  <tom@tromey.com>
5031
5032         * rust-exp.y: Now a pure parser.  Update all rules.
5033         (%union): Move earlier.
5034         (current_parser, work_obstack): Remove globals.
5035         (rust_parser, ~rust_parser): Update.
5036         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5037         lex_character, lex_number, lex_string, lex_identifier,
5038         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5039         convert_name, convert_params_to_expression,
5040         convert_ast_to_expression, ast_basic_type, ast_operation,
5041         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5042         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5043         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5044         ast_array_type, ast_slice_type, ast_reference_type,
5045         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5046         (rust_parse): Update.
5047         (rustyyerror, rustyylex): Add parser parameter.
5048         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5049         (rust_lex_stringish_test, rust_lex_test_sequence)
5050         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5051         (rust_lex_test_push_back, rust_lex_tests): Update.
5052
5053 2018-07-19  Pedro Alves  <palves@redhat.com>
5054
5055         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5056         gdb::unique_xmalloc_ptr.
5057         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5058         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5059         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5060         copy-initialization.
5061         * guile/scm-pretty-print.c (ppscm_print_children): Use
5062         gdb::unique_xmalloc_ptr instead of cleanups.
5063         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5064         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5065         gdb::unique_xmalloc_ptr.
5066         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5067         Adjust to use gdb::unique_xmalloc_ptr.
5068         * guile/scm-utils.c (extract_arg): Adjust.
5069         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5070         gdb::unique_xmalloc_ptr instead of a cleanup.
5071
5072 2018-07-19  Tom Tromey  <tom@tromey.com>
5073
5074         * utils.c (do_value_free_to_mark)
5075         (make_cleanup_value_free_to_mark): Remove.
5076         * utils.h (make_cleanup_value_free_to_mark): Remove.
5077
5078 2018-07-19  Pedro Alves  <palves@redhat.com>
5079
5080         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5081         forwarding reference.
5082
5083 2018-07-18  Pedro Alves  <palves@redhat.com>
5084
5085         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5086         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5087         cleanup.
5088
5089 2018-07-18  Pedro Alves  <palves@redhat.com>
5090
5091         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5092         exceptions.
5093         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5094         (gdbscm_wrap): New.
5095         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5096         directly instead of a cleanup.
5097         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5098         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5099         (vlscm_binop_gdbthrow): New, factored out from ...
5100         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5101         (vlscm_rich_compare): Use gdbscm_wrap.
5102         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5103         instead of a cleanup.
5104         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5105         cleanup.
5106         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5107         Use xfree directly instead of a cleanup.
5108         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5109         Adjust to use gdbscm_wrap and scoped_value_mark.
5110         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5111         (gdbscm_value_address, gdbscm_value_dereference)
5112         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5113         scoped_value_mark.
5114         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5115         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5116         scoped_value_mark.
5117         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5118         gdbscm_wrap and scoped_value_mark.
5119         (gdbscm_value_to_string): Use xfree directly instead of a
5120         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5121         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5122         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5123         scoped_value_mark.
5124         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5125         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5126         scoped_value_mark.
5127         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5128         gdbscm_wrap.
5129
5130 2018-07-18  Tom de Vries  <tdevries@suse.de>
5131
5132         * findvar.c (default_read_var_value): Also resolve dynamic type for
5133         LOC_OPTIMIZED_OUT vars.
5134
5135 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5136
5137         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5138         decoding.
5139
5140 2018-07-17  Tom Tromey  <tom@tromey.com>
5141
5142         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5143         (compute_enum_list, pascm_set_param_value_x)
5144         (gdbscm_parameter_value): Update.
5145         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5146         (gdbscm_scm_to_host_string): Update.
5147         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5148         Update.
5149         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5150         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5151         * guile/scm-string.c (gdbscm_scm_to_string): Return
5152         unique_xmalloc_ptr.
5153         (gdbscm_scm_to_host_string): Likewise.
5154
5155 2018-07-17  Tom Tromey  <tom@tromey.com>
5156
5157         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5158         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5159         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5160         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5161         unique_xmalloc_ptr.
5162
5163 2018-07-17  Tom Tromey  <tom@tromey.com>
5164
5165         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5166         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5167         Update.
5168         * guile/scm-cmd.c (cmdscm_function): Update.
5169         * guile/scm-pretty-print.c
5170         (ppscm_print_exception_unless_memory_error): Update.
5171         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5172         Return unique_xmalloc_ptr.
5173
5174 2018-07-17  Tom Tromey  <tom@tromey.com>
5175
5176         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5177         Use string_printf.
5178
5179 2018-07-17  Jim Wilson  <jimw@sifive.com>
5180
5181         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5182         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5183         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5184         unecessary braces after EF_RISCV_RVC test.  Delete call to
5185         set_gdbarch_decr_pc_after_break.
5186
5187         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5188         RISCV_LAST_FP_REGNUM + 1.
5189         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5190
5191 2018-07-17  Tom Tromey  <tom@tromey.com>
5192
5193         * configure.ac: Remove --disable-gdbcli.
5194         * configure: Rebuild.
5195         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5196         (SUBDIR_CLI_CFLAGS): Remove.
5197         (SFILES): Use SUBDIR_CLI_SRCS.
5198         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5199
5200 2018-07-17  Tom Tromey  <tom@tromey.com>
5201
5202         PR gdb/18624:
5203         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5204
5205 2018-07-16  Jim Wilson  <jimw@sifive.com>
5206
5207         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5208
5209 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5210
5211         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5212         variable.
5213         (libunwind_frame_sniffer): Likewise.
5214         (libunwind_frame_prev_register): Likewise.
5215         (libunwind_sigtramp_frame_sniffer): Likewise.
5216         * ia64-tdep.c (ia64_access_reg): Likewise.
5217         (ia64_access_rse_reg): Likewise.
5218         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5219         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5220
5221 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5222
5223         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5224
5225 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5226
5227         * remote-sim.c (gdbsim_target::close,
5228         gdbsim_target::mourn_inferior): Remove unused variables.
5229
5230 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5231
5232         * ia64-tdep.c (ktab_buf): New global.
5233         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5234         (get_kernel_table): Adjust.
5235
5236 2018-07-16  Tom Tromey  <tom@tromey.com>
5237
5238         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5239         * dwarf2read.c (using_directives, new_symbol): Use
5240         outermost_context_p.
5241         * dbxread.c (process_one_symbol): Use outermost_context_p.
5242         * coffread.c (coff_symtab_read): Use outermost_context_p.
5243
5244 2018-07-16  Tom Tromey  <tom@tromey.com>
5245
5246         * dwarf2read.c (using_directives, read_func_scope)
5247         (read_lexical_block_scope): Update.
5248         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5249         * buildsym.h (local_using_directives, global_using_directives):
5250         Don't declare.
5251         (get_local_using_directives, set_local_using_directives)
5252         (get_global_using_directives): Declare.
5253         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5254         m_global_using_directives>: New members.
5255         (finish_block_internal, prepare_for_building)
5256         (reset_symtab_globals, end_symtab_get_static_block)
5257         (push_context): Update.
5258         (get_local_using_directives, set_local_using_directives)
5259         (get_global_using_directives): New functions.
5260         (buildsym_init): Update.
5261
5262 2018-07-16  Tom Tromey  <tom@tromey.com>
5263
5264         * xcoffread.c (xcoff_initial_scan): Don't call
5265         free_pending_blocks.
5266         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5267         * buildsym.h (class scoped_free_pendings): Add constructor.
5268         (free_pending_blocks): Don't declare.
5269         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5270         (free_pending_blocks): Now static.
5271
5272 2018-07-16  Tom Tromey  <tom@tromey.com>
5273
5274         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5275         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5276         member.
5277         (struct subfile_stack): Remove.
5278         (subfile_stack): Remove.
5279         (push_subfile, pop_subfile, buildsym_init): Update.
5280
5281 2018-07-16  Tom Tromey  <tom@tromey.com>
5282
5283         * buildsym.c (push_subfile): Use gdb_assert.
5284         (pop_subfile): Use gdb_assert.
5285
5286 2018-07-16  Tom Tromey  <tom@tromey.com>
5287
5288         * buildsym.h (merge_symbol_lists): Remove.
5289         * buildsym.c (merge_symbol_lists): Remove.
5290
5291 2018-07-16  Tom Tromey  <tom@tromey.com>
5292
5293         * stabsread.c (scan_file_globals): Update comment.
5294         * stabsread.h (scan_file_globals): Move from buildsym.h.
5295         * buildsym.h (scan_file_globals): Move to stabsread.h.
5296
5297 2018-07-16  Tom Tromey  <tom@tromey.com>
5298
5299         * xcoffread.c (xcoff_new_init): Update.
5300         * mipsread.c (mipscoff_new_init): Update.
5301         * mdebugread.c (mdebug_build_psymtabs): Update.
5302         * elfread.c (elf_new_init): Update.
5303         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5304         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5305         * buildsym.h (buildsym_new_init): Don't declare.
5306         * buildsym.c (buildsym_new_init): Remove.
5307
5308 2018-07-16  Tom Tromey  <tom@tromey.com>
5309
5310         * stabsread.h (within_function): Move from buildsym.h.
5311         * stabsread.c (start_stabs): Clear within_function.
5312         * coffread.c (coff_start_symtab): Clear within_function.
5313         * buildsym.h (within_function): Move to stabsread.h.
5314         * buildsym.c (prepare_for_building): Update.
5315
5316 2018-07-16  Tom Tromey  <tom@tromey.com>
5317
5318         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5319         * dwarf2read.c (dwarf2_start_symtab): Don't set
5320         processing_gcc_compilation.
5321         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5322
5323 2018-07-16  Tom Tromey  <tom@tromey.com>
5324
5325         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5326         (next_symbol_text_func): Move from buildsym.h.
5327         * stabsread.c (hashname): Move from buildsym.c.
5328         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5329         (next_symbol_text_func, hashname): Move to stabsread.h.
5330         * buildsym.c: Don't include bcache.h
5331         (hashname): Move to stasbread.c.
5332
5333 2018-07-16  Tom Tromey  <tom@tromey.com>
5334
5335         * buildsym.h (context_stack_size): Don't declare.
5336         * buildsym.c (context_stack_size): New global.
5337
5338 2018-07-16  Tom Tromey  <tom@tromey.com>
5339
5340         * dbxread.c (processing_acc_compilation): New global.
5341         * buildsym.h (processing_acc_compilation): Don't declare.
5342
5343 2018-07-16  Tom Tromey  <tom@tromey.com>
5344
5345         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5346         * dbxread.c (read_ofile_symtab): Update.
5347         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5348         * buildsym.h (last_source_start_addr): Remove.
5349         (set_last_source_start_addr, get_last_source_start_addr):
5350         Declare.
5351         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5352         parameter.
5353         (struct buildsym_compunit) <m_last_source_start_addr>: New
5354         member.
5355         (prepare_for_building): Remove start_addr parameter.
5356         (start_symtab, restart_symtab, end_symtab_get_static_block)
5357         (end_symtab_with_blockvector): Update.
5358         (set_last_source_start_addr, get_last_source_start_addr): New
5359         functions.
5360
5361 2018-07-16  Tom Tromey  <tom@tromey.com>
5362
5363         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5364         member.
5365         (have_line_numbers): Remove.
5366         (record_line, prepare_for_building, end_symtab_get_static_block)
5367         (augment_type_symtab): Update.
5368
5369 2018-07-16  Tom Tromey  <tom@tromey.com>
5370
5371         * buildsym.c (~buildsym_compunit): Free the macro table.
5372         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5373         methods.
5374         <m_pending_macros>: New member.
5375         (pending_macros): Remove.
5376         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5377         (reset_symtab_globals, end_symtab_get_static_block)
5378         (end_symtab_with_blockvector, augment_type_symtab)
5379         (buildsym_init): Update.
5380
5381 2018-07-16  Tom Tromey  <tom@tromey.com>
5382
5383         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5384         parameter.
5385         (buildsym_compunit::set_last_source_file): New method.
5386         <m_last_source_file>: New member.
5387         (prepare_for_building): Remove "name" parameter.
5388         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5389         (last_source_file): Remove.
5390         (set_last_source_file, get_last_source_file): Update.
5391
5392 2018-07-16  Tom Tromey  <tom@tromey.com>
5393
5394         * buildsym.c (prepare_for_building): Add assert.
5395
5396 2018-07-16  Tom Tromey  <tom@tromey.com>
5397
5398         * buildsym.c (~buildsym_compunit): Update.
5399         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5400         (start_subfile, patch_subfile_names)
5401         (end_symtab_with_blockvector): Update.
5402
5403 2018-07-16  Tom Tromey  <tom@tromey.com>
5404
5405         * buildsym.c (struct buildsym_compunit): Add constructor,
5406         destructor, initializers.
5407         (start_buildsym_compunit): Remove.
5408         (free_buildsym_compunit): Use "delete".
5409         (start_symtab, restart_symtab): Use "new".
5410
5411 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5412
5413         * symfile.c (set_objfile_default_section_offset): Remove struct
5414         keyword.
5415
5416 2018-07-14  Stafford Horne  <shorne@gmail.com>
5417
5418         * (Responsible Maintainers): Add myself as or1k maintainer.
5419
5420 2018-07-13  Tom Tromey  <tom@tromey.com>
5421
5422         * symfile.c (set_objfile_default_section_offset): Use extra braces
5423         around initializer.
5424
5425 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5426
5427         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5428         non-branching basr.
5429
5430 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5431
5432         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5433         unittests/cli-utils-selftests.c
5434         * unittests/cli-utils-selftests.c: New file.
5435
5436 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5437
5438         * NEWS: Mention new commands. Mention change to 'thread apply'.
5439
5440 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5441
5442         * thread.c (thr_try_catch_cmd): New function.
5443         (thread_apply_all_command): Handle qcs flags.
5444         (thread_apply_command): Handle qcs flags.
5445         (taas_command): New function.
5446         (tfaas_command): New function.
5447         (_initialize_thread): Update to setup the new commands 'taas
5448         and 'tfaas'. Change doc string for 'thread apply'.
5449
5450 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5451
5452         * stack.c: (trailing_outermost_frame): New function, mostly
5453         extracted from backtrace_command_1.
5454         (leading_innermost_frame): New function.
5455         (backtrace_command_1): Update to call trailing_outermost_frame.
5456         (frame_apply_command_count): New function.
5457         (frame_apply_level_command): New function.
5458         (frame_apply_all_command): New function.
5459         (frame_apply_command): New function.
5460         (faas_command): New function.
5461         (frame_cmd_list): New variable.
5462         (_initialize_stack): Update to setup the new commands 'frame apply'
5463         and 'faas'.
5464
5465 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5466
5467         * cli-utils.c (number_or_range_parser::get_number): Only handle
5468         numbers or convenience var as numbers.
5469         (parse_flags): New function.
5470         (parse_flags_qcs): New function.
5471         (number_or_range_parser::finished): Ensure parsing end is detected
5472         before end of string.
5473         * cli-utils.h (parse_flags): New function.
5474         (parse_flags_qcs): New function.
5475         (number_or_range_parser): Remove m_finished bool.
5476         (number_or_range_parser::skip_range): Set m_in_range to false.
5477
5478 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5479
5480         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5481         on Windows.
5482
5483 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5484             Jan Kratochvil  <jan.kratochvil@redhat.com>
5485             Paul Fertser  <fercerpav@gmail.com>
5486             Tsutomu Seki  <sekiriki@gmail.com>
5487             Pedro Alves  <palves@redhat.com>
5488
5489         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5490         'unittests/parse-connection-spec-selftests.c'.
5491         (COMMON_SFILES): Add 'common/netstuff.c'.
5492         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5493         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5494         * common/netstuff.c: New file.
5495         * common/netstuff.h: New file.
5496         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5497         (wait_for_connect): Update comment.  New parameter
5498         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5499         Use 'sock' directly instead of 'scb->fd'.
5500         (try_connect): New function, with code from 'net_open'.
5501         (net_open): Rewrite main loop to deal with multiple
5502         sockets/addresses.  Handle IPv6-style hostnames; implement
5503         support for IPv6 connections.
5504         * unittests/parse-connection-spec-selftests.c: New file.
5505
5506 2018-07-11  Pedro Alves  <palves@redhat.com>
5507
5508         PR gdb/23377
5509         * remote.c (remote_target::remote_detach_pid): Call
5510         set_current_process.
5511
5512 2018-07-11  Pedro Alves  <palves@redhat.com>
5513
5514         * h8300-tdep.c (h8300_gdbarch_init): Remove
5515         set_gdbarch_ecoff_reg_to_regnum calls.
5516
5517 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5518
5519         PR c++/23373
5520         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5521         offsets/sizes for static members of a class/struct.
5522
5523 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5524
5525         * target-descriptions.c (tdesc_register_bitsize): Rename.
5526         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5527         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5528         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5529
5530 2018-07-10  Tom Tromey  <tom@tromey.com>
5531
5532         * breakpoint.c (moribund_locations): Now static and a
5533         std::vector.
5534         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5535         (build_bpstat_chain, update_global_location_list)
5536         (breakpoint_retire_moribund): Update.
5537         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5538         VEC.
5539
5540 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5541
5542         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5543         (riscv_register_reggroup_p): Use new function, remove unneeded
5544         parenthesis.
5545         (riscv_push_dummy_call): Extend assert to compare against xlen or
5546         flen based on register type.
5547
5548 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5549
5550         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5551
5552 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5553
5554         * remote.c (show_hardware_watchpoint_limit): New function.
5555         (show_hardware_watchpoint_length_limit): New function.
5556         (show_hardware_breakpoint_limit): New function.
5557         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5558         where appropriate, update help text.
5559
5560 2018-07-09  Tom Tromey  <tom@tromey.com>
5561
5562         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5563         (CLIBS): Don't mention NAT_CLIBS.
5564
5565 2018-07-09  Tom Tromey  <tom@tromey.com>
5566
5567         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5568         (LIBGDB_OBS, clean mostlyclean): Update.
5569         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5570
5571 2018-07-09  Tom Tromey  <tom@tromey.com>
5572
5573         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5574         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5575         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5576
5577 2018-07-09  Tom Tromey  <tom@tromey.com>
5578
5579         * Makefile.in (ALLDEPFILES): Remove exec.c.
5580         (COMMON_OBS): Remove exec.o.
5581         (COMMON_SFILES): Add exec.c.
5582
5583 2018-07-09  Tom Tromey  <tom@tromey.com>
5584
5585         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5586
5587 2018-07-09  Tom Tromey  <tom@tromey.com>
5588
5589         * Makefile.in (clean mostlyclean): Remove stamp-version.
5590         (version.c): Depend on stamp-version.
5591         (stamp-version): New rule, from version.c rule.
5592
5593 2018-07-09  Tom Tromey  <tom@tromey.com>
5594
5595         * Makefile.in (init.c): Depend on stamp-init.
5596         (stamp-init): New rule, from init.c rule.
5597         (clean mostlyclean): Remove stamp-init.
5598
5599 2018-07-09  Tom Tromey  <tom@tromey.com>
5600
5601         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5602         SUBDIR_GCC_COMPILE_SRCS.
5603
5604 2018-07-09  Tom Tromey  <tom@tromey.com>
5605
5606         * Makefile.in (init.c): Remove some unused sed rules.
5607
5608 2018-07-09  Tom Tromey  <tom@tromey.com>
5609
5610         * Makefile.in (TSOBS): Remove.
5611         (INIT_FILES): Update.
5612         (LIBGDB_OBS): Update.
5613         (COMMON_SFILES): Add inflow.c.
5614         (SFILES): Remove inflow.c.
5615
5616 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5617
5618         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5619
5620 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5621
5622         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5623         get_saveloc_name, is_signal_frame_name, step_name,
5624         init_remote_name, create_addr_space_name,
5625         destroy_addr_space_name, search_unwind_table_name,
5626         find_dyn_list_name): Constify.
5627
5628 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5629
5630         * darwin-nat.c (darwin_pthread_kill): New function.
5631         (darwin_resume_thread): Use darwin_pthread_kill.
5632
5633 2018-07-05  Tom de Vries  <tdevries@suse.de>
5634
5635         * macroexp.c (macro_buffer) <operator=>: New member function.
5636
5637 2018-07-04  Tom Tromey  <tom@tromey.com>
5638
5639         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5640
5641 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5642
5643         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5644         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5645         * maint.c: Likewise.
5646         * top.c: Likewise.
5647
5648 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5649
5650         * NEWS: Create a new section for the next release branch.
5651         Rename the section of the current branch, now that it has
5652         been cut.
5653
5654 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5655
5656         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5657         * version.in: Bump version to 8.2.50.DATE-git.
5658
5659 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5660             Pedro Alves  <palves@redhat.com>
5661
5662         * linux-nat.c (linux_init_ptrace): Rename to ...
5663         (linux_init_ptrace_procfs): ... this.  Call
5664         linux_proc_init_warnings.
5665         (linux_nat_target::post_attach)
5666         (linux_nat_target::post_startup_inferior): Adjust.
5667         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5668         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5669
5670 2018-07-04  Tom de Vries  <tdevries@suse.de>
5671
5672         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5673         check ...
5674         (read_comp_unit_head): ... here.
5675
5676 2018-07-03  Tom Tromey  <tom@tromey.com>
5677
5678         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5679         (stop_tracing, tstatus_command)
5680         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5681         (print_one_static_tracepoint_marker): Update.
5682         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5683         std::vector.
5684         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5685         VEC.
5686         (all_tracepoints, static_tracepoints_here): Return std::vector.
5687
5688 2018-07-03  Tom Tromey  <tom@tromey.com>
5689
5690         * common/ptid.c (ptid_equal): Remove.
5691         * common/ptid.h (ptid_equal): Don't declare.
5692         * ada-tasks.c: Update.
5693         * breakpoint.c: Update.
5694         * common/agent.c: Update.
5695         * corelow.c: Update.
5696         * darwin-nat-info.c: Update.
5697         * darwin-nat.c: Update.
5698         * dcache.c: Update.
5699         * dtrace-probe.c: Update.
5700         * dummy-frame.c: Update.
5701         * fbsd-nat.c: Update.
5702         * frame.c: Update.
5703         * gdbthread.h: Update.
5704         * gnu-nat.c: Update.
5705         * go32-nat.c: Update.
5706         * inf-loop.c: Update.
5707         * inf-ptrace.c: Update.
5708         * infcall.c: Update.
5709         * infcmd.c: Update.
5710         * inflow.c: Update.
5711         * infrun.c: Update.
5712         * linux-fork.c: Update.
5713         * linux-nat.c: Update.
5714         * linux-thread-db.c: Update.
5715         * mi/mi-cmd-var.c: Update.
5716         * mi/mi-interp.c: Update.
5717         * mi/mi-main.c: Update.
5718         * nto-procfs.c: Update.
5719         * ppc-linux-tdep.c: Update.
5720         * procfs.c: Update.
5721         * python/py-inferior.c: Update.
5722         * python/py-record-btrace.c: Update.
5723         * python/py-record.c: Update.
5724         * ravenscar-thread.c: Update.
5725         * regcache.c: Update.
5726         * remote-sim.c: Update.
5727         * remote.c: Update.
5728         * sol-thread.c: Update.
5729         * solib.c: Update.
5730         * target.c: Update.
5731         * tui/tui-stack.c: Update.
5732         * varobj.c: Update.
5733         * windows-nat.c: Update.
5734         * windows-tdep.c: Update.
5735
5736 2018-07-03  Tom Tromey  <tom@tromey.com>
5737
5738         * common/ptid.c (ptid_match): Remove.
5739         * common/ptid.h (ptid_match): Don't declare.
5740         * fbsd-nat.c: Update.
5741         * infcmd.c: Update.
5742         * infrun.c: Update.
5743         * linux-nat.c: Update.
5744         * record-btrace.c: Update.
5745         * regcache.c: Update.
5746         * remote.c: Update.
5747
5748 2018-07-03  Tom Tromey  <tom@tromey.com>
5749
5750         * common/ptid.c (ptid_tid_p): Remove.
5751         * common/ptid.h (ptid_tid_p): Don't declare.
5752         * sol-thread.c: Update.
5753
5754 2018-07-03  Tom Tromey  <tom@tromey.com>
5755
5756         * common/ptid.c (ptid_lwp_p): Remove.
5757         * common/ptid.h (ptid_lwp_p): Don't declare.
5758         * fbsd-nat.c: Update.
5759         * linux-nat.c: Update.
5760         * nat/linux-procfs.c: Update.
5761         * nat/x86-linux-dregs.c: Update.
5762         * sol-thread.c: Update.
5763
5764 2018-07-03  Tom Tromey  <tom@tromey.com>
5765
5766         * common/ptid.c (ptid_is_pid): Remove.
5767         * common/ptid.h (ptid_is_pid): Don't declare.
5768         * infrun.c: Update.
5769         * linux-nat.c: Update.
5770         * mi/mi-interp.c: Update.
5771         * remote.c: Update.
5772         * thread.c: Update.
5773
5774 2018-07-03  Tom Tromey  <tom@tromey.com>
5775
5776         * common/ptid.c (ptid_get_tid): Remove.
5777         * common/ptid.h (ptid_get_tid): Don't declare.
5778         * ada-tasks.c: Update.
5779         * aix-thread.c: Update.
5780         * bsd-uthread.c: Update.
5781         * darwin-nat.c: Update.
5782         * fbsd-nat.c: Update.
5783         * i386-darwin-nat.c: Update.
5784         * infrun.c: Update.
5785         * linux-tdep.c: Update.
5786         * nto-procfs.c: Update.
5787         * ppc-ravenscar-thread.c: Update.
5788         * python/py-infthread.c: Update.
5789         * ravenscar-thread.c: Update.
5790         * sol-thread.c: Update.
5791         * sparc-ravenscar-thread.c: Update.
5792         * windows-nat.c: Update.
5793
5794 2018-07-03  Tom Tromey  <tom@tromey.com>
5795
5796         * common/ptid.c (ptid_get_lwp): Remove.
5797         * common/ptid.h (ptid_get_lwp): Don't declare.
5798         * aarch64-linux-nat.c: Update.
5799         * ada-tasks.c: Update.
5800         * aix-thread.c: Update.
5801         * amd64-linux-nat.c: Update.
5802         * arm-linux-nat.c: Update.
5803         * corelow.c: Update.
5804         * fbsd-nat.c: Update.
5805         * fbsd-tdep.c: Update.
5806         * gnu-nat.c: Update.
5807         * i386-cygwin-tdep.c: Update.
5808         * i386-gnu-nat.c: Update.
5809         * i386-linux-nat.c: Update.
5810         * ia64-linux-nat.c: Update.
5811         * inf-ptrace.c: Update.
5812         * infrun.c: Update.
5813         * linux-fork.c: Update.
5814         * linux-nat.c: Update.
5815         * linux-tdep.c: Update.
5816         * linux-thread-db.c: Update.
5817         * mips-linux-nat.c: Update.
5818         * nat/aarch64-linux-hw-point.c: Update.
5819         * nat/aarch64-linux.c: Update.
5820         * nat/linux-btrace.c: Update.
5821         * nat/linux-osdata.c: Update.
5822         * nat/linux-procfs.c: Update.
5823         * nat/x86-linux-dregs.c: Update.
5824         * obsd-nat.c: Update.
5825         * ppc-fbsd-nat.c: Update.
5826         * ppc-linux-nat.c: Update.
5827         * procfs.c: Update.
5828         * python/py-infthread.c: Update.
5829         * ravenscar-thread.c: Update.
5830         * remote.c: Update.
5831         * s390-linux-nat.c: Update.
5832         * sol-thread.c: Update.
5833         * sol2-tdep.c: Update.
5834         * spu-linux-nat.c: Update.
5835         * x86-linux-nat.c: Update.
5836         * xtensa-linux-nat.c: Update.
5837
5838 2018-07-03  Tom Tromey  <tom@tromey.com>
5839
5840         * common/ptid.c (ptid_get_pid): Remove.
5841         * common/ptid.h (ptid_get_pid): Don't declare.
5842         * aarch64-linux-nat.c: Update.
5843         * ada-lang.c: Update.
5844         * aix-thread.c: Update.
5845         * alpha-bsd-nat.c: Update.
5846         * amd64-fbsd-nat.c: Update.
5847         * amd64-linux-nat.c: Update.
5848         * arm-linux-nat.c: Update.
5849         * arm-nbsd-nat.c: Update.
5850         * auxv.c: Update.
5851         * break-catch-syscall.c: Update.
5852         * breakpoint.c: Update.
5853         * bsd-uthread.c: Update.
5854         * corelow.c: Update.
5855         * ctf.c: Update.
5856         * darwin-nat.c: Update.
5857         * fbsd-nat.c: Update.
5858         * fbsd-tdep.c: Update.
5859         * gcore.c: Update.
5860         * gnu-nat.c: Update.
5861         * hppa-nbsd-nat.c: Update.
5862         * hppa-obsd-nat.c: Update.
5863         * i386-fbsd-nat.c: Update.
5864         * ia64-linux-nat.c: Update.
5865         * inf-ptrace.c: Update.
5866         * infcmd.c: Update.
5867         * inferior.c: Update.
5868         * inferior.h: Update.
5869         * inflow.c: Update.
5870         * infrun.c: Update.
5871         * linux-fork.c: Update.
5872         * linux-nat.c: Update.
5873         * linux-tdep.c: Update.
5874         * linux-thread-db.c: Update.
5875         * m68k-bsd-nat.c: Update.
5876         * mi/mi-interp.c: Update.
5877         * mi/mi-main.c: Update.
5878         * mips-linux-nat.c: Update.
5879         * mips-nbsd-nat.c: Update.
5880         * mips64-obsd-nat.c: Update.
5881         * nat/aarch64-linux-hw-point.c: Update.
5882         * nat/aarch64-linux.c: Update.
5883         * nat/linux-btrace.c: Update.
5884         * nat/linux-osdata.c: Update.
5885         * nat/linux-procfs.c: Update.
5886         * nat/x86-linux-dregs.c: Update.
5887         * nto-procfs.c: Update.
5888         * obsd-nat.c: Update.
5889         * ppc-linux-nat.c: Update.
5890         * ppc-nbsd-nat.c: Update.
5891         * ppc-obsd-nat.c: Update.
5892         * proc-service.c: Update.
5893         * procfs.c: Update.
5894         * python/py-inferior.c: Update.
5895         * python/py-infthread.c: Update.
5896         * ravenscar-thread.c: Update.
5897         * record.c: Update.
5898         * remote-sim.c: Update.
5899         * remote.c: Update.
5900         * rs6000-nat.c: Update.
5901         * s390-linux-nat.c: Update.
5902         * sh-nbsd-nat.c: Update.
5903         * sol-thread.c: Update.
5904         * sparc-nat.c: Update.
5905         * sparc64-tdep.c: Update.
5906         * spu-linux-nat.c: Update.
5907         * spu-tdep.c: Update.
5908         * target-debug.h: Update.
5909         * target.c: Update.
5910         * thread.c: Update.
5911         * tid-parse.c: Update.
5912         * tracefile-tfile.c: Update.
5913         * vax-bsd-nat.c: Update.
5914         * windows-nat.c: Update.
5915         * x86-linux-nat.c: Update.
5916         * x86-nat.c: Update.
5917
5918 2018-07-03  Tom Tromey  <tom@tromey.com>
5919
5920         * common/ptid.c (pid_to_ptid): Remove.
5921         * common/ptid.h (pid_to_ptid): Don't declare.
5922         * aix-thread.c: Update.
5923         * arm-linux-nat.c: Update.
5924         * common/ptid.c: Update.
5925         * common/ptid.h: Update.
5926         * corelow.c: Update.
5927         * ctf.c: Update.
5928         * darwin-nat.c: Update.
5929         * fbsd-nat.c: Update.
5930         * fork-child.c: Update.
5931         * gnu-nat.c: Update.
5932         * go32-nat.c: Update.
5933         * inf-ptrace.c: Update.
5934         * infcmd.c: Update.
5935         * inferior.c: Update.
5936         * infrun.c: Update.
5937         * linux-fork.c: Update.
5938         * linux-nat.c: Update.
5939         * nat/aarch64-linux-hw-point.c: Update.
5940         * nat/fork-inferior.c: Update.
5941         * nat/x86-linux-dregs.c: Update.
5942         * nto-procfs.c: Update.
5943         * obsd-nat.c: Update.
5944         * procfs.c: Update.
5945         * progspace.c: Update.
5946         * remote.c: Update.
5947         * rs6000-nat.c: Update.
5948         * s390-linux-nat.c: Update.
5949         * sol-thread.c: Update.
5950         * spu-linux-nat.c: Update.
5951         * target.c: Update.
5952         * top.c: Update.
5953         * tracefile-tfile.c: Update.
5954         * windows-nat.c: Update.
5955
5956 2018-07-03  Tom Tromey  <tom@tromey.com>
5957
5958         * common/ptid.h (ptid_build): Don't declare.
5959         * common/ptid.c (ptid_build): Remove.
5960         * aix-thread.c: Update.
5961         * bsd-kvm.c: Update.
5962         * bsd-uthread.c: Update.
5963         * common/agent.c: Update.
5964         * common/ptid.c: Update.
5965         * common/ptid.h: Update.
5966         * corelow.c: Update.
5967         * darwin-nat.c: Update.
5968         * fbsd-nat.c: Update.
5969         * gnu-nat.c: Update.
5970         * linux-fork.c: Update.
5971         * linux-nat.c: Update.
5972         * linux-thread-db.c: Update.
5973         * nat/linux-osdata.c: Update.
5974         * nat/linux-procfs.c: Update.
5975         * nto-procfs.c: Update.
5976         * obsd-nat.c: Update.
5977         * proc-service.c: Update.
5978         * procfs.c: Update.
5979         * ravenscar-thread.c: Update.
5980         * remote-sim.c: Update.
5981         * remote.c: Update.
5982         * sol-thread.c: Update.
5983         * target.c: Update.
5984         * windows-nat.c: Update.
5985
5986 2018-07-03  Tom Tromey  <tom@tromey.com>
5987
5988         * infrun.c (follow_exec): Use exit_inferior_silent.
5989         * inferior.c (exit_inferior_num_silent): Remove.
5990         * inferior.h (exit_inferior_num_silent): Don't declare.
5991
5992 2018-07-03  Tom Tromey  <tom@tromey.com>
5993
5994         PR cli/23340:
5995         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5996         inferior_ptid on error.
5997
5998 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5999             Simon Marchi  <simon.marchi@polymtl.ca>
6000
6001         PR tdep/8282
6002         * disasm.h (gdb_disassembler): Add
6003         `m_disassembler_options_holder'. member
6004         * disasm.c (get_all_disassembler_options): New function.
6005         (gdb_disassembler::gdb_disassembler): Use it.
6006         (gdb_buffered_insn_length_init_dis): Likewise.
6007         (gdb_buffered_insn_length): Adjust accordingly.
6008         (set_disassembler_options): Handle options with arguments.
6009         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6010         line if showing options with descriptions.
6011         (disassembler_options_completer): Adapt to using the
6012         `disasm_options_and_args_t' structure.
6013         * mips-tdep.c (mips_disassembler_options): New variable.
6014         (mips_disassembler_options_o32): Likewise.
6015         (mips_disassembler_options_n32): Likewise.
6016         (mips_disassembler_options_n64): Likewise.
6017         (gdb_print_insn_mips): Don't set `disassembler_options'.
6018         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6019         functions.
6020         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6021         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6022         `gdbarch_disassembler_options_implicit' and
6023         `gdbarch_valid_disassembler_options'.
6024         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6025         `disasm_options_and_args_t' structure.
6026         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6027         method.
6028         (valid_disassembler_options): Switch from `disasm_options_t' to
6029         the `disasm_options_and_args_t' structure.
6030         * NEWS: Document `set disassembler-options' support for the MIPS
6031         target.
6032         * gdbarch.h: Regenerate.
6033         * gdbarch.c: Regenerate.
6034
6035 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6036
6037         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6038
6039 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6040
6041         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6042         parameter in call to amd64_target_description.
6043         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6044         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6045         (amd64fbsd_init_abi): Likewise.
6046         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6047         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6048         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6049         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6050
6051 2018-06-29  Pedro Alves  <palves@redhat.com>
6052
6053         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6054         "segments" parameter.
6055         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6056         (_initialize_amd64_tdep): Update call to
6057         amd64_create_target_description.
6058         (amd64_target_description): Add "segments" parameter.  Adjust
6059         the implementation to use it.
6060         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6061         call to amd64_create_target_description.
6062         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6063         * gdb/arch/amd64.h (amd64_create_target_description): Add
6064         "segments" register.
6065         * gdb/arch/amd64.c (amd64_create_target_description): Add
6066         "segments" parameter.  Call create_feature_i386_64bit_segments
6067         only if SEGMENTS is true.
6068         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6069         call to amd64_create_target_description.
6070
6071 2018-06-29  Pedro Alves  <palves@redhat.com>
6072
6073         * thread.c (thread_target_id_str): New, factored out from ...
6074         (print_thread_info_1): ... here.  Use it to compute the max
6075         "Target Id" column width.
6076
6077 2018-06-29  Pedro Alves  <palves@redhat.com>
6078
6079         * remote.c (remote_target::extra_thread_info): Delete
6080         'display_buf' and 'n' locals.  from the cache, regardless of
6081         packet mechanims is in use.  Use cache for qThreadExtra and qP
6082         methods too.
6083
6084 2018-06-29  Pedro Alves  <palves@redhat.com>
6085
6086         * blockframe.c (find_pc_sect_containing_function): New function.
6087         * breakpoint.c (print_breakpoint_location): Don't call
6088         find_pc_sect_function.
6089         * linespec.c (create_sals_line_offset): Record the location's
6090         symbol in the sal.
6091         * linespec.c (convert_address_location_to_sals): Fill in sal's
6092         symbol with find_pc_sect_containing_function.
6093         * symtab.c (find_function_start_sal): Rename to ...
6094         (find_function_start_sal_1): ... this.
6095         (find_function_start_sal): Reimplement as wrapper around
6096         find_function_start_sal_1, and use
6097         find_pc_sect_containing_function to fill in the sal's symbol.
6098         (find_function_start_sal(symbol*, bool)): Adjust.
6099         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6100         comments.
6101         (find_pc_sect_containing_function): Declare.
6102
6103 2018-06-29  Pedro Alves  <palves@redhat.com>
6104
6105         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6106         true if the the location has no symbol.
6107
6108 2018-06-28  Tom Tromey  <tom@tromey.com>
6109
6110         * NEWS: Mention --enable-codesign.
6111         * silent-rules.mk (ECHO_SIGN): New variable.
6112         * configure.ac: Add --enable-codesign.
6113         * configure: Rebuild.
6114         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6115         (gdb$(EXEEXT)): Optionally invoke codesign.
6116
6117 2018-06-28  Pedro Alves  <palves@redhat.com>
6118
6119         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6120         comments.
6121         (switch_to_thread_no_regs): Adjust comment.
6122         * infcmd.c (stop_pc): Delete.
6123         (post_create_inferior, info_program_command): Replace references
6124         to stop_pc with references to thread_info->suspend.stop_pc.
6125         * inferior.h (stop_pc): Delete declaration.
6126         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6127         (handle_inferior_event_1, handle_signal_stop)
6128         (process_event_stop_test, keep_going_stepped_thread)
6129         (handle_step_into_function, handle_step_into_function_backward)
6130         (print_stop_location): Replace references to stop_pc with
6131         references to thread_info->suspend.stop_pc.
6132         (struct infcall_suspend_state) <stop_pc>: Delete field.
6133         (save_infcall_suspend_state, restore_infcall_suspend_state):
6134         Remove references to inf_stat->stop_pc.
6135         * linux-fork.c (fork_load_infrun_state): Likewise.
6136         * record-btrace.c (record_btrace_set_replay): Likewise.
6137         * record-full.c (record_full_goto_entry): Likewise.
6138         * remote.c (print_one_stopped_thread): Likewise.
6139         * target.c (target_resume): Extend comment.
6140         * thread.c (set_executing_thread): New.
6141         (set_executing): Use it.
6142         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6143         Remove references to stop_pc.
6144
6145 2018-06-28  Pedro Alves  <palves@redhat.com>
6146
6147         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6148         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6149
6150 2018-06-28  Tom Tromey  <tom@tromey.com>
6151
6152         * coffread.c (coff_symfile_finish): Update.
6153         * xcoffread.c (xcoff_symfile_finish): Update.
6154         * elfread.c (elf_symfile_finish): Update.
6155         * symfile.h (dwarf2_free_objfile): Don't declare.
6156         * dwarf2read.c (_initialize_dwarf2_read): Use
6157         register_objfile_data_with_cleanup.
6158         (dwarf2_free_objfile): Now static.  Change signature.
6159
6160 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6161
6162         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6163         option "-o" to add-symbol-file-load to add an offset to each
6164         section's load address.
6165         * symfile.c (set_objfile_default_section_offset): New function.
6166
6167 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6168
6169         * symfile.c (add_symbol_file_command): Make sure that sections
6170         with the same name are sorted in the same order.
6171
6172 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6173
6174         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6175         require the second argument.  If omitted, load sections at the
6176         addresses specified in the file.
6177
6178 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6179
6180         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6181         (_initialize_symfile): Add option "-o" to symbol-file to add an
6182         offset to each section of the symbol file.
6183
6184 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6185
6186         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6187
6188 2018-06-27  Tom Tromey  <tom@tromey.com>
6189
6190         * stack.c (_initialize_stack): Update "func" help text.
6191
6192 2018-06-27  Tom Tromey  <tom@tromey.com>
6193
6194         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6195         std::vector.
6196         (unwind_infopy_str, pyuw_create_unwind_info)
6197         (unwind_infopy_add_saved_register, pyuw_sniffer)
6198         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6199         Update.
6200         (struct saved_reg): Add constructor.
6201         <value>: Now a gdbpy_ref<>.
6202
6203 2018-06-27  Tom Tromey  <tom@tromey.com>
6204
6205         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6206
6207 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6208
6209         * gdb-gdb.py.in: Format using autopep8.
6210
6211 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6212
6213         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6214         (type_lookup_function): Recognize CORE_ADDR values.
6215
6216 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6217
6218         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6219         print tag_name.
6220
6221 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6222
6223         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6224         <__lt__>: Add.
6225
6226 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6227
6228         * gdb-gdb.py: Move to...
6229         * gdb-gdb.py.in: ... here.
6230         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6231         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6232         dependencies.
6233         (distclean): Remove gdb-gdb.py when cleaning.
6234         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6235         * configure: Re-generate.
6236
6237 2018-06-27  Pedro Alves  <palves@redhat.com>
6238
6239         * proc-service.c (get_ps_regcache): New.
6240         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6241         (ps_lsetfpregs): Use it.
6242
6243 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6244
6245         PR gdb/21695
6246         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6247         (dwarf_decode_lines_1): Adjust.
6248
6249 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6250
6251         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6252         override.
6253         <info_proc>: Likewise.
6254
6255 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6256
6257         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6258         to windows_fetch_one_register, and only handle the case of
6259         fetching one register.  Move the code that reloads the context
6260         and iterates over all registers if R is negative to...
6261         (windows_nat_target::fetch_registers): ... here.
6262         (do_windows_store_inferior_registers): Rename to
6263         windows_store_one_register, and only handle the case of storing
6264         one register.  Move the code that handles the case where r is
6265         negative to...
6266         (windows_nat_target::store_registers) ... here.
6267
6268 2018-06-26  Tom Tromey  <tom@tromey.com>
6269
6270         PR rust/22574:
6271         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6272         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6273         Update.
6274         (rust_internal_print_type): Add podata parameter.
6275         (rust_print_type): Update.
6276
6277 2018-06-26  Tom Tromey  <tom@tromey.com>
6278
6279         * typeprint.h (struct print_offset_data) <update, finish,
6280         maybe_print_hole>: New methods.
6281         <indentation>: New constant.
6282         * typeprint.c (print_offset_data::indentation): Define.
6283         (print_offset_data::maybe_print_hole, print_offset_data::update)
6284         (print_offset_data::finish): Move from c-typeprint.c and rename.
6285         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6286         (print_spaces_filtered_with_print_options): Update.
6287         (c_print_type_union_field_offset, maybe_print_hole)
6288         (c_print_type_struct_field_offset): Move to typeprint.c and
6289         rename.
6290         (c_type_print_base_struct_union): Update.
6291
6292 2018-06-25  Pedro Alves  <palves@redhat.com>
6293
6294         * gdbthread.h (thread_info_ref, delete_thread)
6295         (delete_thread_silent, first_thread_of_inferior)
6296         (any_thread_of_inferior, switch_to_thread)
6297         (enable_thread_stack_temporaries)
6298         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6299         (get_last_thread_stack_temporary)
6300         (value_in_thread_stack_temporaries, can_access_registers_thread):
6301         Spell out "struct thread_info" instead of just "thread_info".
6302         * inferior.h (notice_new_inferior): Likewise.
6303
6304 2018-06-25  Pedro Alves  <palves@redhat.com>
6305
6306         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6307         pass thread_info pointer to delete_thread.
6308         (windows_nat_target::detach): Pass inferior pointer to
6309         detach_inferior.
6310         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6311         delete_thread.
6312         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6313         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6314         and pass a thread_info pointer to delete_thread.
6315         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6316         pass thread_info pointer to delete_thread.
6317         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6318         delete_thread_silent call.
6319         * procfs.c (procfs_target::detach): Pass inferior pointer to
6320         detach_inferior.
6321         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6322         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6323         delete_thread_silent call.
6324         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6325         pass thread_info pointer to delete_thread.
6326         (windows_nat_target::detach): Pass inferior pointer to
6327         delete_inferior.
6328
6329 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6330
6331         * regcache.c (readable_regcache::read_part): Fix asserts.
6332         (reg_buffer::raw_collect_part): New function.
6333         (regcache::write_part): Fix asserts.
6334         (reg_buffer::raw_supply_part): New function.
6335         (regcache::transfer_regset_register): New helper function.
6336         (regcache::transfer_regset): Call new functions.
6337         (regcache_supply_regset): Use gdb_byte*.
6338         (regcache::supply_regset): Likewise.
6339         (regcache_collect_regset): Likewise.
6340         (regcache::collect_regset): Likewise.
6341         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6342         (reg_buffer::raw_supply_part): Likewise.
6343         (regcache::transfer_regset_register): Likewise.
6344         (regcache::transfer_regset): Use gdb_byte*.
6345
6346 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6347
6348         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6349
6350 2018-06-21  Pedro Alves  <palves@redhat.com>
6351
6352         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6353         instead of a ptid_t.  All callers adjusted.
6354         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6355         adjusted.
6356         (print_ada_task_info, display_current_task_id, task_command_1):
6357         Adjust.
6358         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6359         inferior_thread.
6360         (breakpoint_kind): Adjust.
6361         (remove_breakpoints_pid): Rename to ...
6362         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6363         pointer.  All callers adjusted.
6364         (bpstat_clear_actions): Use inferior_thread.
6365         (get_bpstat_thread): New.
6366         (bpstat_do_actions): Use it.
6367         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6368         to take a thread_info pointer.  All callers adjusted.
6369         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6370         (breakpoint_re_set_thread): Use inferior_thread.
6371         * breakpoint.h (struct inferior): Forward declare.
6372         (bpstat_stop_status): Update.
6373         (remove_breakpoints_pid): Delete.
6374         (remove_breakpoints_inf): New.
6375         * bsd-uthread.c (bsd_uthread_target::wait)
6376         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6377         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6378         (maint_btrace_packet_history_cmd)
6379         (maint_btrace_clear_packet_history_cmd): Adjust.
6380         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6381         inferior_thread.
6382         * cli/cli-interp.c: Include "inferior.h".
6383         * common/refcounted-object.h (struct
6384         refcounted_object_ref_policy): New.
6385         * compile/compile-object-load.c: Include gdbthread.h.
6386         (store_regs): Use inferior_thread.
6387         * corelow.c (core_target::close): Use current_inferior.
6388         (core_target_open): Adjust to use first_thread_of_inferior and use
6389         the current inferior.
6390         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6391         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6392         <thread>: ... this new field.  All references adjusted.
6393         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6394         Take a thread_info pointer instead of a ptid_t.
6395         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6396         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6397         thread_info pointer instead of a ptid_t.
6398         * elfread.c: Include "inferior.h".
6399         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6400         Use inferior_thread.
6401         * eval.c (evaluate_subexp): Likewise.
6402         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6403         inferior_thread.
6404         * gdb_proc_service.h (struct thread_info): Forward declare.
6405         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6406         <thread>: ... this new field.  All references adjusted.
6407         * gdbarch.h, gdbarch.c: Regenerate.
6408         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6409         'thread' parameter.  All implementations and callers adjusted.
6410         * gdbthread.h (thread_info) <set_running>: New method.
6411         (delete_thread, delete_thread_silent): Take a thread_info pointer
6412         instead of a ptid.
6413         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6414         (first_thread_of_process): Delete, replaced by ...
6415         (first_thread_of_inferior): ... this new function.  All callers
6416         adjusted.
6417         (any_live_thread_of_process): Delete, replaced by ...
6418         (any_live_thread_of_inferior): ... this new function.  All callers
6419         adjusted.
6420         (switch_to_thread, switch_to_no_thread): Declare.
6421         (is_executing): Delete.
6422         (enable_thread_stack_temporaries): Update comment.
6423         <enable_thread_stack_temporaries>: Take a thread_info pointer
6424         instead of a ptid_t.  Incref the thread.
6425         <~enable_thread_stack_temporaries>: Decref the thread.
6426         <m_ptid>: Delete
6427         <m_thr>: New.
6428         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6429         (get_last_thread_stack_temporary)
6430         (value_in_thread_stack_temporaries, can_access_registers_thread):
6431         Take a thread_info pointer instead of a ptid_t.  All callers
6432         adjusted.
6433         * infcall.c (get_call_return_value): Use inferior_thread.
6434         (run_inferior_call): Work with thread pointers instead of ptid_t.
6435         (call_function_by_hand_dummy): Work with thread pointers instead
6436         of ptid_t.  Use thread_info_ref.
6437         * infcmd.c (proceed_thread_callback): Access thread's state
6438         directly.
6439         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6440         access thread's state directly.
6441         (continue_command): Use inferior_thread.
6442         (info_program_command): Use find_thread_ptid and access thread
6443         state directly.
6444         (proceed_after_attach_callback): Use thread state directly.
6445         (notice_new_inferior): Take a thread_info pointer instead of a
6446         ptid_t.  All callers adjusted.
6447         (exit_inferior): Take an inferior pointer instead of a pid.  All
6448         callers adjusted.
6449         (exit_inferior_silent): New.
6450         (detach_inferior): Delete.
6451         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6452         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6453         (detach_inferior_command, kill_inferior_command): Use
6454         find_inferior_id instead of valid_gdb_inferior_id and
6455         gdb_inferior_id_to_pid.
6456         (inferior_command): Use inferior and thread pointers.
6457         * inferior.h (struct thread_info): Forward declare.
6458         (notice_new_inferior): Take a thread_info pointer instead of a
6459         ptid_t.  All callers adjusted.
6460         (detach_inferior): Delete declaration.
6461         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6462         instead of a pid.  All callers adjusted.
6463         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6464         (valid_gdb_inferior_id): Delete.
6465         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6466         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6467         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6468         ...
6469         <inf>: ... this new field.
6470         <step_ptid>: Delete, replaced by ...
6471         <step_thread>: ... this new field.
6472         (get_displaced_stepping_state): Take an inferior pointer instead
6473         of a pid.  All callers adjusted.
6474         (displaced_step_in_progress_any_inferior): Adjust.
6475         (displaced_step_in_progress_thread): Take a thread pointer instead
6476         of a ptid_t.  All callers adjusted.
6477         (displaced_step_in_progress, add_displaced_stepping_state): Take
6478         an inferior pointer instead of a pid.  All callers adjusted.
6479         (get_displaced_step_closure_by_addr): Adjust.
6480         (remove_displaced_stepping_state): Take an inferior pointer
6481         instead of a pid.  All callers adjusted.
6482         (displaced_step_prepare_throw, displaced_step_prepare)
6483         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6484         All callers adjusted.
6485         (start_step_over): Adjust.
6486         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6487         displaced step queue.
6488         (do_target_resume): Adjust.
6489         (fetch_inferior_event): Use inferior_thread.
6490         (context_switch, get_inferior_stop_soon): Take an
6491         execution_control_state pointer instead of a ptid_t.  All callers
6492         adjusted.
6493         (switch_to_thread_cleanup): Delete.
6494         (stop_all_threads): Use scoped_restore_current_thread.
6495         * inline-frame.c: Include "gdbthread.h".
6496         (inline_state) <inline_state>: Take a thread pointer instead of a
6497         ptid_t.  All callers adjusted.
6498         <ptid>: Delete, replaced by ...
6499         <thread>: ... this new field.
6500         (find_inline_frame_state): Take a thread pointer instead of a
6501         ptid_t.  All callers adjusted.
6502         (skip_inline_frames, step_into_inline_frame)
6503         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6504         pointer instead of a ptid_t.  All callers adjusted.
6505         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6506         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6507         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6508         pointers directly.
6509         * linux-nat.c (get_detach_signal): Likewise.
6510         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6511         (thread_db_notice_clone): Adjust.
6512         (thread_db_find_new_threads_silently)
6513         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6514         a thread pointer instead of a ptid_t.  All callers adjusted.
6515         * mi/mi-cmd-var.c: Include "inferior.h".
6516         (mi_cmd_var_update_iter): Update to use thread pointers.
6517         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6518         inferior directly.
6519         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6520         out to ...
6521         (mi_output_running): ... this new function.
6522         (mi_on_resume_1): Adjust to use it.
6523         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6524         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6525         directly.
6526         (interrupt_thread_callback): : Adjust to use thread and inferior
6527         pointers.
6528         * proc-service.c: Include "gdbthread.h".
6529         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6530         * progspace-and-thread.c: Include "inferior.h".
6531         * progspace.c: Include "inferior.h".
6532         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6533         hold a reference to an inferior_object.
6534         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6535         inferior_thread.
6536         * python/py-inferior.c (struct inferior_object): Give the type a
6537         tag name instead of a typedef.
6538         (python_on_normal_stop): No need to check if the current thread is
6539         listed.
6540         (inferior_to_inferior_object): Change return type to
6541         inferior_object.  All callers adjusted.
6542         (find_thread_object): Delete, bits factored out to ...
6543         (thread_to_thread_object): ... this new function.
6544         * python/py-infthread.c (create_thread_object): Use
6545         inferior_to_inferior_object.
6546         (thpy_is_stopped): Use thread pointer directly.
6547         (gdbpy_selected_thread): Use inferior_thread.
6548         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6549         field, replaced with ...
6550         <thread>: ... this new field.  All users adjusted.
6551         (btpy_insn_or_gap_new): Drop const.
6552         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6553         callers adjusted.
6554         * python/py-record.c: Include "gdbthread.h".
6555         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6556         a ptid_t.  All callers adjusted.
6557         (gdbpy_current_recording): Use inferior_thread.
6558         * python/py-record.h (recpy_record_object) <ptid>: Delete
6559         field, replaced with ...
6560         <thread>: ... this new field.  All users adjusted.
6561         (recpy_element_object) <ptid>: Delete
6562         field, replaced with ...
6563         <thread>: ... this new field.  All users adjusted.
6564         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6565         a ptid_t.  All callers adjusted.
6566         * python/py-threadevent.c: Include "gdbthread.h".
6567         (get_event_thread): Use thread_to_thread_object.
6568         * python/python-internal.h (struct inferior_object): Forward
6569         declare.
6570         (find_thread_object, find_inferior_object): Delete declarations.
6571         (thread_to_thread_object, inferior_to_inferior_object): New
6572         declarations.
6573         * record-btrace.c: Include "inferior.h".
6574         (require_btrace_thread): Use inferior_thread.
6575         (record_btrace_frame_sniffer)
6576         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6577         (get_thread_current_frame): Use scoped_restore_current_thread and
6578         switch_to_thread.
6579         (get_thread_current_frame): Use thread pointer directly.
6580         (record_btrace_replay_at_breakpoint): Use thread's inferior
6581         pointer directly.
6582         * record-full.c: Include "inferior.h".
6583         * regcache.c: Include "gdbthread.h".
6584         (get_thread_arch_regcache): Use the inferior's address space
6585         directly.
6586         (get_thread_regcache, registers_changed_thread): New.
6587         * regcache.h (get_thread_regcache(thread_info *thread)): New
6588         overload.
6589         (registers_changed_thread): New.
6590         (remote_target) <remote_detach_1>: Swap order of parameters.
6591         (remote_add_thread): <remote_add_thread>: Return the new thread.
6592         (get_remote_thread_info(ptid_t)): New overload.
6593         (remote_target::remote_notice_new_inferior): Use thread pointers
6594         directly.
6595         (remote_target::process_initial_stop_replies): Use
6596         thread_info::set_running.
6597         (remote_target::remote_detach_1, remote_target::detach)
6598         (extended_remote_target::detach): Adjust.
6599         * stack.c (frame_show_address): Use inferior_thread.
6600         * target-debug.h (target_debug_print_thread_info_pp): New.
6601         * target-delegates.c: Regenerate.
6602         * target.c (default_thread_address_space): Delete.
6603         (memory_xfer_partial_1): Use current_inferior.
6604         (target_detach): Use current_inferior.
6605         (target_thread_address_space): Delete.
6606         (generic_mourn_inferior): Use current_inferior.
6607         * target.h (struct target_ops) <thread_address_space>: Delete.
6608         (target_thread_address_space): Delete.
6609         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6610         pointers directly.
6611         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6612         thread pointer instead of a ptid_t.  Adjust all callers.
6613         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6614         (first_thread_of_process): Delete, replaced by ...
6615         (first_thread_of_inferior): ... this new function.  All callers
6616         adjusted.
6617         (any_thread_of_process): Rename to ...
6618         (any_thread_of_inferior): ... this, and take an inferior pointer.
6619         (any_live_thread_of_process): Rename to ...
6620         (any_live_thread_of_inferior): ... this, and take an inferior
6621         pointer.
6622         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6623         (value_in_thread_stack_temporaries)
6624         (get_last_thread_stack_temporary): Take a thread pointer instead
6625         of a ptid_t.  Adjust all callers.
6626         (thread_info::set_running): New.
6627         (validate_registers_access): Use inferior_thread.
6628         (can_access_registers_ptid): Rename to ...
6629         (can_access_registers_thread): ... this, and take a thread
6630         pointer.
6631         (print_thread_info_1): Adjust to compare thread pointers instead
6632         of ptids.
6633         (switch_to_no_thread, switch_to_thread): Make extern.
6634         (scoped_restore_current_thread::~scoped_restore_current_thread):
6635         Use m_thread pointer directly.
6636         (scoped_restore_current_thread::scoped_restore_current_thread):
6637         Use inferior_thread.
6638         (thread_command): Use thread pointer directly.
6639         (thread_num_make_value_helper): Use inferior_thread.
6640         * top.c (execute_command): Use inferior_thread.
6641         * tui/tui-interp.c: Include "inferior.h".
6642         * varobj.c (varobj_create): Use inferior_thread.
6643         (value_of_root_1): Use find_thread_global_id instead of
6644         global_thread_id_to_ptid.
6645
6646 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6647
6648         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6649         possible.
6650         (regcache::write_part): Likewise.
6651         (readable_regcache::cooked_read_part): Update comment.
6652         (readable_regcache::cooked_write_part): Likewise.
6653         * regcache.h: (readable_regcache::read_part): Likewise.
6654         (regcache::write_part): Likewise.
6655
6656 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6657             Dirk Schubert  <dirk.schubert@arm.com>
6658
6659         * aarch64-linux-nat.c (post_attach): New.
6660         (aarch64_linux_nat_target::post_attach): Override post_attach to
6661         record the number of hardware debug registers.
6662
6663 2018-06-20  Tom Tromey  <tom@tromey.com>
6664
6665         * python/py-param.c (add_setshow_generic): Make parameters const.
6666         (parmpy_init): Update.
6667
6668 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6669
6670         * regcache.h (regcache_cooked_read_ftype): Rename to...
6671         (register_read_ftype): ...this, change type to function_view.
6672         (class reg_buffer) <save>: Remove src parameter.
6673         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6674         parameter non-const in first overload.  Remove src parameter in
6675         second overload.
6676         * regcache.c (do_cooked_read): Remove.
6677         (readonly_detached_regcache::readonly_detached_regcache): Make
6678         parameter non-const, adjust call to other constructor.
6679         (reg_buffer::save): Remove src parameter.
6680         * frame.c (do_frame_register_read): Remove.
6681         (frame_save_as_regcache): Use lambda function.
6682         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6683         parameter to ppu2spu_data *.
6684         (ppu2spu_sniffer): Use lambda function.
6685
6686 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6687
6688         * record-full.c (record_full_target::insert_breakpoint): Remove
6689         "struct" keyword, add const.
6690
6691 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6692
6693         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6694         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6695         * configure.ac: Remove AC_PREREQ, add missing quoting.
6696         * gnulib/configure.ac: Modernize usage of
6697         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6698         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6699         (AUTOMAKE_VERSION): Bump to 1.15.1.
6700         * configure: Re-generate.
6701         * config.in: Re-generate.
6702         * aclocal.m4: Re-generate.
6703         * gnulib/aclocal.m4: Re-generate.
6704         * gnulib/config.in: Re-generate.
6705         * gnulib/configure: Re-generate.
6706         * gnulib/import/Makefile.in: Re-generate.
6707
6708 2018-06-19  Pedro Alves  <palves@redhat.com>
6709
6710         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6711         (lookup_minimal_symbol_by_pc_section): ... here with
6712         gdb_assert_not_reached added.
6713
6714 2018-06-19  Pedro Alves  <palves@redhat.com>
6715
6716         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6717         parameter with a block parameter.  Compare location's block symbol
6718         with the frame's block instead of addresses.
6719         (skip_inline_frames): Pass the current block instead of the
6720         frame's address.  Break out as soon as we determine the frame
6721         should not be skipped.
6722
6723 2018-06-18  Tom Tromey  <tom@tromey.com>
6724
6725         * solib-aix.c (solib_aix_get_section_offsets): Return
6726         unique_xmalloc_ptr.
6727         (solib_aix_solib_create_inferior_hook): Update.
6728
6729 2018-06-18  Tom Tromey  <tom@tromey.com>
6730
6731         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6732
6733 2018-06-18  Tom Tromey  <tom@tromey.com>
6734
6735         * solib-frv.c (frv_relocate_main_executable): Use
6736         unique_xmalloc_ptr.
6737         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6738         unique_xmalloc_ptr.
6739
6740 2018-06-18  Tom Tromey  <tom@tromey.com>
6741
6742         * objfiles.h (inhibit_section_map_updates): Update.
6743         (resume_section_map_updates, resume_section_map_updates_cleanup):
6744         Remove.
6745         * solib-svr4.c (svr4_handle_solib_event): Update.
6746         * objfiles.c (inhibit_section_map_updates): Return
6747         scoped_restore_tmpl<int>.
6748         (resume_section_map_updates, resume_section_map_updates_cleanup):
6749         Remove.
6750
6751 2018-06-18  Tom Tromey  <tom@tromey.com>
6752
6753         * valprint.h (read_string): Update.
6754         * valprint.c (read_string): Change type of "buffer".
6755         (val_print_string): Update.
6756         * python/py-value.c (valpy_string): Update.
6757         * language.h (struct language_defn) <la_get_string>: Change
6758         type of "buffer".
6759         (default_get_string, c_get_string): Update.
6760         * language.c (default_get_string): Change type of "buffer".
6761         * guile/scm-value.c (gdbscm_value_to_string): Update.
6762         * c-lang.c (c_get_string): Change type of "buffer".
6763
6764 2018-06-18  Tom Tromey  <tom@tromey.com>
6765
6766         * ser-mingw.c (struct pipe_state_destroyer): New.
6767         (pipe_state_up): New typedef.
6768         (cleanup_pipe_state): Remove.
6769         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6770
6771 2018-06-18  Tom Tromey  <tom@tromey.com>
6772
6773         * rust-lang.h (rust_yyerror): Don't declare.
6774         * rust-lang.c (rust_language_defn): Update.
6775         * rust-exp.y (yyerror): Now static.
6776         * parse.c (parse_exp_in_context_1): Update.
6777         * p-lang.h (p_yyerror): Don't declare.
6778         * p-lang.c (p_language_defn): Update.
6779         * p-exp.y (yyerror): Now static.
6780         * opencl-lang.c (opencl_language_defn): Update.
6781         * objc-lang.c (objc_language_defn): Update.
6782         * m2-lang.h (m2_yyerror): Don't declare.
6783         * m2-lang.c (m2_language_defn): Update.
6784         * m2-exp.y (yyerror): Now static.
6785         * language.h (struct language_defn) <la_error>: Remove.
6786         * language.c (unk_lang_error): Remove.
6787         (unknown_language_defn, auto_language_defn): Remove.
6788         * go-lang.h (go_yyerror): Don't declare.
6789         * go-lang.c (go_language_defn): Update.
6790         * go-exp.y (yyerror): Now static.
6791         * f-lang.h (f_yyerror): Don't declare.
6792         * f-lang.c (f_language_defn): Update.
6793         * f-exp.y (yyerror): Now static.
6794         * d-lang.h (d_yyerror): Don't declare.
6795         * d-lang.c (d_language_defn): Update.
6796         * d-exp.y (yyerror): Now static.
6797         * c-lang.h (c_yyerror): Don't declare.
6798         * c-lang.c (c_language_defn, cplus_language_defn)
6799         (asm_language_defn, minimal_language_defn): Update.
6800         * c-exp.y (yyerror): Now static.
6801         * ada-lang.h (ada_yyerror): Don't declare.
6802         * ada-lang.c (ada_language_defn): Update.
6803         * ada-exp.y (yyerror): Now static.
6804
6805 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6806
6807         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6808         (store_sveregs_to_thread): Likewise.
6809         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6810         (aarch64_linux_store_inferior_registers): Likewise.
6811         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6812         function.
6813         (aarch64_sve_regs_copy_to_regcache): Likewise.
6814         (aarch64_sve_regs_copy_from_regcache): Likewise.
6815         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6816         declaration.
6817         (aarch64_sve_regs_copy_to_regcache): Likewise.
6818         (aarch64_sve_regs_copy_from_regcache): Likewise.
6819         (sve_context): Structure from Linux headers.
6820         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6821         (SVE_SIG_ZREG_SIZE): Likewise.
6822         (SVE_SIG_PREG_SIZE): Likewise.
6823         (SVE_SIG_FFR_SIZE): Likewise.
6824         (SVE_SIG_REGS_OFFSET): Likewise.
6825         (SVE_SIG_ZREGS_OFFSET): Likewise.
6826         (SVE_SIG_ZREG_OFFSET): Likewise.
6827         (SVE_SIG_ZREGS_SIZE): Likewise.
6828         (SVE_SIG_PREGS_OFFSET): Likewise.
6829         (SVE_SIG_PREG_OFFSET): Likewise.
6830         (SVE_SIG_PREGS_SIZE): Likewise.
6831         (SVE_SIG_FFR_OFFSET): Likewise.
6832         (SVE_SIG_REGS_SIZE): Likewise.
6833         (SVE_SIG_CONTEXT_SIZE): Likewise.
6834         (SVE_PT_REGS_MASK): Likewise.
6835         (SVE_PT_REGS_FPSIMD): Likewise.
6836         (SVE_PT_REGS_SVE): Likewise.
6837         (SVE_PT_VL_INHERIT): Likewise.
6838         (SVE_PT_VL_ONEXEC): Likewise.
6839         (SVE_PT_REGS_OFFSET): Likewise.
6840         (SVE_PT_FPSIMD_OFFSET): Likewise.
6841         (SVE_PT_FPSIMD_SIZE): Likewise.
6842         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6843         (SVE_PT_SVE_PREG_SIZE): Likewise.
6844         (SVE_PT_SVE_FFR_SIZE): Likewise.
6845         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6846         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6847         (__SVE_SIG_TO_PT): Likewise.
6848         (SVE_PT_SVE_OFFSET): Likewise.
6849         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6850         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6851         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6852         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6853         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6854         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6855         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6856         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6857         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6858         (SVE_PT_SVE_SIZE): Likewise.
6859         (SVE_PT_SIZE): Likewise.
6860         (HAS_SVE_STATE): New define.
6861
6862 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6863
6864         * nat/aarch64-sve-linux-sigcontext.h: New file.
6865         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6866         new files.
6867         (SVE_VQ_MIN): Likewise.
6868         (SVE_VQ_MAX): Likewise.
6869         (SVE_VL_MIN): Likewise.
6870         (SVE_VL_MAX): Likewise.
6871         (SVE_NUM_ZREGS): Likewise.
6872         (SVE_NUM_PREGS): Likewise.
6873         (sve_vl_valid): Likewise.
6874         (struct user_sve_header): Likewise.
6875
6876 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6877             Richard Bunt <Richard.Bunt@arm.com>
6878
6879         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6880         was requested by GDB.
6881
6882 2018-06-15  Tom de Vries  <tdevries@suse.de>
6883
6884         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6885
6886 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6887
6888         * gnulib/update-gnulib.sh: Print expected versions of
6889         autoconf/aclocal.
6890
6891 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6892
6893         * arch-utils.c (default_type_align): Use type_length_units.
6894         * gdbtypes.c (type_align): Use type_length_units.
6895
6896 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6897
6898         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6899         of 'define' command.
6900
6901 2018-06-14  Tom de Vries  <tdevries@suse.de>
6902
6903         PR cli/22573
6904         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6905         get_no_prettyformat_print_options.
6906
6907 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6908
6909         * sparc-nat.h: Include target.h.
6910         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6911         <fetch_registers>: Remove this argument in function call.
6912         <store_registers>: Remove this argument in function call, remove
6913         extra semicolon.
6914         <low_forget_process>: Call sparc64_forget_process instead of
6915         sparc_forget_process.
6916
6917 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6918
6919         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6920         (procfs_target::make_corefile_notes): Adjust to new
6921         target_read_alloc return type.
6922
6923 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6924             Stephen Roberts  <stephen.roberts@arm.com>
6925
6926         PR gdb/22882
6927         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6928         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6929         Move should_notify_stop local into more inner scope.
6930
6931 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6932             Stephen Roberts  <stephen.roberts@arm.com>
6933
6934         PR gdb/22882
6935         * infrun.c (resume_1): Add call to mark_async_event_handler.
6936
6937 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6938
6939         * infrun.c (do_target_wait): Change old version of $pc printed.
6940
6941 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6942
6943         * dwarf2read.c (read_index_from_section): Rename to...
6944         (read_gdb_index_from_section): ... this, update all callers.
6945         (dwarf2_read_index): Rename to...
6946         (dwarf2_read_gdb_index): ... this, update all callers.
6947
6948 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6949
6950         * gdb/hppa-linux-nat.c
6951         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6952         hppa_linux_nat_target::fetch_registers.
6953
6954 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6955
6956         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6957         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6958         (AARCH64_DWARF_SVE_FFR): Likewise.
6959         (AARCH64_DWARF_SVE_P0): Likewise.
6960         (AARCH64_DWARF_SVE_Z0): Likewise.
6961
6962 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6963
6964         * common/common-regcache.h (raw_compare): New function.
6965         * regcache.c (regcache::raw_compare): Likewise.
6966         * regcache.h (regcache::raw_compare): New declaration.
6967
6968 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6969
6970         * common/common-regcache.h (reg_buffer_common): New structure.
6971         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6972         (reg_buffer::raw_supply): Likewise.
6973         (reg_buffer::raw_supply_integer): Likewise.
6974         (reg_buffer::raw_supply_zeroed): Likewise.
6975         (reg_buffer::raw_collect): Likewise.
6976         (reg_buffer::raw_collect_integer): Likewise.
6977         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6978         (reg_buffer::raw_supply): Likewise.
6979         (reg_buffer::raw_supply_integer): Likewise.
6980         (reg_buffer::raw_supply_zeroed): Likewise.
6981         (reg_buffer::raw_collect): Likewise.
6982         (reg_buffer::raw_collect_integer): Likewise.
6983
6984 2018-06-10  Tom Tromey  <tom@tromey.com>
6985
6986         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6987         (class remote_state) <stop_reply_queue>: Now std::vector.
6988         (remote_state::~remote_state)
6989         (remote_target::stop_reply_queue_length): Update.
6990         (struct queue_iter_param, remove_child_of_pending_fork)
6991         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6992         (check_pending_event_prevents_wildcard_vcont_callback)
6993         (remove_stop_reply_for_inferior)
6994         (remove_stop_reply_of_remote_state)
6995         (remote_notif_remove_once_on_match)
6996         (stop_reply_match_ptid_and_ws)
6997         (remote_kill_child_of_pending_fork): Remove.
6998         (remote_target::remove_new_fork_children)
6999         (remote_target::check_pending_events_prevent_wildcard_vcont)
7000         (remote_target::discard_pending_stop_replies)
7001         (remote_target::discard_pending_stop_replies_in_queue)
7002         (remote_target::remote_notif_remove_queued_reply)
7003         (remote_target::queued_stop_reply)
7004         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7005         (remote_target::wait, remote_target::kill_new_fork_children)
7006         (remote_target::async): Update.
7007
7008 2018-06-10  Tom Tromey  <tom@tromey.com>
7009
7010         * record-full.c (record_full_arch_list_cleanups): Remove.
7011         (record_full_message): Use try/catch.
7012         (record_full_wait_cleanups): Remove.
7013         (record_full_wait_1): Use try/catch.
7014         (record_full_restore): Likewise.
7015
7016 2018-06-10  Tom Tromey  <tom@tromey.com>
7017
7018         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7019         declare VEC.  Add constructor.
7020         <in_target_beneath>: Now bool.
7021         (record_full_breakpoints): Now a std::vector, static.
7022         (record_full_sync_record_breakpoints)
7023         (record_full_init_record_breakpoints)
7024         (record_full_target::insert_breakpoint)
7025         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7026
7027 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7028
7029         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7030         * serial.c (serial_interface_lookup): Remove struct keyword.
7031
7032 2018-06-10  Tom Tromey  <tom@tromey.com>
7033
7034         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7035         method.
7036         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7037         a method.
7038         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7039         method.
7040         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7041         "beneath" as a method.
7042         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7043         Use "beneath" as a method.
7044
7045 2018-06-10  Tom Tromey  <tom@tromey.com>
7046
7047         * tracefile.c (struct trace_file_writer_deleter): New.
7048         <operator()>: Rename from trace_file_writer_xfree.
7049         (trace_file_writer_up): New typedef.
7050         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7051
7052 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7053
7054         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7055         <m_registers, m_register_status>: Change type to
7056         std::unique_ptr.
7057         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7058         XCNEWVEC.
7059
7060 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7061
7062         * common/common-regcache.h (enum register_status): Add
7063         underlying type "signed char".
7064         * regcache.h (reg_buffer) <m_register_status>: Change type to
7065         register_status *.
7066         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7067         register_status instead of signed char.
7068         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7069         (reg_buffer::get_register_status): Remove cast.
7070         (readable_regcache::raw_read): Remove cast.
7071         (readable_regcache::cooked_read): Remove cast.
7072
7073 2018-06-09  Tom Tromey  <tom@tromey.com>
7074
7075         * source.c (reverse_search_command, forward_search_command): Use
7076         scoped_fd.
7077
7078 2018-06-09  Tom Tromey  <tom@tromey.com>
7079
7080         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7081         (serial_ops_list): Now static, std::vector.
7082         (serial_interface_lookup, serial_add_interface): Update.
7083
7084 2018-06-09  Tom Tromey  <tom@tromey.com>
7085
7086         * dwarf2read.c (process_cu_includes): Update.
7087         (process_full_comp_unit): Update.
7088         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7089         std::vector.
7090
7091 2018-06-08  Paul Koning  <paul_koning@dell.com>
7092
7093         PR gdb/23252
7094
7095         * python/python.c (do_start_initialization):
7096         Avoid call to internal Python API.
7097         (init__gdb_module): New function.
7098
7099 2018-06-08  Gary Benson <gbenson@redhat.com>
7100
7101         * linux-thread-db.c (valprint.h): New include.
7102         (struct check_thread_db_info): New structure.
7103         (check_thread_db_on_load, tdb_testinfo): New static globals.
7104         (check_thread_db, check_thread_db_callback): New functions.
7105         (try_thread_db_load_1): Run integrity checks if requested.
7106         (maintenance_check_libthread_db): New function.
7107         (_initialize_thread_db): Register "maint check libthread-db"
7108         and "maint set/show check-libthread-db".
7109         * NEWS: Mention the above new commands.
7110
7111 2018-06-08  Tom Tromey  <tom@tromey.com>
7112
7113         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7114         now a method.
7115
7116 2018-06-08  Tom Tromey  <tom@tromey.com>
7117
7118         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7119
7120 2018-06-08  Tom Tromey  <tom@tromey.com>
7121
7122         * common/btrace-common.h (struct btrace_data): Add constructor,
7123         destructor, move assignment operator.
7124         <empty, clear, fini>: New methods.
7125         <format>: Initialize.
7126         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7127         (btrace_data_empty): Don't declare.
7128         * common/btrace-common.c (btrace_data_init): Remove.
7129         (btrace_data::fini): Rename from btrace_data_fini.
7130         (btrace_data::empty): Rename from btrace_data_empty.
7131         (btrace_data::clear): Rename from btrace_data_clear.  Return
7132         bool.
7133         * btrace.h (make_cleanup_btrace_data): Don't declare.
7134         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7135         (parse_xml_btrace): Update.
7136         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7137         (maint_btrace_clear_packet_history_cmd): Update.
7138
7139 2018-06-07  Pedro Alves  <palves@redhat.com>
7140
7141         * target.h (target_ops) <beneath>: Now a method.  All references
7142         updated.
7143         (class target_stack): New.
7144         * target.c (g_target_stack): New.
7145         (g_current_top_target): Delete.
7146         (current_top_target): Get the top target out of g_target_stack.
7147         (target_stack::push, target_stack::unpush): New.
7148         (push_target, unpush_target): Reimplement.
7149         (target_is_pushed): Reimplement in terms of g_target_stack.
7150         (target_ops::beneath, target_stack::find_beneath): New.
7151
7152 2018-06-07  Pedro Alves  <palves@redhat.com>
7153
7154         * target.h (find_target_beneath): Delete declaration.
7155         * target.c (find_target_beneath): Delete definition.
7156         * aix-thread.c: All callers of find_target_beneath adjusted to
7157         call target_ops::beneath instead.
7158         * bsd-uthread.c: Likewise.
7159         * linux-thread-db.c: Likewise.
7160         * ravenscar-thread.c: Likewise.
7161         * sol-thread.c: Likewise.
7162         * spu-multiarch.c: Likewise.
7163
7164 2018-06-07  Pedro Alves  <palves@redhat.com>
7165
7166         * target.h (target_ops) <beneath>: Now a method.  All references
7167         updated.
7168         (target_ops) <m_beneath>: New.
7169         * target.c (target_ops::beneath): New.
7170         * corelow.c: Adjust all references to target_ops::beneath.
7171         * linux-thread-db.c: Likewise.
7172         * make-target-delegates: Likewise.
7173         * record-btrace.c: Likewise.
7174         * record-full.c: Likewise.
7175         * remote.c: Likewise.
7176         * target.c: Likewise.
7177         * target-delegates.c: Regenerate.
7178
7179 2018-06-07  Pedro Alves  <palves@redhat.com>
7180
7181         * target.h (target_stack): Delete.
7182         (current_top_target): Declare function.
7183         * target.c (target_stack): Delete.
7184         (g_current_top_target): New.
7185         (current_top_target): New function.
7186         * auxv.c: Use current_top_target instead of target_stack
7187         throughout.
7188         * avr-tdep.c: Likewise.
7189         * breakpoint.c: Likewise.
7190         * corefile.c: Likewise.
7191         * elfread.c: Likewise.
7192         * eval.c: Likewise.
7193         * exceptions.c: Likewise.
7194         * frame.c: Likewise.
7195         * gdbarch-selftests.c: Likewise.
7196         * gnu-v3-abi.c: Likewise.
7197         * ia64-tdep.c: Likewise.
7198         * ia64-vms-tdep.c: Likewise.
7199         * infcall.c: Likewise.
7200         * infcmd.c: Likewise.
7201         * infrun.c: Likewise.
7202         * linespec.c: Likewise.
7203         * linux-tdep.c: Likewise.
7204         * minsyms.c: Likewise.
7205         * ppc-linux-nat.c: Likewise.
7206         * ppc-linux-tdep.c: Likewise.
7207         * procfs.c: Likewise.
7208         * regcache.c: Likewise.
7209         * remote.c: Likewise.
7210         * rs6000-tdep.c: Likewise.
7211         * s390-linux-nat.c: Likewise.
7212         * s390-tdep.c: Likewise.
7213         * solib-aix.c: Likewise.
7214         * solib-darwin.c: Likewise.
7215         * solib-dsbt.c: Likewise.
7216         * solib-spu.c: Likewise.
7217         * solib-svr4.c: Likewise.
7218         * solib-target.c: Likewise.
7219         * sparc-tdep.c: Likewise.
7220         * sparc64-tdep.c: Likewise.
7221         * spu-tdep.c: Likewise.
7222         * symfile.c: Likewise.
7223         * symtab.c: Likewise.
7224         * target-descriptions.c: Likewise.
7225         * target-memory.c: Likewise.
7226         * target.c: Likewise.
7227         * target.h: Likewise.
7228         * tracefile-tfile.c: Likewise.
7229         * tracepoint.c: Likewise.
7230         * valops.c: Likewise.
7231         * valprint.c: Likewise.
7232         * value.c: Likewise.
7233         * windows-tdep.c: Likewise.
7234         * mi/mi-main.c: Likewise.
7235
7236 2018-06-07  Tom Tromey  <tom@tromey.com>
7237
7238         * valprint.h (build_address_symbolic): Declare.
7239         * printcmd.c (print_address_symbolic): Update.
7240         (build_address_symbolic): Change "name" and "filename" to
7241         std::string.
7242         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7243         Update.
7244         * defs.h (build_address_symbolic): Remove declaration.
7245
7246 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7247
7248         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7249         (aarch64_vnv_type): Add function.
7250         (aarch64_pseudo_register_name): Add V regs for SVE.
7251         (aarch64_pseudo_register_type): Likewise.
7252         (aarch64_pseudo_register_reggroup_p): Likewise.
7253         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7254         (aarch64_pseudo_read_value): Add V regs for SVE.
7255         (aarch64_pseudo_write_2): Use V0 offset for SVE
7256         (aarch64_pseudo_write): Add V regs for SVE.
7257         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7258
7259 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7260
7261         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7262         (sve_vl_from_vq): Likewise.
7263
7264 2018-06-05  Tom Tromey  <tom@tromey.com>
7265
7266         * cli/cli-cmds.c (show_version): Update.
7267         * top.c (print_gdb_version): Add "interactive" parameter.
7268         Update.
7269         * main.c (captured_main_1): Update.
7270         * top.h (print_gdb_version): Add "interactive" parameter and a
7271         comment.
7272
7273 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7274
7275         * common/enum-flags.h: Add trailing semicolon to example in
7276         comment.
7277
7278 2018-06-05  Tom Tromey  <tom@tromey.com>
7279
7280         PR cli/12326:
7281         * NEWS: Add entry about pager.
7282         * utils.c (pagination_disabled_for_command): New global.
7283         (prompt_for_continue): Allow "c" response to prompt.
7284         (reinitialize_more_filter): Clear
7285         pagination_disabled_for_command.
7286         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7287
7288 2018-06-04  Tom Tromey  <tom@tromey.com>
7289
7290         * ada-lang.h (ada_lookup_symbol_list): Update.
7291         * ada-lang.c (resolve_subexp): Update.
7292         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7293         parameter.
7294         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7295         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7296         results parameter to std::vector.
7297         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7298         Update.
7299         * ada-exp.y (block_lookup): Update.
7300         (select_possible_type_sym): Change type of syms.  Remove nsyms
7301         parameter.
7302         (write_var_or_type, write_name_assoc): Update.
7303
7304 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7305
7306         * windows-nat.c (windows_nat_target::xfer_partial): Return
7307         TARGET_XFER_E_IO if we need to delegate to the target beneath
7308         but BENEATH is NULL.
7309
7310 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7311
7312         * Makefile.in (config.status): Add configure.nat as a
7313         dependency.
7314
7315 2018-06-04  Tom Tromey  <tom@tromey.com>
7316
7317         * cp-name-parser.y (cpname_state): Add method declarations.
7318         (HANDLE_QUAL): Update.
7319         (cpname_state::d_grab, cpname_state::fill_comp)
7320         (cpname_state::make_operator, cpname_state::make_dtor)
7321         (cpname_state::make_builtin_type, cpname_state::make_name)
7322         (cpname_state::d_qualify, cpname_state::d_int_type)
7323         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7324         (%union): Move earlier.
7325
7326 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7327
7328         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7329
7330 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7331
7332         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7333         (aarch64_pseudo_write_1): Likewise.
7334         (aarch64_pseudo_read_value): Use helper.
7335         (aarch64_pseudo_write): Likewise.
7336
7337 2018-06-04  Pedro Alves  <palves@redhat.com>
7338
7339         * darwin-nat.c (darwin_ops): Delete.
7340         (darwin_attach_pid): Use get_native_target.
7341
7342 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7343
7344         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7345         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7346
7347 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7348
7349         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7350         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7351         (aarch64_gdbarch_init): Check for SVE.
7352         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7353
7354 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7355
7356         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7357         * aarch64-tdep.h (aarch64_read_description): Likewise.
7358         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7359         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7360         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7361         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7362         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7363
7364 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7365
7366         * value.c (value_fetch_lazy_bitfield): New.
7367         (value_fetch_lazy_memory): New.
7368         (value_fetch_lazy_register): New.
7369         (value_fetch_lazy): Factor out to smaller functions.
7370
7371 2018-06-01  Tom Tromey  <tom@tromey.com>
7372
7373         * cp-name-parser.y (backslashable, represented): Now const.
7374
7375 2018-06-01  Tom Tromey  <tom@tromey.com>
7376
7377         * cp-name-parser.y: Include parser-defs.h.
7378         (parser_fprintf): Remove declaration.
7379
7380 2018-06-01  Tom Tromey  <tom@tromey.com>
7381
7382         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7383         %parse-param.
7384         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7385         (global_result): Remove globals.
7386         (struct cpname_state): New.
7387         (yyparse): Don't declare.
7388         (yylex, yyerror): Move declarations after %union.
7389         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7390         (make_name): Add state parameter.
7391         Update all callers.
7392         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7393         parameter.
7394         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7395         Update.
7396         (yylex): Add lvalp, state parameters.
7397         (yyerror): Add state parameter.
7398         (cp_demangled_name_to_comp): Update.
7399
7400 2018-06-01  Tom Tromey  <tom@tromey.com>
7401
7402         * cp-name-parser.y (parser_fprintf): Declare.
7403         (GDB_YY_REMAP_PREFIX): Define.
7404         Include yy-remap.h.  Don't redefine yy* identifiers.
7405
7406 2018-06-01  Tom Tromey  <tom@tromey.com>
7407
7408         * python/py-type.c (typy_legacy_template_argument): Update.
7409         * cp-support.h (cp_demangled_name_to_comp): Update.
7410         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7411         parameter to be a "std::string *".
7412         (main): Update.
7413
7414 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7415
7416         * ada-lex.l: Include "diagnostics.h" instead of
7417         "common/diagnostics.h".
7418         * unittests/environ-selftests.c: Likewise.
7419         * common/diagnostics.h: Moved to ../include.
7420
7421 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7422
7423         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7424         to language_mode_manual while calling breakpoint_re_set_one.
7425
7426 2018-06-01  Tom Tromey  <tom@tromey.com>
7427
7428         * valops.c (value_cast_structs, destructor_name_p): Update.
7429         * symtab.c (gdb_mangle_name): Update.
7430         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7431         Update.
7432         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7433         (pascal_object_print_value_fields, pascal_object_print_value):
7434         Update.
7435         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7436         * linespec.c (find_methods): Update.
7437         * gdbtypes.h (type_name_no_tag): Remove.
7438         (type_name_or_error): Rename from type_name_no_tag_or_error.
7439         * gdbtypes.c (type_name_no_tag): Remove.
7440         (type_name_or_error): Rename from type_name_no_tag_or_error.
7441         (lookup_struct_elt_type, check_typedef): Update.
7442         * expprint.c (print_subexp_standard): Update.
7443         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7444         * d-namespace.c (d_lookup_nested_symbol): Update.
7445         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7446         (cp_print_class_member): Update.
7447         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7448         * completer.c (add_struct_fields): Update.
7449         * c-typeprint.c (cp_type_print_derivation_info)
7450         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7451         Update.
7452         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7453         (ada_prefer_type, ada_is_exception_sym): Update.
7454
7455 2018-06-01  Tom Tromey  <tom@tromey.com>
7456
7457         * valops.c (enum_constant_from_type, value_namespace_elt)
7458         (value_maybe_namespace_elt): Update.
7459         * valarith.c (find_size_for_pointer_math): Update.
7460         * target-descriptions.c (make_gdb_type): Update.
7461         * symmisc.c (print_symbol): Update.
7462         * stabsread.c (define_symbol, read_type)
7463         (complain_about_struct_wipeout, add_undefined_type)
7464         (cleanup_undefined_types_1): Update.
7465         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7466         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7467         (rust_internal_print_type, rust_composite_type)
7468         (rust_evaluate_funcall, rust_evaluate_subexp)
7469         (rust_inclusive_range_type_p): Update.
7470         * python/py-type.c (typy_get_tag): Update.
7471         * p-typeprint.c (pascal_type_print_base): Update.
7472         * mdebugread.c (parse_symbol, parse_type): Update.
7473         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7474         Update.
7475         * guile/scm-type.c (gdbscm_type_tag): Update.
7476         * go-lang.c (sixg_string_p): Update.
7477         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7478         Update.
7479         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7480         (TYPE_TAG_NAME): Remove.
7481         * gdbtypes.c (type_name_no_tag): Simplify.
7482         (check_typedef, check_types_equal, recursive_dump_type)
7483         (copy_type_recursive, arch_composite_type): Update.
7484         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7485         in summary mode when needed.
7486         * eval.c (evaluate_funcall): Update.
7487         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7488         (process_structure_scope, read_enumeration_type)
7489         (read_namespace_type, read_module_type, determine_prefix): Update.
7490         * cp-support.c (inspect_type): Update.
7491         * coffread.c (process_coff_symbol, decode_base_type): Update.
7492         * c-varobj.c (c_is_path_expr_parent): Update.
7493         * c-typeprint.c (c_type_print_base_struct_union): Update.
7494         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7495         summary when using C language.
7496         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7497         (gen_maybe_namespace_elt): Update.
7498         * ada-lang.c (ada_type_name): Simplify.
7499         (empty_record, ada_template_to_fixed_record_type_1)
7500         (template_to_static_fixed_type)
7501         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7502
7503 2018-06-01  Tom Tromey  <tom@tromey.com>
7504
7505         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7506         c_print_type.
7507         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7508         (c_print_type): Update.
7509         (c_print_type): New overload.
7510         (c_type_print_varspec_prefix, c_type_print_args)
7511         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7512         (c_type_print_base_struct_union, c_type_print_base_1)
7513         (cp_type_print_method_args): Add "language" parameter.
7514         (c_type_print_base): Update.
7515         * c-lang.h (c_print_type): Add new overload.
7516
7517 2018-06-01  Tom Tromey  <tom@tromey.com>
7518
7519         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7520         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7521
7522 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7523
7524         * aarch64-tdep.c (aarch64_sve_register_names): New const
7525         var.
7526         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7527         (AARCH64_SVE_Z_REGS_NUM): New define.
7528         (AARCH64_SVE_P_REGS_NUM): Likewise.
7529         (AARCH64_SVE_NUM_REGS): Likewise.
7530
7531 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7532
7533         * nat/linux-ptrace.h [__alpha__]
7534         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7535         definitions.
7536
7537 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7538
7539         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7540         the endianness selected.
7541         * NEWS: Document `set endian auto' mode operation update.
7542
7543 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7544
7545         * Makefile.in: Add new header.
7546         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7547         (sve_vl_from_vg): Likewise.
7548         (sve_vq_from_vl): Likewise.
7549         (sve_vl_from_vq): Likewise.
7550         (sve_vq_from_vg): Likewise.
7551         (sve_vg_from_vq): Likewise.
7552         * configure.nat: Add new c file.
7553         * nat/aarch64-sve-linux-ptrace.c: New file.
7554         * nat/aarch64-sve-linux-ptrace.h: New file.
7555
7556 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7557
7558         * aarch64-linux-nat.c (aarch64_linux_read_description):
7559         Add parmeter zero.
7560         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7561         Likewise.
7562         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7563         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7564         (aarch64_gdbarch_init): Add parmeter zero.
7565         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7566         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7567         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7568         parmeter.
7569         * doc/gdb.texinfo: Describe SVE feature
7570         * features/aarch64-sve.c: New file.
7571
7572 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7573
7574         PR gdb/23210
7575         * gdbarch.sh (significant_addr_bit): Default to zero when
7576         not set by target architecture.
7577         * gdbarch.c: Re-generated.
7578         * utils.c (address_significant): Update.
7579
7580 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7581
7582         * stack.c (func_command): Remove trailing newline in call to error.
7583
7584 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7585
7586         * regcache.h (regcache_raw_collect): Remove, update callers to
7587         use regcache::raw_collect.
7588         * regcache.c (regcache_raw_collect): Remove.
7589
7590 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7591
7592         * regcache.h (regcache_raw_supply): Remove, update callers to
7593         use detached_regcache::raw_supply.
7594         * regcache.c (regcache_raw_supply): Remove.
7595
7596 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7597
7598         * regcache.h (regcache_cooked_write_part): Remove, update
7599         callers to use regcache::cooked_write_part.
7600         * regcache.c (regcache_cooked_write_part): Remove.
7601
7602 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7603
7604         * regcache.h (regcache_cooked_read_part): Remove, update callers
7605         to use readable_regcache::cooked_read_part.
7606         * regcache.c (regcache_cooked_read_part): Remove.
7607
7608 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7609
7610         * regcache.h (regcache_cooked_read_value): Remove, update
7611         callers to use readable_regcache::cooked_read_value.
7612         * regcache.c (regcache_cooked_read_value): Remove.
7613
7614 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7615
7616         * regcache.h (regcache_cooked_write): Remove, update callers to
7617         use regcache::cooked_write.
7618         * regcache.c (regcache_cooked_write): Remove.
7619
7620 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7621
7622         * regcache.h (regcache_invalidate): Remove, update callers to
7623         use detached_regcache::invalidate instead.
7624         * regcache.c (regcache_invalidate): Remove.
7625
7626 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7627
7628         * regcache.h (regcache_raw_write_part): Remove, update callers
7629         to use regcache::raw_write_part instead.
7630         * regcache.c (regcache_raw_write_part): Remove.
7631
7632 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7633
7634         * regcache.h (regcache_raw_read_part): Remove, update callers to
7635         use readable_regcache::raw_read_part instead.
7636         * regcache.c (regcache_raw_read_part): Remove.
7637
7638 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7639
7640         * regcache.h (regcache_cooked_read): Remove, update callers to
7641         use readable_regcache::cooked_read instead.
7642         * regcache.c (regcache_cooked_read): Remove.
7643
7644 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7645
7646         * regcache.h (regcache_raw_write): Remove, update callers to use
7647         regcache::raw_write instead.
7648         * regcache.c (regcache_raw_write): Remove.
7649
7650 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7651
7652         * regcache.h (regcache_raw_read): Remove, update callers to use
7653         readable_regcache::raw_read instead.
7654         * regcache.c (regcache_raw_read): Remove.
7655
7656 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7657
7658         * regcache.h (regcache_raw_update): Remove, update callers to
7659         use readable_regcache::raw_update instead.
7660         * regcache.c (regcache_raw_update): Remove.
7661
7662 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7663
7664         * regcache.h (regcache_register_status): Remove, update callers
7665         to use reg_buffer::get_register_status directly instead.
7666         * regcache.c (regcache_register_status): Remove.
7667
7668 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7669
7670         * regcache.h (regcache_get_ptid): Remove, update all callers to
7671         call regcache::ptid instead.
7672         * regcache.c (regcache_get_ptid): Remove.
7673
7674 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7675
7676         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7677
7678 2018-05-30  Pedro Alves  <palves@redhat.com>
7679
7680         * common/common-exceptions.h (exception_rethrow): Use
7681         ATTRIBUTE_NORETURN.
7682
7683 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7684
7685         * breakpoint.c (print_solib_event, check_status_catch_solib):
7686         Remove struct keyword in range-based for loops.
7687         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7688         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7689         Likewise.
7690         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7691         Likewise.
7692         * symfile.c (addr_info_make_relative): Likewise.
7693         * thread.c (value_in_thread_stack_temporaries): Likewise.
7694
7695 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7696
7697         PR gdb/16841
7698         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7699         aggregate type to get its real type before accessing it.
7700
7701 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7702
7703         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7704         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7705         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7706         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7707         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7708         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7709         * printcmd.c (info_address_command): Likewise.
7710
7711 2018-05-29  Tom Tromey  <tom@tromey.com>
7712
7713         * windows-nat.c (handle_exception): Update fall-through comment.
7714
7715 2018-05-29  Tom Tromey  <tom@tromey.com>
7716
7717         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7718         (struct program_space) <added_solibs>: Now a std::vector.
7719         * breakpoint.c (print_solib_event): Update.
7720         (check_status_catch_solib): Update.
7721         * progspace.c (clear_program_space_solib_cache): Update.
7722         * solib.c (update_solib_list): Update.
7723
7724 2018-05-29  Tom Tromey  <tom@tromey.com>
7725
7726         * python/py-type.c (typy_richcompare): Update.
7727         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7728         * gdbtypes.h (types_deeply_equal): Return bool.
7729         (types_equal): Likewise.
7730         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7731         declare VEC.
7732         (check_types_equal): Change worklist to std::vector.  Return
7733         bool.
7734         (struct type_equality_entry): Add constructor.
7735         (compare_maybe_null_strings): Return bool.
7736         (check_types_worklist): Return bool.  Change worklist to
7737         std::vector.
7738         (types_deeply_equal): Use std::vector.
7739         (types_equal): Return bool.
7740         (compare_maybe_null_strings): Simplify.
7741
7742 2018-05-29  Tom Tromey  <tom@tromey.com>
7743
7744         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7745
7746 2018-05-29  Tom Tromey  <tom@tromey.com>
7747
7748         * objc-lang.h: Don't include cp-support.h.
7749         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7750         declare VEC.
7751
7752 2018-05-27  Tom Tromey  <tom@tromey.com>
7753
7754         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7755
7756 2018-05-25  Tom Tromey  <tom@tromey.com>
7757
7758         * value.c (value::location): Initialize.
7759
7760 2018-05-25  Tom Tromey  <tom@tromey.com>
7761
7762         * dbxread.c (init_bincl_list): Remove.
7763         (bincl_list): Now a std::vector.
7764         (bincls_allocated, next_bincl): Remove.
7765         (free_bincl_list, do_free_bincl_list_cleanup)
7766         (make_cleanup_free_bincl_list): Remove.
7767         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7768         unique_xmalloc_ptr.
7769         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7770         (struct header_file_location): Add constructor.
7771         (add_bincl_to_list): Remove.
7772
7773 2018-05-25  Tom Tromey  <tom@tromey.com>
7774
7775         * tui/tui.c (tui_enable): Update.
7776         * mi/mi-interp.c (mi_interp::init): Update.
7777         * interps.h (class interp) <name>: New method.
7778         <m_name>: Rename from name.
7779         (~scoped_restore_interp): Update.
7780         * interps.c (interp::interp): Update.
7781         (interp_add, interp_set, interp_lookup_existing)
7782         (current_interp_named_p): Update.
7783
7784 2018-05-25  Tom Tromey  <tom@tromey.com>
7785
7786         * interps.c (interp_name): Remove.
7787         * mi/mi-interp.c (mi_interp::init): Update.
7788         * interps.h (interp_name): Remove.
7789         (~scoped_restore_interp): Update.
7790         * tui/tui.c (tui_enable): Update.
7791
7792 2018-05-25  Tom Tromey  <tom@tromey.com>
7793
7794         * utils.c (fputs_maybe_filtered): Update.
7795         * linespec.c (decode_line_full): Update.
7796         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7797         (mi_print_breakpoint_for_event, mi_solib_loaded)
7798         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7799         (mi_user_selected_context_changed): Update.
7800         * mi/mi-main.c (mi_execute_command): Update.
7801         * cli/cli-script.c (execute_control_command): Update.
7802         * python/python.c (execute_gdb_command): Update.
7803         * solib.c (info_sharedlibrary_command): Update.
7804         * interps.c (interp_ui_out): Remove.
7805         * interps.h (interp_ui_out): Remove.
7806
7807 2018-05-25  Tom Tromey  <tom@tromey.com>
7808
7809         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7810         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7811         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7812
7813 2018-05-25  Tom Tromey  <tom@tromey.com>
7814
7815         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7816         * interps.c (interp_exec): Use scoped_restore.
7817
7818 2018-05-25  Tom Tromey  <tom@tromey.com>
7819
7820         * remote.c (remote_target::remote_file_get): Use
7821         gdb::byte_vector.
7822         (remote_target::remote_file_put): Likewise.
7823
7824 2018-05-25  Tom Tromey  <tom@tromey.com>
7825
7826         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7827         a std::string.
7828         (get_pe_section_index, add_pe_exported_sym): Update.
7829         (read_pe_exported_syms): Use gdb::def_vector.
7830
7831 2018-05-25  Tom Tromey  <tom@tromey.com>
7832
7833         * frame.c (remove_prev_frame): Remove.
7834         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7835
7836 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7837
7838         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7839         Remove prototypes.
7840         * mips-linux-nat.c (supply_fpregset): Always call
7841         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7842         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7843         `mips_fill_fpregset'.
7844         * mips-linux-tdep.c (mips_supply_fpregset)
7845         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7846         (mips_fill_fpregset_wrapper): Remove functions.
7847         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7848         (mips_linux_fpregset): Remove variable.
7849         (mips_linux_iterate_over_regset_sections): Use
7850         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7851         (mips_linux_o32_sigframe_init): Remove comment.
7852
7853 2018-05-25  Pedro Alves  <palves@redhat.com>
7854
7855         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7856         (struct readahead_cache, struct packet_reg, struct
7857         remote_arch_state, class remote_state): Move higher up in the
7858         file.
7859         (remote_target::m_remote_state): Now an object instead of a pointer.
7860         (remote_target::get_remote_state): Adjust.
7861
7862 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7863
7864         * stack.c (select_and_print_frame): Delete.
7865         (struct function_bounds): Move struct within function.
7866         (func_command): Most content moved into new function
7867         find_frame_for_function, use new function, print result, add
7868         function comment.
7869         (find_frame_for_function): New function, now returns a result.
7870
7871 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7872
7873         * stack.c (iterate_over_block_arg_vars): Fix comment.
7874         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7875
7876 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7877
7878         PR gdb/23203
7879         * frame.c
7880         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7881         Define.
7882         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7883         Define.
7884         * frame.h (class scoped_restore_selected_frame): New class.
7885         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7886         of any exception, use scoped_restore_selected_frame to restore the
7887         frame instead.
7888
7889 2018-05-24  Pedro Alves  <palves@redhat.com>
7890
7891         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7892         override.
7893
7894 2018-05-23  Tom Tromey  <tom@tromey.com>
7895
7896         * complaints.c (struct complaints): Remove.
7897         (symfile_complaint_book): Remove.
7898         (series): New global.
7899         (complaint_internal): Update.
7900         (clear_complaints): Update.
7901
7902 2018-05-23  Tom Tromey  <tom@tromey.com>
7903
7904         * complaints.c (counters): New global.
7905         (struct complain): Remove.
7906         (struct complaints) <root>: Remove.
7907         (complaint_sentinel): Remove.
7908         (symfile_complaint_book): Update.
7909         (find_complaint) Remove.
7910         (complaint_internal, clear_complaints): Update.
7911
7912 2018-05-23  Tom Tromey  <tom@tromey.com>
7913
7914         * complaints.c (struct complain) <file, line>: Remove.
7915         (find_complaint): Remove file, line parameters.
7916         (complaint_internal): Update.
7917
7918 2018-05-23  Tom Tromey  <tom@tromey.com>
7919
7920         * complaints.c (vcomplaint): Remove.
7921         (complaint_internal) Merge in contents of vcomplaint.
7922
7923 2018-05-23  Tom Tromey  <tom@tromey.com>
7924
7925         * complaints.c (struct complaints) <explanation>: Remove.
7926         (symfile_explanations): Remove.
7927         (symfile_complaint_book): Update.
7928         (vcomplaint): Update.
7929         (struct explanation): Remove.
7930
7931 2018-05-23  Tom Tromey  <tom@tromey.com>
7932
7933         * complaints.c (symfile_complaints): Remove.
7934         (complaint_internal): Remove "complaints" parameter.
7935         (clear_complaints, vcomplaint): Remove "c" parameter.
7936         (get_complaints): Remove.
7937         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7938         (dwarf2_debug_line_missing_file_complaint)
7939         (dwarf2_debug_line_missing_end_sequence_complaint)
7940         (dwarf2_complex_location_expr_complaint)
7941         (dwarf2_const_value_length_mismatch_complaint)
7942         (dwarf2_section_buffer_overflow_complaint)
7943         (dwarf2_macro_malformed_definition_complaint)
7944         (dwarf2_invalid_attrib_class_complaint)
7945         (create_addrmap_from_index, dw2_symtab_iter_next)
7946         (dw2_expand_marked_cus)
7947         (dw2_debug_names_iterator::find_vec_in_debug_names)
7948         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7949         (create_debug_type_hash_table, init_cutu_and_read_dies)
7950         (partial_die_parent_scope, add_partial_enumeration)
7951         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7952         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7953         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7954         (create_cus_hash_table, create_dwp_hash_table)
7955         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7956         (dwarf2_rnglists_process, dwarf2_ranges_process)
7957         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7958         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7959         (handle_struct_member_die, process_structure_scope)
7960         (read_array_type, read_common_block, read_module_type)
7961         (read_tag_pointer_type, read_typedef, read_base_type)
7962         (read_subrange_type, load_partial_dies, partial_die_info::read)
7963         (partial_die_info::read, partial_die_info::read)
7964         (partial_die_info::read, read_checked_initial_length_and_offset)
7965         (dwarf2_string_attr, read_formatted_entries)
7966         (dwarf_decode_line_header)
7967         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7968         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7969         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7970         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7971         (get_signatured_type, get_DW_AT_signature_type)
7972         (decode_locdesc, file_file_name, consume_improper_spaces)
7973         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7974         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7975         (dwarf2_symbol_mark_computed, set_die_type)
7976         (read_attribute_value): Update.
7977         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7978         Update.
7979         * dbxread.c (unknown_symtype_complaint)
7980         (lbrac_mismatch_complaint, repeated_header_complaint)
7981         (set_namestring, function_outside_compilation_unit_complaint)
7982         (read_dbx_symtab, process_one_symbol): Update.
7983         * gdbtypes.c (stub_noname_complaint): Update.
7984         * windows-nat.c (handle_unload_dll): Update.
7985         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7986         (decode_base_type): Update.
7987         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7988         (eb_complaint, record_include_begin, record_include_end)
7989         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7990         (process_xcoff_symbol, read_symbol)
7991         (function_outside_compilation_unit_complaint)
7992         (scan_xcoff_symtab): Update.
7993         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7994         * buildsym.c (finish_block_internal, make_blockvector)
7995         (end_symtab_get_static_block, augment_type_symtab): Update.
7996         * dtrace-probe.c (dtrace_process_dof)
7997         (dtrace_static_probe_ops::get_probes): Update.
7998         * complaints.h (struct complaint): Don't declare.
7999         (symfile_complaints): Remove.
8000         (complaint_internal): Remove "complaints" parameter.
8001         (complaint): Likewise.
8002         (clear_complaints): Likewise.
8003         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8004         (reread_symbols): Update.
8005         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8006         (dwarf2_frame_cache, decode_frame_entry): Update.
8007         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8008         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8009         (info_selectors_command): Update.
8010         * macrotab.c (macro_include, check_for_redefinition)
8011         (macro_undef): Update.
8012         * objfiles.c (filter_overlapping_sections): Update.
8013         * stabsread.c (invalid_cpp_abbrev_complaint)
8014         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8015         (define_symbol, error_type, read_type, rs6000_builtin_type)
8016         (stabs_method_name_from_physname, read_member_functions)
8017         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8018         (attach_fields_to_type, complain_about_struct_wipeout)
8019         (read_range_type, read_args, common_block_start)
8020         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8021         Update.
8022         * mdebugread.c (index_complaint, unknown_ext_complaint)
8023         (basic_type_complaint, bad_tag_guess_complaint)
8024         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8025         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8026         (parse_procedure, parse_lines)
8027         (function_outside_compilation_unit_complaint)
8028         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8029         (bad_tag_guess_complaint, reg_value_complaint): Update.
8030         * cp-support.c (demangled_name_complaint): Update.
8031         * macroscope.c (sal_macro_scope): Update.
8032         * dwarf-index-write.c (class debug_names): Update.
8033
8034 2018-05-23  Tom Tromey  <tom@tromey.com>
8035
8036         * complaints.c (clear_complaints): Remove "noisy" parameter.
8037         * complaints.h (clear_complaints): Update.
8038         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8039         (reread_symbols): Update.
8040
8041 2018-05-23  Tom Tromey  <tom@tromey.com>
8042
8043         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8044         SUBSEQUENT_MESSAGE.
8045         (vcomplaint, clear_complaints): Update.
8046         (symfile_explanations): Remove some messages.
8047
8048 2018-05-23  Tom Tromey  <tom@tromey.com>
8049
8050         * complaints.c (internal_complaint): Remove.
8051         * complaints.h (internal_complaint): Remove.
8052
8053 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8054
8055         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8056
8057 2018-05-22  Pedro Alves  <palves@redhat.com>
8058
8059         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8060         (remote_fileio_badfd, remote_fileio_return_errno)
8061         (remote_fileio_return_success, remote_fileio_func_open)
8062         (remote_fileio_func_open, remote_fileio_func_close)
8063         (remote_fileio_func_read, remote_fileio_func_write)
8064         (remote_fileio_func_lseek, remote_fileio_func_rename)
8065         (remote_fileio_func_unlink, remote_fileio_func_stat)
8066         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8067         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8068         remote_target parameter.
8069         (remote_fio_func_map) <func>: Add remote_target parameter.
8070         (do_remote_fileio_request, remote_fileio_request):
8071         * remote-fileio.h (remote_fileio_request):
8072         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8073         remote_target parameter.
8074         (remote_notif_process, handle_notification): Adjust to pass down
8075         the remote.
8076         (remote_notif_state_allocate): Add remote_target parameter.  Save
8077         it.
8078         * remote-notif.h (struct remote_target): Forward declare.
8079         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8080         remote_target parameter.
8081         (struct remote_notif_state) <remote>: New field.
8082         (remote_notif_ack, remote_notif_parse): Add remote_target
8083         parameter.
8084         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8085         remote_target parameter.
8086         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8087         (threads_listing_context, rmt_thread_action, protocol_feature)
8088         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8089         (packet_result, struct threads_listing_context, remote_state):
8090         Move definitions and declarations higher up.
8091         (remote_target) <~remote_target>: Declare.
8092         (remote_download_command_source, remote_file_put, remote_file_get)
8093         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8094         (remote_hostio_pread_vFile, remote_hostio_send_command)
8095         (remote_hostio_set_filesystem, remote_hostio_open)
8096         (remote_hostio_close, remote_hostio_unlink, remote_state)
8097         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8098         (get_memory_write_packet_size, get_memory_read_packet_size)
8099         (append_pending_thread_resumptions, remote_detach_1)
8100         (append_resumption, remote_resume_with_vcont)
8101         (add_current_inferior_and_thread, wait_ns, wait_as)
8102         (process_stop_reply, remote_notice_new_inferior)
8103         (process_initial_stop_replies, remote_add_thread)
8104         (btrace_sync_conf, remote_btrace_maybe_reopen)
8105         (remove_new_fork_children, kill_new_fork_children)
8106         (discard_pending_stop_replies, stop_reply_queue_length)
8107         (check_pending_events_prevent_wildcard_vcont)
8108         (discard_pending_stop_replies_in_queue, stop_reply)
8109         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8110         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8111         (remote_interrupt_as, remote_interrupt_ns)
8112         (remote_get_noisy_reply, remote_query_attached)
8113         (remote_add_inferior, remote_current_thread, get_current_thread)
8114         (set_thread, set_general_thread, set_continue_thread)
8115         (set_general_process, write_ptid)
8116         (remote_unpack_thread_info_response, remote_get_threadinfo)
8117         (parse_threadlist_response, remote_get_threadlist)
8118         (remote_threadlist_iterator, remote_get_threads_with_ql)
8119         (remote_get_threads_with_qxfer)
8120         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8121         (get_offsets, remote_check_symbols, remote_supported_packet)
8122         (remote_query_supported, remote_packet_size)
8123         (remote_serial_quit_handler, remote_detach_pid)
8124         (remote_vcont_probe, remote_resume_with_hc)
8125         (send_interrupt_sequence, interrupt_query)
8126         (remote_notif_get_pending_events, fetch_register_using_p)
8127         (send_g_packet, process_g_packet, fetch_registers_using_g)
8128         (store_register_using_P, store_registers_using_G)
8129         (set_remote_traceframe, check_binary_download)
8130         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8131         (remote_xfer_live_readonly_partial, remote_read_bytes)
8132         (remote_send_printf, remote_flash_write, readchar)
8133         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8134         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8135         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8136         (extended_remote_disable_randomization, extended_remote_run)
8137         (send_environment_packet, extended_remote_environment_support)
8138         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8139         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8140         (packet_command): Now methods of ...
8141         (remote_target): ... this class.
8142         (m_remote_state) <remote_target>: New field.
8143         (struct remote_state) <stop_reply_queue,
8144         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8145         fields.
8146         (remote_state::remote_state): Allocate stop_reply_queue.
8147         (remote_state): Delete global.
8148         (get_remote_state_raw): Delete.
8149         (remote_target::get_remote_state): Allocate m_remote_state on
8150         demand.
8151         (get_current_remote_target): New.
8152         (remote_ops, extended_remote_ops): Delete.
8153         (wait_forever_enabled_p, remote_async_inferior_event_token):
8154         Delete, moved to struct remote_state.
8155         (remote_target::close): Delete self.  Destruction bits split to
8156         ...
8157         (remote_target::~remote_target): ... this.
8158         (show_memory_packet_size): Adjust to use
8159         get_current_remote_target.
8160         (struct protocol_feature) <func>: Add remote_target parameter.
8161         All callers adjusted.
8162         (curr_quit_handler_target): New.
8163         (remote_serial_quit_handler): Reimplement.
8164         (remote_target::open_1): Adjust to use get_current_remote_target.
8165         Heap-allocate remote_target/extended_remote_target instances.
8166         (vcont_builder::vcont_builder): Add remote_target parameter, and
8167         save it in m_remote.  All callers adjusted.
8168         (vcont_builder::m_remote): New field.
8169         (vcont_builder::restart, vcont_builder::flush)
8170         (vcont_builder::push_action): Use it.
8171         (remote_target::commit_resume): Use it.
8172         (struct queue_iter_param) <remote>: New field.
8173         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8174         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8175         (check_pending_event_prevents_wildcard_vcont_callback)
8176         (remote_target::check_pending_events_prevent_wildcard_vcont)
8177         (remote_target::discard_pending_stop_replies)
8178         (remote_target::discard_pending_stop_replies_in_queue)
8179         (remote_target::remote_notif_remove_queued_reply): Fill in
8180         'remote' field.
8181         (remote_notif_get_pending_events): New.
8182         (remote_target::readchar, remote_target::remote_serial_write):
8183         Save/restore curr_quit_handler_target.
8184         (putpkt): New.
8185         (kill_new_fork_children): Fill in 'remote' field.
8186         (packet_command): Use get_current_remote_target, defer to
8187         remote_target method of same name.
8188         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8189         parameter, and save it in m_remote.  All callers adjusted.
8190         (scoped_remote_fd::release): Use m_remote.
8191         (scoped_remote_fd::m_remote): New field.
8192         (remote_file_put, remote_file_get, remote_file_delete): Use
8193         get_current_remote_target, defer to remote_target method of same
8194         name.
8195         (remote_btrace_reset): Add remote_state paremeter.  Update all
8196         callers.
8197         (remote_async_inferior_event_handler). Pass down 'data'.
8198         (remote_new_objfile): Use get_current_remote_target.
8199         (remote_target::vcont_r_supported): New.
8200         (set_range_stepping): Use get_current_remote_target and
8201         remote_target::vcont_r_supported.
8202         (_initialize_remote): Don't allocate 'remote_state' and
8203         'stop_reply_queue' globals.
8204         * remote.h (struct remote_target): Forward declare.
8205         (getpkt, putpkt, remote_notif_get_pending_events): Add
8206         'remote_target' parameter.
8207
8208 2018-05-22  Pedro Alves  <palves@redhat.com>
8209
8210         * remote.c (vcont_builder): Now a class.  Make all data members
8211         private.
8212         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8213         Declare methods.
8214         (vcont_builder_restart): Rename to ...
8215         (vcont_builder::restart): ... this.
8216         (vcont_builder_flush): Rename to ...
8217         (vcont_builder::flush): ... this.
8218         (vcont_builder_push_action): Rename to ...
8219         (vcont_builder::push_action): ... this.
8220         (remote_target::commit_resume): Adjust.
8221
8222 2018-05-22  Pedro Alves  <palves@redhat.com>
8223
8224         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8225         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8226         (get_fixed_memory_packet_size): New.
8227         (get_memory_packet_size): Use it.
8228         (set_memory_packet_size): Don't override the config size with
8229         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8230         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8231         Don't refer to get_memory_packet_size if not connected to a remote
8232         target.  Show "(default)" if configured size is 0.
8233
8234 2018-05-22  Pedro Alves  <palves@redhat.com>
8235
8236         * remote.c (remote_target::mourn_inferior): Move
8237         discard_pending_stop_replies call here from ...
8238         (_initialize_remote): ... here.
8239
8240 2018-05-22  Pedro Alves  <palves@redhat.com>
8241
8242         * remote.c (compare_section_command): Remove set_general_process
8243         call.
8244
8245 2018-05-22  Pedro Alves  <palves@redhat.com>
8246
8247         * remote.c (struct packet_reg, struct remote_arch_state):
8248         Move higher up in the file.
8249         (remote_state) <m_arch_states>: Store remote_arch_state values
8250         instead of remote_arch_state pointers.
8251         (remote_state::get_remote_arch_state): Adjust.
8252
8253 2018-05-22  Pedro Alves  <palves@redhat.com>
8254
8255         * remote.c: Include <unordered_map>.
8256         (remote_state): Now a class.
8257         (remote_state) <get_remote_arch_state>: Declare method.
8258         <get_remote_arch_state>: New field.
8259         (remote_arch_state) <remote_arch_state>: Declare ctor.
8260         <regs>: Now a unique_ptr.
8261         (remote_gdbarch_data_handle): Delete.
8262         (get_remote_arch_state): Delete.
8263         (remote_state::get_remote_arch_state): New.
8264         (get_remote_state): Adjust to call remote_state's
8265         get_remote_arch_state method.
8266         (init_remote_state): Delete, bits factored out to ...
8267         (remote_arch_state::remote_arch_state): ... this new method.
8268         (get_remote_packet_size, get_memory_packet_size)
8269         (process_g_packet, remote_target::fetch_registers)
8270         (remote_target::prepare_to_store, store_registers_using_G)
8271         (remote_target::store_registers, remote_target::get_trace_status):
8272         Adjust to call remote_state's method.
8273         (_initialize_remote): Remove reference to
8274         remote_gdbarch_data_handle.
8275
8276 2018-05-22  Pedro Alves  <palves@redhat.com>
8277
8278         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8279         pread>: New method declarations.
8280         (remote_target::open_1): Adjust.
8281         (readahead_cache_invalidate): Rename to ...
8282         (readahead_cache::invalidate): ... this, and adjust to be a class
8283         method.
8284         (readahead_cache_invalidate_fd): Rename to ...
8285         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8286         class method.
8287         (remote_hostio_pwrite): Adjust.
8288         (remote_hostio_pread_from_cache): Rename to ...
8289         (readahead_cache::pread): ... this, and adjust to be a class
8290         method.
8291         (remote_hostio_close): Adjust.
8292
8293 2018-05-22  Pedro Alves  <palves@redhat.com>
8294
8295         * remote.c (remote_hostio_close_cleanup): Delete.
8296         (class scoped_remote_fd): New.
8297         (remote_file_put, remote_file_get): Use it.
8298
8299 2018-05-22  Pedro Alves  <palves@redhat.com>
8300
8301         (struct vCont_action_support): Use bool and initialize all fields.
8302         (struct readahead_cache): Initialize all fields.
8303         (remote_state): Use bool and initialize all fields.
8304         (remote_state::remote_state, remote_state::~remote_state): New.
8305         (new_remote_state): Delete.
8306         (_initialize_remote): Use new to allocate remote_state.
8307
8308 2018-05-22  Pedro Alves  <palves@redhat.com>
8309             張俊芝  <zjz@zjz.name>
8310
8311         PR gdb/22973
8312         * c-exp.y: Include "c-support.h".
8313         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8314         of tolower.  Use c_ident_is_alpha to scan names.
8315         * c-lang.c: Include "c-support.h".
8316         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8317         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8318         * c-support.h: New file, with bits factored out from ...
8319         * cp-name-parser.y: ... this file.
8320         Include "c-support.h".
8321         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8322         c-support.h and renamed.
8323         (symbol_end, yylex): Adjust.
8324
8325 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8326
8327         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8328         parameter type to CORE_ADDR.
8329         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8330         parameter type in declaration to CORE_ADDR.
8331         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8332         target_auxv_search to get AT_HWCAP and use the result to get the
8333         target description.
8334         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8335         to CORE_ADDR. Remove the cast of the return value to unsigned
8336         long. Fix error predicate of target_auxv_search.
8337         (ppc_linux_nat_target::read_description): Change the type of the
8338         hwcap variable to CORE_ADDR.
8339
8340 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8341
8342         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8343         if the size of fpscr is larger than 32 bits.
8344
8345 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8346
8347         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8348         (ppc32_linux_vsxregmap): New global.
8349         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8350         regcache_supply_regset, and regcache_collect_regset.
8351         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8352         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8353         (fetch_vsx_register, store_vsx_register): Remove.
8354         (fetch_vsx_registers): Add regno parameter. Get regset using
8355         ppc_linux_vsxregset. Use regset to supply registers.
8356         (store_vsx_registers): Add regno parameter. Get regset using
8357         ppc_linux_vsxregset. Use regset to collect registers.
8358         (fetch_register): Call fetch_vsx_registers instead of
8359         fetch_vsx_register.
8360         (store_register): Call store_vsx_registers instead of
8361         store_vsx_register.
8362         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8363         new regno parameter.
8364         (store_ppc_registers): Call store_vsx_registers with -1 for the
8365         new regno parameter.
8366         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8367         (ppc_collect_vsxregset): Remove.
8368
8369 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8370
8371         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8372         offset fields.
8373         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8374         for vector register offset fields.
8375         (ppc64_fbsd_reg_offsets): Likewise.
8376         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8377         to vector register offset fields.
8378         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8379         to vector register offset fields.
8380         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8381         vector register offset fields.
8382         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8383         initializers for vector register offset fields.
8384         (rs6000_aix64_reg_offsets): Likewise.
8385         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8386         (ppc_supply_vrregset): Remove.
8387         (ppc_collect_vrregset): Remove.
8388         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8389         (ppc_linux_vrregset) : New function.
8390         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8391         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8392         (ppc32_linux_vrregset): Remove.
8393         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8394         and use result instead of ppc32_linux_vrregset.
8395         (ppc32_linux_reg_offsets): Remove initializers for vector register
8396         offset fields.
8397         (ppc64_linux_reg_offsets): Likewise.
8398         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8399         * ppc-linux-nat.c: Include regset.h.
8400         (gdb_vrregset_t): Adjust comment to account for little-endian
8401         mode.
8402         (supply_vrregset, fill_vrregset): Remove.
8403         (fetch_altivec_register, store_altivec_register): Remove.
8404         (fetch_altivec_registers): Add regno parameter. Get regset using
8405         ppc_linux_vrregset. Use regset to supply registers.
8406         (store_altivec_registers): Add regno parameter. Get regset using
8407         ppc_linux_vrregset. Use regset to collect registers.
8408         (fetch_register): Call fetch_altivec_registers instead of
8409         fetch_altivec_register.
8410         (store_register): Call store_altivec_registers instead of
8411         store_altivec_register.
8412         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8413         the new regno parameter.
8414         (store_ppc_registers): Call store_altivec_registers with -1 for
8415         the new regno parameter.
8416
8417 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8418
8419         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8420         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8421         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8422         (gdb_vrregset_t): Change array type size to
8423         PPC_LINUX_SIZEOF_VRREGSET.
8424         (gdb_vsxregset_t): Change array type size to
8425         PPC_LINUX_SIZEOF_VSXREGSET.
8426         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8427         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8428         PPC_LINUX_SIZEOF_VSXREGSET.
8429
8430 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8431
8432         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8433         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8434         nat/ppc-linux.c.
8435         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8436         ppc_linux_target_wordsize with tid.
8437         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8438         wordsize with tid.
8439         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8440         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8441         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8442         tid parameter. Remove static specifier.
8443         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8444         (ppc_linux_target_wordsize): New declaration.
8445
8446 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8447
8448         * arch/ppc-linux-common.c: New file.
8449         * arch/ppc-linux-common.h: New file.
8450         * arch/ppc-linux-tdesc.h: New file.
8451         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8452         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8453         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8454         arch/ppc-linux-tdesc.h.
8455         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8456         arch/ppc-linux-tdesc.h.
8457         (ppc_linux_nat_target::read_description): Remove target
8458         description matching code. Fill a ppc_linux_features struct and
8459         call ppc_linux_match_description with it. Move comment about ISA
8460         2.05 to ppc-linux-common.c.
8461         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8462         arch/ppc-linux-tdesc.h.
8463         (ppc_linux_core_read_description): Remove target description
8464         matching code. Fill a ppc_linux_features struct and call
8465         ppc_linux_match_description with it.
8466         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8467         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8468         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8469         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8470         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8471         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8472         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8473         (tdesc_powerpc_e500l): Remove.
8474
8475 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8476
8477         * ada-lang.c (catch_assert_command): Pass empty string instead
8478         of NULL for excep_string argument.
8479
8480 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8481
8482         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8483         the width of the requested register exceeds the width of the
8484         `ptrace' data type.
8485
8486 2018-05-21  Tom Tromey  <tom@tromey.com>
8487
8488         * printcmd.c (output_command): Remove.
8489         (output_command_const): Rename to output_command.
8490         * valprint.h (output_command): Rename from output_command_const.
8491         * tracepoint.c (trace_dump_actions): Call output_command.
8492
8493 2018-05-21  Tom Tromey  <tom@tromey.com>
8494
8495         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8496         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8497         * ada-lang.h (create_ada_exception_catchpoint): Update.
8498         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8499         std::string.
8500         (create_excep_cond_exprs, ~ada_catchpoint)
8501         (should_stop_exception, print_one_exception)
8502         (print_mention_exception, print_recreate_exception): Update.
8503         (ada_get_next_arg): Remove.
8504         (catch_ada_exception_command_split): Use std::string.  Change type
8505         of "excep_string", "cond_string".
8506         (catch_ada_exception_command): Update.
8507         (create_ada_exception_catchpoint): Change type of excep_string.
8508         (ada_exception_sal): Remove excep_string parameter.
8509         (~ada_catchpoint): Remove.
8510
8511 2018-05-21  Tom Tromey  <tom@tromey.com>
8512
8513         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8514         cleanup.
8515
8516 2018-05-21  Tom Tromey  <tom@tromey.com>
8517
8518         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8519         Return unique_xmalloc_ptr.
8520         (print_it_exception): Update.
8521
8522 2018-05-21  Tom Tromey  <tom@tromey.com>
8523
8524         * tracepoint.c (trace_dump_actions): Use std::string.
8525
8526 2018-05-21  Tom Tromey  <tom@tromey.com>
8527
8528         * symfile.c (reread_symbols): Use std::string for original_name.
8529
8530 2018-05-21  Tom Tromey  <tom@tromey.com>
8531
8532         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8533         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8534         constructor.
8535
8536 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8537
8538         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8539         instance to...
8540         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8541         * objfiles.c (get_objfile_bfd_data): Allocate
8542         objfile_per_bfd_storage with obstack_new when allocating on
8543         obstack.
8544
8545 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8546
8547         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8548         OBSTACK_ZALLOC.
8549         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8550         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8551         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8552         (add_pending): Likewise.
8553         (parse_symbol): Likewise.
8554         (parse_partial_symbols): Likewise.
8555         (psymtab_to_symtab_1): Likewise.
8556         (new_psymtab): Likewise.
8557         (elfmdebug_build_psymtabs): Likewise.
8558         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8559         * objfiles.c (get_objfile_bfd_data): Likewise.
8560         (objfile_register_static_link): Likewise.
8561         * psymtab.c (allocate_psymtab): Likewise.
8562         * stabsread.c (read_member_functions): Likewise.
8563         * xcoffread.c (xcoff_end_psymtab): Likewise.
8564
8565 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8566
8567         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8568         compiler supports std::is_trivially_constructible.
8569         * common/poison.h: Include obstack.h.
8570         (IsMallocable): Define to is_trivially_constructible if the
8571         compiler supports it, define to true_type otherwise.
8572         (xobnew): New.
8573         (XOBNEW): Redefine.
8574         (xobnewvec): New.
8575         (XOBNEWVEC): Redefine.
8576         * gdb_obstack.h (obstack_zalloc): New.
8577         (OBSTACK_ZALLOC): Redefine.
8578         (obstack_calloc): New.
8579         (OBSTACK_CALLOC): Redefine.
8580         (obstack_new): New.
8581         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8582         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8583         gdbarch.c.
8584         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8585         obstack_calloc/obstack_zalloc.
8586         (gdbarch_obstack_zalloc): Remove.
8587         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8588
8589 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8590
8591         * stack.c (backtrace_command_1): Remove useless variable int i.
8592
8593 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8594
8595         * stack.c (print_frame_info): Fix comment.
8596
8597 2018-05-18  Tom Tromey  <tom@tromey.com>
8598
8599         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8600         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8601         (~dwarf2_per_objfile): Update
8602         (dwarf2_get_dwz_file): Use new.
8603         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8604         unique_ptr.
8605
8606 2018-05-18  Tom Tromey  <tom@tromey.com>
8607
8608         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8609         unique_ptr.
8610         * dwarf2read.c (struct dwp_file): Add constructor and
8611         initializers.
8612         (open_and_init_dwp_file): Return a unique_ptr.
8613         (dwarf2_per_objfile, create_dwp_hash_table)
8614         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8615         (lookup_dwo_unit_in_dwp): Update.
8616         (open_and_init_dwp_file, get_dwp_file): Update.
8617
8618 2018-05-18  Tom Tromey  <tom@tromey.com>
8619
8620         * dwarf2read.c (dwarf2_per_objfile): Update.
8621         (struct mapped_index): Add initializers.
8622         (dwarf2_read_index): Use new.
8623         (dw2_symtab_iter_init): Update.
8624         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8625         unique_ptr.
8626
8627 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8628
8629         * dwarf2read.c (mapped_index) <total_size>: Remove.
8630
8631 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8632
8633         * unittests/format_pieces-selftests.c (test_format_specifier):
8634         Add ARI comments.
8635
8636 2018-05-18  Tom Tromey  <tom@tromey.com>
8637
8638         * c-typeprint.c (maybe_print_hole): New function.
8639         (c_print_type_struct_field_offset): Update.
8640         (c_type_print_base_struct_union): Call maybe_print_hole.
8641
8642 2018-05-17  Keith Seitz  <keiths@redhat.com>
8643
8644         * breakpoint.c (build_bpstat_chain): New function, moved from
8645         bpstat_stop_status.
8646         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8647         If no stop chain is passed, call build_bpstat_chain to build it.
8648         * breakpoint.h (build_bpstat_chain): Declare.
8649         (bpstat_stop_status): Move documentation here from breakpoint.c.
8650         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8651         build the stop chain and pass it to skip_inline_frames.
8652         Pass this stop chain to bpstat_stop_status.
8653         * inline-frame.c: Include breakpoint.h.
8654         (stopped_by_user_bp_inline_frame): New function.
8655         (skip_inline_frames): Add parameter `stop_chain'.
8656         Move documention to inline-frame.h.
8657         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8658         whether the frame should be elided.
8659         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8660         Add moved documentation and update for new parameter.
8661
8662 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8663
8664         PR cli/14975
8665         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8666         unittests/format_pieces-selftests.c.
8667         * common/format.h (format_piece) <operator==>: New.
8668         (format_pieces) <operator[]>: Remove.
8669         * common/format.c (format_pieces::format_pieces): Handle \e.
8670         * unittests/format_pieces-selftests.c: New.
8671
8672 2018-05-17  Tom Tromey  <tom@tromey.com>
8673
8674         PR symtab/23010:
8675         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8676         (dw2_instantiate_symtab): Add skip_partial parameter.
8677         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8678         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8679         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8680         (dw2_expand_symtabs_matching_one)
8681         (dw2_find_pc_sect_compunit_symtab)
8682         (dw2_debug_names_lookup_symbol)
8683         (dw2_debug_names_expand_symtabs_for_function): Update.
8684         (init_cutu_and_read_dies): Add skip_partial parameter.
8685         (process_psymtab_comp_unit, build_type_psymtabs_1)
8686         (process_skeletonless_type_unit, load_partial_comp_unit)
8687         (psymtab_to_symtab_1): Update.
8688         (load_full_comp_unit): Add skip_partial parameter.
8689         (process_imported_unit_die, dwarf2_read_addr_index)
8690         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8691         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8692         (read_signatured_type): Update.
8693
8694 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8695
8696         * value.c (release_value): Remove unused variable.
8697         (record_latest_value): Likewise.
8698         (access_value_history): Likewise.
8699         (preserve_values): Likewise.
8700
8701 2018-05-17  Tom Tromey  <tom@tromey.com>
8702
8703         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8704         Initialize.
8705
8706 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8707
8708         PR gdb/22286
8709         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8710         Also handle registers whose width is not a multiple of
8711         PTRACE_TYPE_RET.
8712         (linux_nat_trad_target::store_register): Likewise.
8713
8714 2018-05-16  Tom Tromey  <tom@tromey.com>
8715
8716         * gdbcore.h (core_bfd): Redefine.
8717         * corelow.c (core_target::close): Update.
8718         (core_target_open): Update.
8719         * progspace.h (struct program_space) <cbfd>: Now a
8720         gdb_bfd_ref_ptr.
8721
8722 2018-05-16  Tom Tromey  <tom@tromey.com>
8723
8724         PR cli/19551:
8725         * symfile-add-flags.h (enum symfile_add_flags)
8726         <SYMFILE_NOT_FILENAME>: New constant.
8727         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8728         objfile name from BFD.
8729         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8730         * minidebug.c (find_separate_debug_file_in_section): Put
8731         ".gnu_debugdata" into BFD's file name.
8732
8733 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8734
8735         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8736         Remove.
8737
8738 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8739
8740         PR binutils/21446
8741         * aarch64-tdep.c (aarch64_analyze_prologue,
8742         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8743         Indicate not interested in errors.
8744
8745 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8746
8747         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8748         Supply the MIPS_ZERO_REGNUM register.
8749
8750 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8751
8752         * mips-tdep.c (mask_address_var): Make variable static.
8753
8754 2018-05-14  Tom Tromey  <tom@tromey.com>
8755
8756         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8757
8758 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8759
8760         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8761         FXSAVE_ADDR for the mxcsr register.
8762
8763 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8764
8765         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8766
8767 2018-05-11  Pedro Alves  <palves@redhat.com>
8768
8769         * corelow.c (core_target) <core_target>: No longer inline.
8770         Initialize m_core_gdbarch, m_core_vec and build the section table
8771         here.
8772         <~core_target>: New.
8773         <core_gdbarch, get_core_register_section>: New methods.
8774         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8775         factored out from ...
8776         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8777         (core_ops): Delete.
8778         (sniff_core_bfd): Add gdbarch parameter.
8779         (core_close): Delete, merged into ...
8780         (core_target::close): ... here.  Delete self.
8781         (core_close_cleanup): Delete.
8782         (core_target_open): Allocate a core_target on the heap.  Use a
8783         unique_ptr instead of a cleanup.  Bits moved into the core_target
8784         ctor.  Adjust to use core_target methods instead of globals.
8785         (get_core_register_section): Rename to ...
8786         (core_target::get_core_register_section): ... this and adjust.
8787         (struct get_core_registers_cb_data): New.
8788         (get_core_registers_cb): Use it.  Use bool.
8789         (core_target::fetch_registers, core_target::files_info)
8790         (core_target::xfer_partial, core_target::read_description)
8791         (core_target::pid_to, core_target::thread_name): Adjust to
8792         reference class fields instead of globals.
8793         * target.h (struct target_ops_deleter, target_ops_up): New.
8794
8795 2018-05-11  Pedro Alves  <palves@redhat.com>
8796
8797         * corefile.c (core_file_command): Move to corelow.c.
8798         * corelow.c (the_core_target): Delete.
8799         (core_file_command): Moved from corefile.c.  Check exec_bfd
8800         instead of the_core_target.  Use target_detach instead of calling
8801         into the_core_target directly.
8802         (maybe_say_no_core_file_now): New.
8803         (core_target::detach): Use it.
8804         (_initialize_corelow): Remove references to the_core_target.
8805         * gdbcore.h (the_core_target): Delete.
8806
8807 2018-05-11  Tom Tromey  <tromey@redhat.com>
8808             Pedro Alves  <palves@redhat.com>
8809
8810         * corefile.c (core_bfd): Remove.
8811         * gdbcore.h (core_bfd): Now a macro.
8812         * progspace.h (struct program_space) <cbfd>: New field.
8813
8814 2018-05-11  Tom Tromey  <tom@tromey.com>
8815
8816         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8817         gdb::def_vector.
8818
8819 2018-05-10  Tom Tromey  <tom@tromey.com>
8820
8821         * configure: Rebuild.
8822         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8823
8824 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8825
8826         PR server/23158:
8827         * regformats/regdat.sh: Adjust script, following the addition
8828         of the new expedite_regs parameter to init_target_desc.
8829
8830 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8831     
8832         PR gdb/23127
8833         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8834         set_gdbarch_significant_addr_bit.
8835         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8836         set_gdbarch_significant_addr_bit.
8837         * utils.c (address_significant): Update to sign extend addr.
8838
8839 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8840
8841         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8842         (xtensa_linux_init_abi): Limit tdep->num_regs by
8843         tdep->num_nopriv_regs.
8844         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8845         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8846         not initialized.
8847
8848 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8849
8850         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8851
8852 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8853
8854         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8855         (I387_MXCSR_INIT_VAL): New constant.
8856         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8857         buffer if it was supplied by the inferior.
8858         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8859         (i387_xsave_get_clear_bv): New function.
8860         (i387_supply_xsave): Only read x87 control registers from the
8861         xsave buffer if the feature is enabled, and the state will have
8862         been written, otherwise, provide a suitable default.
8863         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8864         including x87 control registers.  Update control registers if they
8865         have changed from the default value, and mark features as enabled
8866         as required.
8867         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8868
8869 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8870
8871         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8872
8873 2018-05-07  Tom Tromey  <tom@tromey.com>
8874
8875         * configure: Rebuild.
8876         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8877
8878 2018-05-07  Tom Tromey  <tom@tromey.com>
8879
8880         PR tdep/20362:
8881         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8882         bit.  Use correct value for VDIV.
8883
8884 2018-05-04  Tom Tromey  <tom@tromey.com>
8885
8886         * configure: Rebuild.
8887         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8888
8889 2018-05-04  Tom Tromey  <tom@tromey.com>
8890
8891         * linux-record.c (record_linux_system_call) <case
8892         RECORD_SYS_RECVFROM>: Add "break".
8893
8894 2018-05-04  Tom Tromey  <tom@tromey.com>
8895
8896         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8897         Add missing "break".
8898         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8899         Add missing "break".
8900
8901 2018-05-04  Tom Tromey  <tom@tromey.com>
8902
8903         * rs6000-tdep.c (ppc_process_record_op4)
8904         (ppc_process_record_op63): Add fall-through comment.
8905
8906 2018-05-04  Tom Tromey  <tom@tromey.com>
8907
8908         * i386-tdep.c (i386_process_record): Add fall-through comment.
8909
8910 2018-05-04  Tom Tromey  <tom@tromey.com>
8911
8912         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8913         comment.
8914
8915 2018-05-04  Tom Tromey  <tom@tromey.com>
8916
8917         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8918         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8919         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8920         comment.
8921         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8922         comment.
8923         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8924         comment.
8925
8926 2018-05-04  Tom Tromey  <tom@tromey.com>
8927
8928         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8929
8930 2018-05-04  Tom Tromey  <tom@tromey.com>
8931
8932         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8933         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8934         * symfile.c (section_is_mapped): Fix fall-through comment.
8935         * stabsread.c (define_symbol, read_member_functions): Fix
8936         fall-through comment.
8937         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8938         comment.
8939         * remote.c (remote_wait_as): Fix fall-through comment.
8940         * p-exp.y (yylex): Fix fall-through comment.
8941         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8942         comment.
8943         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8944         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8945         * jv-exp.y (yylex): Fix fall-through comment.
8946         * go-exp.y (lex_one_token): Fix fall-through comment.
8947         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8948         fall-through comment.
8949         * f-exp.y (yylex): Fix fall-through comment.
8950         * dwarf2read.c (process_die): Fix fall-through comments.
8951         * dbxread.c (process_one_symbol): Fix fall-through comment.
8952         * d-exp.y (lex_one_token): Fix fall-through comment.
8953         * cp-name-parser.y (yylex): Fix fall-through comment.
8954         * coffread.c (coff_symtab_read): Fix fall-through comment.
8955         * c-exp.y (lex_one_token): Fix fall-through comment.
8956         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8957         comment.
8958         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8959         comment.
8960
8961 2018-05-04  Tom Tromey  <tom@tromey.com>
8962
8963         PR python/22730:
8964         * NEWS: Mention gdb.execute change.
8965         * gdbcmd.h (execute_control_command): Don't declare.
8966         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8967         execute_control_commands, execute_control_commands_to_string.
8968         * cli/cli-script.h (execute_control_commands)
8969         (execute_control_commands_to_string): Declare.
8970         (execute_control_command): Add from_tty parameter.
8971         * cli/cli-script.c (execute_control_commands)
8972         (execute_control_commands_to_string): New functions.
8973         (execute_user_command): Use execute_control_commands.
8974         (execute_control_command_1): Add "from_tty" parameter.  Update.
8975         (execute_control_command): Likewise.
8976
8977 2018-05-04  Tom Tromey  <tom@tromey.com>
8978
8979         PR python/22731:
8980         * NEWS: Mention that breakpoint commands are writable.
8981         * python/py-breakpoint.c (bppy_set_commands): New function.
8982         (breakpoint_object_getset) <"commands">: Use it.
8983
8984 2018-05-04  Tom Tromey  <tom@tromey.com>
8985
8986         * tracepoint.c (actions_command): Update.
8987         * mi/mi-cmd-break.c (mi_command_line_array)
8988         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8989         (mi_read_next_line): Remove.
8990         (mi_cmd_break_commands): Update.
8991         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8992         function_view.
8993         * cli/cli-script.c (get_command_line): Update.
8994         (process_next_line): Use function_view.  Constify.
8995         (recurse_read_control_structure, read_command_lines)
8996         (read_command_lines_1): Change argument types to function_view.
8997         (do_define_command, document_command): Update.
8998         * breakpoint.h (check_tracepoint_command): Don't declare.
8999         * breakpoint.c (check_tracepoint_command): Remove.
9000         (commands_command_1, create_tracepoint_from_upload): Update.
9001
9002 2018-05-04  Tom Tromey  <tom@tromey.com>
9003
9004         PR gdb/11750:
9005         * cli/cli-script.h (enum command_control_type) <define_control>:
9006         New constant.
9007         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9008         (build_command_line, execute_control_command_1)
9009         (process_next_line): Likewise.
9010         (do_define_command): New function, extracted from define_command.
9011         (define_command): Use it.
9012
9013 2018-05-04  Tom Tromey  <tom@tromey.com>
9014
9015         * tracepoint.c (actions_command): Update.
9016         * cli/cli-script.h (read_command_lines): Update.
9017         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9018         (MAX_TMPBUF): Remove define.
9019         (define_command): Use string_printf.
9020         (document_command): Likewise.
9021         * breakpoint.c (commands_command_1): Update.
9022
9023 2018-05-04  Tom Tromey  <tom@tromey.com>
9024
9025         * top.c (execute_command): Update.
9026         * cli/cli-script.h (print_command_lines): Now varargs.
9027         * cli/cli-script.c (print_command_lines): Now varargs.
9028         (execute_control_command_1) <case while_control, case if_control>:
9029         Update.
9030
9031 2018-05-04  Tom Tromey  <tom@tromey.com>
9032
9033         * tracepoint.c (all_tracepoint_actions): Rename from
9034         all_tracepoint_actions_and_cleanup.  Change return type.
9035         (actions_command, encode_actions_1, encode_actions)
9036         (trace_dump_actions, tdump_command): Update.
9037         * remote.c (remote_download_command_source): Update.
9038         * python/python.c (gdbpy_eval_from_control_command)
9039         (python_command, python_interactive_command): Update.
9040         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9041         * guile/guile.c (guile_command)
9042         (gdbscm_eval_from_control_command, guile_command): Update.
9043         * compile/compile.c (compile_code_command)
9044         (compile_print_command, compile_to_object): Update.
9045         * cli/cli-script.h (struct command_lines_deleter): New.
9046         (counted_command_line): New typedef.
9047         (struct command_line): Add constructor, destructor.
9048         <body_list>: Remove.
9049         <body_list_0, body_list_1>: New members.
9050         (command_line_up): Remove typedef.
9051         (read_command_lines, read_command_lines_1, get_command_line):
9052         Update.
9053         (copy_command_lines): Don't declare.
9054         * cli/cli-script.c (build_command_line): Use "new".
9055         (get_command_line): Return counted_command_line.
9056         (print_command_lines, execute_user_command)
9057         (execute_control_command_1, while_command, if_command): Update.
9058         (realloc_body_list): Remove.
9059         (process_next_line, recurse_read_control_structure): Update.
9060         (read_command_lines, read_command_lines_1): Return counted_command_line.
9061         (free_command_lines): Use "delete".
9062         (copy_command_lines): Remove.
9063         (define_command, document_command, show_user_1): Update.
9064         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9065         a counted_command_line.
9066         * breakpoint.h (counted_command_line): Remove typedef.
9067         (breakpoint_set_commands): Update.
9068         * breakpoint.c (check_no_tracepoint_commands)
9069         (validate_commands_for_breakpoint): Update.
9070         (breakpoint_set_commands): Change commands to be a
9071         counted_command_line.
9072         (commands_command_1, update_dprintf_command_list)
9073         (create_tracepoint_from_upload): Update.
9074
9075 2018-05-04  Tom Tromey  <tom@tromey.com>
9076
9077         * cli/cli-decode.h (cmd_list_element): New constructor.
9078         (~cmd_list_element): New destructor.
9079         (struct cmd_list_element): Add initializers.
9080         * cli/cli-decode.c (do_add_cmd): Use "new".
9081         (delete_cmd): Use "delete".
9082
9083 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9084             Pedro Alves <palves@redhat.com>
9085
9086         PR breakpoints/19806 and support for PR external/20207.
9087         * NEWS: Mention Aarch64 watchpoint improvements.
9088         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9089         watchpoints and PR external/20207 watchpoints.
9090         * nat/aarch64-linux-hw-point.c
9091         (kernel_supports_any_contiguous_range): New.
9092         (aarch64_watchpoint_offset): New.
9093         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9094         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9095         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9096         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9097         next_addr_orig_p.  Support PR external/20207 watchpoints.
9098         (aarch64_downgrade_regs): New.
9099         (aarch64_dr_state_insert_one_point): New parameters offset and
9100         addr_orig.
9101         (aarch64_dr_state_remove_one_point): Likewise.
9102         (aarch64_handle_breakpoint): Update caller.
9103         (aarch64_handle_aligned_watchpoint): Likewise.
9104         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9105         aligned_offset.
9106         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9107         aarch64_downgrade_regs.
9108         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9109         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9110         (DR_CONTROL_MASK): ... this.
9111         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9112         (unsigned int aarch64_watchpoint_offset): New prototype.
9113         (aarch64_linux_set_debug_regs): Remove const from state.
9114         * utils.c (align_up, align_down): Move to ...
9115         * common/common-utils.c (align_up, align_down): ... here.
9116         * utils.h (align_up, align_down): Move to ...
9117         * common/common-utils.h (align_up, align_down): ... here.
9118
9119 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9120
9121         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9122         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9123         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9124         Re-implement to match the ABI as summarized in GCC's
9125         gcc/config/sparc/sparc.c.  All callers updated.
9126         (sparc32_store_arguments): Remove assertion.
9127
9128 2018-05-04  Tom Tromey  <tom@tromey.com>
9129
9130         * printcmd.c: Don't include tui.h.
9131         (decode_format): Use skip_spaces.
9132
9133 2018-05-04  Tom Tromey  <tom@tromey.com>
9134
9135         PR gdb/22619:
9136         * printcmd.c (last_count): New global.
9137         (x_command): Use saved count when repeating.
9138
9139 2018-05-04  Tom Tromey  <tom@tromey.com>
9140
9141         * nto-procfs.c (do_closedir_cleanup): Remove.
9142         (procfs_pidlist): Use gdb_dir_up.
9143         * procfs.c (do_closedir_cleanup): Remove.
9144         (proc_update_threads): Use gdb_dir_up.
9145         * common/filestuff.h (struct gdb_dir_deleter): New.
9146         (gdb_dir_up): New typedef.
9147
9148 2018-05-04  Tom Tromey  <tom@tromey.com>
9149
9150         * ada-lang.c (print_mention_exception): Use std::string.
9151
9152 2018-05-04  Tom Tromey  <tom@tromey.com>
9153
9154         * ada-lang.c (create_excep_cond_exprs): Update.
9155         (ada_exception_catchpoint_cond_string): Use std::string.
9156
9157 2018-05-04  Tom Tromey  <tom@tromey.com>
9158
9159         * ada-lang.c (xget_renaming_scope): Return std::string.
9160         (old_renaming_is_invisible): Update.
9161
9162 2018-05-04  Tom Tromey  <tom@tromey.com>
9163
9164         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9165         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9166
9167 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9168
9169         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9170
9171 2018-05-04  Tom Tromey  <tom@tromey.com>
9172
9173         * remote.c (remote_query_supported_append): Change type.
9174         (remote_check_symbols): Update.
9175
9176 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9177
9178         PR gdb/11420
9179         * configure.ac: Prepend libpython.
9180         * python/python-config.py: Likewise.
9181         * configure: Regenerate.
9182
9183 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9184
9185         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9186
9187 2018-05-03  Pedro Alves  <palves@redhat.com>
9188
9189         * s390-linux-nat.c
9190         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9191         override.  Write 'true' instead of '1'.
9192         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9193         declaration.
9194
9195 2018-05-02  Pedro Alves  <palves@redhat.com>
9196
9197         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9198         add_inf_child_target.
9199         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9200         add_inf_child_target.
9201         * aix-thread.c (aix_thread_target_info): New.
9202         (aix_thread_target) <shortname, longname, doc>: Delete.
9203         <info>: New.
9204         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9205         add_inf_child_target.
9206         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9207         add_inf_child_target.
9208         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9209         add_inf_child_target.
9210         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9211         add_inf_child_target.
9212         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9213         add_inf_child_target.
9214         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9215         add_inf_child_target.
9216         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9217         add_inf_child_target.
9218         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9219         add_inf_child_target.
9220         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9221         add_inf_child_target.
9222         * bfd-target.c (target_bfd_target_info): New.
9223         (target_bfd) <shortname, longname, doc>: Delete.
9224         <info>: New.
9225         * bsd-kvm.c (bsd_kvm_target_info): New.
9226         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9227         <info>: New.
9228         (bsd_kvm_target::open): Rename to ...
9229         (bsd_kvm_target_open): ... this.  Adjust.
9230         * bsd-uthread.c (bsd_uthread_target_info): New.
9231         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9232         <info>: New.
9233         * corefile.c (core_file_command): Adjust.
9234         * corelow.c (core_target_info): New.
9235         (core_target) <shortname, longname, doc>: Delete.
9236         <info>: New.
9237         (core_target::open): Rename to ...
9238         (core_target_open): ... this.  Adjust.
9239         * ctf.c (ctf_target_info): New.
9240         (ctf_target) <shortname, longname, doc>: Delete.
9241         <info>: New.
9242         (ctf_target::open): Rename to ...
9243         (ctf_target_open): ... this.
9244         (_initialize_ctf): Adjust.
9245         * exec.c (exec_target_info): New.
9246         (exec_target) <shortname, longname, doc>: Delete.
9247         <info>: New.
9248         (exec_target::open): Rename to ...
9249         (exec_target_open): ... this.
9250         * gdbcore.h (core_target_open): Declare.
9251         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9252         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9253         add_inf_child_target.
9254         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9255         add_inf_child_target.
9256         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9257         add_inf_child_target.
9258         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9259         add_inf_child_target.
9260         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9261         add_inf_child_target.
9262         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9263         add_inf_child_target.
9264         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9265         add_inf_child_target.
9266         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9267         add_inf_child_target.
9268         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9269         add_inf_child_target.
9270         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9271         add_inf_child_target.
9272         * inf-child.c (inf_child_target_info): New.
9273         (inf_child_target::info): New.
9274         (inf_child_open_target): Remove 'target' parameter.  Use
9275         get_native_target instead.
9276         (inf_child_target::open): Delete.
9277         (add_inf_child_target): New.
9278         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9279         Delete.
9280         <info>: New.
9281         (add_inf_child_target): Declare.
9282         (inf_child_open_target): Declare.
9283         * linux-thread-db.c (thread_db_target_info): New.
9284         (thread_db_target) <shortname, longname, doc>: Delete.
9285         <info>: New.
9286         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9287         add_inf_child_target.
9288         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9289         add_inf_child_target.
9290         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9291         add_inf_child_target.
9292         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9293         add_inf_child_target.
9294         * make-target-delegates (print_class): Adjust.
9295         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9296         add_inf_child_target.
9297         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9298         add_inf_child_target.
9299         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9300         add_inf_child_target.
9301         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9302         add_inf_child_target.
9303         * nto-procfs.c (nto_native_target_info): New.
9304         (nto_procfs_target_native) <shortname, longname, doc>:
9305         Delete.
9306         <info>: New.
9307         (nto_procfs_target_info): New.
9308         (nto_procfs_target_procfs) <shortname, longname, doc>:
9309         Delete.
9310         <info>: New.
9311         (init_procfs_targets): Adjust.
9312         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9313         add_inf_child_target.
9314         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9315         add_inf_child_target.
9316         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9317         add_inf_child_target.
9318         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9319         add_inf_child_target.
9320         * ravenscar-thread.c (ravenscar_target_info): New.
9321         (ravenscar_thread_target) <shortname, longname, doc>:
9322         Delete.
9323         <info>: New.
9324         * record-btrace.c (record_btrace_target_info):
9325         (record_btrace_target) <shortname, longname, doc>: Delete.
9326         <info>: New.
9327         (record_btrace_target::open): Rename to ...
9328         (record_btrace_target_open): ... this.  Adjust.
9329         * record-full.c (record_longname, record_doc): New.
9330         (record_full_base_target) <shortname, longname, doc>: Delete.
9331         <info>: New.
9332         (record_full_target_info): New.
9333         (record_full_target): <shortname>: Delete.
9334         <info>: New.
9335         (record_full_core_open_1, record_full_open_1): Update comments.
9336         (record_full_base_target::open): Rename to ...
9337         (record_full_open): ... this.
9338         (cmd_record_full_restore): Update.
9339         (_initialize_record_full): Update.
9340         * remote-sim.c (remote_sim_target_info): New.
9341         (gdbsim_target) <shortname, longname, doc>: Delete.
9342         <info>: New.
9343         (gdbsim_target::open): Rename to ...
9344         (gdbsim_target_open): ... this.
9345         (_initialize_remote_sim): Adjust.
9346         * remote.c (remote_doc): New.
9347         (remote_target_info): New.
9348         (remote_target) <shortname, longname, doc>: Delete.
9349         <info>: New.
9350         (extended_remote_target_info): New.
9351         (extended_remote_target) <shortname, longname, doc>: Delete.
9352         <info>: New.
9353         (remote_target::open_1): Make static.  Adjust.
9354         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9355         * s390-linux-nat.c (_initialize_s390_nat): Use
9356         add_inf_child_target.
9357         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9358         add_inf_child_target.
9359         * sol-thread.c (thread_db_target_info): New.
9360         (sol_thread_target) <shortname, longname, doc>: Delete.
9361         <info>: New.
9362         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9363         add_inf_child_target.
9364         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9365         add_inf_child_target.
9366         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9367         add_inf_child_target.
9368         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9369         add_inf_child_target.
9370         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9371         add_inf_child_target.
9372         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9373         add_inf_child_target.
9374         * spu-linux-nat.c (_initialize_spu_nat): Use
9375         add_inf_child_target.
9376         * spu-multiarch.c (spu_multiarch_target_info): New.
9377         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9378         <info>: New.
9379         * target-delegates.c: Regenerate.
9380         * target.c: Include <unordered_map>.
9381         (target_ops_p): Delete.
9382         (DEF_VEC_P(target_ops_p)): Delete.
9383         (target_factories): New.
9384         (test_target_info): New.
9385         (test_target_ops::info): New.
9386         (open_target): Adjust to use target_factories.
9387         (add_target_with_completer): Rename to ...
9388         (add_target): ... this.  Change prototype.  Register target_info
9389         and open callback in target_factories.  Register target_info in
9390         command context instead of target_ops.
9391         (add_target): Delete old implementation.
9392         (add_deprecated_target_alias): Change prototype.  Adjust.
9393         (the_native_target): New.
9394         (set_native_target, get_native_target): New.
9395         (find_default_run_target): Use the_native_target.
9396         (find_attach_target, find_run_target): Simplify.
9397         (target_ops::open): Delete.
9398         (dummy_target_info): New.
9399         (dummy_target::shortname, dummy_target::longname)
9400         (dummy_target::doc): Delete.
9401         (dummy_target::info): New.
9402         (debug_target::shortname, debug_target::longname)
9403         (debug_target::doc): Delete.
9404         (debug_target::info): New.
9405         * target.h (struct target_info): New.
9406         (target_ops::~target_ops): Add comment.
9407         (target_ops::info): New.
9408         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9409         longer virtual.  Implement in terms of target_info.
9410         (set_native_target, get_native_target): Declare.
9411         (target_open_ftype): New.
9412         (add_target, add_target_with_completer)
9413         (add_deprecated_target_alias): Change prototype.
9414         (test_target) <shortname, longname, doc>: Delete.
9415         <info>: New.
9416         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9417         add_inf_child_target.
9418         * tracefile-tfile.c (tfile_target_info): New.
9419         (tfile_target) <shortname, longname, doc>: Delete.
9420         <info>: New.
9421         (tfile_target::open): Rename to ...
9422         (tfile_target_open): ... this.
9423         (_initialize_tracefile_tfile): Adjust.
9424         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9425         add_inf_child_target.
9426         * windows-nat.c (_initialize_windows_nat): Use
9427         add_inf_child_target.
9428         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9429         add_inf_child_target.
9430
9431 2018-05-02  Pedro Alves  <palves@redhat.com>
9432
9433         * linux-nat.h (linux_nat_target) <low_new_thread,
9434         low_delete_thread, low_new_fork, low_forget_process,
9435         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9436         New virtual methods.
9437         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9438         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9439         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9440         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9441         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9442         Delete.
9443         * linux-fork.c (delete_fork): Adjust to call low method.
9444         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9445         (linux_nat_new_fork, linux_nat_forget_process_hook)
9446         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9447         (linux_nat_status_is_event):
9448         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9449         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9450         to call low method.
9451         (sigtrap_is_event): Rename to ...
9452         (linux_nat_target::low_status_is_event): ... this.
9453         (linux_nat_set_status_is_event): Delete.
9454         (save_stop_reason, linux_nat_wait_1)
9455         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9456         low methods.
9457         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9458         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9459         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9460         (linux_nat_set_prepare_to_resume): Delete.
9461         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9462         low virtual methods.
9463         * amd64-linux-nat.c: Likewise.
9464         * arm-linux-nat.c: Likewise.
9465         * i386-linux-nat.c: Likewise.
9466         * ia64-linux-nat.c: Likewise.
9467         * mips-linux-nat.c: Likewise.
9468         * ppc-linux-nat.c: Likewise.
9469         * s390-linux-nat.c: Likewise.
9470         * sparc64-linux-nat.c: Likewise.
9471         * x86-linux-nat.c: Likewise.
9472         * x86-linux-nat.h: Include "nat/x86-linux.h".
9473         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9474         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9475         Override methods.
9476
9477 2018-05-02  Pedro Alves  <palves@redhat.com>
9478
9479         * target.h (target_ops)
9480         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9481         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9482         stopped_by_watchpoint, have_continuable_watchpoint,
9483         stopped_data_address, watchpoint_addr_within_range,
9484         can_accel_watchpoint_condition, can_run, thread_alive,
9485         has_all_memory, has_memory, has_stack, has_registers,
9486         has_execution, can_async_p, is_async_p, supports_non_stop,
9487         always_non_stop_p, can_execute_reverse, supports_multi_process,
9488         supports_enable_disable_tracepoint,
9489         supports_disable_randomization, supports_string_tracing,
9490         supports_evaluation_of_breakpoint_conditions,
9491         can_run_breakpoint_commands, filesystem_is_local,
9492         can_download_tracepoint, get_trace_state_variable_value,
9493         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9494         record_is_replaying, record_will_replay,
9495         augmented_libraries_svr4_read>: Adjust to return bool.
9496         * aarch64-linux-nat.c: All implementations adjusted.
9497         * aix-thread.c: All implementations adjusted.
9498         * arm-linux-nat.c: All implementations adjusted.
9499         * breakpoint.c: All implementations adjusted.
9500         * bsd-kvm.c: All implementations adjusted.
9501         * bsd-uthread.c: All implementations adjusted.
9502         * corelow.c: All implementations adjusted.
9503         * ctf.c: All implementations adjusted.
9504         * darwin-nat.c: All implementations adjusted.
9505         * darwin-nat.h: All implementations adjusted.
9506         * exec.c: All implementations adjusted.
9507         * fbsd-nat.c: All implementations adjusted.
9508         * fbsd-nat.h: All implementations adjusted.
9509         * gnu-nat.c: All implementations adjusted.
9510         * gnu-nat.h: All implementations adjusted.
9511         * go32-nat.c: All implementations adjusted.
9512         * ia64-linux-nat.c: All implementations adjusted.
9513         * inf-child.c: All implementations adjusted.
9514         * inf-child.h: All implementations adjusted.
9515         * inf-ptrace.c: All implementations adjusted.
9516         * inf-ptrace.h: All implementations adjusted.
9517         * linux-nat.c: All implementations adjusted.
9518         * linux-nat.h: All implementations adjusted.
9519         * mips-linux-nat.c: All implementations adjusted.
9520         * nto-procfs.c: All implementations adjusted.
9521         * ppc-linux-nat.c: All implementations adjusted.
9522         * procfs.c: All implementations adjusted.
9523         * ravenscar-thread.c: All implementations adjusted.
9524         * record-btrace.c: All implementations adjusted.
9525         * record-full.c: All implementations adjusted.
9526         * remote-sim.c: All implementations adjusted.
9527         * remote.c: All implementations adjusted.
9528         * s390-linux-nat.c: All implementations adjusted.
9529         * sol-thread.c: All implementations adjusted.
9530         * spu-multiarch.c: All implementations adjusted.
9531         * target-delegates.c: All implementations adjusted.
9532         * target.c: All implementations adjusted.
9533         * target.h: All implementations adjusted.
9534         * tracefile-tfile.c: All implementations adjusted.
9535         * tracefile.c: All implementations adjusted.
9536         * tracefile.h: All implementations adjusted.
9537         * windows-nat.c: All implementations adjusted.
9538         * x86-linux-nat.h: All implementations adjusted.
9539         * x86-nat.h: All implementations adjusted.
9540
9541 2018-05-02  Pedro Alves  <palves@redhat.com>
9542
9543         * make-target-delegates (scan_target_h): Don't trim lines here.
9544         Replace sequences of tabs and/or whitespace with a single
9545         whitespace.
9546         (top level, parsing methods): Trim each line before processing it
9547         here.
9548
9549 2018-05-02  Pedro Alves  <palves@redhat.com>
9550             John Baldwin  <jhb@freebsd.org>
9551
9552         * target.h (enum strata) <debug_stratum>: New.
9553         (struct target_ops) <all delegation methods>: Replace by C++
9554         virtual methods, and drop "to_" prefix.  All references updated
9555         throughout.
9556         <to_shortname, to_longname, to_doc, to_data,
9557         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9558         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9559         virtual methods.  All references updated throughout.
9560         <can_attach, supports_terminal_ours, can_create_inferior,
9561         get_thread_control_capabilities, attach_no_wait>: New
9562         virtual methods.
9563         <insert_breakpoint, remove_breakpoint>: Now
9564         TARGET_DEFAULT_NORETURN methods.
9565         <info_proc>: Now returns bool.
9566         <to_magic>: Delete.
9567         (OPS_MAGIC): Delete.
9568         (current_target): Delete.  All references replaced by references
9569         to ...
9570         (target_stack): ... this.  New.
9571         (target_shortname, target_longname): Adjust.
9572         (target_can_run): Now a function declaration.
9573         (default_child_has_all_memory, default_child_has_memory)
9574         (default_child_has_stack, default_child_has_registers)
9575         (default_child_has_execution): Remove target_ops parameter.
9576         (complete_target_initialization): Delete.
9577         (memory_breakpoint_target): New template class.
9578         (test_target_ops): Refactor as a C++ class with virtual methods.
9579         * make-target-delegates (NAME_PART): Tighten.
9580         (POINTER_PART, CP_SYMBOL): New.
9581         (SIMPLE_RETURN_PART): Reimplement.
9582         (VEC_RETURN_PART): Expect less.
9583         (RETURN_PART, VIRTUAL_PART): New.
9584         (METHOD): Adjust to C++ virtual methods.
9585         (scan_target_h): Remove reference to C99.
9586         (dname): Output "target_ops::" prefix.
9587         (write_function_header): Adjust to output a C++ class method.
9588         (write_declaration): New.
9589         (write_delegator): Adjust to output a C++ class method.
9590         (tdname): Output "dummy_target::" prefix.
9591         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9592         method.
9593         (tdefault_names, debug_names): Delete.
9594         (return_types, tdefaults, styles, argtypes_array): New.
9595         (top level): All methods are delegators.
9596         (print_class): New.
9597         (top level): Print dummy_target and debug_target classes.
9598         * target-delegates.c: Regenerate.
9599         * target-debug.h (target_debug_print_enum_info_proc_what)
9600         (target_debug_print_thread_control_capabilities)
9601         (target_debug_print_thread_info_p): New.
9602         * target.c (dummy_target): Delete.
9603         (the_dummy_target, the_debug_target): New.
9604         (target_stack): Now extern.
9605         (set_targetdebug): Push/unpush debug target.
9606         (default_child_has_all_memory, default_child_has_memory)
9607         (default_child_has_stack, default_child_has_registers)
9608         (default_child_has_execution): Remove target_ops parameter.
9609         (complete_target_initialization): Delete.
9610         (add_target_with_completer): No longer call
9611         complete_target_initialization.
9612         (target_supports_terminal_ours): Use regular delegation.
9613         (update_current_target): Delete.
9614         (push_target): No longer check magic number.  Don't call
9615         update_current_target.
9616         (unpush_target): Don't call update_current_target.
9617         (target_is_pushed): No longer check magic number.
9618         (target_require_runnable): Skip for all stratums over
9619         process_stratum.
9620         (target_ops::info_proc): New.
9621         (target_info_proc): Use find_target_at and
9622         find_default_run_target.
9623         (target_supports_disable_randomization): Use regular delegation.
9624         (target_get_osdata): Use find_target_at.
9625         (target_ops::open, target_ops::close, target_ops::can_attach)
9626         (target_ops::attach, target_ops::can_create_inferior)
9627         (target_ops::create_inferior, target_ops::can_run)
9628         (target_can_run): New.
9629         (default_fileio_target): Use regular delegation.
9630         (target_ops::fileio_open, target_ops::fileio_pwrite)
9631         (target_ops::fileio_pread, target_ops::fileio_fstat)
9632         (target_ops::fileio_close, target_ops::fileio_unlink)
9633         (target_ops::fileio_readlink): New.
9634         (target_fileio_open_1, target_fileio_unlink)
9635         (target_fileio_readlink): Always call the target method.  Handle
9636         FILEIO_ENOSYS.
9637         (return_zero, return_zero_has_execution): Delete.
9638         (init_dummy_target): Delete.
9639         (dummy_target::dummy_target, dummy_target::shortname)
9640         (dummy_target::longname, dummy_target::doc)
9641         (debug_target::debug_target, debug_target::shortname)
9642         (debug_target::longname, debug_target::doc): New.
9643         (target_supports_delete_record): Use regular delegation.
9644         (setup_target_debug): Delete.
9645         (maintenance_print_target_stack): Skip debug_stratum.
9646         (initialize_targets): Instantiate the_dummy_target and
9647         the_debug_target.
9648         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9649         use target_stack.
9650         (target_auxv_search, fprint_target_auxv): Adjust.
9651         (info_auxv_command): Adjust to use target_stack.
9652         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9653         * exceptions.c (print_flush): Handle a NULL target_stack.
9654         * regcache.c (target_ops_no_register): Refactor as class with
9655         virtual methods.
9656
9657         * exec.c (exec_target): New class.
9658         (exec_ops): Now an exec_target.
9659         (exec_open, exec_close_1, exec_get_section_table)
9660         (exec_xfer_partial, exec_files_info, exec_has_memory)
9661         (exec_make_note_section): Refactor as exec_target methods.
9662         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9663         Delete.
9664         (exec_target::find_memory_regions): New.
9665         (_initialize_exec): Don't call init_exec_ops.
9666         * gdbcore.h (exec_file_clear): Delete.
9667
9668         * corefile.c (core_target): Delete.
9669         (core_file_command): Adjust.
9670         * corelow.c (core_target): New class.
9671         (the_core_target): New.
9672         (core_close): Remove target_ops parameter.
9673         (core_close_cleanup): Adjust.
9674         (core_target::close): New.
9675         (core_open, core_detach, get_core_registers, core_files_info)
9676         (core_xfer_partial, core_thread_alive, core_read_description)
9677         (core_pid_to_str, core_thread_name, core_has_memory)
9678         (core_has_stack, core_has_registers, core_info_proc): Rework as
9679         core_target methods.
9680         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9681         (_initialize_corelow): Initialize the_core_target.
9682         * gdbcore.h (core_target): Delete.
9683         (the_core_target): New.
9684
9685         * ctf.c: (ctf_target): New class.
9686         (ctf_ops): Now a ctf_target.
9687         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9688         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9689         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9690         methods.
9691         (init_ctf_ops): Delete.
9692         (_initialize_ctf): Don't call it.
9693         * tracefile-tfile.c (tfile_target): New class.
9694         (tfile_ops): Now a tfile_target.
9695         (tfile_open, tfile_close, tfile_files_info)
9696         (tfile_get_tracepoint_status, tfile_trace_find)
9697         (tfile_fetch_registers, tfile_xfer_partial)
9698         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9699         Refactor as tfile_target methods.
9700         (tfile_xfer_partial_features): Remove target_ops parameter.
9701         (init_tfile_ops): Delete.
9702         (_initialize_tracefile_tfile): Don't call it.
9703         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9704         (tracefile_has_stack, tracefile_has_registers)
9705         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9706         tracefile_target methods.
9707         (init_tracefile_ops): Delete.
9708         (tracefile_target::tracefile_target): New.
9709         * tracefile.h: Include "target.h".
9710         (tracefile_target): New class.
9711         (init_tracefile_ops): Delete.
9712
9713         * spu-multiarch.c (spu_multiarch_target): New class.
9714         (spu_ops): Now a spu_multiarch_target.
9715         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9716         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9717         (spu_search_memory, spu_mourn_inferior): Refactor as
9718         spu_multiarch_target methods.
9719         (init_spu_ops): Delete.
9720         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9721         complete_target_initialization.
9722
9723         * ravenscar-thread.c (ravenscar_thread_target): New class.
9724         (ravenscar_ops): Now a ravenscar_thread_target.
9725         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9726         (ravenscar_thread_alive, ravenscar_pid_to_str)
9727         (ravenscar_fetch_registers, ravenscar_store_registers)
9728         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9729         (ravenscar_stopped_by_hw_breakpoint)
9730         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9731         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9732         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9733         methods.
9734         (init_ravenscar_thread_ops): Delete.
9735         (_initialize_ravenscar): Remove references to
9736         init_ravenscar_thread_ops and complete_target_initialization.
9737
9738         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9739         (bsd_uthread_target): New class.
9740         (bsd_uthread_ops): Now a bsd_uthread_target.
9741         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9742         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9743         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9744         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9745         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9746         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9747         (bsd_uthread_target): Delete function.
9748         (_initialize_bsd_uthread): Remove reference to
9749         complete_target_initialization.
9750
9751         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9752         (target_bfd): ... this new class.
9753         (target_bfd_xfer_partial, target_bfd_get_section_table)
9754         (target_bfd_close): Refactor as target_bfd methods.
9755         (target_bfd::~target_bfd): New.
9756         (target_bfd_reopen): Adjust.
9757         (target_bfd::close): New.
9758
9759         * record-btrace.c (record_btrace_target): New class.
9760         (record_btrace_ops): Now a record_btrace_target.
9761         (record_btrace_open, record_btrace_stop_recording)
9762         (record_btrace_disconnect, record_btrace_close)
9763         (record_btrace_async, record_btrace_info)
9764         (record_btrace_insn_history, record_btrace_insn_history_range)
9765         (record_btrace_insn_history_from, record_btrace_call_history)
9766         (record_btrace_call_history_range)
9767         (record_btrace_call_history_from, record_btrace_record_method)
9768         (record_btrace_is_replaying, record_btrace_will_replay)
9769         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9770         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9771         (record_btrace_store_registers, record_btrace_prepare_to_store)
9772         (record_btrace_to_get_unwinder)
9773         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9774         (record_btrace_commit_resume, record_btrace_wait)
9775         (record_btrace_stop, record_btrace_can_execute_reverse)
9776         (record_btrace_stopped_by_sw_breakpoint)
9777         (record_btrace_supports_stopped_by_sw_breakpoint)
9778         (record_btrace_stopped_by_hw_breakpoint)
9779         (record_btrace_supports_stopped_by_hw_breakpoint)
9780         (record_btrace_update_thread_list, record_btrace_thread_alive)
9781         (record_btrace_goto_begin, record_btrace_goto_end)
9782         (record_btrace_goto, record_btrace_stop_replaying_all)
9783         (record_btrace_execution_direction)
9784         (record_btrace_prepare_to_generate_core)
9785         (record_btrace_done_generating_core): Refactor as
9786         record_btrace_target methods.
9787         (init_record_btrace_ops): Delete.
9788         (_initialize_record_btrace): Remove reference to
9789         init_record_btrace_ops.
9790         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9791         the execution_direction global.
9792         (record_full_base_target, record_full_target)
9793         (record_full_core_target): New classes.
9794         (record_full_ops): Now a record_full_target.
9795         (record_full_core_ops): Now a record_full_core_target.
9796         (record_full_target::detach, record_full_target::disconnect)
9797         (record_full_core_target::disconnect)
9798         (record_full_target::mourn_inferior, record_full_target::kill):
9799         New.
9800         (record_full_open, record_full_close, record_full_async): Refactor
9801         as methods of the record_full_base_target class.
9802         (record_full_resume, record_full_commit_resume): Refactor
9803         as methods of the record_full_target class.
9804         (record_full_wait, record_full_stopped_by_watchpoint)
9805         (record_full_stopped_data_address)
9806         (record_full_stopped_by_sw_breakpoint)
9807         (record_full_supports_stopped_by_sw_breakpoint)
9808         (record_full_stopped_by_hw_breakpoint)
9809         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9810         methods of the record_full_base_target class.
9811         (record_full_store_registers, record_full_xfer_partial)
9812         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9813         Refactor as methods of the record_full_target class.
9814         (record_full_can_execute_reverse, record_full_get_bookmark)
9815         (record_full_goto_bookmark, record_full_execution_direction)
9816         (record_full_record_method, record_full_info, record_full_delete)
9817         (record_full_is_replaying, record_full_will_replay)
9818         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9819         (record_full_stop_replaying): Refactor as methods of the
9820         record_full_base_target class.
9821         (record_full_core_resume, record_full_core_kill)
9822         (record_full_core_fetch_registers)
9823         (record_full_core_prepare_to_store)
9824         (record_full_core_store_registers, record_full_core_xfer_partial)
9825         (record_full_core_insert_breakpoint)
9826         (record_full_core_remove_breakpoint)
9827         (record_full_core_has_execution): Refactor
9828         as methods of the record_full_core_target class.
9829         (record_full_base_target::supports_delete_record): New.
9830         (init_record_full_ops): Delete.
9831         (init_record_full_core_ops): Delete.
9832         (record_full_save): Refactor as method of the
9833         record_full_base_target class.
9834         (_initialize_record_full): Remove references to
9835         init_record_full_ops and init_record_full_core_ops.
9836
9837         * remote.c (remote_target, extended_remote_target): New classes.
9838         (remote_ops): Now a remote_target.
9839         (extended_remote_ops): Now an extended_remote_target.
9840         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9841         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9842         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9843         (remote_pass_signals, remote_set_syscall_catchpoint)
9844         (remote_program_signals, )
9845         (remote_thread_always_alive): Remove target_ops parameter.
9846         (remote_thread_alive, remote_thread_name)
9847         (remote_update_thread_list, remote_threads_extra_info)
9848         (remote_static_tracepoint_marker_at)
9849         (remote_static_tracepoint_markers_by_strid)
9850         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9851         (remote_open): Refactor as methods of remote_target.
9852         (extended_remote_open, extended_remote_detach)
9853         (extended_remote_attach, extended_remote_post_attach):
9854         (extended_remote_supports_disable_randomization)
9855         (extended_remote_create_inferior): : Refactor as method of
9856         extended_remote_target.
9857         (remote_set_permissions, remote_open_1, remote_detach)
9858         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9859         (remote_resume, remote_commit_resume, remote_stop)
9860         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9861         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9862         (remote_prepare_to_store, remote_store_registers)
9863         (remote_flash_erase, remote_flash_done, remote_files_info)
9864         (remote_kill, remote_mourn, remote_insert_breakpoint)
9865         (remote_remove_breakpoint, remote_insert_watchpoint)
9866         (remote_watchpoint_addr_within_range)
9867         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9868         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9869         (remote_supports_stopped_by_sw_breakpoint)
9870         (remote_stopped_by_hw_breakpoint)
9871         (remote_supports_stopped_by_hw_breakpoint)
9872         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9873         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9874         (remote_verify_memory): Refactor as methods of remote_target.
9875         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9876         parameter.
9877         (remote_xfer_partial, remote_get_memory_xfer_limit)
9878         (remote_search_memory, remote_rcmd, remote_memory_map)
9879         (remote_pid_to_str, remote_get_thread_local_address)
9880         (remote_get_tib_address, remote_read_description): Refactor as
9881         methods of remote_target.
9882         (remote_target::fileio_open, remote_target::fileio_pwrite)
9883         (remote_target::fileio_pread, remote_target::fileio_close): New.
9884         (remote_hostio_readlink, remote_hostio_fstat)
9885         (remote_filesystem_is_local, remote_can_execute_reverse)
9886         (remote_supports_non_stop, remote_supports_disable_randomization)
9887         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9888         (remote_supports_enable_disable_tracepoint)
9889         (remote_supports_string_tracing)
9890         (remote_can_run_breakpoint_commands, remote_trace_init)
9891         (remote_download_tracepoint, remote_can_download_tracepoint)
9892         (remote_download_trace_state_variable, remote_enable_tracepoint)
9893         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9894         (remote_trace_start, remote_get_trace_status)
9895         (remote_get_tracepoint_status, remote_trace_stop)
9896         (remote_trace_find, remote_get_trace_state_variable_value)
9897         (remote_save_trace_data, remote_get_raw_trace_data)
9898         (remote_set_disconnected_tracing, remote_core_of_thread)
9899         (remote_set_circular_trace_buffer, remote_traceframe_info)
9900         (remote_get_min_fast_tracepoint_insn_len)
9901         (remote_set_trace_buffer_size, remote_set_trace_notes)
9902         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9903         (remote_disable_btrace, remote_teardown_btrace)
9904         (remote_read_btrace, remote_btrace_conf)
9905         (remote_augmented_libraries_svr4_read, remote_load)
9906         (remote_pid_to_exec_file, remote_can_do_single_step)
9907         (remote_execution_direction, remote_thread_handle_to_thread_info):
9908         Refactor as methods of remote_target.
9909         (init_remote_ops, init_extended_remote_ops): Delete.
9910         (remote_can_async_p, remote_is_async_p, remote_async)
9911         (remote_thread_events, remote_upload_tracepoints)
9912         (remote_upload_trace_state_variables): Refactor as methods of
9913         remote_target.
9914         (_initialize_remote): Remove references to init_remote_ops and
9915         init_extended_remote_ops.
9916
9917         * remote-sim.c (gdbsim_target): New class.
9918         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9919         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9920         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9921         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9922         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9923         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9924         Refactor as methods of gdbsim_target.
9925         (gdbsim_ops): Now a gdbsim_target.
9926         (init_gdbsim_ops): Delete.
9927         (gdbsim_cntrl_c): Adjust.
9928         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9929
9930         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9931         (the_amd64_linux_nat_target): New.
9932         (amd64_linux_fetch_inferior_registers)
9933         (amd64_linux_store_inferior_registers): Refactor as methods of
9934         amd64_linux_nat_target.
9935         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9936         * i386-linux-nat.c: Don't include "linux-nat.h".
9937         (i386_linux_nat_target): New class.
9938         (the_i386_linux_nat_target): New.
9939         (i386_linux_fetch_inferior_registers)
9940         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9941         as methods of i386_linux_nat_target.
9942         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9943         * inf-child.c (inf_child_ops): Delete.
9944         (inf_child_fetch_inferior_registers)
9945         (inf_child_store_inferior_registers): Delete.
9946         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9947         methods of inf_child_target.
9948         (inf_child_target::supports_terminal_ours)
9949         (inf_child_target::terminal_init)
9950         (inf_child_target::terminal_inferior)
9951         (inf_child_target::terminal_ours_for_output)
9952         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9953         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9954         New.
9955         (inf_child_open, inf_child_disconnect, inf_child_close)
9956         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9957         (inf_child_post_startup_inferior, inf_child_can_run)
9958         (inf_child_pid_to_exec_file): Refactor as methods of
9959         inf_child_target.
9960         (inf_child_follow_fork): Delete.
9961         (inf_child_target::can_create_inferior)
9962         (inf_child_target::can_attach): New.
9963         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9964         (inf_child_target::has_stack, inf_child_target::has_registers)
9965         (inf_child_target::has_execution): New.
9966         (inf_child_fileio_open, inf_child_fileio_pwrite)
9967         (inf_child_fileio_pread, inf_child_fileio_fstat)
9968         (inf_child_fileio_close, inf_child_fileio_unlink)
9969         (inf_child_fileio_readlink, inf_child_use_agent)
9970         (inf_child_can_use_agent): Refactor as methods of
9971         inf_child_target.
9972         (return_zero, inf_child_target): Delete.
9973         (inf_child_target::inf_child_target): New.
9974         * inf-child.h: Include "target.h".
9975         (inf_child_target): Delete function prototype.
9976         (inf_child_target): New class.
9977         (inf_child_open_target, inf_child_mourn_inferior)
9978         (inf_child_maybe_unpush_target): Delete.
9979         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9980         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9981         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9982         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9983         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9984         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9985         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9986         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9987         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9988         methods of inf_ptrace_target.
9989         (inf_ptrace_target): Delete function.
9990         * inf-ptrace.h: Include "inf-child.h".
9991         (inf_ptrace_target): Delete function declaration.
9992         (inf_ptrace_target): New class.
9993         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9994         * linux-nat.c (linux_target): New.
9995         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9996         (linux_nat_target::~linux_nat_target): New.
9997         (linux_child_post_attach, linux_child_post_startup_inferior)
9998         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9999         (linux_child_remove_fork_catchpoint)
10000         (linux_child_insert_vfork_catchpoint)
10001         (linux_child_remove_vfork_catchpoint)
10002         (linux_child_insert_exec_catchpoint)
10003         (linux_child_remove_exec_catchpoint)
10004         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10005         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10006         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10007         (linux_nat_stopped_data_address)
10008         (linux_nat_stopped_by_sw_breakpoint)
10009         (linux_nat_supports_stopped_by_sw_breakpoint)
10010         (linux_nat_stopped_by_hw_breakpoint)
10011         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10012         (linux_nat_kill, linux_nat_mourn_inferior)
10013         (linux_nat_xfer_partial, linux_nat_thread_alive)
10014         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10015         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10016         (linux_child_static_tracepoint_markers_by_strid)
10017         (linux_nat_is_async_p, linux_nat_can_async_p)
10018         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10019         (linux_nat_supports_multi_process)
10020         (linux_nat_supports_disable_randomization, linux_nat_async)
10021         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10022         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10023         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10024         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10025         methods of linux_nat_target.
10026         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10027         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10028         parameter.
10029         (check_stopped_by_watchpoint): Adjust.
10030         (linux_xfer_partial): Delete.
10031         (linux_target_install_ops, linux_target, linux_nat_add_target):
10032         Delete.
10033         (linux_nat_target::linux_nat_target): New.
10034         * linux-nat.h: Include "inf-ptrace.h".
10035         (linux_nat_target): New.
10036         (linux_target, linux_target_install_ops, linux_nat_add_target):
10037         Delete function declarations.
10038         (linux_target): Declare global.
10039         * linux-thread-db.c (thread_db_target): New.
10040         (thread_db_target::thread_db_target): New.
10041         (thread_db_ops): Delete.
10042         (the_thread_db_target): New.
10043         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10044         (thread_db_update_thread_list, thread_db_pid_to_str)
10045         (thread_db_extra_thread_info)
10046         (thread_db_thread_handle_to_thread_info)
10047         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10048         (thread_db_resume): Refactor as methods of thread_db_target.
10049         (init_thread_db_ops): Delete.
10050         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10051         * x86-linux-nat.c: Don't include "linux-nat.h".
10052         (super_post_startup_inferior): Delete.
10053         (x86_linux_nat_target::~x86_linux_nat_target): New.
10054         (x86_linux_child_post_startup_inferior)
10055         (x86_linux_read_description, x86_linux_enable_btrace)
10056         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10057         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10058         methods of x86_linux_nat_target.
10059         (x86_linux_create_target): Delete.  Bits folded ...
10060         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10061         pointer.
10062         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10063         (x86_linux_nat_target): New class.
10064         (x86_linux_create_target): Delete.
10065         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10066         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10067         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10068         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10069         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10070         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10071         make extern.
10072         (x86_use_watchpoints): Delete.
10073         * x86-nat.h: Include "breakpoint.h" and "target.h".
10074         (x86_use_watchpoints): Delete.
10075         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10076         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10077         (x86_insert_watchpoint, x86_remove_watchpoint)
10078         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10079         (x86_stopped_by_hw_breakpoint): New declarations.
10080         (x86_nat_target): New template class.
10081
10082         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10083         (the_ppc_linux_nat_target): New.
10084         (ppc_linux_fetch_inferior_registers)
10085         (ppc_linux_can_use_hw_breakpoint)
10086         (ppc_linux_region_ok_for_hw_watchpoint)
10087         (ppc_linux_ranged_break_num_registers)
10088         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10089         (ppc_linux_insert_mask_watchpoint)
10090         (ppc_linux_remove_mask_watchpoint)
10091         (ppc_linux_can_accel_watchpoint_condition)
10092         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10093         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10094         (ppc_linux_watchpoint_addr_within_range)
10095         (ppc_linux_masked_watch_num_registers)
10096         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10097         (ppc_linux_read_description): Refactor as methods of
10098         ppc_linux_nat_target.
10099         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10100
10101         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10102         (procfs_target): New class.
10103         (the_procfs_target): New.
10104         (procfs_target): Delete function.
10105         (procfs_auxv_parse, procfs_attach, procfs_detach)
10106         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10107         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10108         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10109         (procfs_create_inferior, procfs_update_thread_list)
10110         (procfs_thread_alive, procfs_pid_to_str)
10111         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10112         (procfs_stopped_data_address, procfs_insert_watchpoint)
10113         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10114         (proc_find_memory_regions, procfs_info_proc)
10115         (procfs_make_note_section): Refactor as methods of procfs_target.
10116         (_initialize_procfs): Adjust.
10117         * sol-thread.c (sol_thread_target): New class.
10118         (sol_thread_ops): Now a sol_thread_target.
10119         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10120         (sol_thread_fetch_registers, sol_thread_store_registers)
10121         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10122         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10123         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10124         (init_sol_thread_ops): Delete.
10125         (_initialize_sol_thread): Adjust.  Remove references to
10126         init_sol_thread_ops and complete_target_initialization.
10127
10128         * windows-nat.c (windows_nat_target): New class.
10129         (windows_fetch_inferior_registers)
10130         (windows_store_inferior_registers, windows_resume, windows_wait)
10131         (windows_attach, windows_detach, windows_pid_to_exec_file)
10132         (windows_files_info, windows_create_inferior)
10133         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10134         (windows_close, windows_pid_to_str, windows_xfer_partial)
10135         (windows_get_tib_address, windows_get_ada_task_ptid)
10136         (windows_thread_name, windows_thread_alive): Refactor as
10137         windows_nat_target methods.
10138         (do_initial_windows_stuff): Adjust.
10139         (windows_target): Delete function.
10140         (_initialize_windows_nat): Adjust.
10141
10142         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10143         (darwin_mourn_inferior, darwin_kill_inferior)
10144         (darwin_create_inferior, darwin_attach, darwin_detach)
10145         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10146         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10147         (darwin_supports_multi_process): Refactor as darwin_nat_target
10148         methods.
10149         (darwin_resume_to, darwin_files_info): Delete.
10150         (_initialize_darwin_inferior): Rename to ...
10151         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10152         * darwin-nat.h: Include "inf-child.h".
10153         (darwin_nat_target): New class.
10154         (darwin_complete_target): Delete.
10155         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10156         (darwin_target): New.
10157         (i386_darwin_fetch_inferior_registers)
10158         (i386_darwin_store_inferior_registers): Refactor as methods of
10159         darwin_nat_target.
10160         (darwin_complete_target): Delete, with ...
10161         (_initialize_i386_darwin_nat): ... bits factored out here.
10162
10163         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10164         (the_alpha_linux_nat_target): New.
10165         (alpha_linux_register_u_offset): Refactor as
10166         alpha_linux_nat_target method.
10167         (_initialize_alpha_linux_nat): Adjust.
10168         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10169         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10170         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10171         methods of linux_nat_trad_target.
10172         (linux_trad_target): Delete.
10173         * linux-nat-trad.h (linux_trad_target): Delete function.
10174         (linux_nat_trad_target): New class.
10175         * mips-linux-nat.c (mips_linux_nat_target): New class.
10176         (super_fetch_registers, super_store_registers, super_close):
10177         Delete.
10178         (the_mips_linux_nat_target): New.
10179         (mips64_linux_regsets_fetch_registers)
10180         (mips64_linux_regsets_store_registers)
10181         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10182         (mips_linux_register_u_offset, mips_linux_read_description)
10183         (mips_linux_can_use_hw_breakpoint)
10184         (mips_linux_stopped_by_watchpoint)
10185         (mips_linux_stopped_data_address)
10186         (mips_linux_region_ok_for_hw_watchpoint)
10187         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10188         (mips_linux_close): Refactor as methods of mips_linux_nat.
10189         (_initialize_mips_linux_nat): Adjust to C++ification.
10190
10191         * aix-thread.c (aix_thread_target): New class.
10192         (aix_thread_ops): Now an aix_thread_target.
10193         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10194         (aix_thread_fetch_registers, aix_thread_store_registers)
10195         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10196         (aix_thread_thread_alive, aix_thread_pid_to_str)
10197         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10198         Refactor as methods of aix_thread_target.
10199         (init_aix_thread_ops): Delete.
10200         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10201         and complete_target_initialization.
10202         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10203         (rs6000_nat_target): New class.
10204         (the_rs6000_nat_target): New.
10205         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10206         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10207         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10208         (super_create_inferior): Delete.
10209         (_initialize_rs6000_nat): Adjust to C++ification.
10210
10211         * arm-linux-nat.c (arm_linux_nat_target): New class.
10212         (the_arm_linux_nat_target): New.
10213         (arm_linux_fetch_inferior_registers)
10214         (arm_linux_store_inferior_registers, arm_linux_read_description)
10215         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10216         (arm_linux_remove_hw_breakpoint)
10217         (arm_linux_region_ok_for_hw_watchpoint)
10218         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10219         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10220         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10221         arm_linux_nat_target.
10222         (_initialize_arm_linux_nat): Adjust to C++ification.
10223
10224         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10225         (the_aarch64_linux_nat_target): New.
10226         (aarch64_linux_fetch_inferior_registers)
10227         (aarch64_linux_store_inferior_registers)
10228         (aarch64_linux_child_post_startup_inferior)
10229         (aarch64_linux_read_description)
10230         (aarch64_linux_can_use_hw_breakpoint)
10231         (aarch64_linux_insert_hw_breakpoint)
10232         (aarch64_linux_remove_hw_breakpoint)
10233         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10234         (aarch64_linux_region_ok_for_hw_watchpoint)
10235         (aarch64_linux_stopped_data_address)
10236         (aarch64_linux_stopped_by_watchpoint)
10237         (aarch64_linux_watchpoint_addr_within_range)
10238         (aarch64_linux_can_do_single_step): Refactor as methods of
10239         aarch64_linux_nat_target.
10240         (super_post_startup_inferior): Delete.
10241         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10242
10243         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10244         (the_hppa_linux_nat_target): New.
10245         (hppa_linux_fetch_inferior_registers)
10246         (hppa_linux_store_inferior_registers): Refactor as methods of
10247         hppa_linux_nat_target.
10248         (_initialize_hppa_linux_nat): Adjust to C++ification.
10249
10250         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10251         (the_ia64_linux_nat_target): New.
10252         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10253         (ia64_linux_stopped_data_address)
10254         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10255         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10256         ia64_linux_nat_target methods.
10257         (super_xfer_partial): Delete.
10258         (_initialize_ia64_linux_nat): Adjust to C++ification.
10259
10260         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10261         (the_m32r_linux_nat_target): New.
10262         (m32r_linux_fetch_inferior_registers)
10263         (m32r_linux_store_inferior_registers): Refactor as
10264         m32r_linux_nat_target methods.
10265         (_initialize_m32r_linux_nat): Adjust to C++ification.
10266
10267         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10268         (the_m68k_linux_nat_target): New.
10269         (m68k_linux_fetch_inferior_registers)
10270         (m68k_linux_store_inferior_registers): Refactor as
10271         m68k_linux_nat_target methods.
10272         (_initialize_m68k_linux_nat): Adjust to C++ification.
10273
10274         * s390-linux-nat.c (s390_linux_nat_target): New class.
10275         (the_s390_linux_nat_target): New.
10276         (s390_linux_fetch_inferior_registers)
10277         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10278         (s390_insert_watchpoint, s390_remove_watchpoint)
10279         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10280         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10281         (s390_auxv_parse, s390_read_description): Refactor as methods of
10282         s390_linux_nat_target.
10283         (_initialize_s390_nat): Adjust to C++ification.
10284
10285         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10286         (the_sparc_linux_nat_target): New.
10287         (_initialize_sparc_linux_nat): Adjust to C++ification.
10288         * sparc-nat.c (sparc_fetch_inferior_registers)
10289         (sparc_store_inferior_registers): Remove target_ops parameter.
10290         * sparc-nat.h (sparc_fetch_inferior_registers)
10291         (sparc_store_inferior_registers): Remove target_ops parameter.
10292         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10293         (the_sparc64_linux_nat_target): New.
10294         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10295
10296         * spu-linux-nat.c (spu_linux_nat_target): New class.
10297         (the_spu_linux_nat_target): New.
10298         (spu_child_post_startup_inferior, spu_child_post_attach)
10299         (spu_child_wait, spu_fetch_inferior_registers)
10300         (spu_store_inferior_registers, spu_xfer_partial)
10301         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10302         methods.
10303         (_initialize_spu_nat): Adjust to C++ification.
10304
10305         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10306         (the_tilegx_linux_nat_target): New.
10307         (fetch_inferior_registers, store_inferior_registers):
10308         Refactor as methods.
10309         (_initialize_tile_linux_nat): Adjust to C++ification.
10310
10311         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10312         (the_xtensa_linux_nat_target): New.
10313         (xtensa_linux_fetch_inferior_registers)
10314         (xtensa_linux_store_inferior_registers): Refactor as
10315         xtensa_linux_nat_target methods.
10316         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10317
10318         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10319         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10320         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10321         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10322         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10323         (fbsd_stopped_by_sw_breakpoint)
10324         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10325         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10326         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10327         (fbsd_post_startup_inferior, fbsd_post_attach)
10328         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10329         (fbsd_set_syscall_catchpoint)
10330         (super_xfer_partial, super_resume, super_wait)
10331         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10332         (fbsd_handle_debug_trap): Remove target_ops parameter.
10333         (fbsd_nat_add_target): Delete.
10334         * fbsd-nat.h: Include "inf-ptrace.h".
10335         (fbsd_nat_add_target): Delete.
10336         (USE_SIGTRAP_SIGINFO): Define.
10337         (fbsd_nat_target): New class.
10338
10339         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10340         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10341         (amd64bsd_target): Delete.
10342         * amd64-bsd-nat.h: New file.
10343         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10344         "x86-bsd-nat.h".
10345         (amd64_fbsd_nat_target): New class.
10346         (the_amd64_fbsd_nat_target): New.
10347         (amd64fbsd_read_description): Refactor as method of
10348         amd64_fbsd_nat_target.
10349         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10350         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10351         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10352         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10353         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10354         (i386bsd_target): Delete.
10355         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10356         (i386bsd_fetch_inferior_registers)
10357         (i386bsd_store_inferior_registers): Declare.
10358         (i386_bsd_nat_target): New class.
10359         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10360         (the_i386_fbsd_nat_target): New.
10361         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10362         i386_fbsd_nat_target methods.
10363         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10364         (_initialize_i386fbsd_nat): Adjust to C++ification.
10365         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10366         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10367         (_initialize_x86_bsd_nat): Adjust to C++ification.
10368         * x86-bsd-nat.h: Include "x86-nat.h".
10369         (x86bsd_target): Delete declaration.
10370         (x86bsd_nat_target): New class.
10371
10372         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10373         (the_aarch64_fbsd_nat_target): New.
10374         (aarch64_fbsd_fetch_inferior_registers)
10375         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10376         aarch64_fbsd_nat_target.
10377         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10378         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10379         (the_alpha_bsd_nat_target): New.
10380         (alphabsd_fetch_inferior_registers)
10381         (alphabsd_store_inferior_registers): Refactor as
10382         alpha_bsd_nat_target methods.
10383         (_initialize_alphabsd_nat): Refactor as methods of
10384         alpha_bsd_nat_target.
10385         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10386         (the_amd64_nbsd_nat_target): New.
10387         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10388         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10389         (the_amd64_obsd_nat_target): New.
10390         (_initialize_amd64obsd_nat): Adjust to C++ification.
10391         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10392         (the_arm_fbsd_nat_target): New.
10393         (arm_fbsd_fetch_inferior_registers)
10394         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10395         (_initialize_arm_fbsd_nat): Refactor as methods of
10396         arm_fbsd_nat_target.
10397         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10398         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10399         (the_arm_netbsd_nat_target): New.
10400         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10401         arm_netbsd_nat_target.
10402         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10403         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10404         (the_hppa_nbsd_nat_target): New.
10405         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10406         hppa_nbsd_nat_target methods.
10407         (_initialize_hppanbsd_nat): Adjust to C++ification.
10408         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10409         (the_hppa_obsd_nat_target): New.
10410         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10411         methods of hppa_obsd_nat_target.
10412         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10413         add_target.
10414         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10415         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10416         add_target.
10417         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10418         (_initialize_i386obsd_nat): Use add_target.
10419         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10420         (the_m68k_bsd_nat_target): New.
10421         (m68kbsd_fetch_inferior_registers)
10422         (m68kbsd_store_inferior_registers): Refactor as methods of
10423         m68k_bsd_nat_target.
10424         (_initialize_m68kbsd_nat): Adjust to C++ification.
10425         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10426         (the_mips_fbsd_nat_target): New.
10427         (mips_fbsd_fetch_inferior_registers)
10428         (mips_fbsd_store_inferior_registers): Refactor as methods of
10429         mips_fbsd_nat_target.
10430         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10431         add_target.
10432         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10433         (the_mips_nbsd_nat_target): New.
10434         (mipsnbsd_fetch_inferior_registers)
10435         (mipsnbsd_store_inferior_registers): Refactor as methods of
10436         mips_nbsd_nat_target.
10437         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10438         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10439         (the_mips64_obsd_nat_target): New.
10440         (mips64obsd_fetch_inferior_registers)
10441         (mips64obsd_store_inferior_registers): Refactor as methods of
10442         mips64_obsd_nat_target.
10443         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10444         add_target.
10445         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10446         nbsd_nat_target.
10447         * nbsd-nat.h: Include "inf-ptrace.h".
10448         (nbsd_nat_target): New class.
10449         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10450         (obsd_wait): Refactor as methods of obsd_nat_target.
10451         (obsd_add_target): Delete.
10452         * obsd-nat.h: Include "inf-ptrace.h".
10453         (obsd_nat_target): New class.
10454         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10455         (the_ppc_fbsd_nat_target): New.
10456         (ppcfbsd_fetch_inferior_registers)
10457         (ppcfbsd_store_inferior_registers): Refactor as methods of
10458         ppc_fbsd_nat_target.
10459         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10460         add_target.
10461         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10462         (the_ppc_nbsd_nat_target): New.
10463         (ppcnbsd_fetch_inferior_registers)
10464         (ppcnbsd_store_inferior_registers): Refactor as methods of
10465         ppc_nbsd_nat_target.
10466         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10467         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10468         (the_ppc_obsd_nat_target): New.
10469         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10470         methods of ppc_obsd_nat_target.
10471         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10472         add_target.
10473         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10474         (the_sh_nbsd_nat_target): New.
10475         (shnbsd_fetch_inferior_registers)
10476         (shnbsd_store_inferior_registers): Refactor as methods of
10477         sh_nbsd_nat_target.
10478         (_initialize_shnbsd_nat): Adjust to C++ification.
10479         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10480         (inf_ptrace_xfer_partial): Delete.
10481         (sparc_xfer_partial, sparc_target): Delete.
10482         * sparc-nat.h (sparc_fetch_inferior_registers)
10483         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10484         (sparc_target): Delete function declaration.
10485         (sparc_target): New template class.
10486         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10487         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10488         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10489         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10490         add_target.
10491         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10492         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10493         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10494         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10495         add_target.
10496         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10497         (the_vax_bsd_nat_target): New.
10498         (vaxbsd_fetch_inferior_registers)
10499         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10500         methods.
10501         (_initialize_vaxbsd_nat): Adjust to C++ification.
10502
10503         * bsd-kvm.c (bsd_kvm_target): New class.
10504         (bsd_kvm_ops): Now a bsd_kvm_target.
10505         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10506         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10507         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10508         bsd_kvm_target.
10509         (bsd_kvm_return_one): Delete.
10510         (bsd_kvm_add_target): Adjust to C++ification.
10511
10512         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10513         (nto_procfs_target_procfs): New classes.
10514         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10515         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10516         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10517         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10518         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10519         (procfs_remove_hw_breakpoint, procfs_resume)
10520         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10521         (procfs_kill_inferior, procfs_store_registers)
10522         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10523         as methods of nto_procfs_target.
10524         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10525         (nto_native_ops): Delete.
10526         (procfs_open, procfs_native_open): Delete.
10527         (nto_native_ops): Now an nto_procfs_target_native.
10528         (init_procfs_targets): Adjust to C++ification.
10529         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10530         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10531         Refactor as methods of nto_procfs_target.
10532
10533         * go32-nat.c (go32_nat_target): New class.
10534         (the_go32_nat_target): New.
10535         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10536         (go32_store_registers, go32_xfer_partial, go32_files_info)
10537         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10538         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10539         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10540         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10541         (go32_target): Delete.
10542         (_initialize_go32_nat): Adjust to C++ification.
10543
10544         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10545         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10546         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10547         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10548         gnu_nat_target.
10549         (gnu_target): Delete.
10550         * gnu-nat.h (gnu_target): Delete.
10551         (gnu_nat_target): New class.
10552         * i386-gnu-nat.c (gnu_base_target): New.
10553         (i386_gnu_nat_target): New class.
10554         (the_i386_gnu_nat_target): New.
10555         (_initialize_i386gnu_nat): Adjust to C++ification.
10556
10557 2018-05-02  Pedro Alves  <palves@redhat.com>
10558
10559         * bfd-target.c (target_bfd_xclose): Rename to ...
10560         (target_bfd_close): ... this.
10561         (target_bfd_reopen): Adjust.
10562         * target.c (target_close): Remove references to to_xclose.
10563         * target.h (target_ops::to_xclose): Delete.
10564         (target_ops::to_close): Update comments.
10565
10566 2018-05-02  Pedro Alves  <palves@redhat.com>
10567
10568         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10569         "linux-nat.h".
10570         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10571         * inf-ptrace.c (inf_ptrace_register_u_offset)
10572         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10573         (inf_ptrace_store_register, inf_ptrace_store_registers)
10574         (inf_ptrace_trad_target): Move to ...
10575         * linux-nat-trad.c: ... this new file.
10576         * linux-nat-trad.h: New file.
10577         * linux-nat.c (linux_target_install_ops): Make extern.
10578         (linux_trad_target): Delete.
10579         * linux-nat.h (linux_trad_target): Delete declaration.
10580         (linux_target_install_ops): Declare.
10581         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10582         "linux-nat.h".
10583
10584 2018-05-02  Pedro Alves  <palves@redhat.com>
10585
10586         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10587         procfs_target/add_target here.
10588         * procfs.c (procfs_target): Make static.
10589         (_initialize_procfs): Call add_target here.
10590         * procfs.h (struct target_ops): Remove forward declaration.
10591         (procfs_target): Remove declaration.
10592         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10593
10594 2018-05-02  Pedro Alves  <palves@redhat.com>
10595
10596         * procfs.c (procfs_stopped_by_watchpoint)
10597         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10598         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10599         Forward declare.
10600         (procfs_use_watchpoints): Delete, move contents...
10601         (procfs_target): ... here.
10602         * procfs.h (procfs_use_watchpoints): Delete declaration.
10603         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10604         procfs_use_watchpoints.
10605         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10606         procfs_use_watchpoints.
10607
10608 2018-05-02  Tom Tromey  <tom@tromey.com>
10609
10610         PR python/20084:
10611         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10612         and var_zuinteger_unlimited.
10613         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10614         and PARAM_ZUINTEGER_UNLIMITED.
10615         (set_parameter_value): Handle var_zuinteger and
10616         var_zuinteger_unlimited.
10617         (add_setshow_generic): Likewise.
10618         (parmpy_init): Likewise.
10619
10620 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10621
10622         PR rust/23124
10623         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10624         pointer is not null before dereferencing it.
10625
10626 2018-04-30  Tom Tromey  <tom@tromey.com>
10627
10628         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10629         is_mi_like_p.
10630
10631 2018-04-30  Tom Tromey  <tom@tromey.com>
10632
10633         * breakpoint.c (mention): Remove use of is_mi_like_p.
10634         (print_mention_ranged_breakpoint): Likewise.
10635         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10636         of is_mi_like_p.
10637
10638 2018-04-30  Tom Tromey  <tom@tromey.com>
10639
10640         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10641
10642 2018-04-30  Tom Tromey  <tom@tromey.com>
10643
10644         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10645         (info_spu_event_command): Remove some uses of is_mi_like_p.
10646
10647 2018-04-30  Tom Tromey  <tom@tromey.com>
10648
10649         * python/py-framefilter.c (py_print_single_arg)
10650         (enumerate_locals, py_print_args, py_print_frame): Remove some
10651         uses of is_mi_like_p.
10652
10653 2018-04-30  Tom Tromey  <tom@tromey.com>
10654
10655         * ui-out.c: Update.
10656         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10657         * ui-out.h (ui_out::is_mi_like_p): Now const.
10658         (ui_out::do_is_mi_like_p): Now const.
10659         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10660
10661 2018-04-30  Tom Tromey  <tom@tromey.com>
10662
10663         * varobj.c (varobj_set_visualizer): Use new_reference.
10664         * python/python.c (gdbpy_decode_line): Use new_reference.
10665         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10666         new_reference.
10667
10668 2018-04-30  Tom Tromey  <tom@tromey.com>
10669
10670         * varobj.c (install_new_value): Use new_reference.
10671         * value.h (value_incref): Return void.  Swap intro comment with
10672         value_decref.
10673         * value.c (set_value_parent): Use new_reference.
10674         (value_incref): Return void.  Update intro comment.
10675         (release_value): Use new_reference.
10676         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10677
10678 2018-04-30  Tom Tromey  <tom@tromey.com>
10679
10680         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10681         * gdb_bfd.h (new_bfd_ref): Remove.
10682         (gdb_bfd_open): Update comment.
10683         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10684         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10685         (gdb_bfd_fdopenr): Use new_reference.
10686         * exec.c (exec_file_attach): Use new_reference.
10687
10688 2018-04-30  Tom Tromey  <tom@tromey.com>
10689
10690         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10691         method.
10692
10693 2018-04-30  Tom Tromey  <tom@tromey.com>
10694
10695         * jit.c (jit_read_code_entry): Use type_align.
10696         * i386-tdep.c (i386_gdbarch_init): Don't call
10697         set_gdbarch_long_long_align_bit.
10698         * gdbarch.sh: Remove long_long_align_bit.
10699         * gdbarch.c, gdbarch.h: Rebuild.
10700         * arc-tdep.c (arc_type_align): New function.
10701         (arc_gdbarch_init): Use arc_type_align.  Don't call
10702         set_gdbarch_long_long_align_bit.
10703
10704 2018-04-30  Tom Tromey  <tom@tromey.com>
10705
10706         * rust-lang.c (rust_type_alignment): Remove.
10707         (rust_composite_type): Use type_align.
10708
10709 2018-04-30  Tom Tromey  <tom@tromey.com>
10710
10711         * NEWS: Mention Type.align.
10712         * python/py-type.c (typy_get_alignof): New function.
10713         (type_object_getset): Add "alignof".
10714
10715 2018-04-30  Tom Tromey  <tom@tromey.com>
10716
10717         PR exp/17095:
10718         * NEWS: Update.
10719         * std-operator.def (UNOP_ALIGNOF): New operator.
10720         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10721         New.
10722         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10723         * c-lang.c (c_op_print_tab): Add alignof.
10724         * c-exp.y (ALIGNOF): New token.
10725         (exp): Add "ALIGNOF" production.
10726         (ident_tokens): Add _Alignof and alignof.
10727
10728 2018-04-30  Tom Tromey  <tom@tromey.com>
10729
10730         * i386-tdep.c (i386_type_align): New function.
10731         (i386_gdbarch_init): Update.
10732         * gdbarch.sh (type_align): New method.
10733         * gdbarch.c, gdbarch.h: Rebuild.
10734         * arch-utils.h (default_type_align): Declare.
10735         * arch-utils.c (default_type_align): New function.
10736         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10737         (struct type) <align_log2>: New field.
10738         <instance_flags>: Now a bitfield.
10739         (TYPE_RAW_ALIGN): New macro.
10740         (type_align, type_raw_align, set_type_align): Declare.
10741         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10742         functions.
10743         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10744         (get_alignment, maybe_set_alignment): New functions.
10745         (read_structure_type, read_enumeration_type, read_array_type)
10746         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10747         (read_subrange_type, read_base_type): Set type alignment.
10748
10749 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10750
10751         * dwarf2read.c (read_index_from_section): Use bool.
10752
10753 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10754
10755         PR gdb/22950
10756         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10757         with #ifdef.
10758
10759 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10760
10761         PR build/22873
10762         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10763         last step, and do it atomically.
10764
10765 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10766
10767         * compile/compile-c-types.c (convert_int, convert_float):
10768         Update for C FE v1.
10769
10770 2018-04-27  Tom Tromey  <tom@tromey.com>
10771
10772         PR rust/22545:
10773         * rust-lang.c (rust_inclusive_range_type_p): New function.
10774         (rust_range): Handle inclusive ranges.
10775         (rust_compute_range): Likewise.
10776         * rust-exp.y (struct rust_op) <inclusive>: New field.
10777         (DOTDOTEQ): New constant.
10778         (range_expr): Add "..=" productions.
10779         (operator_tokens): Add "..=" token.
10780         (ast_range): Add "inclusive" parameter.
10781         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10782         ranges.
10783         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10784         bounds values.
10785         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10786         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10787         Update comments.
10788         * expprint.c (print_subexp_standard): Handle new bounds values.
10789         (dump_subexp_body_standard): Likewise.
10790
10791 2018-04-27  Tom Tromey  <tom@tromey.com>
10792
10793         * configure: Rebuild.
10794         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10795         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10796         "OVERRIDE".
10797         (class symbol_needs_eval_context): Likewise.
10798         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10799         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10800         "virtual".
10801         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10802         "override".
10803         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10804         * aarch64-tdep.c (instruction_reader::read): Use "override".
10805         (instruction_reader_test::read): Likewise.
10806         * arm-tdep.c (instruction_reader::read): Use "override".
10807         (instruction_reader_thumb::read): Likewise.
10808
10809 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10810
10811         PR remote/9665
10812         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10813         instead of remote_send.
10814         (remote_send): Remove.
10815
10816 2018-04-26  Pedro Alves  <palves@redhat.com>
10817
10818         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10819         find_function_start_sal instead of find_pc_line.
10820
10821 2018-04-26  Pedro Alves  <palves@redhat.com>
10822
10823         * breakpoint.c (set_breakpoint_location_function): Handle
10824         mst_data_gnu_ifunc.
10825         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10826         * elfread.c (elf_symtab_read): Give data symbols with
10827         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10828         (elf_rel_plt_read): Update comment.
10829         * linespec.c (convert_linespec_to_sals): Handle
10830         mst_data_gnu_ifunc.
10831         (minsym_found): Handle mst_data_gnu_ifunc.
10832         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10833         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10834         * parse.c (find_minsym_type_and_address): Handle
10835         mst_data_gnu_ifunc.
10836         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10837         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10838         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10839         comment.
10840         <mst_data_gnu_ifunc>: New enumerator.
10841
10842 2018-04-26  Pedro Alves  <palves@redhat.com>
10843
10844         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10845         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10846         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10847         Handle it.
10848         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10849         (lookup_minimal_symbol_by_pc): Adjust.
10850         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10851         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10852         * minsyms.h (lookup_msym_prefer): New enum.
10853         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10854         parameter by a lookup_msym_prefer parameter.
10855
10856 2018-04-26  Pedro Alves  <palves@redhat.com>
10857
10858         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10859         ends in "@plt" instead of looking at the symbol's section.
10860
10861 2018-04-26  Pedro Alves  <palves@redhat.com>
10862
10863         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10864         all references.
10865         (find_pc_partial_function_gnu_ifunc): Rename to ...
10866         (find_pc_partial_function): ... this, and remove references to
10867         'is_gnu_ifunc_p'.
10868         (find_pc_partial_function): Delete old implementation.
10869         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10870
10871 2018-04-26  Pedro Alves  <palves@redhat.com>
10872
10873         * linespec.c (struct bound_minimal_symbol_search_key): New.
10874         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10875         skip first line if we found a GNU ifunc minimal symbol by name.
10876         (compare_msymbols): Change parameters to work with a destructured
10877         lhs minsym.
10878         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10879         functions.
10880
10881 2018-04-26  Pedro Alves  <palves@redhat.com>
10882
10883         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10884         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10885         address/name.
10886         (add_location_to_breakpoint): Store the minsym and the objfile in
10887         the breakpoint location.
10888         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10889         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10890         Record the minsym in the sal.
10891         * symtab.h (symtab_and_line) <msymbol>: New field.
10892
10893 2018-04-26  Pedro Alves  <palves@redhat.com>
10894
10895         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10896         unless we actually resolved the ifunc.
10897
10898 2018-04-26  Pedro Alves  <palves@redhat.com>
10899
10900         * c-exp.y (variable production): Prefer ifunc minsyms over
10901         regular function symbols.
10902         * symtab.c (find_gnu_ifunc): New function.
10903         * minsyms.h (lookup_msym_prefer): New enum.
10904         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10905         parameter by a lookup_msym_prefer parameter.
10906         * symtab.h (find_gnu_ifunc): New declaration.
10907
10908 2018-04-26  Pedro Alves  <palves@redhat.com>
10909
10910         * blockframe.c (find_gnu_ifunc_target_type): New function.
10911         (find_function_type): New.
10912         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10913         return a value with a memory address.
10914         (eval_call): For calls to GNU ifunc functions, try to find the
10915         type of the target function from the type that the resolver
10916         returns.
10917         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10918         symbols.
10919         * infcall.c (find_function_return_type): Delete.
10920         (find_function_addr): Add 'function_type' parameter.  For calls to
10921         GNU ifunc functions, try to find the type of the target function
10922         from the type that the resolver returns, and return it via
10923         FUNCTION_TYPE.
10924         (call_function_by_hand_dummy): Adjust to use the function type
10925         returned by find_function_addr.
10926         (find_function_addr): Add 'function_type' parameter and move
10927         description here.
10928         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10929         declarations.
10930
10931 2018-04-26  Pedro Alves  <palves@redhat.com>
10932
10933         * c-exp.y (variable production): Skip finding an alias for ifunc
10934         symbols.
10935
10936 2018-04-26  Pedro Alves  <palves@redhat.com>
10937
10938         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10939
10940 2018-04-25  Pedro Alves  <palves@redhat.com>
10941
10942         * infcmd.c (kill_command): Print the pid as string, not the whole
10943         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10944         message.
10945         * remote.c (remote_detach_1): Print the pid as string, not the
10946         whole thread's ptid.
10947
10948 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10949             Sergio Durigan Junior  <sergiodj@redhat.com>
10950             Pedro Alves  <palves@redhat.com>
10951
10952         * infcmd.c (kill_command): Print message when inferior has
10953         been killed.
10954         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10955         '1'.
10956         (add_inferior): Improve message printed when
10957         'print_inferior_events' is on.
10958         (exit_inferior): Remove message printed when
10959         'print_inferior_events' is on.
10960         (detach_inferior): Improve message printed when
10961         'print_inferior_events' is on.
10962         (initialize_inferiors): Use 'add_inferior_silent' to set
10963         'current_inferior_'.
10964         * inferior.h (print_inferior_events): Declare here as
10965         'extern'.
10966         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10967         '[Detaching...]' messages when 'print_inferior_events' is on.
10968         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10969         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10970         'Detaching after fork from child...', replace it by '... from
10971         parent...'.
10972         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10973         prefix/suffix when printing 'Detaching...' messages.  Print
10974         them when 'print_inferior_events' is on.
10975         * remote.c (remote_detach_1): Print message when detaching
10976         from inferior and '!is_fork_parent'.
10977
10978 2018-04-24  Tom Tromey  <tom@tromey.com>
10979
10980         * cli-out.h: Reindent.
10981
10982 2018-04-24  Tom Tromey  <tom@tromey.com>
10983
10984         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10985         (cli_ui_out::do_field_string): Use fputs_filtered.
10986         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10987
10988 2018-04-23  Tom Tromey  <tom@tromey.com>
10989
10990         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10991         gdb::unique_xmalloc_ptr.
10992
10993 2018-04-23  Tom Tromey  <tom@tromey.com>
10994
10995         * configure: Rebuild.
10996
10997 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10998
10999         PR gdb/23095
11000         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11001         prepare_for_testing.  Set normal_bp to r_debug_state if target
11002         is bsd.
11003
11004 2018-04-21  Pedro Alves  <palves@redhat.com>
11005             Rajendra SY  <rajendra.sy@gmail.com>
11006
11007         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11008         * remote.c (extended_remote_attach): In all-stop mode, mark the
11009         thread as executing.
11010
11011 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11012
11013         * thread.c (thread_apply_all_command): Fix comment.
11014         (thread_command): Fix comment.
11015
11016 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11017
11018         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11019         parameter.
11020         * features/aarch64-core.c (create_feature_aarch64_core):
11021         Regenerate.
11022         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11023         Likewise.
11024         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11025         Likewise.
11026         * features/i386/32bit-avx512.c
11027         (create_feature_i386_32bit_avx512): Likewise.
11028         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11029         Likewise.
11030         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11031         Likewise.
11032         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11033         Likewise.
11034         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11035         Likewise.
11036         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11037         Likewise.
11038         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11039         Likewise.
11040         * features/i386/64bit-avx512.c
11041         (create_feature_i386_64bit_avx512): Likewise.
11042         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11043         Likewise.
11044         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11045         Likewise.
11046         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11047         Likewise.
11048         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11049         Likewise.
11050         * features/i386/64bit-segments.c
11051         (create_feature_i386_64bit_segments): Likewise.
11052         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11053         Likewise.
11054         * features/i386/x32-core.c
11055         (create_feature_i386_x32_core): Likewise.
11056         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11057         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11058         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11059         * target-descriptions.c: In generated code, don't pass xml
11060         filename.
11061
11062 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11063
11064         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11065         (print_xml_feature::visit_post): Likewise.
11066         (print_xml_feature::visit): Likewise.
11067         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11068         (print_xml_feature): Add new class.
11069         * regformats/regdat.sh: Null xmltarget on feature targets.
11070         * target-descriptions.c (struct target_desc): Add xmltarget.
11071         (maintenance_check_tdesc_xml_convert): Add unittest function.
11072         (tdesc_get_features_xml): Add function to get xml.
11073         (maintenance_check_xml_descriptions): Test xml generation.
11074         * xml-tdesc.c (string_read_description_xml): Add function.
11075         * xml-tdesc.h (string_read_description_xml): Add declaration.
11076
11077 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11078
11079         * features/Makefile: Add feature marker to targets with new style
11080         target descriptions.
11081         * regformats/aarch64.dat: Regenerate.
11082         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11083         * regformats/i386/amd64-avx-linux.dat: Likewise.
11084         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11085         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11086         * regformats/i386/amd64-linux.dat: Likewise.
11087         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11088         * regformats/i386/amd64.dat: Likewise.
11089         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11090         * regformats/i386/i386-avx-linux.dat: Likewise.
11091         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11092         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11093         * regformats/i386/i386-linux.dat: Likewise.
11094         * regformats/i386/i386-mmx-linux.dat: Likewise.
11095         * regformats/i386/i386-mpx-linux.dat: Likewise.
11096         * regformats/i386/i386.dat: Likewise.
11097         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11098         * regformats/i386/x32-avx-linux.dat: Likewise.
11099         * regformats/i386/x32-linux.dat: Likewise.
11100         * regformats/tic6x-c62x-linux.dat: Likewise.
11101         * regformats/tic6x-c64x-linux.dat: Likewise.
11102         * regformats/tic6x-c64xp-linux.dat: Likewise.
11103         * regformats/regdat.sh: Parse feature marker.
11104
11105 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11106
11107         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11108         (tdesc_osabi_name): Likewise.
11109         * target-descriptions.c (tdesc_architecture_name): Add new
11110         function.
11111         (tdesc_osabi_name): Likewise.
11112
11113 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11114
11115         * common/tdesc.c (tdesc_predefined_type): Move to here.
11116         (tdesc_named_type): Likewise.
11117         (tdesc_create_vector): Likewise.
11118         (tdesc_create_struct): Likewise.
11119         (tdesc_set_struct_size): Likewise.
11120         (tdesc_create_union): Likewise.
11121         (tdesc_create_flags): Likewise.
11122         (tdesc_create_enum): Likewise.
11123         (tdesc_add_field): Likewise.
11124         (tdesc_add_typed_bitfield): Likewise.
11125         (tdesc_add_bitfield): Likewise.
11126         (tdesc_add_flag): Likewise.
11127         (tdesc_add_enum_value): Likewise.
11128         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11129         (struct tdesc_type_vector): Likewise.
11130         (struct tdesc_type_field): Likewise.
11131         (struct tdesc_type_with_fields): Likewise.
11132         (tdesc_create_enum): Add declaration.
11133         (tdesc_add_typed_bitfield): Likewise.
11134         (tdesc_add_enum_value): Likewise.
11135         * target-descriptions.c (tdesc_type_field): Move from here.
11136         (tdesc_type_builtin): Likewise.
11137         (tdesc_type_vector): Likewise.
11138         (tdesc_type_with_fields): Likewise.
11139         (tdesc_predefined_types): Likewise.
11140         (tdesc_named_type): Likewise.
11141         (tdesc_create_vector): Likewise.
11142         (tdesc_create_struct): Likewise.
11143         (tdesc_set_struct_size): Likewise.
11144         (tdesc_create_union): Likewise.
11145         (tdesc_create_flags): Likewise.
11146         (tdesc_create_enum): Likewise.
11147         (tdesc_add_field): Likewise.
11148         (tdesc_add_typed_bitfield): Likewise.
11149         (tdesc_add_bitfield): Likewise.
11150         (tdesc_add_flag): Likewise.
11151         (tdesc_add_enum_value): Likewise.
11152         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11153         (tdesc_add_typed_bitfield): Likewise.
11154         (tdesc_add_enum_value): Likewise.
11155
11156 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11157
11158         * common/tdesc.c (tdesc_feature::accept): Move to here.
11159         (tdesc_feature::operator==): Likewise.
11160         (tdesc_create_reg): Likewise.
11161         * common/tdesc.h (tdesc_type_kind): Likewise.
11162         (struct tdesc_type): Likewise.
11163         (struct tdesc_feature): Likewise.
11164         * regformats/regdat.sh: Create a feature.
11165         * target-descriptions.c (tdesc_type_kind): Move from here.
11166         (tdesc_type): Likewise.
11167         (tdesc_type_up): Likewise.
11168         (tdesc_feature): Likewise.
11169         (tdesc_create_reg): Likewise.
11170
11171 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11172
11173         * Makefile.in: Add arch/tdesc.c
11174         * common/tdesc.c: New file.
11175         * common/tdesc.h (tdesc_element_visitor): Move to here.
11176         (tdesc_element): Likewise.
11177         (tdesc_reg): Likewise.
11178         (tdesc_reg_up): Likewise.
11179         * regformats/regdef.h (reg): Add offset to constructors.
11180         * target-descriptions.c (tdesc_element_visitor): Move from here.
11181         (tdesc_element): Likewise.
11182         (tdesc_reg): Likewise.
11183         (tdesc_reg_up): Likewise.
11184
11185 2018-04-17  Tom Tromey  <tom@tromey.com>
11186
11187         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11188         discriminant field.
11189
11190 2018-04-17  Tom Tromey  <tom@tromey.com>
11191
11192         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11193
11194 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11195
11196         * symtab.c (print_symbol_info): Skip printing filename and line
11197         number when `last' is NULL.
11198         (symtab_symbol_info): Use empty string instead of NULL for first
11199         invocation of print_symbol_info.
11200         (rbreak_command): Pass NULL to `last' parameter of
11201         print_symbol_info.
11202
11203 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11204
11205         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11206         instead of nullptr.
11207
11208 2018-04-16  Pedro Alves  <palves@redhat.com>
11209
11210         * MAINTAINERS (sh): Remove.
11211         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11212         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11213         (ALLDEPFILES): Remove sh64-tdep.c.
11214         * NEWS: Mentions that support for SH-5/SH64 is removed.
11215         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11216         (sh*-*-openbsd*): Ditto.
11217         (sh64-*-elf*): Remove.
11218         (sh*): Remove.
11219         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11220         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11221         * sh-tdep.c: No longer include "sh64-tdep.h".
11222         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11223         * sh64-tdep.c, sh64-tdep.h: Remove files.
11224
11225 2018-04-16  Pedro Alves  <palves@redhat.com>
11226
11227         * MAINTAINERS: Remove m88k.
11228         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11229         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11230         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11231         * NEWS: Mention that support for m88k was removed.
11232         * configure.host (m88*-*-*): Remove support.
11233         * configure.nat (m88k-*-*): Remove support.
11234         * configure.tgt (m88*-*-openbsd*): Remove.
11235         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11236
11237 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11238
11239         * configure.tgt (x86_tobjs): New variable.
11240         (amd64_tobjs, i386_tobjs): Use it.
11241
11242 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11243
11244         * symtab.c (print_symbol_info): Precede the symbol definition by
11245         the line number when available.
11246         * NEWS: Advertise this enhancement.
11247
11248 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11249
11250         * NEWS (New options): announce set/show record btrace cpu.
11251         * btrace.c: Include record-btrace.h.
11252         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11253         the vendor is unknown.
11254         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11255         Maybe overwrite the btrace configuration's cpu.
11256         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11257         (btrace_fetch): Add cpu parameter.  Update callers.
11258         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11259         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11260         errata workarounds if the vendor is unknown.
11261         * python/py-record-btrace.c: Include record-btrace.h.
11262         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11263         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11264         * record-btrace.c (record_btrace_cpu_state_kind): New.
11265         (record_btrace_cpu): New.
11266         (set_record_btrace_cpu_cmdlist): New.
11267         (record_btrace_get_cpu): New.
11268         (require_btrace_thread, record_btrace_info)
11269         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11270         (cmd_set_record_btrace_cpu_none): New.
11271         (cmd_set_record_btrace_cpu_auto): New.
11272         (cmd_set_record_btrace_cpu): New.
11273         (cmd_show_record_btrace_cpu): New.
11274         (_initialize_record_btrace): Initialize set/show record btrace cpu
11275         commands.
11276         * record-btrace.h (record_btrace_get_cpu): New.
11277
11278 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11279
11280         * record.c (set_record_command): Fix typo in message.
11281
11282 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11283
11284         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11285
11286 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11287
11288         * infrun.c (process_event_stop_test): Call
11289         gdbarch_in_indirect_branch_thunk.
11290         * gdbarch.sh (in_indirect_branch_thunk): New.
11291         * gdbarch.c: Regenerated.
11292         * gdbarch.h: Regenerated.
11293         * x86-tdep.h: New.
11294         * x86-tdep.c: New.
11295         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11296         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11297         (ALLDEPFILES): Add x86-tdep.c.
11298         * arch-utils.h (default_in_indirect_branch_thunk): New.
11299         * arch-utils.c (default_in_indirect_branch_thunk): New.
11300         * i386-tdep: Include x86-tdep.h.
11301         (i386_in_indirect_branch_thunk): New.
11302         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11303         function.
11304         * amd64-tdep: Include x86-tdep.h.
11305         (amd64_in_indirect_branch_thunk): New.
11306         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11307
11308 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11309
11310         PR gdb/23053
11311         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11312         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11313         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11314         regression.
11315
11316 2018-04-12  Tom Tromey  <tom@tromey.com>
11317
11318         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11319         (rust_evaluate_subexp): Likewise.
11320
11321 2018-04-12  Pedro Alves  <palves@redhat.com>
11322
11323         * procfs.c (procfs_detach): Make forward declaration's prototype
11324         match definition's protototype.
11325         (proc_get_LDT_entry): Remove stale do_cleanups call.
11326
11327 2018-04-12  Pedro Alves  <palves@redhat.com>
11328
11329         * target.h (target_ops::to_has_exited): Delete.
11330         (target_has_exited): Delete.
11331         * target-delegates.c: Regenerate.
11332
11333 2018-04-11  Pedro Alves  <palves@redhat.com>
11334
11335         * target.c (fileio_fh_t::t): Add comment.
11336         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11337         (target_fileio_close): Handle a NULL target.
11338         (invalidate_fileio_fh): New.
11339         (target_close): Call it.
11340         * remote.c (remote_hostio_send_command): No longer check whether
11341         remote_desc is open.
11342
11343 2018-04-11  Pedro Alves  <palves@redhat.com>
11344
11345         * target.c (fileio_fh_t): Make it a named struct instead of a
11346         typedef.
11347         (fileio_fh_t::is_closed): New method.
11348         (DEF_VEC_O (fileio_fh_t)): Remove.
11349         (fileio_fhandles): Now a std::vector.
11350         (is_closed_fileio_fh): Delete.
11351         (acquire_fileio_fd): Adjust.  Rename parameters.
11352         (release_fileio_fd): Adjust.
11353         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11354         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11355         (target_fileio_close): Adjust.
11356
11357 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11358
11359         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11360         index.
11361
11362 2018-04-10  Pedro Alves  <palves@redhat.com>
11363
11364         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11365         (scoped_finish_thread_state): New class.
11366         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11367         cleanup.
11368         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11369         (fetch_inferior_event, normal_stop): Likewise.
11370         * thread.c (finish_thread_state_cleanup): Delete.
11371
11372 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11373             Pedro Alves  <palves@redhat.com>
11374
11375         * value.c: Include "selftest.h" and "common/array-view.h".
11376         (struct range) <operator ==>: New.
11377         (test_ranges_contain): New.
11378         (check_ranges_vector): New.
11379         (test_insert_into_bit_range_vector): New.
11380         (_initialize_values): Register selftests.
11381         * common/array-view.h (operator==, operator!=): New.
11382
11383 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11384
11385         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11386         an iterator.
11387         * inline-frame.c: Include <algorithm>.
11388         (struct inline_state): Add constructor.
11389         (inline_state_s): Remove.
11390         (DEF_VEC_O(inline_state_s)): Remove.
11391         (inline_states): Change type to std::vector.
11392         (find_inline_frame_state): Adjust to std::vector.
11393         (allocate_inline_frame_state): Remove.
11394         (clear_inline_frame_state): Adjust to std::vector.
11395         (skip_inline_frames): Adjust to std::vector.
11396
11397 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11398
11399         * tracepoint.h (struct trace_state_variable): Add constructor.
11400         <name>: Change type to std::string.
11401         * tracepoint.c (tsv_s): Remove.
11402         (DEF_VEC_O(tsv_s)): Remove.
11403         (tvariables): Change to std::vector.
11404         (create_trace_state_variable): Adjust to std::vector.
11405         (find_trace_state_variable): Likewise.
11406         (find_trace_state_variable_by_number): Likewise.
11407         (delete_trace_state_variable): Likewise.
11408         (trace_variable_command): Adjust to std::string.
11409         (delete_trace_variable_command): Likewise.
11410         (tvariables_info_1): Adjust to std::vector.
11411         (save_trace_state_variables): Likewise.
11412         (start_tracing): Likewise.
11413         (merge_uploaded_trace_state_variables): Adjust to std::vector
11414         and std::string.
11415         * target.h (struct target_ops)
11416         <to_download_trace_state_variable>: Pass reference to
11417         trace_state_variable.
11418         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11419         * target-delegates.c: Re-generate.
11420         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11421         (mi_tsv_deleted): Likewise.
11422         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11423         * remote.c (remote_download_trace_state_variable): Change
11424         pointer to reference and adjust.
11425         * make-target-delegates (parse_argtypes): Handle references.
11426         (write_function_header): Likewise.
11427         (munge_type): Likewise.
11428
11429 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11430
11431         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11432         string_view-selftests.c.
11433         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11434         testsuite.
11435         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11436         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11437         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11438         * unittests/basic_string_view/element_access/char/1.cc:
11439         Likewise.
11440         * unittests/basic_string_view/element_access/char/empty.cc:
11441         Likewise.
11442         * unittests/basic_string_view/element_access/char/front_back.cc:
11443         Likewise.
11444         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11445         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11446         Likewise.
11447         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11448         Likewise.
11449         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11450         Likewise.
11451         * unittests/basic_string_view/operations/compare/char/1.cc:
11452         Likewise.
11453         * unittests/basic_string_view/operations/compare/char/13650.cc:
11454         Likewise.
11455         * unittests/basic_string_view/operations/copy/char/1.cc:
11456         Likewise.
11457         * unittests/basic_string_view/operations/data/char/1.cc:
11458         Likewise.
11459         * unittests/basic_string_view/operations/find/char/1.cc:
11460         Likewise.
11461         * unittests/basic_string_view/operations/find/char/2.cc:
11462         Likewise.
11463         * unittests/basic_string_view/operations/find/char/3.cc:
11464         Likewise.
11465         * unittests/basic_string_view/operations/find/char/4.cc:
11466         Likewise.
11467         * unittests/basic_string_view/operations/rfind/char/1.cc:
11468         Likewise.
11469         * unittests/basic_string_view/operations/rfind/char/2.cc:
11470         Likewise.
11471         * unittests/basic_string_view/operations/rfind/char/3.cc:
11472         Likewise.
11473         * unittests/basic_string_view/operations/substr/char/1.cc:
11474         Likewise.
11475         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11476         * unittests/string_view-selftests.c: New file.
11477
11478 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11479
11480         * unittests/basic_string_view/capacity/1.cc: New file.
11481         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11482         * unittests/basic_string_view/cons/char/1.cc: New file.
11483         * unittests/basic_string_view/cons/char/2.cc: New file.
11484         * unittests/basic_string_view/cons/char/3.cc: New file.
11485         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11486         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11487         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11488         * unittests/basic_string_view/element_access/char/1.cc: New file.
11489         * unittests/basic_string_view/element_access/char/2.cc: New file.
11490         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11491         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11492         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11493         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11494         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11495         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11496         * unittests/basic_string_view/include.cc: New file.
11497         * unittests/basic_string_view/inserters/char/1.cc: New file.
11498         * unittests/basic_string_view/inserters/char/2.cc: New file.
11499         * unittests/basic_string_view/inserters/char/3.cc: New file.
11500         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11501         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11502         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11503         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11504         * unittests/basic_string_view/literals/types.cc: New file.
11505         * unittests/basic_string_view/literals/values.cc: New file.
11506         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11507         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11508         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11509         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11510         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11511         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11512         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11513         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11514         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11515         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11516         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11517         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11518         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11519         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11520         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11521         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11522         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11523         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11524         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11525         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11526         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11527         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11528         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11529         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11530         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11531         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11532         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11533         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11534         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11535         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11536         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11537         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11538         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11539         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11540         * unittests/basic_string_view/operators/char/2.cc: New file.
11541         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11542         * unittests/basic_string_view/range_access/char/1.cc: New file.
11543         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11544         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11545         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11546         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11547         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11548         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11549         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11550         * unittests/basic_string_view/typedefs.cc: New file.
11551         * unittests/basic_string_view/types/1.cc: New file.
11552
11553 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11554
11555         * common/gdb_string_view.h: Remove libstdc++ implementation
11556         details, adjust to gdb reality.
11557         * common/gdb_string_view.tcc: Likewise.
11558         * cli/cli-script.c (struct string_view): Remove.
11559         (user_args) <m_args>: Change element type to gdb::string_view.
11560         (user_args::insert_args): Adjust.
11561
11562 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11563
11564         * common/gdb_string_view.h: New file.
11565         * common/gdb_string_view.tcc: New file.
11566
11567 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11568
11569         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11570         * configure: Re-generate.
11571
11572 2018-04-09  Pedro Alves  <palves@redhat.com>
11573
11574         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11575         (set_target_gdbarch): Call
11576         gdb::observers::architecture_changed.notify instead of
11577         observer_notify_architecture_changed.
11578
11579 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11580
11581         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11582         (do_restore_current_traceframe_cleanup): Remove.
11583         (restore_current_traceframe_cleanup_dtor): Remove.
11584         (make_cleanup_restore_current_traceframe): Remove.
11585         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11586         New.
11587         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11588         * infrun.c (fetch_inferior_event): Use
11589         scoped_restore_current_traceframe.
11590
11591 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11592
11593         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11594         Remove.
11595         <n_allocated_type_units>: Remove.
11596         <all_type_units>: Change to std::vector.
11597         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11598         to std::vector change.
11599         (dwarf2_per_objfile::get_cutu): Likewise.
11600         (dwarf2_per_objfile::get_tu): Likewise.
11601         (create_signatured_type_table_from_index): Likewise.
11602         (create_signatured_type_table_from_debug_names): Likewise.
11603         (dw2_symtab_iter_next): Likewise.
11604         (dw2_print_stats): Likewise.
11605         (dw2_expand_all_symtabs): Likewise.
11606         (dw2_expand_marked_cus): Likewise.
11607         (dw2_debug_names_iterator::next): Likewise.
11608         (dwarf2_initialize_objfile): Likewise.
11609         (add_signatured_type_cu_to_table): Likewise.
11610         (create_all_type_units): Likewise.
11611         (add_type_unit): Likewise.
11612         (struct tu_abbrev_offset): Add constructor.
11613         (build_type_psymtabs_1): Adjust to std::vector change.
11614         (print_tu_stats): Likewise.
11615         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11616         (write_debug_names): Likewise.
11617
11618 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11619
11620         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11621         Make an std::vector.
11622         <n_comp_units>: Remove.
11623         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11624         to std::vector change.
11625         (dwarf2_per_objfile::get_cutu): Likewise.
11626         (dwarf2_per_objfile::get_cu): Likewise.
11627         (create_cus_from_index): Likewise.
11628         (create_addrmap_from_index): Likewise.
11629         (create_addrmap_from_aranges): Likewise.
11630         (dwarf2_read_index): Likewise.
11631         (dw2_find_last_source_symtab): Likewise.
11632         (dw2_map_symtabs_matching_filename): Likewise.
11633         (dw2_symtab_iter_next): Likewise.
11634         (dw2_print_stats): Likewise.
11635         (dw2_expand_all_symtabs): Likewise.
11636         (dw2_expand_symtabs_with_fullname): Likewise.
11637         (dw2_expand_marked_cus): Likewise.
11638         (dw2_map_symbol_filenames): Likewise.
11639         (create_cus_from_debug_names): Likewise.
11640         (dwarf2_read_debug_names): Likewise.
11641         (dw2_debug_names_iterator::next): Likewise.
11642         (dwarf2_initialize_objfile): Likewise.
11643         (set_partial_user): Likewise.
11644         (dwarf2_build_psymtabs_hard): Likewise.
11645         (read_comp_units_from_section): Remove arguments, adjust to
11646         std::vector change.
11647         (create_all_comp_units): Adjust to std::vector and
11648         read_comp_units_from_section changes.
11649         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11650         change.
11651         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11652         (psyms_seen_size): Likewise.
11653         (write_gdbindex): Likewise.
11654         (write_debug_names): Likewise.
11655
11656 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11657
11658         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11659         with dwarf2_per_objfile.
11660         (create_cus_from_index): Likewise.
11661         (create_signatured_type_table_from_index): Likewise.
11662         (dwarf2_read_index): Likewise.
11663         (dwarf2_initialize_objfile): Likewise.
11664         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11665         per_cu rather than get_dwarf2_per_objfile.
11666
11667 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11668
11669         * dwarf2read.h (struct signatured_type): Forward declare.
11670         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11671         New methods.
11672         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11673         (dw2_get_cutu): ...this.
11674         (dwarf2_per_objfile::get_cu): Rename from...
11675         (dw2_get_cu): ...this.
11676         (dwarf2_per_objfile::get_tu): New.
11677         (create_addrmap_from_index): Adjust.
11678         (create_addrmap_from_aranges): Adjust.
11679         (dw2_find_last_source_symtab): Adjust.
11680         (dw2_map_symtabs_matching_filename): Adjust.
11681         (dw2_symtab_iter_next): Adjust.
11682         (dw2_print_stats): Adjust.
11683         (dw2_expand_all_symtabs): Adjust.
11684         (dw2_expand_symtabs_with_fullname): Adjust.
11685         (dw2_expand_marked_cus): Adjust.
11686         (dw_expand_symtabs_matching_file_matcher): Adjust.
11687         (dw2_map_symbol_filenames): Adjust.
11688         (dw2_debug_names_iterator::next): Adjust.
11689         (dwarf2_initialize_objfile): Adjust.
11690         (set_partial_user): Adjust.
11691         (dwarf2_build_psymtabs_hard): Adjust.
11692
11693 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11694
11695         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11696         Remove unused variables.
11697         (dw2_map_symtabs_matching_filename): Likewise.
11698         (dwarf2_record_block_ranges): Likewise.
11699         (dwarf2_read_addr_index): Likewise.
11700         (follow_die_offset): Likewise.
11701
11702 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11703
11704         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11705         to symbol_file_add_main.
11706
11707 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11708
11709         PR mi/22299
11710         * mi/mi-console.c (do_fputc_async_safe): New.
11711         (mi_console_file::write_async_safe): New.
11712         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11713         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11714         New.
11715         * ui-file.c (ui_file::putstrn): Adjust call to
11716         fputstrn_unfiltered.
11717         * utils.c (printchar): Replace do_fputs and do_fprintf
11718         parameters by do_fputc.
11719         (fputstr_filtered): Adjust call to printchar.
11720         (fputstr_unfiltered): Likewise.
11721         (fputstrn_filtered): Likewise.
11722         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11723         printchar.
11724         * utils.h (do_fputc_ftype): New typedef.
11725         (fputstrn_unfiltered): Add do_fputc parameter.
11726
11727 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11728
11729         * regformats/i386/i386-avx.dat: Remove.
11730
11731 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11732
11733         PR gdb/22979
11734         * amd64-tdep.c (amd64_none_init_abi): New function.
11735         (amd64_x32_none_init_abi): New function.
11736         (_initialize_amd64_tdep): Register handlers for x86-64 and
11737         x64_32 with GDB_OSABI_NONE.
11738         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11739         GDB_OSABI_NONE osabi.
11740
11741 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11742
11743         PR gdb/22980
11744         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11745         GDB_OSABI_NONE.
11746         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11747         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11748
11749 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11750
11751         * common/byte-vector.h (char_vector): New type.
11752         * target.h (target_read_alloc): Return
11753         gdb::optional<byte_vector>.
11754         (target_read_stralloc): Return gdb::optional<char_vector>.
11755         (target_get_osdata): Return gdb::optional<char_vector>.
11756         * target.c (target_read_alloc_1): Templatize.  Replacement
11757         manual memory management with vector.
11758         (target_read_alloc): Change return type, adjust.
11759         (target_read_stralloc): Change return type, adjust.
11760         (target_get_osdata): Change return type, adjust.
11761         * auxv.c (struct auxv_info) <length>: Remove.
11762         <data>: Change type to gdb::optional<byte_vector>.
11763         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11764         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11765         (target_auxv_search): Adjust.
11766         (fprint_target_auxv): Adjust.
11767         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11768         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11769         (linux_make_corefile_notes): Adjust.
11770         * osdata.c (get_osdata): Adjust.
11771         * remote.c (remote_get_threads_with_qxfer): Adjust.
11772         (remote_memory_map): Adjust.
11773         (remote_traceframe_info): Adjust.
11774         (btrace_read_config): Adjust.
11775         (remote_read_btrace): Adjust.
11776         (remote_pid_to_exec_file): Adjust.
11777         * solib-aix.c (solib_aix_get_library_list): Adjust.
11778         * solib-dsbt.c (decode_loadmap): Don't free buf.
11779         (dsbt_get_initial_loadmaps): Adjust.
11780         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11781         * solib-target.c (solib_target_current_sos): Adjust.
11782         * tracepoint.c (sdata_make_value): Adjust.
11783         * xml-support.c (xinclude_start_include): Adjust.
11784         (xml_fetch_content_from_file): Adjust.
11785         * xml-support.h (xml_fetch_another): Change return type.
11786         (xml_fetch_content_from_file): Change return type.
11787         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11788         * xml-tdesc.c (file_read_description_xml): Adjust.
11789         (fetch_available_features_from_target): Change return type.
11790         (target_fetch_description_xml): Adjust.
11791         (target_read_description_xml): Adjust.
11792
11793 2018-04-06  Tom Tromey  <tom@tromey.com>
11794
11795         * value.c (~value): Update.
11796         (struct value) <contents>: Now unique_xmalloc_ptr.
11797         (value_contents_bits_eq, allocate_value_contents)
11798         (value_contents_raw, value_contents_all_raw)
11799         (value_contents_for_printing, value_contents_for_printing_const)
11800         (set_value_enclosing_type): Update.
11801
11802 2018-04-06  Tom Tromey  <tom@tromey.com>
11803
11804         * value.c (range_s): Remove typedef, VEC.
11805         (struct range): Add operator<.
11806         (range_lessthan): Remove.
11807         (ranges_contain): Change type.
11808         (~value): Update.
11809         (struct value) <unavailable, optimized_out>: Now std::vector.
11810         (value_entirely_available)
11811         (value_entirely_covered_by_range_vector)
11812         (value_entirely_unavailable, value_entirely_optimized_out):
11813         Update.
11814         (insert_into_bit_range_vector): Change argument type.
11815         (find_first_range_overlap): Likewise.
11816         (struct ranges_and_idx, value_contents_bits_eq)
11817         (require_not_optimized_out, require_available): Update.
11818         (ranges_copy_adjusted): Change argument types.
11819         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11820
11821 2018-04-06  Tom Tromey  <tom@tromey.com>
11822
11823         * value.c (~value): Update.
11824         (struct value) <parent>: Now a value_ref_ptr.
11825         (value_parent, set_value_parent, value_address, value_copy):
11826         Update.
11827
11828 2018-04-06  Tom Tromey  <tom@tromey.com>
11829
11830         * value.c (struct value): Add constructor, destructor, and member
11831         initializers.
11832         (allocate_value_lazy, value_decref): Update.
11833
11834 2018-04-06  Tom Tromey  <tom@tromey.com>
11835
11836         * value.c (struct value) <released, next>: Remove.
11837         (all_values): Now a std::vector.
11838         (allocate_value_lazy): Update.
11839         (value_next): Remove.
11840         (value_mark, value_free_to_mark, release_value)
11841         (value_release_to_mark): Update.
11842
11843 2018-04-06  Tom Tromey  <tom@tromey.com>
11844
11845         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11846         (free_value_chain): Remove.
11847         * value.c (free_value_chain): Remove.
11848         (value_release_to_mark): Return a std::vector.
11849         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11850         std::vector.
11851         (check_condition): Update.
11852         * eval.c (fetch_subexp_value): Change "val_chain" to a
11853         std::vector.
11854         * breakpoint.c (update_watchpoint): Update.
11855         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11856
11857 2018-04-06  Tom Tromey  <tom@tromey.com>
11858
11859         * value.h (free_all_values): Remove.
11860         * value.c (free_all_values): Remove.
11861
11862 2018-04-06  Tom Tromey  <tom@tromey.com>
11863
11864         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11865         (value_history_chain, value_history_count): Remove.
11866         (value_history): New global.
11867         (record_latest_value, access_value_history, show_values)
11868         (preserve_values): Update.
11869
11870 2018-04-06  Tom Tromey  <tom@tromey.com>
11871
11872         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11873         * varobj.c (varobj_set_display_format, varobj_set_value)
11874         (install_default_visualizer, construct_visualizer)
11875         (install_new_value, ~varobj, varobj_get_value_type)
11876         (my_value_of_variable, varobj_editable_p): Update.
11877         * c-varobj.c (c_describe_child, c_value_of_variable)
11878         (cplus_number_of_children, cplus_describe_child): Update.
11879         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11880         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11881         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11882
11883 2018-04-06  Tom Tromey  <tom@tromey.com>
11884
11885         * printcmd.c (last_examine_address): Change type to
11886         value_ref_ptr.
11887         (do_examine, x_command): Update.
11888
11889 2018-04-06  Tom Tromey  <tom@tromey.com>
11890
11891         * value.c (release_value): Update.
11892         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11893         (struct bpstats) <val>: Now a value_ref_ptr.
11894         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11895         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11896         (~watchpoint, print_it_watchpoint, watch_command_1)
11897         (invalidate_bp_value_on_memory_change): Update.
11898
11899 2018-04-06  Tom Tromey  <tom@tromey.com>
11900
11901         * varobj.c (varobj_clear_saved_item)
11902         (update_dynamic_varobj_children, install_new_value, ~varobj):
11903         Update.
11904         * value.h (value_incref): Move declaration earlier.
11905         (value_decref): Rename from value_free.
11906         (struct value_ref_policy): New.
11907         (value_ref_ptr): New typedef.
11908         (struct value_deleter): Remove.
11909         (gdb_value_up): Remove typedef.
11910         (release_value): Change return type.
11911         (release_value_or_incref): Remove.
11912         * value.c (set_value_parent): Update.
11913         (value_incref): Change return type.
11914         (value_decref): Rename from value_free.
11915         (value_free_to_mark, free_all_values, free_value_chain): Update.
11916         (release_value): Return value_ref_ptr.
11917         (release_value_or_incref): Remove.
11918         (record_latest_value, set_internalvar, clear_internalvar):
11919         Update.
11920         * stack.c (info_frame_command): Don't call value_free.
11921         * python/py-value.c (valpy_dealloc, valpy_new)
11922         (value_to_value_object): Update.
11923         * printcmd.c (do_examine): Update.
11924         * opencl-lang.c (lval_func_free_closure): Update.
11925         * mi/mi-main.c (register_changed_p): Don't call value_free.
11926         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11927         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11928         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11929         value_free.
11930         * guile/scm-value.c (vlscm_free_value_smob)
11931         (vlscm_scm_from_value): Update.
11932         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11933         (frame_unwind_register_unsigned, get_frame_register_bytes)
11934         (put_frame_register_bytes): Don't call value_free.
11935         * findvar.c (address_from_register): Don't call value_free.
11936         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11937         * dwarf2loc.c (entry_data_value_free_closure)
11938         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11939         (dwarf2_evaluate_loc_desc_full): Update.
11940         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11941         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11942         (~watchpoint, watch_command_1)
11943         (invalidate_bp_value_on_memory_change): Update.
11944         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11945
11946 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11947
11948         PR gdb/23022
11949         * warning.m4: Add -Wno-error=deprecated-register.
11950         * configure: Re-generate.
11951
11952 2018-04-05  Tom Tromey  <tom@tromey.com>
11953
11954         * linespec.h: Remove include of "vec.h".
11955
11956 2018-04-05  Tom Tromey  <tom@tromey.com>
11957
11958         * linespec.c (typep): Remove typedef.
11959         (find_methods, find_superclass_methods): Take a std::vector.
11960         (find_method): Use std::vector.
11961
11962 2018-04-05  Tom Tromey  <tom@tromey.com>
11963
11964         * utils.c (compare_strings): Remove.
11965         * utils.h (compare_strings): Remove.
11966         * objc-lang.h (find_imps): Update.
11967         * objc-lang.c (find_methods): Take a std::vector.
11968         (uniquify_strings, find_imps): Likewise.
11969         * linespec.c (find_methods): Take a std::vector.
11970         (decode_objc): Use std::vector.
11971         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11972         a std::vector.
11973         (find_method, find_function_symbols): Use std::vector.
11974
11975 2018-04-05  Tom Tromey  <tom@tromey.com>
11976
11977         * completer.c (completion_tracker::completion_tracker): Remove
11978         cast.
11979         (completion_tracker::discard_completions): Likewise.
11980         * breakpoint.c (ambiguous_names_p): Remove cast.
11981         * ada-lang.c (_initialize_ada_language): Remove cast.
11982         * utils.h (streq): Update.
11983         (streq_hash): Add new declaration.
11984         * utils.c (streq): Return bool.
11985         (streq_hash): New function.
11986
11987 2018-04-05  Tom Tromey  <tom@tromey.com>
11988
11989         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11990         Remove a string copy.
11991
11992 2018-04-05  Tom Tromey  <tom@tromey.com>
11993
11994         * linespec.c (filter_results): Use std::vector.
11995         (decode_line_2, decode_line_full): Update.
11996
11997 2018-04-05  Tom Tromey  <tom@tromey.com>
11998
11999         * linespec.c (canonical_to_fullform): Return std::string.
12000         (filter_results): Update.
12001         (struct decode_line_2_item): Add constructor.
12002         <fullform, displayform>: Now std::string.
12003         (decode_line_2_compare_items): Now a std::sort comparator.
12004         (decode_line_2): Update.
12005
12006 2018-04-05  Tom Tromey  <tom@tromey.com>
12007
12008         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12009         (unexpected_linespec_error): Update.
12010         (linespec_parse_basic, parse_linespec): Update.
12011
12012 2018-04-05  Tom Tromey  <tom@tromey.com>
12013
12014         * linespec.c (linespec_parse_basic): Reindent.
12015
12016 2018-04-05  Tom Tromey  <tom@tromey.com>
12017
12018         * minsyms.h (iterate_over_minimal_symbols): Update.
12019         * minsyms.c (iterate_over_minimal_symbols): Take a
12020         gdb::function_view.
12021         * linespec.c (struct collect_minsyms): Remove.
12022         (compare_msyms): Now a std::sort comparator.
12023         (add_minsym): Add parameters.
12024         (search_minsyms_for_name): Update.  Use std::vector.
12025
12026 2018-04-03  Tom Tromey  <tom@tromey.com>
12027
12028         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12029         gdb::byte_vector.
12030
12031 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12032
12033         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12034
12035 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12036
12037         PR gdb/16959
12038         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12039         printing static type.
12040
12041 2018-04-01  Tom Tromey  <tom@tromey.com>
12042
12043         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12044         (rs6000_xfer_shared_libraries): Update.
12045
12046 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12047
12048         * common/gdb_vecs.h (char_ptr): Remove.
12049         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12050
12051 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12052
12053         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12054         with std::vector.
12055         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12056
12057 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12058
12059         * tracepoint.h (struct uploaded_tp): Initialize fields.
12060         <actions, step_actions, cmd_strings>: Change type to
12061         std::vector<char *>.
12062         * tracepoint.c (get_uploaded_tp): Allocate with new.
12063         (free_uploaded_tps): Free with delete.
12064         (parse_tracepoint_definition): Adjust to std::vector change.
12065         * breakpoint.c (read_uploaded_action): Likewise.
12066         (create_tracepoint_from_upload): Likewise.
12067         * ctf.c (ctf_write_uploaded_tp): Likewise.
12068         (SET_ARRAY_FIELD): Likewise.
12069         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12070
12071 2018-03-30  Tom Tromey  <tom@tromey.com>
12072
12073         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12074         std::unique_ptr.
12075         (svr4_keep_data_in_core): Update.
12076         (svr4_read_so_list): Update.
12077
12078 2018-03-30  Tom Tromey  <tom@tromey.com>
12079
12080         * windows-nat.c (handle_output_debug_string, handle_exception):
12081         Update.
12082         * target.h (target_read_string): Update.
12083         * target.c (target_read_string): Change "string" to
12084         unique_xmalloc_ptr.
12085         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12086         Update.
12087         * solib-frv.c (frv_current_sos): Update.
12088         * solib-dsbt.c (dsbt_current_sos): Update.
12089         * solib-darwin.c (darwin_current_sos): Update.
12090         * linux-thread-db.c (inferior_has_bug): Update.
12091         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12092         Update.  Remove alloca.
12093         * ada-lang.c (ada_main_name): Update.
12094
12095 2018-03-30  Tom Tromey  <tom@tromey.com>
12096
12097         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12098         (struct dwo_file_deleter): New.
12099         (dwo_file_up): New typedef.
12100         (open_and_init_dwo_file): Use dwo_file_up.
12101         (free_dwo_file_cleanup): Remove.
12102
12103 2018-03-30  Tom Tromey  <tom@tromey.com>
12104
12105         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12106         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12107
12108 2018-03-30  Tom Tromey  <tom@tromey.com>
12109
12110         * dwarf2read.c (class free_cached_comp_units): New class.
12111         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12112         (free_cached_comp_units): Remove function.
12113
12114 2018-03-30  Tom Tromey  <tom@tromey.com>
12115
12116         * utils.h (make_cleanup_unpush_target): Remove.
12117         * inf-ptrace.c (struct target_unpusher): New.
12118         (target_unpush_up) New typedef.
12119         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12120         target_unpush_up.
12121         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12122
12123 2018-03-27  Tom Tromey  <tom@tromey.com>
12124
12125         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12126
12127 2018-03-27  Pedro Alves  <palves@redhat.com>
12128             Tom Tromey  <tom@tromey.com>
12129
12130         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12131         destructor.  Now a class.
12132         (gdb_readline_wrapper_cleanup): Remove function.
12133         (gdb_readline_wrapper): Remove cleanups.
12134
12135 2018-03-27  Tom Tromey  <tom@tromey.com>
12136
12137         * typeprint.h (struct type_print_options) <local_typedefs,
12138         global_typedefs>: Remove "struct" keyword.
12139         (class typedef_hash_table): New class.
12140         (recursively_update_typedef_hash, add_template_parameters)
12141         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12142         (find_typedef_in_hash): Don't declare.
12143         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12144         (typedef_hash_table::recursively_update): Rename from
12145         recursively_update_typedef_hash.  Now a member.
12146         (typedef_hash_table::add_template_parameters): Rename from
12147         add_template_parameters.  Now a member.
12148         (typedef_hash_table::typedef_hash_table): Now a constructor;
12149         rename from create_typedef_hash.
12150         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12151         rename from free_typedef_hash.
12152         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12153         (do_free_global_table): Remove.
12154         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12155         from copy_type_recursive.
12156         (create_global_typedef_table): Remove.
12157         (typedef_hash_table::find_global_typedef): Now a member of
12158         typedef_hash_table.
12159         (typedef_hash_table::find_typedef): Rename from
12160         find_typedef_in_hash; now a member.
12161         (whatis_exp): Update.
12162         * extension.h (struct ext_lang_type_printers): Add constructor and
12163         destructor.
12164         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12165         declare.
12166         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12167         Now a constructor; rename from start_ext_lang_type_printers.
12168         (ext_lang_type_printers): Now a destructor; rename from
12169         free_ext_lang_type_printers.
12170         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12171         Update.
12172         (c_type_print_base_struct_union): Update.  Remove cleanups.
12173
12174 2018-03-27  Tom Tromey  <tom@tromey.com>
12175
12176         * dwarf-index-write.c: Include <cmath>.
12177
12178 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12179
12180         * NEWS: Add entry describing new "set|show varsize-limit" command.
12181         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12182         command.
12183         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12184         "set variable".
12185
12186 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12187
12188         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12189         dwarf-index-write.c
12190         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12191         * dwarf-index-common.c: New file.
12192         * dwarf-index-common.h: New file.
12193         * dwarf-index-write.c: New file.
12194         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12195         (struct dwarf2_section_info): Move from here.
12196         (dwarf2_section_info_def): Likewise.
12197         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12198         (offset_type): Likewise.
12199         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12200         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12201         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12202         (byte_swap): Likewise.
12203         (MAYBE_SWAP): Likewise.
12204         (dwarf2_per_cu_ptr): Likewise.
12205         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12206         (struct tu_stats): Likewise.
12207         (struct dwarf2_per_objfile): Likewise.
12208         (struct dwarf2_per_cu_data): Likewise.
12209         (struct signatured_type): Likewise.
12210         (sig_type_ptr): Likewise.
12211         (DEF_VEC_P (sig_type_ptr)): Likewise.
12212         (INDEX4_SUFFIX): Likewise.
12213         (INDEX5_SUFFIX): Likewise.
12214         (DEBUG_STR_SUFFIX): Likewise.
12215         (dwarf2_read_section): Make non-static.
12216         (mapped_index_string_hash): Move from here.
12217         (dwarf5_djb_hash): Likewise.
12218         (file_write): Likewise.
12219         (class data_buf): Likewise.
12220         (struct symtab_index_entry): Likewise.
12221         (struct mapped_symtab): Likewise.
12222         (find_slot): Likewise.
12223         (hash_expand): Likewise.
12224         (add_index_entry): Likewise.
12225         (uniquify_cu_indices): Likewise.
12226         (class c_str_view): Likewise.
12227         (class c_str_view_hasher): Likewise.
12228         (class vector_hasher): Likewise.
12229         (write_hash_table): Likewise.
12230         (psym_index_map): Likewise.
12231         (struct addrmap_index_data): Likewise.
12232         (add_address_entry): Likewise.
12233         (add_address_entry_worker): Likewise.
12234         (write_address_map): Likewise.
12235         (symbol_kind): Likewise.
12236         (write_psymbols): Likewise.
12237         (struct signatured_type_index_data): Likewise.
12238         (write_one_signatured_type): Likewise.
12239         (recursively_count_psymbols): Likewise.
12240         (recursively_write_psymbols): Likewise.
12241         (class debug_names): Likewise.
12242         (check_dwarf64_offsets): Likewise.
12243         (psyms_seen_size): Likewise.
12244         (write_gdbindex): Likewise.
12245         (write_debug_names): Likewise.
12246         (assert_file_size): Likewise.
12247         (write_psymtabs_to_index): Likewise.
12248         (save_gdb_index_command): Likewise.
12249         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12250         command.
12251         * dwarf2read.h: New file.
12252
12253 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12254
12255         PR gdb/22670
12256         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12257         symbol name if the CU's language stores symbol names in linkage
12258         format.
12259         * language.h (struct language_defn)
12260         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12261         all instances of this struct.
12262
12263 2018-03-26  Tom Tromey  <tom@tromey.com>
12264
12265         * stack.c (backtrace_command_1): Remove verbose code.
12266
12267 2018-03-26  Tom Tromey  <tom@tromey.com>
12268
12269         * python/py-framefilter.c (py_print_type): Don't catch
12270         exceptions.  Return void.
12271         (py_print_value): Likewise.
12272         (py_print_single_arg): Likewise.
12273         (enumerate_args): Don't catch exceptions.
12274         (py_print_args): Likewise.
12275         (py_print_frame): Likewise.
12276         (gdbpy_apply_frame_filter): Catch exceptions here.
12277
12278 2018-03-26  Tom Tromey  <tom@tromey.com>
12279
12280         * stack.c (_initialize_stack): Remove trailing newlines from help
12281         text.  Add "Usage" line to "backtrace" help.
12282
12283 2018-03-26  Tom Tromey  <tom@tromey.com>
12284
12285         PR python/16486:
12286         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12287
12288 2018-03-26  Tom Tromey  <tom@tromey.com>
12289
12290         * python/py-framefilter.c (py_print_single_arg): Return
12291         EXT_LANG_BT_ERROR from catch.
12292
12293 2018-03-26  Tom Tromey  <tom@tromey.com>
12294
12295         PR backtrace/15584:
12296         * stack.c (backtrace_command_1): Move some code into no-filters
12297         "if".
12298
12299 2018-03-26  Tom Tromey  <tom@tromey.com>
12300
12301         * python/py-framefilter.c (throw_quit_or_print_exception): New
12302         function.
12303         (gdbpy_apply_frame_filter): Use it.
12304
12305 2018-03-26  Tom Tromey  <tom@tromey.com>
12306
12307         PR cli/17716:
12308         * python/py-framefilter.c (py_print_type, py_print_value)
12309         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12310         RETURN_MASK_ERROR.
12311
12312 2018-03-26  Tom Tromey  <tom@tromey.com>
12313
12314         * python/py-framefilter.c (enumerate_args): Use
12315         gdb::unique_xmalloc_ptr.
12316
12317 2018-03-26  Tom Tromey  <tom@tromey.com>
12318
12319         * python/py-framefilter.c (py_print_frame): Return
12320         EXT_LANG_BT_OK.
12321         (gdbpy_apply_frame_filter): Update comment.
12322         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12323         Remove.
12324         <EXT_LANG_BT_NO_FILTERS>: Change value.
12325
12326 2018-03-26  Tom Tromey  <tom@tromey.com>
12327
12328         PR backtrace/15582:
12329         * stack.c (backtrace_command): Parse "hide" argument.
12330         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12331         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12332         constant.
12333
12334 2018-03-26  Tom Tromey  <tom@tromey.com>
12335
12336         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12337         add "flags".
12338         (backtrace_command): Remove "fulltrace", add "flags".
12339
12340 2018-03-26  Tom Tromey  <tom@tromey.com>
12341
12342         * stack.c (backtrace_command): Rewrite command line parsing.
12343
12344 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12345
12346         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12347
12348 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12349
12350         * filename-seen-cache.h: Add include guard.
12351
12352 2018-03-26  Keith Seitz  <keiths@redhat.com>
12353
12354         * symfile.c (place_section): Remove "struct" from section_addr_info
12355         in comment.
12356         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12357         "struct" keyword from section_addr_info.
12358
12359 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12360
12361         * regformats/regdef.h (reg): Add constructors.
12362
12363 2018-03-25  Pedro Alves  <palves@redhat.com>
12364
12365         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12366         if then/else bodies in var_func_name extraction.
12367
12368 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12369
12370         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12371         lookup_minimal_symbol() to find symbol entry.
12372         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12373
12374 2018-03-23  Keith Seitz  <keiths@redhat.com>
12375
12376         PR c++/22968
12377         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12378         nested type definitions for C++, too.
12379
12380 2018-03-23  Tom Tromey  <tom@tromey.com>
12381
12382         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12383         a typedef.
12384         (macho_register_oso): Remove.
12385         (macho_symtab_read): Take a std::vector.
12386         (oso_el_compare_name): Now a std::sort comparator.
12387         (macho_symfile_read_all_oso): Take a std::vector.
12388         (macho_symfile_read): Use std::vector.  Remove cleanups.
12389
12390 2018-03-22  Tom Tromey  <tom@tromey.com>
12391
12392         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12393         (record_full_goto_bookmark): Use std::string.
12394
12395 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12396
12397         PR tdep/18295
12398         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12399         a single mask.
12400
12401 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12402
12403         * rs6000-tdep.c (store_insn_p): New function.
12404         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12405         and cr_reg to their unshifted values. Use store_insn_p to
12406         match LR saves using either R1 or fdata->alloca_reg. Use
12407         store_insn_p to match CR saves. Set alloca_reg_offset
12408         when alloca_reg and framep are set. Remove lr_reg shift
12409         when assigning to fdata->lr_register.
12410
12411 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12412
12413         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12414         command line args instead of emitting a warning.
12415
12416 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12417
12418         * tracepoint.h (struct static_tracepoint_marker): Initialize
12419         fields, define default constructor, move constructor and move
12420         assignment, disable the rest.
12421         <str_id, extra>: Make std::string.
12422         (release_static_tracepoint_marker): Remove.
12423         (free_current_marker): Remove.
12424         * tracepoint.c (free_current_marker): Remove.
12425         (parse_static_tracepoint_marker_definition): Adjust to
12426         std::string, use new hex2str overload.
12427         (release_static_tracepoint_marker): Remove.
12428         (print_one_static_tracepoint_marker): Get marker by reference
12429         and adjust to std::string.
12430         (info_static_tracepoint_markers_command): Adjust to std::vector
12431         changes
12432         * target.h (static_tracepoint_marker_p): Remove typedef.
12433         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12434         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12435         bool.
12436         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12437         * target-debug.h
12438         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12439         (target_debug_print_std_vector_static_tracepoint_marker): New.
12440         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12441         to...
12442         (target_debug_print_static_tracepoint_marker_p): ... this.
12443         * target-delegates.c: Re-generate.
12444         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12445         Make std::string.
12446         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12447         (decode_static_tracepoint_spec): Adjust to std::vector.
12448         (tracepoint_print_one_detail): Adjust to std::string.
12449         (strace_marker_decode_location): Adjust to std::string.
12450         (update_static_tracepoint): Adjust to std::string, remove call
12451         to release_static_tracepoint_marker.
12452         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12453         Adjust to std::vector.
12454         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12455         (remote_static_tracepoint_markers_by_strid): Adjust to
12456         std::vector.
12457         * common/rsp-low.h (hex2str): New overload with explicit count
12458         of bytes.
12459         * common/rsp-low.c (hex2str): New overload with explicit count
12460         of bytes.
12461         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12462         (_initialize_rsp_low_selftests): Add test_hex2str test.
12463         * unittests/tracepoint-selftests.c
12464         (test_parse_static_tracepoint_marker_definition): Adjust to
12465         std::string.
12466
12467 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12468
12469         * tracepoint.c (parse_static_tracepoint_marker_definition):
12470         Consider case where the definition is followed by more
12471         definitions.
12472         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12473         tracepoint-selftests.c.
12474         * unittests/tracepoint-selftests.c: New.
12475
12476 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12477
12478         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12479         Carvalho.
12480
12481 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12482
12483         * symtab.c (find_pc_sect_line): fixed indentation.
12484
12485 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12486
12487         * symtab.c (find_pc_sect_line): now uses binary search.
12488
12489 2018-03-19  Tom Tromey  <tom@tromey.com>
12490
12491         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12492         "IDENT" production.
12493
12494 2018-03-19  Pedro Alves  <palves@redhat.com>
12495             Tom Tromey  <tom@tromey.com>
12496
12497         * unittests/observable-selftests.c: New file.
12498         * common/observable.h: New file.
12499         * observable.h: New file.
12500         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12501         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12502         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12503         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12504         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12505         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12506         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12507         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12508         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12509         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12510         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12511         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12512         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12513         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12514         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12515         tui/tui-interp.c, valops.c: Update all users.
12516         * tui/tui-hooks.c (tui_bp_created_observer)
12517         (tui_bp_deleted_observer, tui_bp_modified_observer)
12518         (tui_inferior_exit_observer, tui_before_prompt_observer)
12519         (tui_normal_stop_observer, tui_register_changed_observer):
12520         Remove.
12521         (tui_observers_token): New global.
12522         (attach_or_detach, tui_attach_detach_observers): New functions.
12523         (tui_install_hooks, tui_remove_hooks): Use
12524         tui_attach_detach_observers.
12525         * record-btrace.c (record_btrace_thread_observer): Remove.
12526         (record_btrace_thread_observer_token): New global.
12527         * observer.sh: Remove.
12528         * observer.c: Rename to observable.c.
12529         * observable.c (namespace gdb_observers): Define new objects.
12530         (observer_debug): Move into gdb_observers namespace.
12531         (struct observer, struct observer_list, xalloc_observer_list_node)
12532         (xfree_observer_list_node, generic_observer_attach)
12533         (generic_observer_detach, generic_observer_notify): Remove.
12534         (_initialize_observer): Update.
12535         Don't include observer.inc.
12536         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12537         (clean mostlyclean): Likewise.
12538         (observer.h, observer.inc): Remove targets.
12539         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12540         (COMMON_SFILES): Use observable.c, not observer.c.
12541         * .gitignore: Remove observer.h.
12542
12543 2018-03-18  Tom Tromey  <tom@tromey.com>
12544
12545         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12546         gdb::def_vector.
12547         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12548
12549 2018-03-17  Tom Tromey  <tom@tromey.com>
12550
12551         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12552
12553 2018-03-17  Tom Tromey  <tom@tromey.com>
12554
12555         * target.c (class scoped_target_fd): New.
12556         (target_fileio_close_cleanup): Remove.
12557         (target_fileio_read_alloc_1): Use scoped_target_fd.
12558
12559 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12560
12561         * silent-rules.mk: New.
12562         * Makefile.in: Include silent-rules.mk
12563         (srcdir, VPATH, top_srcdir): Move up.
12564         (COMPILE): Add ECHO_CXX.
12565         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12566         (init.c): Add ECHO_INIT_C.
12567         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12568         (version.c): Add ECHO_GEN.
12569         (printcmd.o): Add ECHO_CXX.
12570         (target-float.o): Add ECHO_CXX.
12571         (ada-exp.o): Add ECHO_CXX.
12572         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12573         (insight$(EXEEXT)): Add ECHO_CXXLD.
12574         * gnulib/configure.ac: Add AM_SILENT_RULES.
12575         * gnulib/aclocal.m4: Re-generate.
12576         * gnulib/configure: Re-generate.
12577         * gnulib/import/Makefile.in: Re-generate.
12578
12579 2018-03-16  Tom Tromey  <tom@tromey.com>
12580
12581         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12582         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12583         * utils.c (do_free_section_addr_info)
12584         (make_cleanup_free_section_addr_info): Remove.
12585         * symfile.h (struct other_sections): Add constructor.
12586         (struct section_addr_info): Remove.
12587         (section_addr_info): New typedef.
12588         (struct sym_fns) <sym_offsets>: Change type of parameter.
12589         (build_section_addr_info_from_objfile)
12590         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12591         (default_symfile_offsets, symbol_file_add)
12592         (symbol_file_add_from_bfd)
12593         (build_section_addr_info_from_section_table): Update.
12594         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12595         * symfile.c (alloc_section_addr_info): Remove.
12596         (build_section_addr_info_from_section_table): Change return type.
12597         Update.
12598         (build_section_addr_info_from_bfd)
12599         (build_section_addr_info_from_objfile): Likewise.
12600         (free_section_addr_info): Remove.
12601         (relative_addr_info_to_section_offsets): Change type of "addrs".
12602         (addrs_section_compar): Now a std::sort comparator.
12603         (addrs_section_sort): Change return type.
12604         (addr_info_make_relative): Change type of "addrs".  Update.
12605         (default_symfile_offsets, syms_from_objfile_1)
12606         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12607         (symbol_file_add_separate): Update.
12608         (symbol_file_add): Change type of "addrs".  Update.
12609         (add_symbol_file_command): Update.  Remove cleanups.
12610         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12611         cleanups.
12612         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12613         * solib.c (solib_read_symbols): Update.
12614         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12615         * machoread.c (macho_symfile_offsets): Update.
12616         * jit.c (jit_bfd_try_read_symtab): Update.
12617
12618 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12619
12620         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12621         unittests/utils-selftests.c.
12622         * unittests/utils-selftests.c: New file.
12623
12624 2018-03-14  Tom Tromey  <tom@tromey.com>
12625
12626         PR cli/14977:
12627         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12628         for NULL.
12629
12630 2018-03-14  Tom Tromey  <tom@tromey.com>
12631
12632         PR cli/19918:
12633         * printcmd.c (printf_pointer): Allow "-" in format.
12634
12635 2018-03-14  Tom Tromey  <tom@tromey.com>
12636
12637         * printcmd.c (_initialize_printcmd): Add usage to printf.
12638
12639 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12640
12641         * MAINTAINERS: Update my email address.
12642
12643 2018-03-13  Tom Tromey  <tom@tromey.com>
12644
12645         * machoread.c (macho_check_dsym): Change filenamep to a
12646         std::string*.
12647         (macho_symfile_read): Update.
12648         * symfile.c (load_command): Use std::string.
12649
12650 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12651
12652         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12653         to error message string.
12654         (riscv_register_name): Use xsnprintf instead of sprintf.
12655         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12656         internal_error.
12657         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12658         error.
12659         (riscv_push_dummy_call): Likewise.
12660
12661 2018-03-12  Tom Tromey  <tom@tromey.com>
12662
12663         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12664         Use gdb::byte_vector.
12665         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12666
12667 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12668
12669         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12670         parameter type to readable_regcache.
12671         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12672         the declaration.
12673
12674 2018-03-11  Tom Tromey  <tom@tromey.com>
12675
12676         * dwarf2read.c (struct nextfield): Add initializers.
12677         (struct nextfnfield): Remove.
12678         (struct fnfieldlist): Add initializers.  Remove "length" and
12679         "head", use std::vector.
12680         (struct decl_field_list): Remove.
12681         (struct field_info): Add initializers.
12682         <fields, baseclasses>: Now std::vector.
12683         <nbaseclasses, nfnfields, typedef_field_list_count,
12684         nested_types_list_count>: Remove.
12685         (dwarf2_add_field, dwarf2_add_type_defn)
12686         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12687         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12688         (process_structure_scope): Update.
12689
12690 2018-03-11  Tom Tromey  <tom@tromey.com>
12691
12692         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12693         for use by std::sort.
12694         (build_type_psymtabs_1): Use std::vector.
12695
12696 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12697
12698         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12699         and LIBMPFR in the printed configuration.
12700
12701 2018-03-08  Tom Tromey  <tom@tromey.com>
12702
12703         * source.c (get_filename_and_charpos): Use scoped_fd.
12704         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12705         (procfs_pidlist): Likewise.
12706         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12707         (iterate_over_mappings): Likewise.
12708
12709 2018-03-08  Tom Tromey  <tom@tromey.com>
12710
12711         * infcall.c (struct call_return_meta_info)
12712         <stack_temporaries_enabled>: Remove.
12713         (get_call_return_value, call_function_by_hand_dummy): Update.
12714         * thread.c (disable_thread_stack_temporaries): Remove.
12715         (enable_thread_stack_temporaries): Remove.
12716         (thread_stack_temporaries_enabled_p): Return bool.
12717         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12718         (get_last_thread_stack_temporary): Update.
12719         * eval.c (evaluate_subexp): Update.
12720         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12721         class, not a function.
12722         (value_ptr, value_vec): Remove typedefs.
12723         (class thread_info) <stack_temporaries_enabled>: Now bool.
12724         <stack_temporaries>: Now a std::vector.
12725         (thread_stack_temporaries_enabled_p)
12726         (value_in_thread_stack_temporaries): Return bool.
12727
12728 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12729
12730         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12731         (getpkt_or_notif_sane_1): Likewise.
12732
12733 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12734
12735         * build-id.c (build_id_to_debug_bfd): Use std::string.
12736
12737 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12738
12739         * build-id.c (find_separate_debug_file_by_buildid): Return
12740         std::string.
12741         * build-id.h (find_separate_debug_file_by_buildid): Return
12742         std::string.
12743         * coffread.c (coff_symfile_read): Adjust to std::string.
12744         * elfread.c (elf_symfile_read): Adjust to std::string.
12745         * symfile.c (separate_debug_file_exists): Change parameter to
12746         std::string.
12747         (find_separate_debug_file): Return std::string.
12748         (find_separate_debug_file_by_debuglink): Return std::string.
12749         * symfile.h (find_separate_debug_file_by_debuglink): Return
12750         std::string.
12751
12752 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12753
12754         * common/xml-utils.c (xml_escape_text): Move code to...
12755         (xml_escape_text_append): ... this new function.
12756         * common/xml-utils.h (xml_escape_text_append): New declaration.
12757         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12758         New function.
12759         (_initialize_xml_utils): register test_xml_escape_text_append as
12760         a selftest.
12761
12762 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12763
12764         * defs.h: Remove MAX_REGISTER_SIZE.
12765         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12766         asserts.
12767         * python/py-unwind.c (pyuw_sniffer): Likewise.
12768
12769 2018-03-07  Tom Tromey  <tom@tromey.com>
12770
12771         * linux-tdep.c (linux_info_proc): Update.
12772         * target.h (struct target_ops) <to_fileio_readlink>: Return
12773         optional<string>.
12774         (target_fileio_readlink): Return optional<string>.
12775         * remote.c (remote_hostio_readlink): Return optional<string>.
12776         * inf-child.c (inf_child_fileio_readlink): Return
12777         optional<string>.
12778         * target.c (target_fileio_readlink): Return optional<string>.
12779
12780 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12781
12782         * regcache.c (cooked_read_test): Add riscv to the list of
12783         architectures that have a save_reggroup.
12784
12785 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12786
12787         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12788         value is not a dynamic class object.
12789
12790 2018-03-06  Tom Tromey  <tom@tromey.com>
12791
12792         * rust-exp.y: Formatting fixes.
12793
12794 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12795
12796         * riscv-tdep.c (riscv_register_name): Remove target description
12797         support.
12798         (riscv_gdbarch_init): Remove target description check.
12799
12800 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12801
12802         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12803         comment.
12804         * riscv-tdep.h: Likewise.
12805
12806 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12807
12808         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12809         (riscv_pseudo_register_write): Delete.
12810         (riscv_gdbarch_init): Remove all use of pseudo registers.
12811
12812 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12813
12814         * record-btrace.c (btrace_print_lines): Replace cleanup
12815         parameter with RAII equivalents.
12816         (btrace_insn_history): Replace cleanup with RAII equivalents.
12817         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12818         make_cleanup_ui_out_tuple_begin_end): Remove.
12819         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12820         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12821         make_cleanup_ui_out_list_begin_end): Remove.
12822
12823 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12824
12825         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12826         parameter types to std::vector.  Use bool.
12827         (record_btrace_wait): Replace VEC(tp_t) with
12828         std::vector<thread_info *>.
12829         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12830
12831 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12832
12833         * record-btrace.c (record_btrace_disable_callback): Remove.
12834         (struct scoped_btrace_disable): New.
12835         (record_btrace_open): Use scoped_btrace_disable.
12836
12837 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12838
12839         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12840         reading values from registers.
12841
12842 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12843
12844         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12845         where appropriate.
12846
12847 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12848
12849         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12850         change parameter type.  Use GDB's print functions, and use
12851         core_addr_to_string where appropriate.
12852         (riscv_push_dummy_call): Use core_addr_to_string where
12853         appropriate, update call to riscv_print_arg_location, and reindent
12854         a few lines.
12855         (riscv_return_value): Update call to riscv_print_arg_location.
12856
12857 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12858             Tim Newsome <tim@sifive.com>
12859             Albert Ou <a0u@eecs.berkeley.edu>
12860             Darius Rad <darius@bluespec.com>
12861
12862         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12863         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12864         (ALLDEPFILES): Add riscv-tdep.c
12865         * configure.tgt: Add riscv support.
12866         * riscv-tdep.c: New file.
12867         * riscv-tdep.h: New file.
12868         * NEWS: Mention new target.
12869         * MAINTAINERS: Add entry for riscv.
12870
12871 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12872
12873         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12874         fields within aggregates.
12875
12876 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12877
12878         * record-btrace.c (btrace_print_lines): Change type of flags to
12879         gdb_disassembly_flags.
12880
12881 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12882
12883         * fbsd-nat.c: Include "inf-ptrace.h".
12884         (USE_SIGTRAP_SIGINFO): Conditionally define.
12885         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12886         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12887         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12888         function.
12889         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12890         Likewise.
12891         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12892         Likewise.
12893         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12894         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12895         "supports_stopped_by_hw_breakpoint" target methods.
12896
12897 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12898
12899         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12900         * fbsd-nat.c (debug_fbsd_nat): New variable.
12901         (show_fbsd_nat_debug): New function.
12902         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12903         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12904
12905 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12906
12907         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12908         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12909         prototype.
12910         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12911         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12912         method.
12913
12914 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12915
12916         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12917         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12918
12919 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12920
12921         * charset.c (struct charset_vector): New.
12922         (charsets): Change type to charset_vector.
12923         (find_charset_names): Adjust.
12924         (add_one): Adjust.
12925         (_initialize_charset): Adjust.
12926
12927 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12928
12929         * progspace.h (struct program_space) <deleted_solibs>: Change
12930         type to std::vector<std::string>.
12931         * progspace.c (clear_program_space_solib_cache): Adjust.
12932         * breakpoint.c (print_solib_event): Adjust.
12933         (check_status_catch_solib): Adjust.
12934         * solib.c (update_solib_list): Adjust.
12935         * ui-out.h (class ui_out) <field_string>: New overload.
12936         * ui-out.c (ui_out::field_string): New overload.
12937
12938 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12939
12940         * progspace.h (struct program_space): Add constructor and
12941         destructor, initialize fields.
12942         (add_program_space): Remove.
12943         * progspace.c (add_program_space): Rename to...
12944         (program_space::program_space): ... this.
12945         (release_program_space): Rename to...
12946         (program_space::~program_space): ... this.
12947         (delete_program_space): Use delete to delete program_space.
12948         (initialize_progspace): Use new to allocate program_space.
12949         * inferior.c (add_inferior_with_spaces): Likewise.
12950         (clone_inferior_command): Likewise.
12951         * infrun.c (follow_fork_inferior): Likewise.
12952         (handle_vfork_child_exec_or_exit): Likewise.
12953
12954 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12955
12956         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12957         (delim_string_to_char_ptr_vec): Return std::vector of
12958         gdb::unique_xmalloc_ptr.
12959         (dirnames_to_char_ptr_vec_append): Take std::vector of
12960         gdb::unique_xmalloc_ptr.
12961         (dirnames_to_char_ptr_vec): Return std::vector of
12962         gdb::unique_xmalloc_ptr.
12963         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12964         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12965         (delim_string_to_char_ptr_vec): Return an std::vector of
12966         gdb::unique_xmalloc_ptr, adjust the code.
12967         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12968         gdb::unique_xmalloc_ptr, adjust the code.
12969         (dirnames_to_char_ptr_vec): Return an std::vector of
12970         gdb::unique_xmalloc_ptr, adjust the code.
12971         * auto-load.c (auto_load_safe_path_vec): Change type to
12972         std::vector of gdb::unique_xmalloc_ptr.
12973         (auto_load_expand_dir_vars): Return an std::vector of
12974         gdb::unique_xmalloc_ptr, adjust the code.
12975         (auto_load_safe_path_vec_update): Adjust.
12976         (filename_is_in_auto_load_safe_path_vec): Adjust.
12977         (auto_load_objfile_script_1): Adjust.
12978         * build-id.c (build_id_to_debug_bfd): Adjust.
12979         * linux-thread-db.c (thread_db_load_search): Adjust.
12980         * source.c (add_path): Adjust.
12981         (openp): Adjust.
12982         * symfile.c (find_separate_debug_file): Adjust.
12983         * utils.c (do_free_char_ptr_vec): Remove.
12984         (make_cleanup_free_char_ptr_vec): Remove.
12985
12986 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12987
12988         PR gdb/22907
12989         * common/pathstuff.c: Conditionally include "<windows.h>".
12990
12991 2018-03-01  Georg Sauthoff  <mail@georg.so>
12992
12993         PR gdb/22888
12994         * gcore.in: Quote variables and switch interpreter to bash.
12995
12996 2018-03-01  Tom Tromey  <tom@tromey.com>
12997
12998         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12999         assertion.  Add assertion for discriminant_index.
13000         (quirk_rust_enum): Use correct base type name in univariant case.
13001
13002 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13003
13004         * record.c (get_call_history_modifiers): Return a
13005         record_print_flags.
13006         (cmd_record_call_history): Adjust.
13007         * record-btrace.c (record_btrace_call_history): Adjust.
13008         (record_btrace_call_history_range): Adjust.
13009         (record_btrace_call_history_from): Adjust.
13010         * target-debug.h (target_debug_print_record_print_flags): New.
13011         * target-delegates.c: Re-generate.
13012         * target.c (target_call_history): Change flags type.
13013         (target_call_history_from): Likewise.
13014         (target_call_history_range): Likewise.
13015         * target.h (struct target_ops) <target_call_history>: Likewise.
13016         (target_call_history_from): Likewise.
13017         (target_call_history_range): Likewise.
13018
13019 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13020             Simon Marchi  <simon.marchi@polymtl.ca>
13021
13022         * common/common-utils.c: Include "sys/stat.h".
13023         (is_regular_file): Move here from "source.c"; change return
13024         type to "bool".
13025         * common/common-utils.h (is_regular_file): New prototype.
13026         * common/pathstuff.c (contains_dir_separator): New function.
13027         * common/pathstuff.h (contains_dir_separator): New prototype.
13028         * source.c: Don't include "sys/stat.h".
13029         (is_regular_file): Move to "common/common-utils.c".
13030
13031 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13032
13033         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13034         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13035         * auto-load.c: Include "common/pathstuff.h".
13036         * common/common-def.h (current_directory): Move here.
13037         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13038         function.
13039         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13040         prototype.
13041         * common/pathstuff.c: New file.
13042         * common/pathstuff.h: New file.
13043         * compile/compile.c: Include "common/pathstuff.h".
13044         * defs.h (current_directory): Move to "common/common-defs.h".
13045         * dwarf2read.c: Include "common/pathstuff.h".
13046         * exec.c: Likewise.
13047         * guile/scm-safe-call.c: Likewise.
13048         * linux-thread-db.c: Likewise.
13049         * main.c: Likewise.
13050         * nto-tdep.c: Likewise.
13051         * objfiles.c: Likewise.
13052         * source.c: Likewise.
13053         * symtab.c: Likewise.
13054         * utils.c: Include "common/pathstuff.h".
13055         (gdb_realpath): Move to "common/pathstuff.c".
13056         (gdb_realpath_keepfile): Likewise.
13057         (gdb_abspath): Likewise.
13058         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13059         (gdb_realpath_keepfile): Likewise.
13060         (gdb_abspath): Likewise.
13061
13062 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13063
13064         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13065         wildcard process pid for super_resume for kernels with a
13066         specific bug.
13067
13068 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13069
13070         * compile/compile.c (get_args): Add additional comments
13071         explaining function.
13072
13073 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13074             Tom Tromey  <tom@tromey.com>
13075
13076         * target.h (memory_write_request_s): Remove typedef.  Don't define
13077         VEC.
13078         (target_write_memory_blocks): Change argument to std::vector.
13079         (struct memory_write_request): Add constructor.
13080         * target-memory.c (compare_block_starting_address): Return bool.
13081         Change argument types.
13082         (claim_memory): Change arguments to use std::vector.
13083         (split_regular_and_flash_blocks, blocks_to_erase)
13084         (compute_garbled_blocks): Likewise.
13085         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13086         (target_write_memory_blocks): Change argument to std::vector.
13087         * symfile.c (struct load_section_data): Add constructor and
13088         destructor.  Use std::vector for "requests".
13089         (struct load_progress_data): Add initializers.
13090         (load_section_callback): Update.  Use "new".
13091         (clear_memory_write_data): Remove.
13092         (generic_load): Update.
13093
13094 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13095
13096         * arch/aarch64.h: Use common/tdesc.h.
13097
13098 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13099
13100         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13101         architecture with a 64-bit ABI.
13102
13103 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13104
13105         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13106         ahead of target description loading.
13107
13108 2018-02-26  Tom Tromey  <tom@tromey.com>
13109
13110         * stack.c (backtrace_command_1): Update.
13111         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13112         of "flags".
13113         * python/py-framefilter.c (py_print_frame)
13114         (gdbpy_apply_frame_filter): Change type of "flags".
13115         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13116         of "flags".
13117         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13118         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13119         * extension.h (enum frame_filter_flag): Rename from
13120         frame_filter_flags.
13121         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13122         (apply_ext_lang_frame_filter): Change type of "flags".
13123         * extension.c (apply_ext_lang_frame_filter): Change type of
13124         "flags".
13125         * extension-priv.h (struct extension_language_ops)
13126         <apply_frame_filter>: Change type of "flags".
13127
13128 2018-02-26  Tom Tromey  <tom@tromey.com>
13129
13130         PR python/16497:
13131         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13132         off-by-one in py_end computation.
13133         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13134         PRINT_MORE_FRAMES.
13135         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13136         constant.
13137
13138 2018-02-26  Tom Tromey  <tom@tromey.com>
13139
13140         * dwarf2read.c (struct variant_field): New.
13141         (struct nextfield) <variant>: New field.
13142         (dwarf2_add_field): Handle DW_TAG_variant_part.
13143         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13144         discriminated union.
13145         (read_structure_type): Handle DW_TAG_variant_part.
13146         (handle_struct_member_die): New function, extracted from
13147         process_structure_scope.  Handle DW_TAG_variant.
13148         (process_structure_scope): Handle discriminated unions.  Call
13149         handle_struct_member_die.
13150
13151 2018-02-26  Tom Tromey  <tom@tromey.com>
13152
13153         * rust-lang.h (rust_last_path_segment): Declare.
13154         * rust-lang.c (rust_last_path_segment): Now public.  Change
13155         contract.
13156         (struct disr_info): Remove.
13157         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13158         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13159         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13160         (rust_enum_p, rust_enum_variant): New function.
13161         (rust_underscore_fields): Remove "offset" parameter.
13162         (rust_print_enum): New function.
13163         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13164         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13165         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13166         enums.
13167         (rust_internal_print_type): New function, from rust_print_type.
13168         Remove enum code.
13169         (rust_print_type): Call rust_internal_print_type.
13170         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13171         Update enum handling.
13172         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13173         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13174         (rust_union_quirks): New functions.
13175         (process_full_comp_unit, process_full_type_unit): Call
13176         rust_union_quirks.
13177         (process_structure_scope): Update rust_unions if necessary.
13178
13179 2018-02-26  Tom Tromey  <tom@tromey.com>
13180
13181         * value.h (value_union_variant): Declare.
13182         * valops.c (value_union_variant): New function.
13183         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13184         (struct discriminant_info): New.
13185         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13186         enumerator.
13187         (struct main_type) <flag_discriminated_union>: New field.
13188
13189 2018-02-26  Tom Tromey  <tom@tromey.com>
13190
13191         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13192         unittests/unpack-selftests.c.
13193         * unittests/unpack-selftests.c: New file.
13194         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13195
13196 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13197
13198         * dwarf2read.c (struct partial_die_info) <read>: New method.
13199         (read_partial_die): Remove the declaration.
13200         (load_partial_dies): Update.
13201         (partial_die_info::partial_die_info):
13202         (read_partial_die): Change it to partial_die_info::read.
13203
13204 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13205
13206         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13207         (fixup_partial_die): Remove declaration.
13208         (scan_partial_symbols): Update.
13209         (partial_die_parent_scope): Likewise.
13210         (partial_die_full_name): Likewise.
13211         (fixup_partial_die): Change it to partial_die_info::fixup.
13212
13213 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13214
13215         * dwarf2read.c (read_partial_die): Update the declaration.
13216         (load_partial_dies): Caller update.
13217         (read_partial_die): Remove one argument abbrev_len.
13218
13219 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13220
13221         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13222         assignment operator.
13223         (load_partial_dies): Use ctor and copy ctor.
13224         (read_partial_die): Update.
13225         (dwarf2_cu::find_partial_die): Use ctor.
13226
13227 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13228
13229         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13230         (find_partial_die_in_comp_unit): Change it to
13231         dwarf2_cu::find_partial_die.
13232         (find_partial_die): Update.
13233
13234 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13235
13236         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13237         is NULL.
13238
13239 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13240
13241         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13242
13243 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13244
13245         * arch/amd64.h: Use common/tdesc.h.
13246         * arch/i386.c: Likewise.
13247         * arch/i386.h: Likewise.
13248         * arch/tic6x.c: Likewise.
13249         * arch/tdesc.h: Move file from here...
13250         * common/tdesc.h: ...to here.
13251         * features/aarch64-core.c: Regenerate.
13252         * features/aarch64-fpu.c: Regenerate.
13253         * features/i386/32bit-avx.c: Regenerate.
13254         * features/i386/32bit-avx512.c: Regenerate.
13255         * features/i386/32bit-core.c: Regenerate.
13256         * features/i386/32bit-linux.c: Regenerate.
13257         * features/i386/32bit-mpx.c: Regenerate.
13258         * features/i386/32bit-pkeys.c: Regenerate.
13259         * features/i386/32bit-sse.c: Regenerate.
13260         * features/i386/64bit-avx.c: Regenerate.
13261         * features/i386/64bit-avx512.c: Regenerate.
13262         * features/i386/64bit-core.c: Regenerate.
13263         * features/i386/64bit-linux.c: Regenerate.
13264         * features/i386/64bit-mpx.c: Regenerate.
13265         * features/i386/64bit-pkeys.c: Regenerate.
13266         * features/i386/64bit-segments.c: Regenerate.
13267         * features/i386/64bit-sse.c: Regenerate.
13268         * features/i386/x32-core.c: Regenerate.
13269         * features/tic6x-c6xp.c: Regenerate.
13270         * features/tic6x-core.c: Regenerate.
13271         * features/tic6x-gp.c: Regenerate.
13272         * target-descriptions.c: Use common/tdesc.h.
13273         * target-descriptions.h: Likewise.
13274
13275 2018-02-24  Tom Tromey  <tom@tromey.com>
13276
13277         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13278         (try_thread_db_load_from_dir, thread_db_load_search): Use
13279         std::string.
13280         (info_auto_load_libthread_db_compare): Return bool.  Change
13281         argument types.
13282         (info_auto_load_libthread_db): Use std::vector, std::string.
13283         Remove cleanups.
13284
13285 2018-02-24  Tom Tromey  <tom@tromey.com>
13286
13287         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13288         std::string.
13289         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13290         std::string*.
13291         * gdbarch.c: Rebuild.
13292         * gdbarch.h: Rebuild.
13293         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13294         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13295         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13296         std::string*.
13297
13298 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13299
13300         * gdbtypes.h (sect_offset): Change type to uint64_t.
13301         (sect_offset_str): New function.
13302         * dwarf2read.c (create_addrmap_from_aranges): Use
13303         sect_offset_str.
13304         (error_check_comp_unit_head): Likewise.
13305         (create_debug_type_hash_table): Likewise.
13306         (read_cutu_die_from_dwo): Likewise.
13307         (init_cutu_and_read_dies): Likewise.
13308         (init_cutu_and_read_dies_no_follow): Likewise.
13309         (process_psymtab_comp_unit_reader): Likewise.
13310         (partial_die_parent_scope): Likewise.
13311         (peek_die_abbrev): Likewise.
13312         (process_queue): Likewise.
13313         (dwarf2_physname): Likewise.
13314         (read_namespace_alias): Likewise.
13315         (read_import_statement): Likewise.
13316         (create_dwo_cu_reader): Likewise.
13317         (create_cus_hash_table): Likewise.
13318         (lookup_dwo_cutu): Likewise.
13319         (inherit_abstract_dies): Likewise.
13320         (read_func_scope): Likewise.
13321         (read_call_site_scope): Likewise.
13322         (dwarf2_add_member_fn): Likewise.
13323         (read_common_block): Likewise.
13324         (read_module_type): Likewise.
13325         (read_typedef): Likewise.
13326         (read_subrange_type): Likewise.
13327         (load_partial_dies): Likewise.
13328         (read_partial_die): Likewise.
13329         (find_partial_die): Likewise.
13330         (read_str_index): Likewise.
13331         (dwarf2_string_attr): Likewise.
13332         (build_error_marker_type): Likewise.
13333         (lookup_die_type): Likewise.
13334         (dump_die_shallow): Likewise.
13335         (follow_die_ref): Likewise.
13336         (dwarf2_fetch_die_loc_sect_off): Likewise.
13337         (dwarf2_fetch_constant_bytes): Likewise.
13338         (follow_die_sig): Likewise.
13339         (get_signatured_type): Likewise.
13340         (get_DW_AT_signature_type): Likewise.
13341         (dwarf2_find_containing_comp_unit): Likewise.
13342         (set_die_type): Likewise.
13343
13344 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13345
13346         * arch/aarch64.c: Include "common-defs.h".
13347         * arch/amd64.c: Likewise.
13348         * arch/i386.c: Likewise.
13349
13350 2018-02-21  Tom Tromey  <tom@tromey.com>
13351
13352         * value.h: (extract_field_op): Update.
13353         * eval.c (extract_field_op): Return a const char *.
13354         * expression.h (parse_expression_for_completion): Update.
13355         * completer.c (complete_expression): Update.
13356         (add_struct_fields): Make fieldname const.
13357         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13358         (mark_completion_tag, parse_exp_in_context_1): Update.
13359         (parse_expression_for_completion): Change "name" to
13360         unique_xmalloc_ptr*.
13361
13362 2018-02-21  Tom Tromey  <tom@tromey.com>
13363
13364         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13365
13366 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13367
13368         * avr-tdep.c (avr_read_pc): Change parameter type to
13369         readable_regcache.
13370         * gdbarch.sh (read_pc): Likewise.
13371         * gdbarch.c: Re-generated.
13372         * gdbarch.h: Re-generated.
13373         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13374         readable_regcache.
13375         * ia64-tdep.c (ia64_read_pc): Likewise.
13376         * mips-tdep.c (mips_read_pc): Likewise.
13377         * spu-tdep.c (spu_read_pc): Likewise.
13378
13379 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13380
13381         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13382         * regcache-dump.c: New file.
13383         * regcache.c: Move register_dump to regcache-dump.c.
13384         (maintenance_print_registers): Likewise.
13385         (maintenance_print_raw_registers): Likewise.
13386         (maintenance_print_cooked_registers): Likewise.
13387         (maintenance_print_register_groups): Likewise.
13388         (maintenance_print_remote_registers): Likewise.
13389         (_initialize_regcache): Likewise.
13390         * regcache.h (register_dump): Moved from regcache.c.
13391
13392 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13393
13394         * regcache.c (regcache::regcache): Update.
13395         (regcache::invalidate): Move it to detached_regcache::invalidate.
13396         (get_thread_arch_aspace_regcache): Update.
13397         (regcache::raw_update): Update.
13398         (regcache::cooked_read): Remove some code.
13399         (regcache::cooked_read_value): Likewise.
13400         (regcache::raw_write): Remove assert on m_readonly_p.
13401         (regcache::raw_supply_integer): Move it to
13402         detached_regcache::raw_supply_integer.
13403         (regcache::raw_supply_zeroed): Likewise.
13404         * regcache.h (detached_regcache) <raw_supply_integer>: New
13405         declaration.
13406         <raw_supply_zeroed, invalidate>: Likewise.
13407         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13408         <invalidate>: Likewise.
13409         <m_readonly_p>: Removed.
13410
13411 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13412
13413         * infcmd.c (get_return_value): Let stop_regs point to
13414         get_current_regcache.
13415         * regcache.c (regcache::regcache): Remove.
13416         (register_dump_reg_buffer): New class.
13417         (regcache_print): Adjust.
13418         * regcache.h (regcache): Remove constructors.
13419
13420 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13421
13422         * regcache.c (class register_dump): New class.
13423         (register_dump_regcache, register_dump_none): New class.
13424         (register_dump_remote, register_dump_groups): New class.
13425         (regcache_print): Update.
13426         * regcache.h (regcache_dump_what): Move it to regcache.c.
13427         (regcache) <dump>: Remove.
13428
13429 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13430
13431         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13432          reg_buffer_rw *.
13433         (jit_unwind_reg_set_impl): Call raw_supply.
13434         (jit_frame_sniffer): Use reg_buffer_rw.
13435         * record-full.c (record_full_core_regbuf): Change its type.
13436         (record_full_core_open_1): Use reg_buffer_rw.
13437         (record_full_close): Likewise.
13438         (record_full_core_fetch_registers): Use regcache->raw_supply.
13439         (record_full_core_store_registers): Likewise.
13440         * regcache.c (regcache::get_register_status): Move it to
13441         reg_buffer.
13442         (regcache_raw_set_cached_value): Remove.
13443         (regcache::raw_set_cached_value): Remove.
13444         (regcache::raw_write): Call raw_supply.
13445         (regcache::raw_supply): Move it to reg_buffer_rw.
13446         * regcache.h (regcache_raw_set_cached_value): Remove.
13447         (reg_buffer_rw): New class.
13448
13449 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13450
13451         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13452         readonly_detached_regcache.
13453         (dummy_frame_prev_register): Use regcache->cooked_read.
13454         * frame.c (frame_save_as_regcache): Change return type.
13455         (frame_pop): Update.
13456         * frame.h (frame_save_as_regcache): Update declaration.
13457         * inferior.h (get_infcall_suspend_state_regcache): Update
13458         declaration.
13459         * infrun.c (infcall_suspend_state) <registers>: use
13460         readonly_detached_regcache.
13461         (save_infcall_suspend_state): Don't use regcache_dup.
13462         (get_infcall_suspend_state_regcache): Change return type.
13463         * linux-fork.c (struct fork_info) <savedregs>: Change to
13464         readonly_detached_regcache.
13465         <pc>: New field.
13466         (fork_save_infrun_state): Don't use regcache_dup.
13467         (info_checkpoints_command): Adjust.
13468         * mi/mi-main.c (register_changed_p): Update declaration.
13469         (mi_cmd_data_list_changed_registers): Use
13470         readonly_detached_regcache.
13471         (register_changed_p): Change parameter type to
13472         readonly_detached_regcache.
13473         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13474         readonly_detached_regcache.
13475         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13476         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13477         New.
13478         (regcache::save): Move it to reg_buffer.
13479         (regcache::restore): Change parameter type.
13480         (regcache_dup): Remove.
13481         * regcache.h (reg_buffer) <save>: New method.
13482         (readonly_detached_regcache): New class.
13483         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13484         readonly_detached_regcache.
13485         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13486
13487 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13488
13489         * frame.c (frame_save_as_regcache): Use regcache method save.
13490         (frame_pop): Use regcache method restore.
13491         * infrun.c (restore_infcall_suspend_state): Likewise.
13492         * linux-fork.c (fork_load_infrun_state): Likewise.
13493         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13494         save.
13495         * regcache.c (regcache_save): Remove.
13496         (regcache::restore): More asserts.
13497         (regcache_cpy): Remove.
13498         * regcache.h (regcache_save): Remove the declaration.
13499         (regcache::restore): Move from private to public.
13500         Remove the friend declaration of regcache_cpy.
13501         (regcache_cpy): Remove declaration.
13502
13503 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13504
13505         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13506         parameter type to 'readable_regcache *'.
13507         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13508         * arm-tdep.c (arm_neon_quad_read): Likewise.
13509         (arm_pseudo_read): Likewise.
13510         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13511         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13512         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13513         * gdbarch.c: Re-generated.
13514         * gdbarch.h: Re-generated.
13515         * gdbarch.sh (pseudo_register_read): Change parameter type to
13516         'readable_regcache *'.
13517         (pseudo_register_read_value): Likewise.
13518         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13519         (h8300_pseudo_register_read): Likewise.
13520         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13521         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13522         (i386_pseudo_register_read_into_value): Likewise.
13523         (i386_pseudo_register_read_value): Likewise.
13524         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13525         declaration.
13526         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13527         * m32c-tdep.c (m32c_raw_read): Likewise.
13528         (m32c_read_flg): Likewise.
13529         (m32c_banked_register): Likewise.
13530         (m32c_banked_read): Likewise.
13531         (m32c_sb_read): Likewise.
13532         (m32c_part_read): Likewise.
13533         (m32c_cat_read): Likewise.
13534         (m32c_r3r2r1r0_read): Likewise.
13535         (m32c_pseudo_register_read): Likewise.
13536         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13537         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13538         (mep_pseudo_cr64_read): Likewise.
13539         (mep_pseudo_register_read): Likewise.
13540         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13541         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13542         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13543         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13544         (regcache::cooked_read): Likewise.
13545         (regcache::cooked_read_value): Likewise.
13546         (regcache_cooked_read_signed):
13547         (regcache::cooked_read): Likewise.
13548         * regcache.h (readable_regcache): New class.
13549         (regcache): Inherit readable_regcache.  Move some methods to
13550         readable_regcache.
13551         * rl78-tdep.c (rl78_pseudo_register_read): Change
13552         parameter type to 'readable_regcache *'.
13553         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13554         (e500_pseudo_register_read): Change parameter type to
13555         'readable_regcache *'.
13556         (dfp_pseudo_register_read): Likewise.
13557         (vsx_pseudo_register_read): Likewise.
13558         (efpr_pseudo_register_read): Likewise.
13559         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13560         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13561         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13562         (sh64_pseudo_register_read): Likewise.
13563         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13564         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13565         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13566         (spu_pseudo_register_read): Likewise.
13567         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13568         (xtensa_pseudo_register_read): Likewise.
13569
13570 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13571
13572         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13573         (regcache::arch): Move it to reg_buffer::arch.
13574         (regcache::register_buffer): Likewise.
13575         (regcache::assert_regnum): Likewise.
13576         (regcache::num_raw_registers): Likewise.
13577         * regcache.h (reg_buffer): New class.
13578         (regcache): Inherit reg_buffer.
13579
13580 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13581
13582         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13583         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13584
13585 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13586
13587         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13588
13589 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13590
13591         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13592         (SFILES): Remove common/*.c files.
13593         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13594         * common/common.host: Add common reference.
13595         * configure.ac: Likewise.
13596         * configure: Regenerate.
13597
13598 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13599
13600         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13601         (block_initialize_namespace): Use new.
13602         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13603         (dwarf2_free_objfile): Use delete.
13604         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13605         (copy_type_recursive): Use new.
13606         * gdb_obstack.h (allocate_on_obstack): New.
13607
13608 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13609
13610         PR gdb/22849
13611         * inferior.c (exit_inferior_1): Reset inf->control.
13612
13613 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13614
13615         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13616         declaration.
13617
13618 2018-02-14  Pedro Alves  <palves@redhat.com>
13619
13620         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13621         frame_cleanup_after_sniffer on exception.
13622
13623 2018-02-14  Tom Tromey  <tom@tromey.com>
13624
13625         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13626         const.
13627         (solib_bfd_open): Make pathname const.
13628         * solib.c (solib_bfd_open): Make pathname const.
13629         * solib-spu.c (spu_bfd_fopen): Make name const.
13630         (spu_bfd_open): Make pathname const.
13631         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13632         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13633
13634 2018-02-14  Tom Tromey  <tom@tromey.com>
13635
13636         * symfile.c (symfile_bfd_open): Update.
13637         * source.h (openp, source_full_path_of, find_and_open_source):
13638         Change argument type to unique_xmalloc_ptr.
13639         * source.c (openp): Take a unique_xmalloc_ptr.
13640         (source_full_path_of, find_and_open_source): Likewise.
13641         (open_source_file, symtab_to_fullname): Update.
13642         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13643         unique_xmalloc_ptr.
13644         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13645         (exec_file_find): Update.
13646         * psymtab.c (psymtab_to_fullname): Update.
13647         * nto-tdep.h (nto_find_and_open_solib): Update.
13648         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13649         unique_xmalloc_ptr.
13650         * exec.c (exec_file_attach): Update.
13651         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13652         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13653
13654 2018-02-14  Tom Tromey  <tom@tromey.com>
13655
13656         * solib.c: Include source.h.
13657         * nto-tdep.c: Include source.h.
13658         * mi/mi-cmd-env.c: Include source.h.
13659         * infcmd.c: Include source.h.
13660         * exec.c: Include source.h.
13661         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13662         (add_path, directory_switch, source_path, init_source_path): Move
13663         declarations...
13664         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13665         (add_path, directory_switch, source_path, init_source_path):
13666         ...here.
13667
13668 2018-02-14  Tom Tromey  <tom@tromey.com>
13669
13670         * solist.h (exec_file_find, solib_find): Return
13671         unique_xmalloc_ptr.
13672         (solib_bfd_fopen): Take a const char *.
13673         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13674         (exec_file_find, solib_find): Likewise.
13675         (solib_bfd_fopen): Do not take ownership of "pathname".
13676         (solib_bfd_open): Use unique_xmalloc_ptr.
13677         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13678         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13679         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13680         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13681
13682 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13683
13684         * ada-lang.c (name_match_type_from_name): Remove reference to
13685         ada_name_for_lookup in function's documentation.
13686         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13687
13688 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13689
13690         * defs.h (enum openp_flags): New enum.
13691         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13692         Move to enum openp_flags.
13693         (openp_flags): New enum flags.
13694         (openp): Change parameter type to openp_flags.
13695         * source.c (openp): Change parameter type to openp_flags.
13696         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13697         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13698
13699 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13700
13701         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13702         per-command.
13703
13704 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13705
13706         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13707         into...
13708         (class dwarf2_queue_guard): ...the destructor of this new class.
13709         (dw2_do_instantiate_symtab): Create instance of the new class
13710         dwarf2_queue_guard, remove cleanup.
13711
13712 2018-02-09  Tom Tromey  <tom@tromey.com>
13713
13714         * source.c (find_source_lines): Don't reference past the end of
13715         the vector.
13716
13717 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13718
13719         * remote.c (remote_btrace_maybe_reopen): Change error message.
13720         * btrace.c (btrace_enable): Likewise.
13721         (parse_xml_btrace): Likewise.
13722         (parse_xml_btrace_conf): Likewise.
13723
13724 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13725
13726         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13727         (linux_enable_pt, linux_enable_bts): Call
13728         diagnose_perf_event_open_fail.
13729
13730 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13731
13732         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13733         Remove parameter and change return type.  Update callers.  Move it.
13734         (linux_enable_bts, linux_enable_pt): Improve error message.
13735         (linux_enable_pt): Remove zero buffer size check.
13736         (linux_enable_btrace): Improve error messages.  Remove NULL return
13737         check.
13738
13739 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13740
13741         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13742         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13743         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13744         (linux_supports_pt, linux_supports_btrace): Remove.
13745         (linux_enable_bts): Call cpu_supports_bts.
13746         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13747         * remote.c (remote_supports_btrace): Remove.
13748         (init_remote_ops): Remove remote_supports_btrace.
13749         * target-delegates.c: Regenerated.
13750         * target.c (target_supports_btrace): Remove.
13751         * target.h (target_ops) <to_supports_btrace>: Remove
13752         (target_supports_btrace): Remove.
13753         * x86-linux-nat.c (x86_linux_create_target): Remove
13754         linux_supports_btrace.
13755
13756 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13757
13758         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13759         btrace failed.
13760         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13761         exception and use message in own exception.
13762
13763 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13764
13765         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13766         (perf_event_pt_event_type): Use gdb_file_up.
13767         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13768         scoped_fd, and scoped_mmap.
13769
13770 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13771
13772         * common/scoped_mmap.h: New.
13773         * unittests/scoped_mmap-selftest.c: New.
13774         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13775         unittests/scoped_mmap-selftest.c.
13776
13777 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13778
13779         * common/scoped_fd.h: New.
13780         * unittests/scoped_fd-selftest.c: New.
13781         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13782         unittests/scoped_fd-selftest.c.
13783
13784 2018-02-09  Tom Tromey  <tom@tromey.com>
13785
13786         * auto-load.c (auto_load_section_scripts): Use
13787         gdb::unique_xmalloc_ptr.
13788
13789 2018-02-09  Tom Tromey  <tom@tromey.com>
13790
13791         * auto-load.c (execute_script_contents): Use std::string.
13792
13793 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13794
13795         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13796         Python function, rather than a new command.
13797
13798 2018-02-08  Tom Tromey  <tom@tromey.com>
13799
13800         * solib.c (solib_find_1): Use std::string.
13801         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13802
13803 2018-02-08  Tom Tromey  <tom@tromey.com>
13804
13805         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13806
13807 2018-02-08  Tom Tromey  <tom@tromey.com>
13808
13809         * source.c (find_source_lines): Use gdb::def_vector.
13810
13811 2018-02-08  Tom Tromey  <tom@tromey.com>
13812
13813         * macrocmd.c (struct temporary_macro_definition): New.
13814         (macro_define_command): Use temporary_macro_definition.  Remove
13815         cleanups.
13816         (free_macro_definition_ptr): Remove.
13817
13818 2018-02-08  Tom Tromey  <tom@tromey.com>
13819
13820         * macroexp.c (maybe_expand): Use std::string.
13821
13822 2018-02-08  Tom Tromey  <tom@tromey.com>
13823
13824         * macroexp.c (struct macro_buffer): Add initializers for some
13825         members.
13826         (init_buffer, init_shared_buffer, free_buffer)
13827         (free_buffer_return_text): Remove.
13828         (macro_buffer): New constructors.
13829         (~macro_buffer): New destructor.
13830         (macro_buffer::set_shared): New method.
13831         (macro_buffer::resize_buffer, macro_buffer::appendc)
13832         (macro_buffer::appendmem): Now methods, not free functions.
13833         (set_token, append_tokens_without_splicing, stringify)
13834         (macro_stringify): Update.
13835         (gather_arguments): Change return type.  Remove argc_p argument,
13836         add args_ptr argument.  Use std::vector.
13837         (substitute_args): Remove argc argument.  Accept std::vector.
13838         (expand): Update.  Use std::vector.
13839         (scan, macro_expand, macro_expand_next): Update.
13840
13841 2018-02-08  Tom Tromey  <tom@tromey.com>
13842
13843         * symtab.c (default_collect_symbol_completion_matches_break_on):
13844         Use unique_xmalloc_ptr.
13845         * macroscope.h: (sal_macro_scope, user_macro_scope)
13846         (default_macro_scope): Return unique_xmalloc_ptr.
13847         * macroscope.c (sal_macro_scope, user_macro_scope)
13848         (default_macro_scope): Return unique_xmalloc_ptr.
13849         * macroexp.h (macro_expand, macro_expand_once): Return
13850         unique_xmalloc_ptr.
13851         * macroexp.c (macro_expand, macro_expand_once): Return
13852         unique_xmalloc_ptr.
13853         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13854         (info_macro_command, info_macros_command): Use
13855         unique_xmalloc_ptr.
13856         * compile/compile-c-support.c (write_macro_definitions): Use
13857         unique_xmalloc_ptr.
13858         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13859
13860 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13861
13862         * value.c (value_static_field): Assign field type instead of
13863         containing type when returning an optimized out value.
13864
13865 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13866
13867         * ft32-tdep.c (ft32_read_pc): Remove.
13868         (ft32_write_pc): Remove.
13869         (ft32_gdbarch_init): Update.
13870         * m32r-tdep.c (m32r_read_pc): Remove.
13871         (m32r_gdbarch_init): Update.
13872         * mep-tdep.c (mep_read_pc): Remove.
13873         (mep_gdbarch_init): Update.
13874         * microblaze-tdep.c (microblaze_write_pc): Remove.
13875         (microblaze_gdbarch_init): Update.
13876         * mn10300-tdep.c (mn10300_read_pc): Remove.
13877         (mn10300_write_pc): Remove.
13878         (mn10300_gdbarch_init): Update.
13879         * moxie-tdep.c (moxie_read_pc): Remove.
13880         (moxie_write_pc): Remove.
13881         (moxie_gdbarch_init): Update.
13882
13883 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13884
13885         * expprint.c (print_subexp_standard): Handle
13886         OP_F77_UNDETERMINED_ARGLIST.
13887         (dump_subexp_body_standard): Likewise.
13888
13889 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13890
13891         * target-descriptions.c (tdesc_element_visitor) Add empty
13892         implementations.
13893         (tdesc_type): Move make_gdb_type from here.
13894         (tdesc_type_builtin): Likewise.
13895         (tdesc_type_vector): Likewise.
13896         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13897         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13898         (make_gdb_type_union): Likewise.
13899         (make_gdb_type_flags): Likewise.
13900         (make_gdb_type_enum): Likewise.
13901         (make_gdb_type): New function.
13902         (tdesc_register_type): Use static make_gdb_type.
13903
13904 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13905
13906         * infcmd.c (default_print_one_register_info): Align natural-format
13907         column values consistently one under another.
13908         (pad_to_column): New function.
13909
13910 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13911
13912         * dwarf2read.c (dwarf2_physname): Move commment.
13913
13914 2018-02-01  Leszek Swirski  <leszeks@google.com>
13915
13916         * varobj.c (varobj_formatted_print_options): Allow recursive
13917         pretty printing if pretty printing is enabled.
13918
13919 2018-02-01  Leszek Swirski  <leszeks@google.com>
13920
13921         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13922         names after a structop as a filename.
13923
13924 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13925
13926         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13927         (arm_record_coproc_data_proc): Likewise.
13928
13929 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13930
13931         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13932
13933 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13934
13935         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13936         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13937
13938 2018-01-31  Pedro Alves  <palves@redhat.com>
13939
13940         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13941         * inflow.c (child_terminal_save_inferior): Wrap reference to
13942         tcgetpgrp in HAVE_TERMIOS_H.
13943         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13944         _WIN32.
13945         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13946         always iterate over all inferiors.
13947         (gdbsim_cntrl_c): Adjust.
13948         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13949
13950 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13951
13952         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13953         index type is objfile-owned if the element type is as well.
13954
13955 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13956
13957         GDB 8.1 released.
13958
13959 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13960
13961         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13962         "features/s390x-linux64.c".
13963         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13964         s390_linux32 and s390x_linux64.
13965         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13966         default tdesc.
13967         * s390-tdep.c: Include "features/s390-linux32.c" and
13968         "features/s390x-linux64.c".
13969         (s390_tdesc_valid): Add check for tdesc_has_registers.
13970         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13971         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13972         tdesc_s390x_linux64.
13973         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13974         tdesc_s390x_linux64 to...
13975         * s390-tdep.h: ...here.
13976
13977 2018-01-30  Pedro Alves  <palves@redhat.com>
13978
13979         PR gdb/13211
13980         * config.in, configure: Regenerate.
13981         * configure.ac: Check for getpgid.
13982         * go32-nat.c (go32_pass_ctrlc): New.
13983         (go32_target): Install it.
13984         * inf-child.c (inf_child_target): Install
13985         child_terminal_save_inferior, child_pass_ctrlc and
13986         child_interrupt.
13987         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13988         (inf_ptrace_target): No longer install it.
13989         * infcmd.c (interrupt_target_1): Adjust.
13990         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13991         (child_interrupt): Declare.
13992         (inferior::terminal_state): New.
13993         * inflow.c (struct terminal_info): Update comments.
13994         (inferior_process_group): Delete.
13995         (terminal_is_ours): Delete.
13996         (gdb_tty_state): New.
13997         (child_terminal_init): Adjust.
13998         (is_gdb_terminal, sharing_input_terminal_1)
13999         (sharing_input_terminal): New functions.
14000         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14001         Set the process's actual process group in the foreground if
14002         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14003         mark terminal as the inferior's if not sharing GDB's terminal.
14004         Don't check attach_flag.
14005         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14006         pass down a target_terminal_state.
14007         (child_terminal_save_inferior): New, factored out from ...
14008         (child_terminal_ours_1): ... this.  Handle
14009         target_terminal_state::is_ours_for_output.
14010         (child_interrupt, child_pass_ctrlc): New.
14011         (inflow_inferior_exit): Clear the inferior's terminal_state.
14012         (copy_terminal_info): Copy the inferior's terminal state.
14013         (_initialize_inflow): Remove reference to terminal_is_ours.
14014         * inflow.h (inferior_process_group): Delete.
14015         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14016         * procfs.c (procfs_target): Don't install procfs_interrupt.
14017         (procfs_interrupt): Delete.
14018         * remote.c (remote_serial_quit_handler): Adjust.
14019         (remote_interrupt): Remove ptid parameter.  Adjust.
14020         * target-delegates.c: Regenerate.
14021         * target.c: Include "terminal.h".
14022         (target_terminal::terminal_state): Rename to ...
14023         (target_terminal::m_terminal_state): ... this.
14024         (target_terminal::init): Adjust.
14025         (target_terminal::inferior): Adjust to per-inferior
14026         terminal_state.
14027         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14028         (target_terminal::ours, target_terminal::ours_for_output): Use
14029         target_terminal_is_ours_kind.
14030         (target_interrupt): Remove ptid parameter.  Adjust.
14031         (default_target_pass_ctrlc): Adjust.
14032         * target.h (target_ops::to_terminal_save_inferior): New field.
14033         (target_ops::to_interrupt): Remove ptid_t parameter.
14034         (target_interrupt): Remove ptid_t parameter.  Update comment.
14035         (target_pass_ctrlc): Update comment.
14036         * target/target.h (target_terminal_state): New scoped enum,
14037         factored out of ...
14038         (target_terminal::terminal_state): ... here.
14039         (target_terminal::inferior): Update comments.
14040         (target_terminal::restore_inferior): New.
14041         (target_terminal::is_inferior, target_terminal::is_ours)
14042         (target_terminal::is_ours_for_output): Adjust.
14043         (target_terminal::scoped_restore_terminal_state): Adjust to
14044         rename, and call restore_inferior() instead of inferior().
14045         (target_terminal::scoped_restore_terminal_state::m_state): Change
14046         type.
14047         (target_terminal::terminal_state): Rename to ...
14048         (target_terminal::m_terminal_state): ... this and change type.
14049
14050 2018-01-30  Pedro Alves  <palves@redhat.com>
14051
14052         * linux-nat.c (wait_for_signal): New function.
14053         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14054         directly.
14055         (async_terminal_is_ours)
14056         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14057         (linux_nat_add_target): Don't override
14058         to_terminal_inferior/to_terminal_ours.
14059
14060 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14061
14062         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14063
14064 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14065
14066         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14067         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14068         dwarf2_per_objfile_free here.
14069         (dwarf2_per_objfile_free): Remove.
14070         (_initialize_dwarf2_read): Don't register
14071         dwarf2_per_objfile_free as a registry cleanup.
14072
14073 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14074
14075         Avoid compilation errors in MinGW native builds
14076
14077         The error is triggered by including python-internal.h, and the
14078         error message is:
14079
14080              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14081                       from build-gnulib/import/math.h:27,
14082                       from d:/usr/Python26/include/pyport.h:235,
14083                       from d:/usr/Python26/include/Python.h:58,
14084                       from python/python-internal.h:94,
14085                       from python/py-arch.c:24:
14086              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14087         using ::hypot;
14088                 ^~~~~
14089
14090         This happens because Python headers define 'hypot' to expand t
14091         '_hypot' in the Windows builds.
14092         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14093         'hypoth'.  This avoids a compilation error.
14094
14095 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14096
14097         * MAINTAINERS (Write After Approval): Fix ordering.
14098
14099 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14100
14101         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14102
14103 2018-01-26  Alan Modra  <amodra@gmail.com>
14104
14105         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14106         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14107         Remove nop.  Make const.  Comment.
14108         (powerpc32_plt_stub_so_2): New.
14109         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14110         Correct count.  Update uses.
14111         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14112         Move common code reading PLT entry word.  Correct
14113         powerpc32_plt_stub PLT address calculation.
14114         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14115         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14116         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14117         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14118         (ppc64_standard_linkage8): Likewise.
14119         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14120         Correct insns description.
14121         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14122
14123 2018-01-24  Pedro Alves  <palves@redhat.com>
14124
14125         GCC PR libstdc++/83906
14126         * gdbtypes.c (operator==(const dynamic_prop &,
14127         const dynamic_prop &)): New.
14128         (operator==(const range_bounds &, const range_bounds &)): New.
14129         (check_types_equal): Use them instead of memcmp.
14130         * gdbtypes.h (operator==(const dynamic_prop &,
14131         const dynamic_prop &)): Declare.
14132         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14133         (operator==(const range_bounds &, const range_bounds &)): Declare.
14134         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14135
14136 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14137
14138         * s390-linux-tdep.c (s390_record_address_mask)
14139         (s390_record_calc_disp_common, s390_record_calc_disp)
14140         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14141         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14142         (s390_process_record): Move to s390-tdep.c.
14143         (s390_linux_init_abi_any): Adjust.
14144         * s390-tdep.c (s390_record_address_mask)
14145         (s390_record_calc_disp_common, s390_record_calc_disp)
14146         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14147         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14148         (s390_process_record): Moved from s390-linux-tdep.c
14149         (s390_gdbarch_init): Adjust.
14150
14151 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14152
14153         * s390-linux-nat.c (s390-tdep.h): New include.
14154         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14155         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14156         (ALLDEPFILES): Add s390-tdep.c.
14157         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14158         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14159         * s390-tdep.h: ...this.  New file.
14160         * s390-linux-tdep.c (s390-tdep.h): New include.
14161         (_initialize_s390_tdep): Rename to...
14162         (_initialize_s390_linux_tdep): ...this and adjust.
14163         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14164         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14165         s390-tdep.h.
14166         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14167         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14168         (s390_is_partial_instruction, s390_software_single_step)
14169         (is_non_branch_ril, s390_displaced_step_copy_insn)
14170         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14171         (s390_prologue_data, s390_addr, s390_store, s390_load)
14172         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14173         (s390_register_call_saved, s390_guess_tracepoint_registers)
14174         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14175         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14176         (s390_pseudo_register_name, s390_pseudo_register_type)
14177         (s390_pseudo_register_read, s390_pseudo_register_write)
14178         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14179         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14180         (s390_addr_bits_remove, s390_address_class_type_flags)
14181         (s390_address_class_type_flags_to_name)
14182         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14183         (s390_function_arg_float, s390_function_arg_vector)
14184         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14185         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14186         (s390_frame_align, s390_register_return_value, s390_return_value)
14187         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14188         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14189         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14190         (s390_trad_frame_prev_register, s390_unwind_cache)
14191         (s390_prologue_frame_unwind_cache)
14192         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14193         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14194         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14195         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14196         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14197         (s390_frame_base_address, s390_local_base_address)
14198         (s390_frame_base, s390_gcc_target_options)
14199         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14200         (s390_validate_reg_range, s390_tdesc_valid)
14201         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14202         * s390-tdep.c: ...this.  New file.
14203
14204 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14205
14206         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14207         (s390_process_record, s390_gdbarch_tdep_alloc)
14208         (s390_linux_init_abi_any): Use/set new hook.
14209
14210 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14211
14212         * s390-linux-tdep.c (osabi.h): New include.
14213         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14214         (s390_linux_init_abi_any): New functions.
14215         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14216
14217 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14218
14219         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14220         tdesc_has_registers check
14221
14222 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14223
14224         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14225         (s390_validate_reg_range): New macro.
14226         (s390_gdbarch_init): Adjust.
14227
14228 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14229
14230         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14231         (s390_gdbarch_tdep_alloc): Adjust.
14232         (s390_gdbarch_init): Adjust.
14233
14234 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14235
14236         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14237         <have_tdb>: Change type to bool.
14238         (s390_gdbarch_tdep_alloc): Adjust.
14239         (s390_gdbarch_init): Adjust.
14240
14241 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14242
14243         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14244         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14245         (s390_gdbarch_tdep_alloc): New function.
14246         (s390_gdbarch_init): Allocate tdep at start and use its fields
14247         instead of separate variables.
14248
14249 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14250
14251         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14252         when looking for cached gdbarch and add comment for remaining.
14253
14254 2018-01-22  Pedro Alves  <palves@redhat.com>
14255             Sergio Durigan Junior  <sergiodj@redhat.com>
14256
14257         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14258         case.
14259
14260 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14261
14262         * MAINTAINERS: Update my company e-mail address.
14263
14264 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14265
14266         * regcache.c (cooked_write_test): New function.
14267         (_initialize_regcache): Register the test.
14268
14269 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14270
14271         * ia64-tdep.c (ia64_pseudo_register_read): Call
14272         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14273         * m32c-tdep.c (m32c_cat_read): Likewise.
14274         (m32c_r3r2r1r0_read): Likewise.
14275         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14276         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14277
14278 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14279
14280         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14281         method raw_read instead of regcache_raw_read.
14282         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14283         * arm-tdep.c (arm_neon_quad_read): Likewise.
14284         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14285         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14286         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14287         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14288         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14289         (i386_pseudo_register_read_into_value): Likewise.
14290         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14291         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14292         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14293         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14294         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14295         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14296         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14297         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14298         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14299
14300 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14301
14302         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14303         * configure.tgt: Remove target mt.
14304         * mt-tdep.c: Remove.
14305         * regcache.c (cooked_read_test): Remove the check for mt.
14306
14307 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14308
14309         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14310         instead of gdbarch_pseudo_register_read_value.
14311
14312 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14313
14314         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14315         language is Ada.
14316
14317 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14318
14319         * linespec.c (create_sals_line_offset): Remove code that preserved
14320         the symtab_and_line's line number.
14321
14322 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14323
14324         * varobj.c (varobj_create): Don't set valid_block when creating a
14325         floating varobj.
14326
14327 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14328
14329         * varobj.c (varobj_create): Remove out of date comment.
14330
14331 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14332
14333         PR mi/20395
14334         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14335         updating innermost block.
14336         * parse.c (innermost_block_tracker::update): Take extra type
14337         parameter, and check types match before updating innermost block.
14338         (write_dollar_variable): Update innermost block for registers.
14339         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14340         (innermost_block_tracker::innermost_block_tracker): Initialise
14341         m_types member.
14342         (innermost_block_tracker::reset): Take type parameter.
14343         (innermost_block_tracker::update): Take type parameter, and pass
14344         type through as needed.
14345         (innermost_block_tracker::m_types): New member.
14346         * varobj.c (varobj_create): Pass type when reseting innermost
14347         block.
14348
14349 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14350
14351         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14352         * ada-lang.c (resolve_subexp): Likewise.
14353         * breakpoint.c (set_breakpoint_condition) Likewise.
14354         (watch_command_1) Likewise.
14355         * c-exp.y (variable): Likewise.
14356         * d-exp.y (PrimaryExpression): Likewise.
14357         * f-exp.y (variable): Likewise.
14358         * go-exp.y (variable): Likewise.
14359         * m2-exp.y (variable): Likewise.
14360         * objfiles.c (objfile::~objfile): Likewise.
14361         * p-exp.y (variable): Likewise.
14362         * parse.c (innermost_block): Change type.
14363         * parser-defs.h (class innermost_block_tracker): New.
14364         (innermost_block): Change to innermost_block_tracker.
14365         * printcmd.c (display_command): Switch to innermost_block API.
14366         (do_one_display): Likewise.
14367         * rust-exp.y (do_one_display): Likewise.
14368         * symfile.c (clear_symtab_users): Likewise.
14369         * varobj.c (varobj_create): Switch to innermost_block API, replace
14370         use of innermost_block with block stored on varobj object.
14371
14372 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14373
14374         * expression.h (innermost_block): Remove declaration.
14375         * varobj.c: Add 'parser-defs.h' include.
14376
14377 2018-01-19  Tom Tromey  <tom@tromey.com>
14378
14379         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14380         symbols in the static and global blocks.
14381
14382 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14383
14384         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14385         gdb_ptrace.h, and move including gdb_wait.h ...
14386         * nat/linux-ptrace.h: ... to here.
14387
14388 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14389
14390         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14391         inf_ptrace_detach_success.
14392         (inf_ptrace_detach_success): Add inferior parameter, use it
14393         instead of inferior_ptid, pass it to detach_inferior.
14394         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14395         parameter.
14396         * inferior.c (detach_inferior): Add overload that takes an
14397         inferior object.
14398         * inferior.h (detach_inferior): Likewise.
14399         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14400         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14401         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14402
14403 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14404
14405         * target.h (struct target_ops) <to_detach>: Add inferior
14406         parameter.
14407         (target_detach): Likewise.
14408         * target.c (dispose_inferior): Pass inferior down.
14409         (target_detach): Pass inferior down.  Assert that it is equal to
14410         the current inferior.
14411         * aix-thread.c (aix_thread_detach): Pass inferior down.
14412         * corefile.c (core_file_command): Pass current_inferior() down.
14413         * corelow.c (core_detach): Add inferior parameter.
14414         * darwin-nat.c (darwin_detach): Likewise.
14415         * gnu-nat.c (gnu_detach): Likewise.
14416         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14417         * infcmd.c (detach_command): Pass current_inferior() down to
14418         target_detach.
14419         * infrun.c (follow_fork_inferior): Pass parent_inf to
14420         target_detach.
14421         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14422         target_detach.
14423         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14424         * linux-thread-db.c (thread_db_detach): Likewise.
14425         * nto-procfs.c (procfs_detach): Likewise.
14426         * procfs.c (procfs_detach): Likewise.
14427         * record.c (record_detach): Likewise.
14428         * record.h (struct inferior): Forward-declare.
14429         (record_detach): Add inferior parameter.
14430         * remote-sim.c (gdbsim_detach): Likewise.
14431         * remote.c (remote_detach_1): Likewise.
14432         (remote_detach): Likewise.
14433         (extended_remote_detach): Likewise.
14434         * sol-thread.c (sol_thread_detach): Likewise.
14435         * target-debug.h (target_debug_print_inferior_p): New macro.
14436         * target-delegates.c: Re-generate.
14437         * top.c (kill_or_detach): Pass inferior down to target_detach.
14438         * windows-nat.c (windows_detach): Add inferior parameter.
14439
14440 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14441
14442         * target.h (struct target_ops) <to_detach>: Remove args
14443         parameter.
14444         (target_detach): Likewise.
14445         * target.c (dispose_inferior): Adjust.
14446         (target_detach): Remove args parameter, adjust.
14447         * aix-thread.c (aix_thread_detach): Adjust.
14448         * corefile.c (core_file_command): Adjust.
14449         * corelow.c (core_detach): Adjust.
14450         * darwin-nat.c (darwin_detach): Adjust.
14451         * gnu-nat.c (gnu_detach): Adjust.
14452         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14453         * infcmd.c (detach_command): Adjust
14454         * infrun.c (follow_fork_inferior): Adjust.
14455         (handle_vfork_child_exec_or_exit): Adjust.
14456         * linux-fork.c (linux_fork_detach): Remove args parameter.
14457         * linux-fork.h (linux_fork_detach): Likewise.
14458         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14459         * linux-thread-db.c (thread_db_detach): Likewise.
14460         * nto-procfs.c (procfs_detach): Likewise.
14461         * procfs.c (procfs_detach): Likewise.
14462         (do_detach): Remove signo parameter.
14463         * record.c (record_detach): Remove args parameter.
14464         * record.h (record_detach): Likewise.
14465         * remote-sim.c (gdbsim_detach): Likewise.
14466         * remote.c (remote_detach_1): Likewise.
14467         (remote_detach): Likewise.
14468         (extended_remote_detach): Likewise.
14469         * sol-thread.c (sol_thread_detach): Likewise.
14470         * target-delegates.c: Re-generate.
14471         * top.c (struct qt_args) <args>: Remove field.
14472         (kill_or_detach): Don't pass args.
14473         (quit_force): Don't set args.
14474         * windows-nat.c (windows_detach): Remove args parameter.
14475
14476 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14477
14478         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14479         (arm_linux_init_abi): Install it.
14480
14481 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14482
14483         * osabi.c (gdb_osabi_names): Extend the regexp for
14484         arm-linux-gnueabihf.
14485
14486 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14487
14488         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14489         m_abbrevs.
14490         (abbrev_table::add_abbrev): Update.
14491         (abbrev_table::lookup_abbrev): Update.
14492
14493 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14494
14495         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14496
14497 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14498
14499         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14500         to "std::string".
14501
14502 2018-01-17  Tom Tromey  <tom@tromey.com>
14503
14504         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14505
14506 2018-01-17  Tom Tromey  <tom@tromey.com>
14507
14508         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14509         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14510         (create_array_type_with_stride): Update.
14511         * dwarf2read.c (set_die_type): Update.
14512
14513 2018-01-17  Tom Tromey  <tom@tromey.com>
14514
14515         * dwarf2read.c (delayed_method_info): Remove typedef.
14516         (dwarf2_cu::method_info): Now a std::vector.
14517         (add_to_method_list): Update.
14518         (free_delayed_list): Remove.
14519         (compute_delayed_physnames): Update.
14520         (process_full_comp_unit, process_full_type_unit): Clear the method
14521         list.  Remove cleanups.
14522         (psymtab_include_file_name): Add name_holder parameter.  Use
14523         unique_xmalloc_ptr.
14524         (dwarf_decode_lines): Update.
14525
14526 2018-01-17  Tom Tromey  <tom@tromey.com>
14527             Simon Marchi  <simon.marchi@ericsson.com>
14528
14529         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14530         (dwarf2_per_objfile::free_cached_comp_units)
14531         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14532         (init_cutu_and_read_dies_no_follow): Update.
14533         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14534         (dwarf2_cu::~dwarf2_cu): New.
14535         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14536         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14537
14538 2018-01-17  Tom Tromey  <tom@tromey.com>
14539             Simon Marchi  <simon.marchi@ericsson.com>
14540
14541         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14542         (struct die_reader_specs) <abbrev_table>: New member.
14543         (struct abbrev_table): Add constructor.
14544         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14545         <abbrev_obstack>: Now an auto_obstack.
14546         (abbrev_table_up): New typedef.
14547         (init_cu_die_reader): Add abbrev_table parameter.
14548         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14549         Add result_dwo_abbrev_table.
14550         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14551         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14552         Update.
14553         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14554         parameter.
14555         (skip_children): Update.
14556         (abbrev_table::alloc_abbrev): Rename from
14557         abbrev_table_alloc_abbrev.
14558         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14559         (abbrev_table::lookup_abbrev): Rename from
14560         abbrev_table_lookup_abbrev.
14561         (abbrev_table_read_table): Return abbrev_table_up.
14562         (abbrev_table_free, abbrev_table_free_cleanup)
14563         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14564         (load_partial_dies): Update.
14565
14566 2018-01-17  Tom Tromey  <tom@tromey.com>
14567
14568         * dwarf2read.c (dwarf2_compute_name): Update comment.
14569         (read_func_scope, read_variable): Update.
14570         (new_symbol): Remove.
14571         (new_symbol_full): Rename to new_symbol.
14572
14573 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14574
14575         PR gdb/16577
14576         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14577         a warning instead of throwing an error, set section size to 0 and return
14578         NULL.
14579         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14580
14581 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14582
14583         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14584         std::string.
14585         (linux_ptrace_attach_fail_reason_string): Likewise.
14586         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14587         Likewise.
14588         (linux_ptrace_attach_fail_reason_string): Likewise.
14589         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14590
14591 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14592
14593         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14594
14595 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14596
14597         PR gdb/21559
14598         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14599         checking for fs_base/gs_base fields in struct user_regs_struct.
14600         * configure: Regenerate.
14601
14602 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14603
14604         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14605         function.
14606         (aarch64_linux_init_abi): Install it to gdbarch hook
14607         gcc_target_options.
14608
14609 2018-01-15  Pedro Alves  <palves@redhat.com>
14610
14611         * common/signals-state-save-restore.c
14612         (save_original_signals_state): Fix typos.
14613
14614 2017-01-12  Tom Tromey  <tom@tromey.com>
14615             Sergio Durigan Junior  <sergiodj@redhat.com>
14616
14617         * Makefile.in (install-only): Install gdb-add-index.
14618
14619 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14620
14621         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14622
14623 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14624
14625         * infrun.c (keep_going_pass_signal): Clear step-over info when
14626         insert_breakpoints fails.
14627
14628 2018-01-11  Pedro Alves  <palves@redhat.com>
14629
14630         PR gdb/22583
14631         * infrun.c (resume): Rename to ...
14632         (resume_1): ... this.
14633         (resume): Reimplement as wrapper around resume_1.
14634
14635 2018-01-11  Pedro Alves  <palves@redhat.com>
14636
14637         PR remote/22597
14638         * remote.c (remote_parse_stop_reply): Default to the last-set
14639         general thread instead of to 'magic_null_ptid'.
14640
14641 2018-01-10  Pedro Alves  <palves@redhat.com>
14642
14643         * language.h (language_get_symbol_name_matcher): Rename ...
14644         (get_symbol_name_matcher): ... this.
14645         * language.c (language_get_symbol_name_matcher): Ditto.
14646         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14647         callers adjusted.
14648
14649 2018-01-10  Pedro Alves  <palves@redhat.com>
14650
14651         PR gdb/22670
14652         * dwarf2read.c
14653         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14654         Adjust to use language_get_symbol_name_matcher instead of
14655         language_defn::la_get_symbol_name_matcher.
14656         * language.c (language_get_symbol_name_matcher): If in Ada mode
14657         and the lookup name is a verbatim match, return Ada's matcher.
14658         * language.h (language_get_symbol_name_matcher): Adjust comment.
14659         (ada_lookup_name_info::verbatim_p):: New method.
14660
14661 2018-01-10  Pedro Alves  <palves@redhat.com>
14662
14663         PR gdb/22670
14664         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14665         minsym's language is language_auto or language_cplus, pass down
14666         language_ada instead.
14667         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14668
14669 2018-01-10  Pedro Alves  <palves@redhat.com>
14670
14671         PR gdb/22670
14672         * minsyms.c (linkage_name_str): New function.
14673         (iterate_over_minimal_symbols): Use it.
14674
14675 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14676
14677         * NEWS: Document that 'info proc' now works on FreeBSD.
14678
14679 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14680
14681         * configure.ac: Check for kinfo_getfile in libutil.
14682         * configure: Regenerate.
14683         * config.in: Regenerate.
14684         * fbsd-nat.c: Include "fbsd-tdep.h".
14685         (fbsd_fetch_cmdline): New.
14686         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14687         rather than calling error.
14688         (fbsd_info_proc): New.
14689         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14690         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14691         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14692
14693 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14694
14695         * fbsd-nat.c (struct free_deleter): Remove.
14696         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14697
14698 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14699
14700         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14701         NULL for an empty pathname.
14702
14703 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14704
14705         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14706         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14707         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14708         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14709         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14710         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14711         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14712         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14713         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14714         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14715         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14716         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14717         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14718         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14719         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14720
14721 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14722
14723         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14724         (gnu_xfer_auxv): New function.
14725         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14726         TARGET_OBJECT_AUXV.
14727
14728 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14729             Simon Marchi  <simon.marchi@ericsson.com>
14730
14731         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14732         common/selftest.c.
14733         (COMMON_OBS): Remove selftest.o.
14734         * configure.ac: Append selftest-arch.c and common/selftest.c to
14735         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14736         * configure: Re-generated.
14737         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14738         GDB_SELF_TEST.
14739         (maintenance_info_selftests): Likewise.
14740
14741 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14742
14743         * ada-valprint.c (val_print_packed_array_elements): Use
14744         proper number of elements when printing an array indexed
14745         by an enumeration type.
14746
14747 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14748
14749         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14750         (dw2_get_file_names_reader): Adjust.
14751         (lookup_dwo_signatured_type): Adjust.
14752         (lookup_dwp_signatured_type): Adjust.
14753         (lookup_signatured_type): Adjust.
14754         (create_type_unit_group): Adjust.
14755         (get_type_unit_group): Adjust.
14756         (process_psymtab_comp_unit_reader): Adjust.
14757         (build_type_psymtabs_reader): Adjust.
14758         (scan_partial_symbols): Adjust.
14759         (add_partial_symbol): Adjust.
14760         (add_partial_subprogram): Adjust.
14761         (peek_die_abbrev): Adjust.
14762         (fixup_go_packaging): Adjust.
14763         (process_imported_unit_die): Adjust.
14764         (dwarf2_compute_name): Adjust.
14765         (dwarf2_physname): Adjust.
14766         (read_import_statement): Adjust.
14767         (handle_DW_AT_stmt_list): Adjust.
14768         (read_file_scope): Adjust.
14769         (read_func_scope): Adjust.
14770         (read_lexical_block_scope): Adjust.
14771         (read_call_site_scope): Adjust.
14772         (read_variable): Adjust.
14773         (dwarf2_rnglists_process): Adjust.
14774         (dwarf2_ranges_process): Adjust.
14775         (dwarf2_ranges_read): Adjust.
14776         (dwarf2_get_pc_bounds): Adjust.
14777         (dwarf2_record_block_ranges): Adjust.
14778         (dwarf2_add_field): Adjust.
14779         (dwarf2_add_member_fn): Adjust.
14780         (read_structure_type): Adjust.
14781         (process_structure_scope): Adjust.
14782         (read_enumeration_type): Adjust.
14783         (read_array_type): Adjust.
14784         (mark_common_block_symbol_computed): Adjust.
14785         (read_common_block): Adjust.
14786         (read_namespace_type): Adjust.
14787         (read_namespace): Adjust.
14788         (read_module_type): Adjust.
14789         (read_tag_pointer_type): Adjust.
14790         (read_tag_ptr_to_member_type): Adjust.
14791         (read_tag_string_type): Adjust.
14792         (read_subroutine_type): Adjust.
14793         (read_typedef): Adjust.
14794         (read_base_type): Adjust.
14795         (attr_to_dynamic_prop): Adjust.
14796         (read_subrange_type): Adjust.
14797         (read_unspecified_type): Adjust.
14798         (dwarf2_read_abbrevs): Adjust.
14799         (load_partial_dies): Adjust.
14800         (read_partial_die): Adjust.
14801         (find_partial_die): Adjust.
14802         (guess_partial_die_structure_name): Adjust.
14803         (fixup_partial_die): Adjust.
14804         (read_attribute_value): Adjust.
14805         (read_addr_index): Adjust.
14806         (read_addr_index_from_leb128): Adjust.
14807         (read_str_index): Adjust.
14808         (dwarf2_string_attr): Adjust.
14809         (get_debug_line_section): Adjust.
14810         (dwarf_decode_line_header): Adjust.
14811         (lnp_state_machine::check_line_address): Adjust.
14812         (dwarf_decode_lines_1): Adjust.
14813         (dwarf_decode_lines): Adjust.
14814         (dwarf2_start_symtab): Adjust.
14815         (var_decode_location): Adjust.
14816         (new_symbol_full): Adjust.
14817         (dwarf2_const_value_data): Adjust.
14818         (dwarf2_const_value_attr): Adjust.
14819         (dwarf2_const_value): Adjust.
14820         (die_type): Adjust.
14821         (die_containing_type): Adjust.
14822         (build_error_marker_type): Adjust.
14823         (lookup_die_type): Adjust.
14824         (guess_full_die_structure_name): Adjust.
14825         (anonymous_struct_prefix): Adjust.
14826         (determine_prefix): Adjust.
14827         (dwarf2_name): Adjust.
14828         (follow_die_ref_or_sig): Adjust.
14829         (follow_die_offset): Adjust.
14830         (follow_die_ref): Adjust.
14831         (follow_die_sig_1): Adjust.
14832         (follow_die_sig): Adjust.
14833         (get_signatured_type): Adjust.
14834         (get_DW_AT_signature_type): Adjust.
14835         (decode_locdesc): Adjust.
14836         (dwarf_decode_macros): Adjust.
14837         (cu_debug_loc_section): Adjust.
14838         (fill_in_loclist_baton): Adjust.
14839         (dwarf2_symbol_mark_computed): Adjust.
14840         (init_one_comp_unit): Don't assign
14841         dwarf2_cu::dwarf2_per_objfile.
14842         (set_die_type): Adjust.
14843
14844 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14845
14846         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14847         <dwarf2_per_objfile>: New field.
14848         (dwarf2_per_objfile): Remove global.
14849         (get_dwarf2_per_objfile): New function.
14850         (set_dwarf2_per_objfile): New function.
14851         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14852         dwarf2_per_objfile.
14853         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14854         (read_abbrev_offset): Likewise.
14855         (read_indirect_string): Likewise.
14856         (read_indirect_line_string): Likewise.
14857         (read_indirect_string_at_offset): Likewise.
14858         (read_indirect_string_from_dwz): Likewise.
14859         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14860         dwarf2_per_objfile.
14861         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14862         (create_all_comp_units): Change objfile parameter to
14863         dwarf2_per_objfile.
14864         (create_all_type_units): Likewise.
14865         (process_queue): Add dwarf2_per_objfile parameter.
14866         (read_and_check_comp_unit_head): Likewise.
14867         (lookup_dwo_unit_in_dwp): Likewise.
14868         (get_dwp_file): Likewise.
14869         (process_cu_includes): Likewise.
14870         (struct free_dwo_file_cleanup_data): New struct.
14871         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14872         set_dwarf2_per_objfile.
14873         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14874         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14875         context, adjust calls.
14876         (dw2_instantiate_symtab): Likewise.
14877         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14878         (dw2_get_cu): Likewise.
14879         (create_cu_from_index_list): Change objfile parameter to
14880         dwarf2_per_objfile.
14881         (create_cus_from_index_list): Get dwarf2_per_objfile from
14882         context, adjust calls.
14883         (create_cus_from_index): Likewise.
14884         (create_signatured_type_table_from_index): Change objfile
14885         parameter to dwarf2_per_objfile.
14886         (create_signatured_type_table_from_debug_names): Change objfile
14887         parameter to dwarf2_per_objfile.
14888         (create_addrmap_from_index): Likewise.
14889         (create_addrmap_from_aranges): Likewise.
14890         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14891         (dw2_setup): Remove.
14892         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14893         context.
14894         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14895         get_dwarf2_per_objfile.
14896         (dw2_forget_cached_source_info): Likewise.
14897         (dw2_map_symtabs_matching_filename): Likewise.
14898         (struct dw2_symtab_iterator) <index>: Remove.
14899         <dwarf2_per_objfile>: New field.
14900         (dw2_symtab_iter_init): Replace index parameter with
14901         dwarf2_per_objfile.
14902         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14903         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14904         (dw2_print_stats): Likewise.
14905         (dw2_dump): Likewise.
14906         (dw2_expand_symtabs_for_function): Likewise.
14907         (dw2_expand_all_symtabs): Likewise.
14908         (dw2_expand_symtabs_with_fullname): Likewise.
14909         (dw2_expand_marked_cus): Replace index and objfile parameters
14910         with dwarf2_per_objfile.
14911         (dw_expand_symtabs_matching_file_matcher): Add
14912         dwarf2_per_objfile parameter and adjust calls.
14913         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14914         adjust calls.
14915         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14916         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14917         adjust calls.
14918         (create_cus_from_debug_names_list): Replace objfile parameter
14919         with dwarf2_per_objfile and adjust calls.
14920         (create_cus_from_debug_names): Likewise.
14921         (dwarf2_read_debug_names): Likewise.
14922         (mapped_debug_names::namei_to_name): Adjust call.
14923         (dw2_debug_names_iterator::next): Likewise.
14924         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14925         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14926         (dw2_debug_names_dump): Likewise.
14927         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14928         (dw2_debug_names_expand_symtabs_matching): Likewise.
14929         (dwarf2_initialize_objfile): Likewise.
14930         (dwarf2_build_psymtabs): Likewise.
14931         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14932         this_cu.
14933         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14934         (read_and_check_comp_unit_head): Likewise.
14935         (read_abbrev_offset): Likewise.
14936         (create_debug_type_hash_table): Likewise.
14937         (create_debug_types_hash_table): Likewise.
14938         (create_all_type_units): Replace objfile parameter with
14939         dwarf2_per_objfile.
14940         (add_type_unit): Add dwarf2_per_objfile parameter.
14941         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14942         with dwarf2_per_objfile.
14943         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14944         (lookup_dwp_signatured_type): Likewise.
14945         (lookup_signatured_type): Likewise.
14946         (read_cutu_die_from_dwo): Likewise.
14947         (init_tu_and_read_dwo_dies): Likewise.
14948         (init_cutu_and_read_dies): Likewise.
14949         (init_cutu_and_read_dies_no_follow): Likewise.
14950         (allocate_type_unit_groups_table): Add objfile parameter.
14951         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14952         (get_type_unit_group): Likewise.
14953         (process_psymtab_comp_unit): Update call.
14954         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14955         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14956         (print_tu_stats): Likewise.
14957         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14958         in void* parameter.
14959         (build_type_psymtabs): Change objfile parameter to
14960         dwarf2_per_objfile.
14961         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14962         passed in void* parameter.
14963         (process_skeletonless_type_units): Change objfile parameter to
14964         dwarf2_per_objfile.
14965         (set_partial_user): Likewise.
14966         (dwarf2_build_psymtabs_hard): Likewise.
14967         (read_comp_units_from_section): Likewise.
14968         (create_all_comp_units): Likewise.
14969         (scan_partial_symbols): Update calls.
14970         (add_partial_symbol): Likewise.
14971         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14972         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14973         (process_queue): Add dwarf2_per_objfile parameter.
14974         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14975         (compute_compunit_symtab_includes): Likewise.
14976         (process_cu_includes): Add dwarf2_per_objfile parameter.
14977         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14978         (process_full_type_unit): Likewise.
14979         (process_imported_unit_die): Update call.
14980         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14981         (read_file_scope): Likewise.
14982         (allocate_dwo_file_hash_table): Add objfile parameter.
14983         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14984         (create_cus_hash_table): Likewise.
14985         (create_dwp_hash_table): Likewise.
14986         (create_dwo_unit_in_dwp_v1): Likewise.
14987         (create_dwp_v2_section): Likewise.
14988         (create_dwo_unit_in_dwp_v2): Likewise.
14989         (lookup_dwo_unit_in_dwp): Likewise.
14990         (try_open_dwop_file): Likewise.
14991         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14992         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14993         cleanup to include a reference to dwarf2_per_objfile.
14994         (open_dwp_file): Add dwarf2_per_objfile parameter.
14995         (open_and_init_dwp_file): Likewise.
14996         (get_dwp_file): Likewise.
14997         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14998         (queue_and_load_all_dwo_tus): Update call.
14999         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15000         data.
15001         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15002         (dwarf2_ranges_process): Likewise.
15003         (dwarf2_get_pc_bounds): Likewise.
15004         (mark_common_block_symbol_computed): Likewise.
15005         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15006         (dwarf2_read_abbrevs): Update call.
15007         (read_partial_die): Use dwarf2_per_objfile from cu.
15008         (find_partial_die): Likewise.
15009         (fixup_partial_die): Likewise.
15010         (read_attribute_value): Likewise.
15011         (read_indirect_string_at_offset_from): Add objfile parameter.
15012         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15013         parameter.
15014         (read_indirect_string_from_dwz): Add objfile parameter.
15015         (read_indirect_string): Add objfile parameter.
15016         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15017         (read_addr_index): Use dwarf2_per_objfile from cu.
15018         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15019         call dw2_setup.
15020         (read_str_index): Use dwarf2_per_objfile from cu.
15021         (get_debug_line_section): Likewise.
15022         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15023         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15024         (new_symbol_full): Use dwarf2_per_objfile from cu.
15025         (build_error_marker_type): Likewise.
15026         (lookup_die_type): Likewise.
15027         (determine_prefix): Likewise.
15028         (follow_die_offset): Likewise.
15029         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15030         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15031         (dwarf2_fetch_die_type_sect_off): Likewise.
15032         (dwarf2_get_die_type): Likewise.
15033         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15034         (get_signatured_type): Likewise.
15035         (get_DW_AT_signature_type): Likewise.
15036         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15037         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15038         (cu_debug_loc_section): Likewise.
15039         (fill_in_loclist_baton): Likewise.
15040         (dwarf2_symbol_mark_computed): Likewise.
15041         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15042         dwarf2_per_objfile.
15043         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15044         parameter.
15045         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15046         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15047         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15048         (set_die_type): Use dwarf2_free_objfile from cu.
15049         (get_die_type_at_offset): Likewise.
15050         (dwarf2_per_objfile_free): Don't assign global variable.
15051         (debug_names) <constructor>: Add dwarf2_per_objfile
15052         parameter, update m_debugstrlookup construction.
15053         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15054         parameter.
15055         <m_dwarf2_per_objfile>: New field.
15056         <lookup>: Use m_dwarf2_per_objfile.
15057         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15058         (psyms_seen_size): Likewise.
15059         (write_gdbindex): Replace objfile parameter with
15060         dwarf2_per_objfile.
15061         (write_debug_names): Likewise.
15062         (write_psymtabs_to_index): Likewise.
15063         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15064         calls.
15065
15066 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15067
15068         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15069         <dwarf2_per_objfile>: New field.
15070         (struct dwarf2_per_cu_data) <objfile>: Remove.
15071         <dwarf2_per_objfile>: New field.
15072         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15073         of objfile.
15074         (create_signatured_type_table_from_index): Likewise.
15075         (create_debug_type_hash_table): Likewise.
15076         (fill_in_sig_entry_from_dwo_entry): Likewise.
15077         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15078         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15079         objfile.
15080         (create_partial_symtab): Access objfile through
15081         dwarf2_per_objfile.
15082         (process_psymtab_comp_unit_reader): Likewise.
15083         (read_comp_units_from_section): Likewise.
15084         (scan_partial_symbols): Likewise.
15085         (add_partial_symbol): Likewise.
15086         (add_partial_subprogram): Likewise.
15087         (peek_die_abbrev): Likewise.
15088         (fixup_go_packaging): Likewise.
15089         (process_full_comp_unit): Likewise.
15090         (process_full_type_unit): Likewise.
15091         (process_imported_unit_die): Likewise.
15092         (dwarf2_compute_name): Likewise.
15093         (dwarf2_physname): Likewise.
15094         (read_import_statement): Likewise.
15095         (create_cus_hash_table): Assign dwarf2_physname instead of
15096         objfile.
15097         (read_func_scope): Access objfile through dwarf2_per_objfile.
15098         (read_lexical_block_scope): Likewise.
15099         (read_call_site_scope): Likewise.
15100         (read_variable): Likewise.
15101         (dwarf2_rnglists_process): Likewise.
15102         (dwarf2_ranges_process): Likewise.
15103         (dwarf2_ranges_read): Likewise.
15104         (dwarf2_record_block_ranges): Likewise.
15105         (dwarf2_add_field): Likewise.
15106         (dwarf2_add_member_fn): Likewise.
15107         (read_structure_type): Likewise.
15108         (process_structure_scope): Likewise.
15109         (read_enumeration_type): Likewise.
15110         (read_array_type): Likewise.
15111         (read_common_block): Likewise.
15112         (read_namespace_type): Likewise.
15113         (read_namespace): Likewise.
15114         (read_module_type): Likewise.
15115         (read_tag_pointer_type): Likewise.
15116         (read_tag_ptr_to_member_type): Likewise.
15117         (read_tag_string_type): Likewise.
15118         (read_subroutine_type): Likewise.
15119         (read_typedef): Likewise.
15120         (read_base_type): Likewise.
15121         (attr_to_dynamic_prop): Likewise.
15122         (read_subrange_type): Likewise.
15123         (read_unspecified_type): Likewise.
15124         (load_partial_dies): Likewise.
15125         (read_partial_die): Likewise.
15126         (find_partial_die): Likewise.
15127         (guess_partial_die_structure_name): Likewise.
15128         (fixup_partial_die): Likewise.
15129         (read_attribute_value): Likewise.
15130         (read_addr_index_from_leb128): Likewise.
15131         (dwarf2_read_addr_index): Likewise.
15132         (dwarf2_string_attr): Likewise.
15133         (lnp_state_machine::check_line_address): Likewise.
15134         (dwarf_decode_lines_1): Likewise.
15135         (dwarf_decode_lines): Likewise.
15136         (dwarf2_start_symtab): Likewise.
15137         (var_decode_location): Likewise.
15138         (new_symbol_full): Likewise.
15139         (dwarf2_const_value_data): Likewise.
15140         (dwarf2_const_value_attr): Likewise.
15141         (dwarf2_const_value): Likewise.
15142         (die_type): Likewise.
15143         (die_containing_type): Likewise.
15144         (lookup_die_type): Likewise.
15145         (guess_full_die_structure_name): Likewise.
15146         (anonymous_struct_prefix): Likewise.
15147         (dwarf2_name): Likewise.
15148         (follow_die_ref_or_sig): Likewise.
15149         (follow_die_offset): Likewise.
15150         (follow_die_ref): Likewise.
15151         (dwarf2_fetch_die_loc_sect_off): Likewise.
15152         (dwarf2_fetch_constant_bytes): Likewise.
15153         (dwarf2_fetch_die_type_sect_off): Likewise.
15154         (dwarf2_get_die_type): Likewise.
15155         (follow_die_sig): Likewise.
15156         (decode_locdesc): Likewise.
15157         (dwarf2_per_cu_objfile): Likewise.
15158         (dwarf2_per_cu_text_offset): Likewise.
15159         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15160         objfile.
15161         (set_die_type): Access objfile through
15162         dwarf2_per_objfile.
15163
15164 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15165
15166         * valprint.c (converted_character_d): Remove typedef.
15167         (DEF_VEC_O (converted_character_d)): Remove.
15168         (count_next_character): Use std::vector.
15169         (print_converted_chars_to_obstack): Likewise.
15170         (generic_printstr): Likewise.
15171
15172 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15173
15174         * xml-support.h (struct gdb_xml_value): Add constructor.
15175         <value>: Change type to unique_xmalloc_ptr.
15176         (gdb_xml_value_s): Remove typedef.
15177         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15178         (gdb_xml_element_start_handler): Change parameter type to
15179         std::vector.
15180         (xml_find_attribute): Likewise.
15181         * xml-support.c (xml_find_attribute): Change parameter type to
15182         std::vector and adjust.
15183         (gdb_xml_values_cleanup): Remove.
15184         (gdb_xml_parser::start_element): Adjust to std::vector.
15185         (xinclude_start_include): Change paraeter type to std::vector
15186         and adjust.
15187         * btrace.c (check_xml_btrace_version): Likewise.
15188         (parse_xml_btrace_block): Likewise.
15189         (parse_xml_btrace_pt_config_cpu): Likewise.
15190         (parse_xml_btrace_pt): Likewise.
15191         (parse_xml_btrace_conf_bts): Likewise.
15192         (parse_xml_btrace_conf_pt): Likewise.
15193         * memory-map.c (memory_map_start_memory): Likewise.
15194         (memory_map_start_property): Likewise.
15195         * osdata.c (osdata_start_osdata): Likewise.
15196         (osdata_start_item): Likewise.
15197         (osdata_start_column): Likewise.
15198         * remote.c (start_thread): Likewise.
15199         * solib-aix.c (library_list_start_library): Likewise.
15200         (library_list_start_list): Likewise.
15201         * solib-svr4.c (library_list_start_library): Likewise.
15202         (svr4_library_list_start_list): Likewise.
15203         * solib-target.c (library_list_start_segment): Likewise.
15204         (library_list_start_section): Likewise.
15205         (library_list_start_library): Likewise.
15206         (library_list_start_list): Likewise.
15207         * tracepoint.c (traceframe_info_start_memory): Likewise.
15208         (traceframe_info_start_tvar): Likewise.
15209         * xml-syscall.c (syscall_start_syscall): Likewise.
15210         * xml-tdesc.c (tdesc_start_target): Likewise.
15211         (tdesc_start_feature): Likewise.
15212         (tdesc_start_reg): Likewise.
15213         (tdesc_start_union): Likewise.
15214         (tdesc_start_struct): Likewise.
15215         (tdesc_start_flags): Likewise.
15216         (tdesc_start_enum): Likewise.
15217         (tdesc_start_field): Likewise.
15218         (tdesc_start_enum_value): Likewise.
15219         (tdesc_start_vector): Likewise.
15220
15221 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15222
15223         * extension.h (struct xmethod_worker) <clone>: Remove.
15224         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15225         Remove.
15226         (python_xmethod_worker::clone): Remove.
15227         * valops.c (find_overload_match): Use std::move instead of
15228         clone.
15229
15230 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15231
15232         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15233         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15234         <free_xmethod_worker_data>: Remove.
15235         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15236         <get_xmethod_arg_types>: Remove.
15237         <get_xmethod_result_type>: Remove.
15238         <invoke_xmethod>: Remove.
15239         * extension.c (new_xmethod_worker): Remove.
15240         (clone_xmethod_worker): Remove.
15241         (get_matching_xmethod_workers): Return void, pass std::vector by
15242         pointer.
15243         (get_xmethod_arg_types): Rename to...
15244         (xmethod_worker::get_arg_types): ... this, and adjust.
15245         (get_xmethod_result_type): Rename to...
15246         (xmethod_worker::get_result_type): ... this, and adjust.
15247         (invoke_xmethod): Remove.
15248         (free_xmethod_worker): Remove.
15249         (free_xmethod_worker_vec): Remove.
15250         * extension.h (enum ext_lang_rc): Move here from
15251         extension-priv.h.
15252         (struct xmethod_worker): Add constructor and destructor.
15253         <data>: Remove.
15254         <value>: Remove.
15255         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15256         virtual pure methods.
15257         <get_arg_types, get_result_type>: New methods.
15258         (xmethod_worker_ptr): Remove typedef.
15259         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15260         (xmethod_worker_vec): Remove typedef.
15261         (xmethod_worker_up): New typedef.
15262         (invoke_xmethod): Remove.
15263         (clone_xmethod_worker): Remove.
15264         (free_xmethod_worker): Remove.
15265         (free_xmethod_worker_vec): Remove.
15266         (get_xmethod_arg_types): Remove.
15267         (get_xmethod_result_type): Remove.
15268         * valops.c (find_method_list): Use std::vector, don't use
15269         intermediate vector.
15270         (value_find_oload_method_list): Use std::vector.
15271         (find_overload_match): Use std::vector.
15272         (find_oload_champ): Use std::vector.
15273         * value.c (value_free): Use operator delete.
15274         (value_of_xmethod): Rename to...
15275         (value_from_xmethod): ... this.  Don't assign
15276         xmethod_worker::value, take rvalue-reference.
15277         (result_type_of_xmethod): Adjust.
15278         (call_xmethod): Adjust.
15279         * value.h: Include extension.h.
15280         (struct xmethod_worker): Don't forward-declare.
15281         (value_of_xmethod): Rename to...
15282         (value_from_xmethod): ... this, take rvalue-reference.
15283         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15284         (struct python_xmethod_worker): ... this, add constructor and
15285         destructor.
15286         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15287         (gdbpy_free_xmethod_worker_data): Rename to...
15288         (python_xmethod_worker::~python_xmethod_worker): ... this and
15289         adjust.
15290         (gdbpy_clone_xmethod_worker_data): Rename to...
15291         (python_xmethod_worker::clone): ... this and adjust.
15292         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15293         temporary vector.
15294         (gdbpy_get_xmethod_arg_types): Rename to...
15295         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15296         (gdbpy_get_xmethod_result_type): Rename to...
15297         (python_xmethod_worker::do_get_result_type): ... this and
15298         adjust.
15299         (gdbpy_invoke_xmethod): Rename to...
15300         (python_xmethod_worker::invoke): ... this and adjust.
15301         (new_python_xmethod_worker): Rename to...
15302         (python_xmethod_worker::python_xmethod_worker): ... this and
15303         adjust.
15304         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15305         Remove.
15306         (gdbpy_free_xmethod_worker_data): Remove.
15307         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15308         (gdbpy_get_xmethod_arg_types): Remove.
15309         (gdbpy_get_xmethod_result_type): Remove.
15310         (gdbpy_invoke_xmethod): Remove.
15311         * python/python.c (python_extension_ops): Remove obsolete
15312         callbacks.
15313
15314 2018-01-05  Pedro Alves  <palves@redhat.com>
15315
15316         PR gdb/18653
15317         * common/signals-state-save-restore.c
15318         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15319         find a custom handler preinstalled, instead of internal erroring.
15320         But only warn if !quiet.
15321         * common/signals-state-save-restore.h
15322         (save_original_signals_state): New parameter 'quiet'.
15323         * main.c (captured_main_1): Move save_original_signals_state call
15324         after option handling, and pass QUIET.
15325
15326 2018-01-05  Pedro Alves  <palves@redhat.com>
15327
15328         * spu-tdep.c (spu_catch_start): Pass
15329         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15330
15331 2018-01-05  Pedro Alves  <palves@redhat.com>
15332
15333         PR gdb/22670
15334         * ada-lang.c (literal_symbol_name_matcher): New function.
15335         (ada_get_symbol_name_matcher): Use it for
15336         symbol_name_match_type::SEARCH_NAME.
15337         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15338         it down instead of assuming symbol_name_match_type::FULL.
15339         * block.h (block_lookup_symbol): New parameter 'match_type'.
15340         * c-valprint.c (print_unpacked_pointer): Use
15341         lookup_symbol_search_name instead of lookup_symbol.
15342         * compile/compile-object-load.c (get_out_value_type): Pass down
15343         symbol_name_match_type::SEARCH_NAME.
15344         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15345         symbol_name_match_type::FULL.
15346         * cp-support.c (cp_get_symbol_name_matcher): Handle
15347         symbol_name_match_type::SEARCH_NAME.
15348         * infrun.c (insert_exception_resume_breakpoint): Use
15349         lookup_symbol_search_name.
15350         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15351         * psymtab.c (maintenance_check_psymtabs): Use
15352         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15353         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15354         SYMBOL_SEARCH_NAME.
15355         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15356         if symbol_name_match_type::SEARCH_NAME.
15357         (lookup_symbol_in_language): Pass down
15358         symbol_name_match_type::FULL.
15359         (lookup_symbol_search_name): New.
15360         (lookup_language_this): Pass down
15361         symbol_name_match_type::SEARCH_NAME.
15362         (lookup_symbol_aux, lookup_local_symbol): New parameter
15363         'match_type'.  Pass it down.
15364         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15365         (lookup_symbol_search_name): New declaration.
15366         (lookup_symbol_in_block): New 'match_type' parameter.
15367
15368 2018-01-05  Pedro Alves  <palves@redhat.com>
15369
15370         PR gdb/22670
15371         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15372         ada_lookup_symbol.
15373         (ada_lookup_symbol): Reimplement in terms of
15374         ada_lookup_symbol_list, bits factored out from
15375         ada_lookup_encoded_symbol.
15376
15377 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15378
15379         * ada-exp.y (write_object_renaming): When subscripting an array
15380         using a symbol as the index, pass the block in call to
15381         ada_lookup_encoded_symbol when looking that symbol up.
15382
15383 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15384
15385         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15386         TYPE_INDEX_TYPE.
15387
15388 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15389
15390         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15391         the case where VALUE_LVAL (val0) is not lval_memory.
15392
15393 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15394
15395         * ada-valprint.c (print_optional_low_bound): Handle
15396         character-indexed array printing like boolean-indexed array
15397         printing.
15398
15399 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15400
15401         * NEWS: Create a new section for the next release branch.
15402         Rename the section of the current branch, now that it has
15403         been cut.
15404
15405 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15406
15407         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15408         * version.in: Bump version to 8.1.50.DATE-git.
15409
15410 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15411
15412         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15413         Add field.
15414         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15415         Add field.
15416         (default_exception_support_info) <catch_handlers_sym>: Add field.
15417         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15418         (ada_exception_name_addr_1): Add "catch handlers" handling.
15419         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15420         Update all callers.
15421         (create_excep_cond_exprs) <ex>: Add parameter.
15422         (re_set_exception): Update create_excep_cond_exprs call.
15423         (print_it_exception, print_one_exception, print_mention_exception)
15424         (print_recreate_exception): Add "catch handler" handling.
15425         (allocate_location_catch_handlers, re_set_catch_handlers)
15426         (check_status_catch_handlers, print_it_catch_handlers)
15427         (print_one_catch_handlers, print_mention_catch_handlers)
15428         (print_recreate_catch_handlers): New function.
15429         (catch_handlers_breakpoint_ops): New variable.
15430         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15431         Add parameter.  Add "catch handler" handling.
15432         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15433         Add "catch handler" handling.
15434         (ada_exception_catchpoint_cond_string): Add "catch handler"
15435         handling.
15436         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15437         call.
15438         (catch_ada_handlers_command): New function.
15439         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15440         operations structure.
15441         (_initialize_ada_language): Add "catch handlers" command entry.
15442         * NEWS: Document "catch handlers" feature.
15443
15444 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15445
15446         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15447         account when creating the array type of the slice.
15448         (ada_value_slice): Likewise.
15449
15450 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15451
15452         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15453         New enum value.
15454         (create_array_type_with_stride): Add byte_stride_prop parameter.
15455         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15456         New parameter.  Update all callers in this file.
15457         (array_type_has_dynamic_stride): New function.
15458         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15459         of arrays with dynamic byte strides.
15460         * dwarf2read.c (read_array_type): Add support for dynamic
15461         DW_AT_byte_stride attributes.
15462
15463 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15464
15465         * dwarf2read.c (read_unspecified_type): Treat
15466         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15467
15468 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15469
15470         Update copyright year range in all GDB files.
15471
15472 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15473
15474         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15475         and gdb/testsuite/gdb.base/step-line.c.
15476
15477 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15478
15479         * copyright.py (main): Dump the contents of
15480         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15481         even if BY_HAND is empty.
15482
15483 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15484
15485         * top.c (print_gdb_version): Update Copyright year in version
15486         message.
15487
15488 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15489
15490         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15491
15492 For older changes see ChangeLog-2017.
15493 \f
15494 Local Variables:
15495 mode: change-log
15496 left-margin: 8
15497 fill-column: 74
15498 version-control: never
15499 coding: utf-8
15500 End: