(Ada) fix "error in expression" when using watch -location command
[external/binutils.git] / gdb / ChangeLog
1 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
2
3         * ada-lang.c (ada_watch_location_expression): New function.
4         (ada_language_defn): Set la_watch_location_expression to
5         ada_watch_location_expression.
6
7 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
8
9         * print-utils.c (int_string): Remove unnecessary trailing spaces.
10
11 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
12
13         * rs6000-tdep.c (skip_prologue): Fix potential negative left
14         shifting.
15
16 2018-11-01  Jerome Guitton  <guitton@adacore.com>
17             Joel Brobecker  <brobecker@adacore.com>
18
19         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
20         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
21         * arm-pikeos-tdep.c: New file.
22         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
23         embedded system.
24         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
25
26 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
27
28         * common/pathstuff.c (get_standard_temp_dir): New.
29         * common/pathstuff.h (get_standard_temp_dir): New.
30         * config.in: Re-generate.
31         * configure: Re-generate.
32         * configure.ac: Don't check for mkdtemp.
33         * gnulib/aclocal-m4-deps.mk: Re-generate.
34         * gnulib/aclocal.m4: Re-generate.
35         * gnulib/config.in: Re-generate.
36         * gnulib/configure: Re-generate.
37         * gnulib/import/Makefile.am: Re-generate.
38         * gnulib/import/Makefile.in: Re-generate.
39         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
40         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
41         * gnulib/import/m4/mkdtemp.m4: New file.
42         * gnulib/import/mkdtemp.c: New file.
43         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
44         Add mkdtemp module.
45         * unittests/mkdir-recursive-selftests.c (test): Use
46         get_standard_temp_dir.
47         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
48         ifdef.
49         * compile/compile.c (get_compile_file_tempdir): Likewise.
50
51 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
52
53         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
54         (SIG_FRAME_LR_OFFSET64): New define.
55         (SIG_FRAME_FP_OFFSET64): New define.
56         (aix_sighandle_frame_cache): New Function.
57         (aix_sighandle_frame_this_id): New Function.
58         (aix_sighandle_frame_prev_register): New Function.
59         (aix_sighandle_frame_sniffer): New Function.
60         (aix_sighandle_frame_unwind): New global variable.
61         (rs6000_aix_init_osabi): Install new frame unwinder.
62
63 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
64
65         PR gdb/23835
66         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
67         already defined.
68
69 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
70
71         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
72
73 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
74
75         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
76         (producer_is_icc): New function.
77         (check_producer): Set producer_is_icc field on dwarf2_cu.
78         (dwarf2_init_integer_type): New function.
79         (read_base_type): Call dwarf2_init_integer_type instead of
80         init_integer_type in all cases.
81         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
82         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
83         LEN is greater than 0.
84
85 2018-10-30  Tom Tromey  <tom@tromey.com>
86
87         * main.c (captured_main_1): Check return value of bfd_init.
88
89 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
90
91         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
92         Adjust comments.
93
94 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
95
96         * procfs.c: Include common/pathstuff.h.
97
98 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
99
100         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
101         Add missing braces.  No functional change.
102
103 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
104
105         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
106         to report a bad option and fix indentation.
107         * demangle.c (demangle_command): Use report_unrecognized_option_error
108         to report a bad option and correctly report the bad option.
109
110 2018-10-27  Tom Tromey  <tom@tromey.com>
111
112         PR cli/23364:
113         * darwin-nat.c (copied_shell): New global.
114         (may_have_sip): Rename from should_disable_startup_with_shell.
115         (copy_shell_to_cache, maybe_cache_shell): New functions.
116         (darwin_nat_target::create_inferior): Update.  Use
117         copied_shell.
118
119 2018-10-27  Tom Tromey  <tom@tromey.com>
120
121         * unittests/scoped_fd-selftests.c (test_to_file): New function.
122         (run_tests): Call test_to_file.
123         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
124         temporary files.
125         * common/scoped_fd.h (scoped_fd::to_file): New method.
126
127 2018-10-27  Tom Tromey  <tom@tromey.com>
128
129         * unittests/scoped_mmap-selftests.c (test_normal): Use
130         gdb_mkostemp_cloexec.
131         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
132         Use gdb_mkostemp_cloexec.
133         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
134         gnulib/config.in, gnulib/configure,
135         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
136         gnulib/import/m4/gnulib-cache.m4,
137         gnulib/import/m4/gnulib-comp.m4: Update.
138         * gnulib/import/m4/mkostemp.m4: New file.
139         * gnulib/import/m4/mkstemp.m4: Remove.
140         * gnulib/import/mkostemp.c: New file.
141         * gnulib/import/mkstemp.m4: Remove.
142         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
143         mkstemp, add mkostemp.  Apply new patch.
144         * gnulib/import/stdlib.in.h: Apply patch.
145         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
146         New file.
147         * dwarf-index-write.c (write_psymtabs_to_index): Use
148         gdb_mkostemp_cloexec.
149         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
150
151 2018-10-27  Tom Tromey  <tom@tromey.com>
152
153         * unittests/mkdir-recursive-selftests.c: New file.
154         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
155         unittests/mkdir-recursive-selftests.c.
156         * dwarf-index-cache.c (mkdir_recursive): Move to
157         common/filestuff.c.
158         (index_cache::store): Check return value of mkdir_recursive.
159         (create_dir_and_check, test_mkdir_recursive): Move to new file.
160         (_initialize_index_cache): Don't register test.
161         * common/filestuff.h (mkdir_recursive): Declare.
162         * common/filestuff.c (mkdir_recursive): Move from
163         dwarf-index-cache.c.  Return bool.
164
165 2018-10-27  Tom Tromey  <tom@tromey.com>
166
167         * dwarf-index-write.c (write_psymtabs_to_index): Move
168         make_temp_filename to common/pathstuff.c.
169         * common/pathstuff.h (make_temp_filename): Declare.
170         * common/pathstuff.c (make_temp_filename): New function, moved
171         from dwarf-index-write.c.
172
173 2018-10-27  Tom Tromey  <tom@tromey.com>
174
175         * procfs.c (procfs_target::create_inferior): Use get_shell.
176         * cli/cli-cmds.c (shell_escape): Use get_shell.
177         * windows-nat.c (windows_nat_target::create_inferior): Use
178         get_shell.
179         * common/pathstuff.c (get_shell): New function.
180         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
181         (fork_inferior): Use get_shell.
182         * common/pathstuff.h (get_shell): Declare.
183
184 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
185
186         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
187
188 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
189
190         * stack.c (print_variable_and_value_data): Add preg and treg.
191         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
192         and update callers.
193         (print_frame_arg_vars): Likewise.
194         (prepare_reg): New function.
195         (info_locals_command): Extract info print args and use them.
196         (info_args_command): Likewise.
197         (_initialize_stack): Modify on-line help.
198         * symtab.c (treg_matches_sym_type_name): New function.
199         (search_symbols): New arg t_regexp.
200         (symtab_symbol_info): New args quiet, regexp, t_regexp.
201         (info_variables_command): Extract info print args and use them.
202         (info_functions_command): Likewise.
203         (info_types_command): Update call to symtab_symbol_info.
204         (_initialize_symtab): Modify on-line help.
205         * symtab.h (treg_matches_sym_type_name): New function.
206         (search_symbols): New t_regexp arg.
207
208 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
209
210         * cli-utils.c (extract_arg_maybe_quoted): New function.
211         (extract_info_print_args): New function.
212         (info_print_args_help): New function.
213         (report_unrecognized_option_error): New function.
214         * cli-utils.h (extract_arg_maybe_quoted): New function.
215         (extract_info_print_args): New function.
216         (info_print_args_help): New function.
217         (report_unrecognized_option_error): New function.
218
219 2018-10-26  Tom Tromey  <tom@tromey.com>
220
221         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
222         (compute_compunit_symtab_includes): Update.
223         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
224         (compunit_symtab_ptr): Likewise.
225
226 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
227
228         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
229         default_print_auxv_entry for specific tag values.
230
231 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
232
233         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
234
235 2018-10-26  Jim Wilson  <jimw@sifive.com>
236
237         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
238         (riscv_linux_sigframe_init): Declare.
239         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
240         (riscv_linux_sigframe): New.
241         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
242         (riscv_linux_sigframe_init): Define.
243         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
244
245         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
246         (riscv_isa_flen): Likewise.  Drop static.
247         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
248         (riscv_isa_flen): Likewise.  Declare.
249
250 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
251             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
252
253         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
254         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
255         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
256         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
257         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
258         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
259         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
260         Define.
261         (struct ppc_linux_features) <htm>: New field.
262         (ppc_linux_no_features): Add initializer for htm field.
263         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
264         new tdescs.
265         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
266         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
267         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
268         Define if not already defined.
269         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
270         and rs6000/powerpc-isa207-htm-vsx64l.
271         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
272         rs6000/powerpc-isa207-htm-vsx64l.xml.
273         * features/rs6000/power-htm-spr.xml: New file.
274         * features/rs6000/power-htm-core.xml: New file.
275         * features/rs6000/power64-htm-core.xml: New file.
276         * features/rs6000/power-htm-fpu.xml: New file.
277         * features/rs6000/power-htm-altivec.xml: New file.
278         * features/rs6000/power-htm-vsx.xml: New file.
279         * features/rs6000/power-htm-ppr.xml: New file.
280         * features/rs6000/power-htm-dscr.xml: New file.
281         * features/rs6000/power-htm-tar.xml: New file.
282         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
283         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
284         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
285         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
286         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
287         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
288         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
289         fetch_regset with HTM regsets.
290         (store_register, store_ppc_registers): Call store_regset with HTM
291         regsets.
292         (ppc_linux_nat_target::read_description): Set htm field in the
293         features struct if needed.
294         * ppc-linux-tdep.c: Include
295         features/rs6000/powerpc-isa207-htm-vsx32l.c and
296         features/rs6000/powerpc-isa207-htm-vsx64l.c.
297         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
298         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
299         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
300         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
301         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
302         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
303         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
304         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
305         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
306         (ppc32_linux_ctarregset): New globals.
307         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
308         (ppc_linux_collect_core_cpgrregset): New function.
309         (ppc_linux_iterate_over_regset_sections): Call back with the htm
310         regsets.
311         (ppc_linux_core_read_description): Check if the tm spr section is
312         present and set htm in the features struct.
313         (_initialize_ppc_linux_tdep): Call
314         initialize_tdesc_powerpc_isa207_htm_vsx32l and
315         initialize_tdesc_powerpc_isa207_htm_vsx64l.
316         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
317         Declare.
318         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
319         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
320         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
321         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
322         New fields.
323         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
324         Likewise.
325         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
326         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
327         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
328         New enum fields.
329         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
330         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
331         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
332         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
333         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
334         <PPC_CTAR_REGNUM>: Likewise.
335         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
336         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
337         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
338         (IS_CEFP_PSEUDOREG): Define.
339         (rs6000_register_name): Hide the upper halves of checkpointed VSX
340         registers.  Return names for the checkpointed DFP, VSX, and EFP
341         pseudo registers.
342         (rs6000_pseudo_register_type): Remove initial assert and raise an
343         internal error in the else clause instead.  Return types for the
344         checkpointed DFP, VSX, and EFP pseudo registers.
345         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
346         checkpointed DFP pseudo registers.
347         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
348         checkpointed VSX pseudo registers.
349         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
350         from efpr_pseudo_register_read and
351         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
352         registers.
353         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
354         Handle checkpointed DFP, VSX, and EFP registers.
355         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
356         (efp_ax_pseudo_register_collect): New functions.
357         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
358         register logic to new functions.  Handle checkpointed DFP, VSX,
359         and EFP pseudo registers.
360         (rs6000_gdbarch_init): Look for and validate the htm features.
361         Include checkpointed DFP, VSX and EFP pseudo-registers.
362         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
363         HTM registers.
364
365 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
366
367         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
368         without altivec or fpu.
369
370 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
371             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
372
373         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
374         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
375         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
376         Define if not already defined.
377         * features/rs6000/power-ebb.xml: New file.
378         * features/rs6000/power-linux-pmu.xml: New file.
379         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
380         features.
381         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
382         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
383         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
384         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
385         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
386         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
387         fetch_regset with ebb and pmu regsets.
388         (store_register, store_ppc_registers): Call store_regset with ebb
389         and pmu regsets.
390         (ppc_linux_nat_target::read_description): Set isa207 field in the
391         features struct if ebb and pmu are avaiable.
392         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
393         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
394         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
395         and pmu regsets.
396         (ppc_linux_core_read_description): Check if the pmu section is
397         present and set isa207 in the features struct.
398         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
399         (ppc32_linux_pmuregset): Declare.
400         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
401         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
402         <ppc_sier_regnum>: New field.
403         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
404         New enum values.
405         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
406         values.
407         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
408         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
409         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
410         ebb and pmu features.
411
412 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
413             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
414
415         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
416         (tdesc_powerpc_isa207_vsx64l): Declare.
417         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
418         (struct ppc_linux_features) <isa207>: New field.
419         (ppc_linux_no_features): Add initializer for isa207 field.
420         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
421         new tdescs.
422         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
423         (NT_PPC_TAR): Define if not already defined.
424         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
425         rs6000/powerpc-isa207-vsx64l.
426         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
427         rs6000/powerpc-isa207-vsx64l.xml.
428         * features/rs6000/power-tar.xml: New file.
429         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
430         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
431         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
432         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
433         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
434         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
435         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
436         fetch_regset with the TAR regset.
437         (store_register, store_ppc_registers): Call store_regset with the
438         TAR regset.
439         (ppc_linux_nat_target::read_description): Set isa207 field in the
440         features struct if needed.
441         * ppc-linux-tdep.c: Include
442         features/rs6000/powerpc-isa207-vsx32l.c and
443         features/rs6000/powerpc-isa207-vsx64l.c.
444         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
445         (ppc_linux_iterate_over_regset_sections): Call back with the tar
446         regset.
447         (ppc_linux_core_read_description): Check if the tar section is
448         present and set isa207 in the features struct.
449         (_initialize_ppc_linux_tdep): Call
450         initialize_tdesc_powerpc_isa207_vsx32l and
451         initialize_tdesc_powerpc_isa207_vsx64l.
452         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
453         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
454         (enum) <PPC_TAR_REGNUM>: New enum value.
455         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
456         feature.
457         (ppc_process_record_op31): Record changes to TAR.
458
459 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
460             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
461
462         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
463         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
464         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
465         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
466         (struct ppc_linux_features) <ppr_dscr>: New field.
467         (ppc_linux_no_features): Add initializer for ppr_dscr field.
468         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
469         new tdescs.
470         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
471         Define if not already defined.
472         * features/Makefile (WHICH): Add
473         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
474         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
475         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
476         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
477         * features/rs6000/power-dscr.xml: New file.
478         * features/rs6000/power-ppr.xml: New file.
479         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
480         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
481         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
482         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
483         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
484         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
485         * ppc-linux-nat.c: Include <sys/uio.h>.
486         (fetch_regset, store_regset, check_regset): New functions.
487         (fetch_register, fetch_ppc_registers): Call fetch_regset with
488         DSCR and PPR regsets.
489         (store_register, store_ppc_registers): Call store_regset with
490         DSCR and PPR regsets.
491         (ppc_linux_get_hwcap2): New function.
492         (ppc_linux_nat_target::read_description): Call
493         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
494         features struct if needed.
495         * ppc-linux-tdep.c: Include
496         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
497         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
498         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
499         (ppc32_linux_dscrregset): New globals.
500         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
501         and dscr regsets.
502         (ppc_linux_core_read_description): Check if the ppr and dscr
503         sections are present and set ppr_dscr in the features struct.
504         (_initialize_ppc_linux_tdep): Call
505         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
506         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
507         * ppc-linux-tdep.h (ppc32_linux_pprregset)
508         (ppc32_linux_dscrregset): Declare.
509         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
510         <ppc_dscr_regnum>: New field.
511         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
512         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
513         and dscr features.
514         (ppc_process_record_op31): Record changes to PPR and DSCR.
515
516 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
517
518         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
519         second initializer line for the have_* variables.  Initialize
520         have_fpu to 0 instead of 1.
521
522 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
523
524         * arch/ppc-linux-common.c (ppc_linux_match_description):
525         Parenthesize tdesc assignements and indent them properly.
526
527 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
528
529         * ppc-linux-nat.c (fetch_register): Change if statement to else
530         if.
531         (store_register): Likewise.
532
533 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
534
535         * rs6000-tdep.c: Remove reggroups.h include.
536         (rs6000_pseudo_register_reggroup_p): Remove.
537         (rs6000_gdbarch_init): Remove call to
538         set_tdesc_pseudo_register_reggroup_p.
539
540 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
541
542         * reggroups.c (default_register_reggroup_p): Return true for
543         decfloat registers and float_reggroup.
544
545 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
546
547         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
548         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
549         ppc_linux_collect_vrregset by regcache_collect_regset.
550
551 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
552
553         * linux-tdep.c (linux_collect_regset_section_cb): Use
554         std::vector<gdb_byte> instead of char * and malloc for buf.
555         Remove xfree.
556
557 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
558
559         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
560         symtab_start instead of always using language_unknown.
561
562 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
563
564         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
565         READ_P parameter, catch and ignore register access errors from
566         either the old or new MISA location.
567         (riscv_has_feature): Update call to riscv_read_misa_reg.
568
569 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
570
571         * python/py-function.c (convert_values_to_python): Return
572         gdbpy_ref<>.  Add header comment.
573         (fnpy_call): Adjust.
574
575 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
576
577         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
578         (cmdpy_completer_handle_brkchars): Adjust.
579         (cmdpy_completer): Adjust.
580
581 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
582
583         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
584         Pass correct regnum to raw_supply_zeroed.
585
586 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
587
588         * regcache.c (cooked_read_test): Add CSKY to the list of
589         architectures with a save_reggroup
590
591 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
592
593         PR gdb/23368
594         * infrun.c (follow_exec): In the follow_exec_mode_new case,
595         transfer terminal state from old new new inferior.
596         * terminal.h (swap_terminal_info): New function.
597         * inflow.c (swap_terminal_info): New function.
598
599 2018-10-23  Tom Tromey  <tom@tromey.com>
600
601         * record-btrace.c (get_thread_current_frame_id): Rename from
602         get_thread_current_frame.  Return a frame_id.
603         (record_btrace_start_replaying): Update.
604
605 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
606
607         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
608         for CSRs.
609
610 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
611
612         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
613         have_nonsteppable_watchpoint attribute to 1.
614
615 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
616
617         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
618         register names.
619         (struct register_alias): Rename to...
620         (struct riscv_register_alias): ...this, and update comment.
621         (riscv_register_aliases): Update type, and alias names.  Remove
622         CSR names from this list.
623         (riscv_register_name): Use riscv_gdb_reg_names for int and float
624         register names.  Add an extra assertion.
625         (riscv_is_regnum_a_named_csr): New function.
626         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
627
628 2018-10-22  Jim Wilson  <jimw@sifive.com>
629
630         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
631         FP reg smaller than FP reg size, and fill with -1 instead of 0.
632
633         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
634         (riscv_register_type): Use them.
635         (riscv_print_one_register_info): Handle union of floats same as float.
636         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
637         riscv_fpreg_q_type fields.
638
639 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
640
641         * gdbarch.sh (gdbarch_num_cooked_regs): New.
642         * gdbarch.h: Re-generate.
643         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
644         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
645         * eval.c (evaluate_subexp_standard): Likewise.
646         * findvar.c (value_of_register): Likewise.
647         (value_of_register_lazy): Likewise.
648         (address_from_register): Likewise.
649         * frame.c (get_frame_register_bytes): Likewise.
650         * gdbarch-selftests.c (register_to_value_test): Likewise.
651         * h8300-tdep.c (h8300_register_type): Likewise.
652         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
653         (i386_svr4_reg_to_regnum): Likewise.
654         * infcmd.c (default_print_registers_info): Likewise.
655         (registers_info): Likewise.
656         (print_vector_info): Likewise.
657         (default_print_float_info): Likewise.
658         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
659         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
660         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
661         (mi_cmd_data_list_changed_registers): Likewise.
662         (mi_cmd_data_list_register_values): Likewise.
663         (mi_cmd_data_write_register_values): Likewise.
664         (mi_cmd_trace_frame_collected): Likewise.
665         * mips-tdep.c (print_gp_register_row): Likewise.
666         (mips_print_registers_info): Likewise.
667         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
668         * regcache.c (init_regcache_descr): Likewise.
669         (register_size): Likewise.
670         (register_dump::dump): Likewise.
671         (cooked_read_test): Likewise.
672         (cooked_write_test): Likewise.
673         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
674         (rs6000_gdbarch_init): Likewise.
675         * stabsread.c (stab_reg_to_regnum): Likewise.
676         * stack.c (info_frame_command): Likewise.
677         * target-descriptions.c (tdesc_register_name): Likewise.
678         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
679         * tui/tui-regs.c (tui_show_register_group): Likewise.
680         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
681         (user_reg_map_regnum_to_name): Likewise.
682         (value_of_user_reg): Likewise.
683         (maintenance_print_user_registers): Likewise.
684         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
685         (xtensa_register_name): Likewise.
686         (xtensa_register_type): Likewise.
687         (xtensa_reg_to_regnum): Likewise.
688         (xtensa_pseudo_register_read): Likewise.
689         (xtensa_pseudo_register_write): Likewise.
690
691 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
692
693         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
694         correctly-sized buffer with raw_read.
695         (amd64_pseudo_register_write): Use correctly-sized buffer for
696         raw_read/raw_write.
697
698 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
699
700         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
701         in add_prefix_cmd of set print type.
702
703 2018-10-19  Tom Tromey  <tom@tromey.com>
704
705         PR tui/18388:
706         * NEWS: Mention tabset deprecation.
707         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
708         (update_tab_width): New function.
709         (tui_set_tab_width, tui_show_tab_width): New functions.
710         (tui_set_tab_width_command): Use update_tab_width.
711         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
712         Add new "set tui tab-width" command.
713         * tui/tui-source.c (tui_set_source_content): Update.
714         * tui/tui-disasm.c (tui_set_disassem_content): Update.
715         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
716         Don't declare.
717         (tui_tab_width): Declare.
718         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
719         (tui_set_default_tab_len): Remove.
720
721 2018-10-19  Tom Tromey  <tom@tromey.com>
722
723         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
724         (key_is_backspace, tui_getc): Don't declare.
725         * tui/tui-io.c (key_is_start_sequence): Now static.
726         (key_is_end_sequence, key_is_backspace): Remove.
727         (tui_getc): Now static.
728
729 2018-10-19  Tom Tromey  <tom@tromey.com>
730
731         * symfile.c (reread_symbols): Clear "static_links".
732
733 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
734
735         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
736         define.
737         (aarch64_linux_sigframe_init): Extra boundary checks.
738
739 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
740
741         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
742         the possibly non-existent tdesc type 'vec128', but the type of raw
743         register v16 instead.
744
745 2018-10-19  Gary Benson <gbenson@redhat.com>
746
747         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
748
749 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
750
751         PR cli/23785
752         * cli/cli-dump.c (restore_binary_file): Check if "file" is
753         NULL.
754
755 2018-10-17  Paul Koning  <paul_koning@dell.com>
756
757         * charset.c (convert_between_encodings): Fix unsigned overflow.
758
759 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
760
761         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
762         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
763         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
764         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
765         New functions.
766         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
767         and fbsd_info_proc_mappings_header.
768         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
769         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
770         New.
771
772 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
773
774         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
775         Solaris Maintainer.
776
777 2018-10-15  Tom Tromey  <tom@tromey.com>
778
779         * tui/tui.c (strcat_to_buf): Remove casts.
780         * tui/tui-winsource.c (tui_show_source_line)
781         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
782         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
783         * tui/tui-windata.c (tui_first_data_item_displayed)
784         (tui_delete_data_content_windows, tui_erase_data_content)
785         (tui_display_all_data, tui_display_data_from)
786         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
787         * tui/tui-win.c (tui_set_win_height)
788         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
789         casts.
790         * tui/tui-win.c (tui_resize_all): Remove casts.
791         (tui_scroll_backward_command, tui_set_focus)
792         (tui_set_tab_width_command): Likewise.
793         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
794         * tui/tui-regs.c (tui_show_register_group): Remove cast.
795         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
796         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
797         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
798         Remove casts.
799
800 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
801
802         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
803         AArch64/ARM maintainer.
804
805 2018-10-11  Gary Benson <gbenson@redhat.com>
806
807         * interps.h (interp::m_name): Make private and mutable.
808         * interps.c (interp::~interp): Free m_name.
809
810 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
811             Simon Marchi <simark@simark.ca>
812
813         * README (`configure' options): Add documentation for new
814         "--enable-unit-tests" option.
815         * acinclude.m4: Include "selftest.m4".
816         * configure: Regenerate.
817         * configure.ac: Use "GDB_AC_SELFTEST".
818         * maint.c (maintenance_selftest): Update message informing
819         that selftests have been disabled.
820         (maintenance_info_selftests): Likewise.
821         * selftest.m4: New file.
822
823 2018-10-10  Gary Benson <gbenson@redhat.com>
824
825         * remote.c (remote_target::remote_send_printf): Add
826         missing va_end found by Coverity.
827
828 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
829
830         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
831
832 2018-10-09  Tom Tromey  <tom@tromey.com>
833
834         * configure: Rebuild.
835         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
836         * NEWS: Update --enable-ubsan documentation.
837
838 2018-10-09  Gary Benson <gbenson@redhat.com>
839
840         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
841         found by Coverity.
842
843 2018-10-08  Tom Tromey  <tom@tromey.com>
844
845         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
846         variable.
847         (riscv_fbsd_init_abi): Likewise.
848
849 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
850         * valops.c (value_struct_elt_for_reference): Rename local variable
851         to work around the shadowing a previous local warning.
852
853 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
854
855         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
856         * NEWS: Mention new FreeBSD/riscv native configuration.
857         * configure.host: Add riscv*-*-freebsd*.
858         * configure.nat: Likewise.
859         * riscv-fbsd-nat.c: New file.
860
861 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
862
863         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
864         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
865         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
866         * NEWS: Mention new FreeBSD/riscv target.
867         * configure.tgt: Add riscv*-*-freebsd*.
868         * riscv-fbsd-tdep.c: New file.
869         * riscv-fbsd-tdep.h: New file.
870
871 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
872
873         * regcache.h (struct regcache_map_entry): Note that this type can
874         be used with traditional frame caches.
875         * trad-frame.c (trad_frame_set_reg_regmap): New.
876         * trad-frame.h (trad_frame_set_reg_regmap): New.
877
878 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
879
880         PR c++/16841
881         * valops.c (get_virtual_base_offset): New function.
882         (value_struct_elt_for_reference): Use it to get virtual base offset
883         and add it in calculating class member address.
884
885 2018-10-08   John Darrington <john@darrington.wattle.id.au>
886
887     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
888       (check_producer): Check if the producer is codewarrior.
889       (producer_is_codewarrior): New function.
890       (lnp_state_machine::record_line): Ignore is_stmt flag for records
891        produced by codewarrior.
892       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
893
894 2018-10-06  Tom Tromey  <tom@tromey.com>
895
896         PR python/19399:
897         * python/py-inferior.c: Add "architecture" entry.
898         (infpy_architecture): New function.
899
900 2018-10-06  Tom Tromey  <tom@tromey.com>
901
902         PR python/21765:
903         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
904         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
905         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
906         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
907
908 2018-10-06  Tom Tromey  <tom@tromey.com>
909
910         PR build/17077:
911         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
912         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
913         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
914         #include.
915
916 2018-10-06  Tom Tromey  <tom@tromey.com>
917
918         * python/py-breakpoint.c (bppy_get_location): Handle a
919         bp_breakpoint without a location.
920
921 2018-10-06  Tom Tromey  <tom@tromey.com>
922
923         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
924         (_RegEx): Reformat help text.
925         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
926         (AnyCallerIs, AnyCallerMatches): Reformat help text.
927         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
928         text.
929         * python/lib/gdb/command/xmethods.py (InfoXMethod)
930         (EnableXMethod, DisableXMethod): Remove help indentation.
931         Capitalize meta-syntactic variables.
932         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
933         (EnableUnwinder, DisableUnwinder): Remove help indentation.
934         Capitalize meta-syntactic variables.
935         * python/lib/gdb/command/explore.py (ExploreCommand)
936         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
937         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
938         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
939         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
940         Remove help indentation.
941         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
942         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
943         (DisableFrameFilter, SetFrameFilterPriority)
944         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
945
946 2018-10-06  Tom Tromey  <tom@tromey.com>
947
948         PR tui/28819:
949         * tui/tui-io.c (gdb_wgetch): New function.
950         (tui_mld_getc, tui_getc): Use it.
951
952 2018-10-05  Tom Tromey  <tom@tromey.com>
953
954         * sol-thread.c (sol_thread_target::wait): Rename inner
955         "save_ptid".
956
957 2018-10-04  Tom Tromey  <tom@tromey.com>
958
959         * configure: Rebuild.
960         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
961
962 2018-10-04  Tom Tromey  <tom@tromey.com>
963
964         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
965         declaration of "block".
966
967 2018-10-04  Tom Tromey  <tom@tromey.com>
968
969         * common/filestuff.c (fdwalk): Remove inner declaration of
970         "result".
971
972 2018-10-04  Tom Tromey  <tom@tromey.com>
973
974         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
975         "structs_addr" and hoist declaration.
976
977 2018-10-04  Tom Tromey  <tom@tromey.com>
978
979         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
980         variable "size".
981
982 2018-10-04  Tom Tromey  <tom@tromey.com>
983
984         * mdebugread.c (parse_partial_symbols): Use std::string.
985
986 2018-10-04  Tom Tromey  <tom@tromey.com>
987
988         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
989         * p-valprint.c (pascal_val_print): Split inner "i" variable.
990         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
991         header.
992         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
993         more inner scope.
994         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
995         * varobj.c (varobj_update): Rename inner "newobj",
996         "type_changed".
997         * valprint.c (generic_emit_char): Rename inner "buf".
998         * valops.c (find_overload_match): Rename inner "temp".
999         (value_struct_elt_for_reference): Declare "v" in more inner
1000         scope.
1001         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1002         * unittests/array-view-selftests.c (run_tests): Rename inner
1003         "vec".
1004         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1005         header.
1006         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1007         "tsv" in more inner scope.
1008         (print_one_static_tracepoint_marker): Rename inner
1009         "tuple_emitter".
1010         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1011         (tic6x_push_dummy_call): Don't redeclare "addr".
1012         * target-float.c: Declare "dto" lower.
1013         * symtab.c (lookup_local_symbol): Rename inner "sym".
1014         (find_pc_sect_line): Rename inner "pc".
1015         * stack.c (print_frame): Don't redeclare "gdbarch".
1016         (return_command): Rename inner "gdbarch".
1017         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1018         "sp".
1019         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1020         header.
1021         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1022         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1023         scope.
1024         * remote.c (remote_target::update_thread_list): Don't redeclare
1025         "tp".
1026         (remote_target::process_initial_stop_replies): Rename inner
1027         "thread".
1028         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1029         (remote_target::wait_as): Don't redeclare "stop_reply".
1030         (remote_target::get_thread_local_address): Rename inner
1031         "result".
1032         (remote_target::get_tib_address): Likewise.
1033
1034         * regcache.c (cooked_read_test): Rename "regnum".
1035         * record-btrace.c (cmd_record_btrace_start): Rename inner
1036         "exception".
1037         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1038         loop header.
1039         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1040         header.
1041         (ppu2spu_sniffer): Rename inner "buf".
1042         * parse.c (operator_check_standard): Rename inner "type",
1043         "objfile".
1044         * p-valprint.c (pascal_val_print): Introduce new scope for
1045         "low_bound", "high_bound".
1046         * p-exp.y (yylex): Declare "i" in loop header.
1047         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1048         Lower declaration of "s".
1049         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1050         header.
1051         (nios2_push_dummy_call): Rename "len".
1052         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1053         "buf".
1054         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1055         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1056         (linux_xfer_osdata_modules): Likewise.
1057         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1058         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1059         (mips_o64_push_dummy_call): Likewise.
1060         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1061         "op".
1062         * mi/mi-main.c (list_available_thread_groups): Rename inner
1063         "tuple_emitter".
1064         (mi_cmd_data_read_memory): Rename inner "opts".
1065         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1066         "tuple_emitter".
1067         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1068         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1069         more inner scope.
1070         (parse_partial_symbols): Rename inner "pst", "p", "name"
1071         * main.c (captured_main_1): Rename inner "i"s.
1072         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1073         "oso2".
1074         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1075         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1076         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1077         (handle_signal_stop): Rename inner "gdbarch".
1078         (handle_command): Declare "signum" in loop header.
1079         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1080         "status".
1081         (examine_prologue): Rename inner "sol" and "sof".
1082         (ia64_extract_return_value): Rename inner "val".  Declare another
1083         "val" in a more inner scope.
1084         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1085         inner scope.
1086         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1087         "except".
1088         * findvar.c (default_read_var_value): Don't redeclare "addr".
1089         * f-exp.y (yylex): Declare "i" in loop header.
1090         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1091         Rename inner "type", "expect_type".
1092         (evaluate_subexp_for_sizeof): Rename inner "pc".
1093         * elfread.c (elf_symfile_read): Rename inner "abfd".
1094         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1095         "bytes_read".
1096         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1097         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1098         (dwarf_decode_line_header): Rename inner "lh".
1099         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1100         "offset".  Declare "i" in loop header.
1101         (disassemble_dwarf_expression): Rename inner "addr_size".
1102         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1103         inner "result".
1104         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1105         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1106         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1107         "inner_list_emitter".
1108         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1109         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1110         declaration in a block.
1111         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1112         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1113         "obstack_final_size".
1114         * cp-support.c (inspect_type): Declare "i" in loop header.
1115         * compile/compile.c (compile_instance::insert_symbol_error):
1116         Rename inner "e".
1117         * common/agent.c (agent_run_command): Remove inner "ret"
1118         declaration.
1119         * coffread.c (coff_symfile_read): Rename inner "name".
1120         (coff_symfile_read): Rename inner "abfd".
1121         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1122         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1123         "high".
1124         * c-exp.y (lex_one_token): Move "len" declaration lower.
1125         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1126         "gdbarch".
1127         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1128         "b".
1129         (watch_command_1): Declare "mark" later.
1130         (clear_command): Don't shadow "a" or "b".
1131         (delete_command): Rename inner "b".
1132         (delete_trace_command): Likewise.
1133         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1134         "op".
1135         (arm_gdbarch_init): Remove inner "e_flags".
1136         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1137         "offset" in inner blocks.
1138
1139 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1140
1141         * dwarf-index-write.c (file_write): Don't write if the vector is
1142         empty.
1143
1144 2018-10-05  Tom de Vries  <tdevries@suse.de>
1145
1146         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1147         PyArg_ParseTuple call.
1148
1149 2018-10-05  Tom de Vries  <tdevries@suse.de>
1150
1151         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1152         PyArg_ParseTuple call.
1153
1154 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1155
1156         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1157         to avoid exceeding 80 characters per line limit.
1158
1159 2018-10-04  Tom Tromey  <tom@tromey.com>
1160
1161         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1162         (reread_symbols): Update.
1163         * complaints.h (clear_complaints): Remove argument.
1164         * complaints.c (enum complaint_series): Remove.
1165         (series): Remove global.
1166         (complaint_internal): Update.
1167         (clear_complaints): Remove argument.
1168
1169 2018-10-04  Tom Tromey  <tom@tromey.com>
1170
1171         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1172         debugging symbols" message if there is a separate debug objfile.
1173
1174 2018-10-04  Tom Tromey  <tom@tromey.com>
1175
1176         PR cli/19551:
1177         * symfile.c (symbol_file_add_with_addrs): Update output.
1178         * psymtab.c (require_partial_symbols): Update output.
1179
1180 2018-10-04  Tom Tromey  <tom@tromey.com>
1181
1182         PR cli/22234:
1183         * complaints.c: Emit \n.
1184
1185 2018-10-04  Tom Tromey  <tom@tromey.com>
1186
1187         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1188         (separate_debug_file_exists, find_separate_debug_file)
1189         (add_symbol_file_command, reread_symbols, allocate_symtab)
1190         (allocate_compunit_symtab): Use filtered printing, not
1191         unfiltered.
1192         * psymtab.c (require_partial_symbols, dump_psymtab)
1193         (allocate_psymtab): Use filtered printing, not unfiltered.
1194
1195 2018-10-04  Tom Tromey  <tom@tromey.com>
1196
1197         * complaints.c (complaint_internal): Correctly check complaint
1198         count.
1199
1200 2018-10-04  Tom Tromey  <tom@tromey.com>
1201
1202         * complaints.h (struct complaints): Remove declaration.
1203         * complaints.c (clear_complaints): Remove an unused variable.
1204
1205 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1206
1207         * MAINTAINERS (Write After Approval): Add self.
1208
1209 2018-10-03  Tom Tromey  <tom@tromey.com>
1210
1211         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1212         "buffer_contents".
1213         * coffread.c (coff_symtab_read): Initialize "newobj".
1214
1215 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1216
1217         * dwarf2read.c (read_func_scope): Remove struct keyword in
1218         range-based for.
1219
1220 2018-10-03  Tom Tromey  <tom@tromey.com>
1221
1222         * README: Mention --enable-ubsan.
1223         * NEWS: Mention --enable-ubsan.
1224         * acinclude.m4: Include sanitize.m4.
1225         * configure: Rebuild.
1226         * configure.ac: Call AM_GDB_UBSAN.
1227         * sanitize.m4: New file.
1228
1229 2018-10-03  Tom Tromey  <tom@tromey.com>
1230
1231         * expression.h (enum exp_opcode): Use uint8_t as base type.
1232         * expprint.c (op_name): Handle invalid opcodes.
1233
1234 2018-10-03  Tom Tromey  <tom@tromey.com>
1235
1236         * parse.c (prefixify_expression): Add assert.
1237         (parse_exp_in_context_1): Throw exception if the expression is
1238         empty.
1239
1240 2018-10-03  Tom Tromey  <tom@tromey.com>
1241
1242         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1243
1244 2018-10-03  Tom Tromey  <tom@tromey.com>
1245
1246         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1247
1248 2018-10-03  Tom Tromey  <tom@tromey.com>
1249
1250         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1251         unsigned.
1252
1253 2018-10-03  Tom Tromey  <tom@tromey.com>
1254
1255         * findvar.c (extract_integer): Do work in an unsigned type.
1256
1257 2018-10-03  Tom Tromey  <tom@tromey.com>
1258
1259         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1260         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1261         base type.
1262         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1263         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1264         type.
1265         * c-lang.h (enum c_string_type_values): Use unsigned as base
1266         type.
1267         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1268
1269 2018-10-03  Tom Tromey  <tom@tromey.com>
1270
1271         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1272         <~dwarf2_frame_state_reg_info>: Update.
1273         <dwarf2_frame_state_reg_info>: Update.
1274         <alloc_regs>: Add assertion.  Update.
1275         <reg>: Now a std::vector.
1276         <num_regs>: Remove.
1277         <swap>: Update.
1278         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1279         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1280
1281 2018-10-03  Tom Tromey  <tom@tromey.com>
1282
1283         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1284
1285 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1286
1287         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1288
1289 2018-10-02  Tom Tromey  <tom@tromey.com>
1290
1291         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1292
1293 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1294
1295         * NEWS: Mention changed commands.
1296         * ser-uds.c: New file.
1297         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1298         * configure: Regenerate.
1299         * Makefile.in: Add new file.
1300         * serial.c (serial_open): Check if filename is a socket
1301           and lookup the appropriate interface accordingly.
1302
1303 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1304
1305         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1306         define.
1307         (AARCH64_EXTRA_MAGIC): Likewise.
1308         (AARCH64_FPSIMD_MAGIC): Likewise.
1309         (AARCH64_SVE_MAGIC): Likewise.
1310         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1311         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1312         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1313         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1314         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1315         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1316         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1317         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1318         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1319         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1320         (read_aarch64_ctx): Add function.
1321         (aarch64_linux_sigframe_init): Detect FP registers.
1322
1323 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1324
1325         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1326         (AARCH64_D0_REGNUM): Likewise.
1327         (AARCH64_S0_REGNUM): Likewise.
1328         (AARCH64_H0_REGNUM): Likewise.
1329         (AARCH64_B0_REGNUM): Likewise.
1330         (AARCH64_SVE_V0_REGNUM): Likewise.
1331         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1332         (AARCH64_D0_REGNUM): Likewise.
1333         (AARCH64_S0_REGNUM): Likewise.
1334         (AARCH64_H0_REGNUM): Likewise.
1335         (AARCH64_B0_REGNUM): Likewise.
1336         (AARCH64_SVE_V0_REGNUM): Likewise.
1337
1338 2018-10-01  Gary Benson <gbenson@redhat.com>
1339
1340         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1341         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1342         prfpregset_t instead of gdb_prfpregset_t.
1343         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1344         * configure, config.in: Rebuild.
1345
1346 2018-10-01  Gary Benson <gbenson@redhat.com>
1347
1348         * common/gdb_proc_service.h: New file, factored out from...
1349         * gdb_proc_service.h: Moved common code to the above file.
1350         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1351
1352 2018-10-01  Gary Benson <gbenson@redhat.com>
1353
1354         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1355         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1356
1357 2018-10-01  Gary Benson <gbenson@redhat.com>
1358
1359         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1360         (AC_CHECK_HEADERS): Check for linux/elf.h.
1361         * configure, config.in: Rebuild.
1362         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1363         doesn't define elf_fpregset_t.
1364
1365 2018-10-01  Gary Benson <gbenson@redhat.com>
1366
1367         * gdb_proc_service.h: Whitespace change.
1368
1369 2018-10-01  Tom Tromey  <tom@tromey.com>
1370
1371         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1372         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1373         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1374
1375 2018-10-01  Tom Tromey  <tom@tromey.com>
1376
1377         * README: Minor change.
1378
1379 2018-09-30  Pedro Alves  <palves@redhat.com>
1380
1381         * darwin-nat-info.c (darwin_debug_regions_recurse)
1382         (info_mach_exceptions_command): Remove unused local variables.
1383         * darwin-nat.c (darwin_decode_notify_message)
1384         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1385         (darwin_stop_inferior, darwin_setup_exceptions)
1386         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1387         (darwin_nat_target::attach, darwin_nat_target::detach)
1388         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1389         local variables.
1390         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1391         variables.
1392
1393 2018-09-29  Tom Tromey  <tom@tromey.com>
1394
1395         * README: Remove some leftover text.
1396
1397 2018-09-29  Tom Tromey  <tom@tromey.com>
1398
1399         * PROBLEMS: Rewrite.
1400         * README: Update.
1401
1402 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1403
1404         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1405         case with explicit breakpoint kind.
1406         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1407         'additional_info' and related logic.
1408         (riscv_debug_breakpoints): New variable.
1409         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1410         instruction to determine the breakpoint kind.
1411         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1412         flag.  Update description of 'set/show riscv
1413         use-compressed-breakpoints' flag.
1414
1415 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1416
1417         (NEWS): Mention changes to frame related commands.
1418         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1419         (add_prefix_cmd_suppress_notification): New function.
1420         (add_com_suppress_notification): Call
1421         add_cmd_suppress_notification.
1422         * command.h (add_cmd_suppress_notification): Declare.
1423         (add_prefix_cmd_suppress_notification): Declare.
1424         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1425         (parse_frame_specification): Moved from stack.c, with
1426         simplification to handle a single argument.
1427         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1428         switch to the selected frame.  Add a header comment.
1429         * stack.c: Remove 'safe-ctype.h' include.
1430         (find_frame_for_function): Add declaration.
1431         (find_frame_for_address): New function.
1432         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1433         (frame_selection_by_function_completer): New function.
1434         (info_frame_command): Rename to...
1435         (info_frame_command_core): ...this, and update parameter types.
1436         (select_frame_command): Rename to...
1437         (select_frame_command_core): ...this, and update parameter types.
1438         (frame_command): Rename to...
1439         (frame_command_core): ...this, and update parameter types.
1440         (class frame_command_helper): New class to wrap implementations of
1441         frame related sub-commands.
1442         (frame_apply_cmd_list): New static global.
1443         (frame_cmd_list): Make static.
1444         (select_frame_cmd_list): New global for sub-commands.
1445         (info_frame_cmd_list): New global for sub-commands.
1446         (_initialize_stack): Register sub-commands for 'frame',
1447         'select-frame', and 'info frame'.  Update 'frame apply' commands
1448         to use frame_apply_cmd_list.  Move function local static
1449         frame_apply_list to file static frame_apply_cmd_list for
1450         consistency.
1451         * stack.h (select_frame_command): Delete declarationn.
1452         (select_frame_for_mi): Declare new function.
1453
1454 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1455
1456         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1457         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1458         and NOP.
1459
1460 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1461
1462         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1463
1464 2018-09-26  Tom Tromey  <tom@tromey.com>
1465
1466         * valops.c (auto_abandon): Remove dead code.
1467
1468 2018-09-26  Tom Tromey  <tom@tromey.com>
1469
1470         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1471
1472 2018-09-24  Tom Tromey  <tom@tromey.com>
1473
1474         * common/pathstuff.c (get_standard_cache_dir): Make
1475         "xdg_cache_home" and "home" const.
1476         * top.c (init_history): Make "tmpenv" const.
1477         * main.c (get_init_files): Make "homedir" const.
1478
1479 2018-09-23  Tom Tromey  <tom@tromey.com>
1480
1481         PR python/18852:
1482         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1483
1484 2018-09-23  Tom Tromey  <tom@tromey.com>
1485
1486         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1487         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1488         * python/python-internal.h (gdbpy_handle_exception): Declare.
1489         * python/py-utils.c (gdbpy_handle_exception): New function.
1490
1491 2018-09-23  Tom Tromey  <tom@tromey.com>
1492
1493         PR python/17284:
1494         * python/py-type.c (typy_template_argument): Check for negative
1495         argument number.
1496
1497 2018-09-23  Tom Tromey  <tom@tromey.com>
1498
1499         PR python/14062:
1500         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1501
1502 2018-09-23  Tom Tromey  <tom@tromey.com>
1503
1504         PR python/18170:
1505         * python/py-value.c (valpy_int): Allow conversion from pointer
1506         type.
1507
1508 2018-09-23  Tom Tromey  <tom@tromey.com>
1509
1510         PR python/20126:
1511         * python/py-value.c (valpy_int): Respect type sign.
1512
1513 2018-09-23  Tom Tromey  <tom@tromey.com>
1514
1515         PR python/18352;
1516         * python/py-value.c (valpy_float): Allow conversions from int or
1517         char.
1518         (valpy_int, valpy_long): Allow conversions from float.
1519
1520 2018-09-23  Tom Tromey  <tom@tromey.com>
1521
1522         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1523         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1524
1525 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1526
1527         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1528         __sighndlr.
1529         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1530
1531 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1532
1533         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1534         target_terminal::ours().
1535
1536 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1537
1538         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1539         of vl to ULONGEST.
1540
1541 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1542
1543         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1544         redundant condition.
1545
1546 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1547
1548         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1549
1550         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1551         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1552         * sol-thread.c (ps_pdmodel): Don't guard definition.
1553
1554         * procfs.c: Fix formatting.
1555
1556         * procfs.c (sysset_t_alloc): Remove.
1557         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1558         (procfs_debug_inferior): Likewise.
1559         (procfs_set_exec_trap): Likewise.
1560         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1561         (proc_set_traced_sysexit): Likewise.
1562
1563         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1564         (dead_procinfo): Likewise.
1565         (proc_warn): Likewise.
1566         (proc_error): Likewise.
1567         (proc_get_LDT_entry): Likewise.
1568         (do_attach): Likewise.
1569         (procfs_target::pid_to_str): Likewise.
1570         (iterate_over_mappings): Likewise.
1571
1572         * procfs.c (create_procinfo): Fix ARI warning.
1573         (proc_get_status): Likewise.
1574         (proc_stop_process): Likewise.
1575         (proc_run_process): Likewise.
1576         (proc_kill): Likewise.
1577         (proc_get_LDT_entry): Likewise.
1578         (procfs_find_LDT_entry): Likewise.
1579         (proc_update_threads): Likewise.
1580         (proc_iterate_over_threads): Likewise.
1581         (do_attach): Likewise.
1582         (procfs_xfer_memory): Likewise.
1583         (invalidate_cache): Likewise.
1584         (procfs_target::resume): Likewise.
1585         (procfs_init_inferior): Likewise.
1586         (procfs_set_exec_trap): Likewise.
1587         (procfs_target::thread_alive): Likewise.
1588         (procfs_target::pid_to_exec_file): Likewise.
1589         (iterate_over_mappings): Likewise.
1590         (procfs_target::make_corefile_notes): Likewise.
1591         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1592
1593         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1594         (procfs_find_LDT_entry): Likewise.
1595         * sol-thread.c (ps_lgetLDT): Likewise.
1596
1597 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1598
1599         PR tdep/17903
1600         * procfs.c (procfs_target): Declare pid_to_exec_file.
1601         (procfs_target::pid_to_exec_file): New.
1602
1603 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1604
1605         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1606         renaming.
1607         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1608         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1609
1610 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1611
1612         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1613         (supply_fpregset, fill_fpregset): Move ...
1614         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1615         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1616         Remove references to ioctl-based procfs.
1617         Include <sys/reg.h>.
1618         Remove PR_MODEL_NATIVE guards.
1619         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1620         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1621
1622 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1623
1624         PR gdb/20981:
1625         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1626         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1627         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1628
1629 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1630
1631         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1632         (fbsd_print_sockaddr_in6): Likewise.
1633
1634 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1635             Chris January  <chris.january@arm.com>
1636
1637         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1638         (evaluate_subexp_standard): Return a dummy type when
1639         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1640         OP_F77_UNDETERMINED_ARGLIST case.
1641         * expression.h (enum noside): Update comment.
1642
1643 2018-09-19  George Vasick <george.vasick@oracle.com>
1644
1645         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1646
1647 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1648             April Chin <april.chin@oracle.com>
1649             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1650
1651         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1652         uint_t lwpid_t.
1653         (create_procinfo): Print pids in /proc without leading zeros.
1654
1655 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1656
1657         * nios2-tdep.c (nios2_gcc_target_options): New.
1658         (nios2_gdb_arch_init): Install new hook.
1659
1660 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1661
1662         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1663         New file.
1664         * update-gnulib.sh: Apply patch.
1665         * configure: Re-generate.
1666
1667 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1668
1669         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1670         description.  Make "info proc" command descriptions more
1671         consistent.
1672
1673 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1674
1675         * NEWS: Mention 'info proc files' command.
1676
1677 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1678
1679         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1680         descriptors for IP_FILES and IP_ALL.
1681
1682 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1683
1684         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1685         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1686         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1687         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1688         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1689         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1690         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1691         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1692         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1693         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1694         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1695         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1696         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1697         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1698         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1699         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1700         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1701         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1702         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1703         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1704         (struct fbsd_sockaddr_un): New types.
1705         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1706         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1707         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1708         (fbsd_core_info_proc_files): New functions.
1709         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1710         IP_ALL.
1711         * fbsd-tdep.h (fbsd_info_proc_files_header)
1712         (fbsd_info_proc_files_entry): New.
1713
1714 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1715
1716         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1717         * infcmd.c (info_proc_cmd_files): New function.
1718         (_initialize_infcmd): Register 'info proc files' command.
1719
1720 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1721
1722         * gnulib/aclocal-m4-deps.mk: Re-generate.
1723         * gnulib/aclocal.m4: Re-generate.
1724         * gnulib/config.in: Re-generate.
1725         * gnulib/configure: Re-generate.
1726         * gnulib/import/Makefile.am: Re-generate.
1727         * gnulib/import/Makefile.in: Re-generate.
1728         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1729         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1730         * gnulib/import/arpa_inet.in.h: New file.
1731         * gnulib/import/inet_ntop.c: New file.
1732         * gnulib/import/m4/arpa_inet_h.m4: New file.
1733         * gnulib/import/m4/inet_ntop.m4: New file.
1734         * gnulib/import/m4/netinet_in_h.m4: New file.
1735         * gnulib/import/m4/socklen.m4: New file.
1736         * gnulib/import/m4/sockpfaf.m4: New file.
1737         * gnulib/import/m4/stdalign.m4: New file.
1738         * gnulib/import/m4/sys_uio_h.m4: New file.
1739         * gnulib/import/netinet_in.in.h: New file.
1740         * gnulib/import/stdalign.in.h: New file.
1741         * gnulib/import/sys_socket.c: New file.
1742         * gnulib/import/sys_socket.in.h: New file.
1743         * gnulib/import/sys_uio.in.h: New file.
1744         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1745         module.
1746
1747 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1748
1749         * gnulib/aclocal-m4-deps.mk: New file.
1750         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1751         deterministically.
1752
1753 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1754
1755         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1756         KVE_PATH.
1757
1758 2018-09-18  Tom Tromey  <tom@tromey.com>
1759
1760         * compile/compile-object-load.c (struct
1761         link_hash_table_cleanup_data): Add constructor and destructor.
1762         Use DISABLE_COPY_AND_ASSIGN.
1763         (~link_hash_table_cleanup_data): Rename from
1764         link_hash_table_free.  Now a destructor.
1765         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1766
1767 2018-09-18  Tom Tromey  <tom@tromey.com>
1768
1769         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1770         * compile/compile-object-load.c (struct munmap_list): Move to
1771         header file.
1772         (munmap_list::add): Rename from munmap_list_add; rewrite.
1773         (munmap_list::~munmap_list): Rename from munmap_list_free.
1774         (munmap_listp_free_cleanup): Remove.
1775         (compile_object_load): Update.
1776         * compile/compile-object-load.h (struct munmap_list): Move from
1777         compile-object-load.c.  Rewrite.
1778
1779 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1780
1781         * aarch64-tdep.c (pass_in_v): Use register size.
1782         (aarch64_extract_return_value): Likewise.
1783         (aarch64_store_return_value): Likewise.
1784
1785 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1786
1787         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1788         rlim_t.
1789
1790 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1791
1792         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1793         Fix short help line.
1794
1795 2018-09-17  Tom Tromey  <tom@tromey.com>
1796
1797         PR python/20445:
1798         * configure: Rebuild.
1799         * configure.ac: Conditionally use -DNDEBUG for Python.
1800
1801 2018-09-17  Tom Tromey  <tom@tromey.com>
1802
1803         * configure: Rebuild.
1804         * configure.ac: Use gmp as a library dependency when checking for
1805         mpfr.
1806
1807 2018-09-17  Pedro Alves  <palves@redhat.com>
1808
1809         * python/py-inferior.c (find_inferior_object): Delete.
1810
1811 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1812
1813         * compile/compile-cplus-types.c
1814         (compile_cplus_instance::enter_scope): Don't use new_scope after
1815         std::move.
1816
1817 2018-09-17  Tom Tromey  <tom@tromey.com>
1818
1819         * common/pathstuff.c (get_standard_cache_dir): Use
1820         ~/Library/Caches on macOS.
1821         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1822
1823 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1824
1825         PR python/23669
1826         * breakpoint.c (commands_cmd_element): New.
1827         (_initialize_breakpoint): Assign commands_cmd_element.
1828         * breakpoint.h (commands_cmd_element): New.
1829         * cli/cli-script.c (while_cmd_element, if_command,
1830         define_cmd_element): New.
1831         (command_name_equals): Remove.
1832         (process_next_line): Compare commands by pointer, not by name.
1833         (_initialize_cli_script): Assign the various cmd_list_element
1834         variables.
1835         * compile/compile.c (compile_cmd_element): New.
1836         (_initialize_compile): Assign compile_cmd_element.
1837         * compile/compile.h (compile_cmd_element): New.
1838         * guile/guile.c (guile_cmd_element): New.
1839         (install_gdb_commands): Assign guile_cmd_element.
1840         * guile/guile.h (guile_cmd_element): New.
1841         * python/python.c (python_cmd_element): New.
1842         (_initialize_python): Assign python_cmd_element.
1843         * python/python.h (python_cmd_element): New.
1844         * tracepoint.c (while_stepping_cmd_element): New.
1845         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1846         * tracepoint.h (while_stepping_cmd_element): New.
1847
1848 2018-09-17  Tom Tromey  <tom@tromey.com>
1849
1850         * infrun.c (save_infcall_suspend_state): Return
1851         infcall_suspend_state_up.
1852         (save_infcall_control_state): Return infcall_control_state_up.
1853         * inferior.h (save_infcall_suspend_state)
1854         (save_infcall_control_state): Declare later.  Return unique
1855         pointers.
1856
1857 2018-09-17  Tom Tromey  <tom@tromey.com>
1858
1859         * infrun.c (struct stop_context): Declare constructor,
1860         destructor, "changed" method.
1861         (stop_context::stop_context): Rename from save_stop_context.
1862         (stop_context::~stop_context): Rename from
1863         release_stop_context_cleanup.
1864         (normal_stop): Update.
1865         (stop_context::changed): Rename from stop_context_changed.  Return
1866         bool.
1867
1868 2018-09-17  Tom Tromey  <tom@tromey.com>
1869
1870         * inferior.h (struct infcall_suspend_state_deleter): New.
1871         (infcall_suspend_state_up): New typedef.
1872         (struct infcall_control_state_deleter): New.
1873         (infcall_control_state_up): New typedef.
1874         (make_cleanup_restore_infcall_suspend_state)
1875         (make_cleanup_restore_infcall_control_state): Don't declare.
1876         * infcall.c (call_function_by_hand_dummy): Update.
1877         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1878         (make_cleanup_restore_infcall_suspend_state): Remove.
1879         (do_restore_infcall_control_state_cleanup)
1880         (make_cleanup_restore_infcall_control_state): Remove.
1881
1882 2018-09-17  Tom Tromey  <tom@tromey.com>
1883
1884         * gdbthread.h (struct thread_control_state): Add initializer.
1885         (class thread_info) <control>: Remove initializer.
1886         * inferior.h (struct inferior_control_state): Add initializer.
1887         (class inferior) <control>: Remove initializer.
1888         (exit_inferior_1): Update.
1889         * infrun.c (struct infcall_control_state): Add constructors.
1890         (save_infcall_control_state): Use new.
1891         (restore_infcall_control_state, discard_infcall_control_state):
1892         Use delete.
1893
1894 2018-09-17  Tom Tromey  <tom@tromey.com>
1895
1896         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1897         unique_ptr.
1898         <siginfo_data>: Now a unique_xmalloc_ptr.
1899         (save_infcall_suspend_state, restore_infcall_suspend_state)
1900         (discard_infcall_suspend_state)
1901         (get_infcall_suspend_state_regcache): Update.
1902
1903 2018-09-17  Tom Tromey  <tom@tromey.com>
1904
1905         * gdbthread.h (struct thread_suspend_state): Add initializers.
1906         (class thread_info) <suspend>: Remove initializer.
1907         * infrun.c (struct infcall_suspend_state): Add initializers.
1908         (save_infcall_suspend_state): Use new.
1909         (discard_infcall_suspend_state): Use delete.
1910
1911 2018-09-16  Tom Tromey  <tom@tromey.com>
1912
1913         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1914         Remove.
1915         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1916         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1917         (py_varobj_iter_new): Likewise.
1918         (py_varobj_get_iterator): Use gdbpy_ref.
1919
1920 2018-09-16  Tom Tromey  <tom@tromey.com>
1921
1922         * python/py-threadevent.c (py_get_event_thread): Simplify.
1923         * python/py-inferior.c (infpy_thread_from_thread_handle):
1924         Return immediately after calling thread_to_thread_object.  Use
1925         Py_RETURN_NONE.
1926         (thread_to_thread_object): Set the exception on a NULL return.
1927
1928 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1929
1930         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1931
1932 2018-09-16  Tom Tromey  <tom@tromey.com>
1933
1934         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1935         Remove.
1936
1937 2018-09-16  Tom Tromey  <tom@tromey.com>
1938
1939         * python/python-internal.h (thread_to_thread_object): Change
1940         return type.
1941         * python/py-inferior.c (thread_to_thread_object): Return a new
1942         reference.
1943         (infpy_thread_from_thread_handle): Update.
1944         * python/py-infthread.c (gdbpy_selected_thread): Update.
1945         * python/py-stopevent.c (create_stop_event_object): Update.
1946         * python/py-threadevent.c (py_get_event_thread): Return a new
1947         reference.
1948         (py_get_event_thread): Update.
1949         * python/py-event.h (py_get_event_thread): Change return type.
1950         * python/py-continueevent.c (create_continue_event_object):
1951         Update.
1952
1953 2018-09-16  Tom Tromey  <tom@tromey.com>
1954
1955         * python/py-progspace.c (pspy_get_objfiles): Update.
1956         * python/python-internal.h (objfile_to_objfile_object): Change
1957         return type.
1958         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1959         Update.
1960         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1961         Update.
1962         * python/python.c (gdbpy_get_current_objfile): Update.
1963         (gdbpy_objfiles): Update.
1964         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1965         Update.
1966         (objfile_to_objfile_object): Return a new reference.
1967         * python/py-symtab.c (stpy_get_objfile): Update.
1968         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1969         Update.
1970
1971 2018-09-16  Tom Tromey  <tom@tromey.com>
1972
1973         * python/py-inferior.c (infpy_get_progspace): Update.
1974         * python/python-internal.h (pspace_to_pspace_object): Change
1975         return type.
1976         * python/py-newobjfileevent.c
1977         (create_clear_objfiles_event_object): Update.
1978         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1979         Update.
1980         * python/python.c (gdbpy_get_current_progspace): Update.
1981         (gdbpy_progspaces): Update.
1982         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1983         reference.
1984         * python/py-objfile.c (objfpy_get_progspace): Update.
1985         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1986         Update.
1987
1988 2018-09-16  Tom Tromey  <tom@tromey.com>
1989
1990         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1991         (solib_name, block_for_pc, find_pc_line): New functions.
1992         (execute_unwinders): Update.
1993         * python/py-block.c (gdbpy_block_for_pc): Remove.
1994         * python/py-inferior.c (infpy_get_progspace): New function.
1995         (inferior_object_getset) <progspace>: Add.
1996         * python/py-progspace.c (pspy_objfiles): Rewrite.
1997         (pspy_solib_name, pspy_block_for_pc)
1998         (pspy_find_pc_line, pspy_is_valid): New functions.
1999         (progspace_object_methods): Add entries for solib_name,
2000         block_for_pc, find_pc_line, is_valid.
2001         * python/python-internal.h (gdbpy_block_for_pc)
2002         (build_objfiles_list): Don't declare.
2003         * python/python.c: Don't include solib.h.
2004         (gdbpy_solib_name, gdbpy_find_pc_line)
2005         (gdbpy_get_current_progspace, build_objfiles_list)
2006         (gdbpy_objfiles): Remove.
2007         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2008         solib_name, find_pc_line>: Remove entries.
2009
2010 2018-09-16  Tom Tromey  <tom@tromey.com>
2011
2012         * top.c (new_ui_command): Use GNU style for metasyntactic
2013         variables.
2014         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2015         variables.
2016         * maint.c (maintenance_translate_address): Remove "<>" around
2017         text.
2018         * interps.c (interpreter_exec_cmd): Use GNU style for
2019         metasyntactic variables.
2020         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2021         metasyntactic variables.
2022         * tracepoint.c (tfind_range_command): Use GNU style for
2023         metasyntactic variables.
2024         (tfind_outside_command): Likewise.
2025         (_initialize_tracepoint): Likewise.
2026         * remote.c (extended_remote_target::create_inferior): Use GNU
2027         style for metasyntactic variables.
2028         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2029         metasyntactic variables.
2030         (adi_assign_command): Likewise.
2031
2032 2018-09-16  Tom Tromey  <tom@tromey.com>
2033
2034         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2035         metasyntactic variables.  Print message if no disassembler options
2036         are available.
2037
2038 2018-09-15  Tom Tromey  <tom@tromey.com>
2039
2040         * infcmd.c (get_inferior_args): Return const char *.
2041         * inferior.h (get_inferior_args): Return type now const.
2042         * linux-tdep.c (linux_fill_prpsinfo): Update.
2043         * procfs.c (procfs_target::make_corefile_notes): Update.
2044
2045 2018-09-07  Tom Tromey  <tom@tromey.com>
2046
2047         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2048         inside the TRY.
2049
2050 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2051
2052         * nios2-tdep.c (nios2_type_align): New.
2053         (nios2_gdb_arch_init): Install type_align hook.
2054
2055 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2056
2057         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2058         type that is neither object file owned, nor gdbarch owned.
2059         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2060         gdbarch is non-NULL.
2061         (alloc_type_instance): Allocate non-objfile owned types on the
2062         gdbarch obstack.
2063         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2064         using TYPE_ALLOC to ensure memory is allocated on the correct
2065         obstack.
2066         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2067         obstack, or the gdbarch obstack.
2068         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2069
2070 2018-09-14  Tom Tromey  <tom@tromey.com>
2071
2072         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2073         block.
2074
2075 2018-09-14  Tom Tromey  <tom@tromey.com>
2076
2077         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2078
2079 2018-09-13  Tom Tromey  <tom@tromey.com>
2080
2081         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2082         static.
2083
2084 2018-09-13  Tom Tromey  <tom@tromey.com>
2085
2086         * exec.c (try_open_exec_file): Use std::string.
2087
2088 2018-09-13  Tom Tromey  <tom@tromey.com>
2089
2090         * utils.h (gdb_bfd_errmsg): Return std::string.
2091         * exec.c (exec_file_attach): Update.
2092         * compile/compile-object-load.c (compile_object_load): Update.
2093         * utils.c (gdb_bfd_errmsg): Return std::string.
2094
2095 2018-09-13  Tom Tromey  <tom@tromey.com>
2096
2097         * procfs.c (struct procinfo_deleter): New.
2098         (procinfo_up): New typedef.
2099         (do_destroy_procinfo_cleanup): Remove.
2100         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2101
2102 2018-09-13  Tom Tromey  <tom@tromey.com>
2103
2104         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2105
2106 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2107 2018-09-13  Tom Tromey  <tom@tromey.com>
2108
2109         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2110         (pspy_get_objfiles): New function.
2111         (progspace_object_methods): New.
2112         (pspace_object_type): Add tp_methods callback.
2113         * python/python-internal.h (build_objfiles_list): New
2114         declaration.
2115         * python/python.c (build_objfiles_list): New function.
2116         (gdbpy_objfiles): Implement using build_objfiles_list.
2117         * NEWS: Mention the Progspace.objfiles method.
2118
2119 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2120
2121         * python/py-inferior.c (infpy_get_progspace): New function.
2122         (inferior_object_getset): Add progspace property.
2123         * NEWS: Mention the new property.
2124
2125 2018-09-13  Tom Tromey  <tom@tromey.com>
2126
2127         PR rust/23650:
2128         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2129
2130 2018-09-13  Tom Tromey  <tom@tromey.com>
2131
2132         PR rust/23626:
2133         * rust-lang.c (rust_enum_variant): Now static.
2134         (rust_empty_enum_p): New function.
2135         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2136         Handle empty enum.
2137
2138 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2139
2140         * python/py-inferior.c (infpy_repr): New.
2141         (inferior_object_type): Register infpy_repr.
2142         * python/py-objfile.c (objfpy_repr): New.
2143         (objfile_object_type): Register objfpy_repr.
2144
2145 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2146
2147         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2148
2149 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2150
2151         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2152         typo.
2153
2154 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2155
2156         * common/common-utils.c: Don't include '<sys/stat.h>'.
2157         (is_regular_file): Move to...
2158         * common/filestuff.c (is_regular_file): ... here.
2159         * common/common-utils.h (is_regular_file): Move to...
2160         * common/filestuff.h (is_regular_file): ... here.
2161
2162 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2163
2164         * skip.c (debug_skip): New variable.
2165         (skiplist_entry::do_skip_file_p): Add debug output.
2166         (skiplist_entry::do_skip_gfile_p): Likewise.
2167         (skiplist_entry::skip_function_p): Likewise.
2168         (_initialize_step_skip): Create debug command.
2169         * NEWS: Mention set/show debug skip.
2170
2171 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2172
2173         * darwin-nat.c (should_disable_startup_with_shell):
2174         New function.
2175         (darwin_nat_target::create_inferior): Add call.
2176
2177 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2178
2179         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2180         inf_port, msg_state>: Initialize.
2181         (struct darwin_thread_info) <signaled, single_step>: Change
2182         type and initialize.
2183         (struct darwin_thread_info) <event>: Initialize.
2184
2185 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2186
2187         PR gdb/23555
2188         PR gdb/23558
2189         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2190         guesses.
2191
2192 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2193
2194         Revert:
2195         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2196
2197         PR gdb/23555
2198         PR gdb/23558
2199         * gnulib/aclocal.m4: Regenerate.
2200         * gnulib/config.in: Regenerate.
2201         * gnulib/configure: Regenerate.
2202         * gnulib/import/Makefile.am: Update.
2203         * gnulib/import/Makefile.in: Update.
2204         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2205         * gnulib/import/_Noreturn.h: ... this.
2206         * gnulib/import/alloca.in.h: Update.
2207         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2208         * gnulib/import/arg-nonnull.h: ... this.
2209         * gnulib/import/assure.h: Update.
2210         * gnulib/import/at-func.c: Update.
2211         * gnulib/import/basename-lgpl.c: Update.
2212         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2213         * gnulib/import/c++defs.h: ... this.
2214         * gnulib/import/canonicalize-lgpl.c: Update.
2215         * gnulib/import/cdefs.h: Update.
2216         * gnulib/import/chdir-long.c: Update.
2217         * gnulib/import/chdir-long.h: Update.
2218         * gnulib/import/cloexec.c: Update.
2219         * gnulib/import/cloexec.h: Update.
2220         * gnulib/import/close.c: Update.
2221         * gnulib/import/closedir.c: Update.
2222         * gnulib/import/config.charset: Update.
2223         * gnulib/import/dirent-private.h: Update.
2224         * gnulib/import/dirent.in.h: Update.
2225         * gnulib/import/dirfd.c: Update.
2226         * gnulib/import/dirname-lgpl.c: Update.
2227         * gnulib/import/dirname.h: Update.
2228         * gnulib/import/dosname.h: Update.
2229         * gnulib/import/dup-safer-flag.c: Update.
2230         * gnulib/import/dup-safer.c: Update.
2231         * gnulib/import/dup.c: Update.
2232         * gnulib/import/dup2.c: Update.
2233         * gnulib/import/errno.in.h: Update.
2234         * gnulib/import/error.c: Update.
2235         * gnulib/import/error.h: Update.
2236         * gnulib/import/exitfail.c: Update.
2237         * gnulib/import/exitfail.h: Update.
2238         * gnulib/import/extra/update-copyright: Update.
2239         * gnulib/import/fchdir.c: Update.
2240         * gnulib/import/fcntl.c: Update.
2241         * gnulib/import/fcntl.in.h: Update.
2242         * gnulib/import/fd-hook.c: Update.
2243         * gnulib/import/fd-hook.h: Update.
2244         * gnulib/import/fd-safer-flag.c: Update.
2245         * gnulib/import/fd-safer.c: Update.
2246         * gnulib/import/fdopendir.c: Update.
2247         * gnulib/import/filename.h: Update.
2248         * gnulib/import/filenamecat-lgpl.c: Update.
2249         * gnulib/import/filenamecat.h: Update.
2250         * gnulib/import/flexmember.h: Update.
2251         * gnulib/import/float+.h: Update.
2252         * gnulib/import/float.c: Update.
2253         * gnulib/import/float.in.h: Update.
2254         * gnulib/import/fnmatch.c: Update.
2255         * gnulib/import/fnmatch.in.h: Update.
2256         * gnulib/import/fnmatch_loop.c: Update.
2257         * gnulib/import/fpucw.h: Update.
2258         * gnulib/import/frexp.c: Update.
2259         * gnulib/import/frexpl.c: Update.
2260         * gnulib/import/fstat.c: Update.
2261         * gnulib/import/fstatat.c: Update.
2262         * gnulib/import/getcwd-lgpl.c: Update.
2263         * gnulib/import/getcwd.c: Update.
2264         * gnulib/import/getdtablesize.c: Update.
2265         * gnulib/import/getlogin_r.c: Update.
2266         * gnulib/import/getprogname.c: Update.
2267         * gnulib/import/getprogname.h: Update.
2268         * gnulib/import/gettext.h: Update.
2269         * gnulib/import/gettimeofday.c: Update.
2270         * gnulib/import/glob-libc.h: Update.
2271         * gnulib/import/glob.c: Update.
2272         * gnulib/import/glob.in.h: Update.
2273         * gnulib/import/glob_internal.h: Update.
2274         * gnulib/import/glob_pattern_p.c: Update.
2275         * gnulib/import/globfree.c: Update.
2276         * gnulib/import/hard-locale.c: Update.
2277         * gnulib/import/hard-locale.h: Update.
2278         * gnulib/import/intprops.h: Update.
2279         * gnulib/import/inttypes.in.h: Update.
2280         * gnulib/import/isnan.c: Update.
2281         * gnulib/import/isnand-nolibm.h: Update.
2282         * gnulib/import/isnand.c: Update.
2283         * gnulib/import/isnanl-nolibm.h: Update.
2284         * gnulib/import/isnanl.c: Update.
2285         * gnulib/import/itold.c: Update.
2286         * gnulib/import/libc-config.h: Update.
2287         * gnulib/import/limits.in.h: Update.
2288         * gnulib/import/localcharset.c: Update.
2289         * gnulib/import/localcharset.h: Update.
2290         * gnulib/import/localtime-buffer.c: Update.
2291         * gnulib/import/localtime-buffer.h: Update.
2292         * gnulib/import/lstat.c: Update.
2293         * gnulib/import/m4/00gnulib.m4: Update.
2294         * gnulib/import/m4/__inline.m4: Update.
2295         * gnulib/import/m4/absolute-header.m4: Update.
2296         * gnulib/import/m4/alloca.m4: Update.
2297         * gnulib/import/m4/builtin-expect.m4: Update.
2298         * gnulib/import/m4/canonicalize.m4: Update.
2299         * gnulib/import/m4/chdir-long.m4: Update.
2300         * gnulib/import/m4/close.m4: Update.
2301         * gnulib/import/m4/closedir.m4: Update.
2302         * gnulib/import/m4/configmake.m4: Update.
2303         * gnulib/import/m4/d-ino.m4: Update.
2304         * gnulib/import/m4/d-type.m4: Update.
2305         * gnulib/import/m4/dirent_h.m4: Update.
2306         * gnulib/import/m4/dirfd.m4: Update.
2307         * gnulib/import/m4/dirname.m4: Update.
2308         * gnulib/import/m4/double-slash-root.m4: Update.
2309         * gnulib/import/m4/dup.m4: Update.
2310         * gnulib/import/m4/dup2.m4: Update.
2311         * gnulib/import/m4/eealloc.m4: Update.
2312         * gnulib/import/m4/environ.m4: Update.
2313         * gnulib/import/m4/errno_h.m4: Update.
2314         * gnulib/import/m4/error.m4: Update.
2315         * gnulib/import/m4/exponentd.m4: Update.
2316         * gnulib/import/m4/exponentl.m4: Update.
2317         * gnulib/import/m4/extensions.m4: Update.
2318         * gnulib/import/m4/extern-inline.m4: Update.
2319         * gnulib/import/m4/fchdir.m4: Update.
2320         * gnulib/import/m4/fcntl-o.m4: Update.
2321         * gnulib/import/m4/fcntl.m4: Update.
2322         * gnulib/import/m4/fcntl_h.m4: Update.
2323         * gnulib/import/m4/fdopendir.m4: Update.
2324         * gnulib/import/m4/filenamecat.m4: Update.
2325         * gnulib/import/m4/flexmember.m4: Update.
2326         * gnulib/import/m4/float_h.m4: Update.
2327         * gnulib/import/m4/fnmatch.m4: Update.
2328         * gnulib/import/m4/fnmatch_h.m4: Update.
2329         * gnulib/import/m4/fpieee.m4: Update.
2330         * gnulib/import/m4/frexp.m4: Update.
2331         * gnulib/import/m4/frexpl.m4: Update.
2332         * gnulib/import/m4/fstat.m4: Update.
2333         * gnulib/import/m4/fstatat.m4: Update.
2334         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2335         * gnulib/import/m4/getcwd-path-max.m4: Update.
2336         * gnulib/import/m4/getcwd.m4: Update.
2337         * gnulib/import/m4/getdtablesize.m4: Update.
2338         * gnulib/import/m4/getlogin.m4: Update.
2339         * gnulib/import/m4/getlogin_r.m4: Update.
2340         * gnulib/import/m4/getpagesize.m4: Update.
2341         * gnulib/import/m4/getprogname.m4: Update.
2342         * gnulib/import/m4/gettimeofday.m4: Update.
2343         * gnulib/import/m4/glibc21.m4: Update.
2344         * gnulib/import/m4/glob.m4: Update.
2345         * gnulib/import/m4/glob_h.m4: Update.
2346         * gnulib/import/m4/gnulib-cache.m4: Update.
2347         * gnulib/import/m4/gnulib-common.m4: Update.
2348         * gnulib/import/m4/gnulib-comp.m4: Update.
2349         * gnulib/import/m4/gnulib-tool.m4: Update.
2350         * gnulib/import/m4/hard-locale.m4: Update.
2351         * gnulib/import/m4/include_next.m4: Update.
2352         * gnulib/import/m4/inttypes-pri.m4: Update.
2353         * gnulib/import/m4/inttypes.m4: Update.
2354         * gnulib/import/m4/isnand.m4: Update.
2355         * gnulib/import/m4/isnanl.m4: Update.
2356         * gnulib/import/m4/largefile.m4: Update.
2357         * gnulib/import/m4/limits-h.m4: Update.
2358         * gnulib/import/m4/localcharset.m4: Update.
2359         * gnulib/import/m4/locale-fr.m4: Update.
2360         * gnulib/import/m4/locale-ja.m4: Update.
2361         * gnulib/import/m4/locale-zh.m4: Update.
2362         * gnulib/import/m4/localtime-buffer.m4: Update.
2363         * gnulib/import/m4/longlong.m4: Update.
2364         * gnulib/import/m4/lstat.m4: Update.
2365         * gnulib/import/m4/malloc.m4: Update.
2366         * gnulib/import/m4/malloca.m4: Update.
2367         * gnulib/import/m4/math_h.m4: Update.
2368         * gnulib/import/m4/mbrtowc.m4: Update.
2369         * gnulib/import/m4/mbsinit.m4: Update.
2370         * gnulib/import/m4/mbsrtowcs.m4: Update.
2371         * gnulib/import/m4/mbstate_t.m4: Update.
2372         * gnulib/import/m4/memchr.m4: Update.
2373         * gnulib/import/m4/memmem.m4: Update.
2374         * gnulib/import/m4/mempcpy.m4: Update.
2375         * gnulib/import/m4/memrchr.m4: Update.
2376         * gnulib/import/m4/mkdir.m4: Update.
2377         * gnulib/import/m4/mkstemp.m4: Update.
2378         * gnulib/import/m4/mmap-anon.m4: Update.
2379         * gnulib/import/m4/mode_t.m4: Update.
2380         * gnulib/import/m4/msvc-inval.m4: Update.
2381         * gnulib/import/m4/msvc-nothrow.m4: Update.
2382         * gnulib/import/m4/multiarch.m4: Update.
2383         * gnulib/import/m4/nocrash.m4: Update.
2384         * gnulib/import/m4/off_t.m4: Update.
2385         * gnulib/import/m4/onceonly.m4: Update.
2386         * gnulib/import/m4/open-cloexec.m4: Update.
2387         * gnulib/import/m4/open.m4: Update.
2388         * gnulib/import/m4/openat.m4: Update.
2389         * gnulib/import/m4/opendir.m4: Update.
2390         * gnulib/import/m4/pathmax.m4: Update.
2391         * gnulib/import/m4/rawmemchr.m4: Update.
2392         * gnulib/import/m4/readdir.m4: Update.
2393         * gnulib/import/m4/readlink.m4: Update.
2394         * gnulib/import/m4/realloc.m4: Update.
2395         * gnulib/import/m4/rename.m4: Update.
2396         * gnulib/import/m4/rewinddir.m4: Update.
2397         * gnulib/import/m4/rmdir.m4: Update.
2398         * gnulib/import/m4/save-cwd.m4: Update.
2399         * gnulib/import/m4/secure_getenv.m4: Update.
2400         * gnulib/import/m4/setenv.m4: Update.
2401         * gnulib/import/m4/signal_h.m4: Update.
2402         * gnulib/import/m4/ssize_t.m4: Update.
2403         * gnulib/import/m4/stat-time.m4: Update.
2404         * gnulib/import/m4/stat.m4: Update.
2405         * gnulib/import/m4/std-gnu11.m4: Update.
2406         * gnulib/import/m4/stdbool.m4: Update.
2407         * gnulib/import/m4/stddef_h.m4: Update.
2408         * gnulib/import/m4/stdint.m4: Update.
2409         * gnulib/import/m4/stdio_h.m4: Update.
2410         * gnulib/import/m4/stdlib_h.m4: Update.
2411         * gnulib/import/m4/strchrnul.m4: Update.
2412         * gnulib/import/m4/strdup.m4: Update.
2413         * gnulib/import/m4/strerror.m4: Update.
2414         * gnulib/import/m4/string_h.m4: Update.
2415         * gnulib/import/m4/strstr.m4: Update.
2416         * gnulib/import/m4/strtok_r.m4: Update.
2417         * gnulib/import/m4/sys_socket_h.m4: Update.
2418         * gnulib/import/m4/sys_stat_h.m4: Update.
2419         * gnulib/import/m4/sys_time_h.m4: Update.
2420         * gnulib/import/m4/sys_types_h.m4: Update.
2421         * gnulib/import/m4/tempname.m4: Update.
2422         * gnulib/import/m4/time_h.m4: Update.
2423         * gnulib/import/m4/unistd-safer.m4: Update.
2424         * gnulib/import/m4/unistd_h.m4: Update.
2425         * gnulib/import/m4/warn-on-use.m4: Update.
2426         * gnulib/import/m4/wchar_h.m4: Update.
2427         * gnulib/import/m4/wchar_t.m4: Update.
2428         * gnulib/import/m4/wctype_h.m4: Update.
2429         * gnulib/import/m4/wint_t.m4: Update.
2430         * gnulib/import/malloc.c: Update.
2431         * gnulib/import/malloc/scratch_buffer.h: Update.
2432         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2433         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2434         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2435         * gnulib/import/malloca.c: Update.
2436         * gnulib/import/malloca.h: Update.
2437         * gnulib/import/malloca.valgrind: Update.
2438         * gnulib/import/math.in.h: Update.
2439         * gnulib/import/mbrtowc.c: Update.
2440         * gnulib/import/mbsinit.c: Update.
2441         * gnulib/import/mbsrtowcs-impl.h: Update.
2442         * gnulib/import/mbsrtowcs-state.c: Update.
2443         * gnulib/import/mbsrtowcs.c: Update.
2444         * gnulib/import/memchr.c: Update.
2445         * gnulib/import/memmem.c: Update.
2446         * gnulib/import/mempcpy.c: Update.
2447         * gnulib/import/memrchr.c: Update.
2448         * gnulib/import/mkdir.c: Update.
2449         * gnulib/import/mkstemp.c: Update.
2450         * gnulib/import/msvc-inval.c: Update.
2451         * gnulib/import/msvc-inval.h: Update.
2452         * gnulib/import/msvc-nothrow.c: Update.
2453         * gnulib/import/msvc-nothrow.h: Update.
2454         * gnulib/import/open.c: Update.
2455         * gnulib/import/openat-die.c: Update.
2456         * gnulib/import/openat-priv.h: Update.
2457         * gnulib/import/openat-proc.c: Update.
2458         * gnulib/import/openat.c: Update.
2459         * gnulib/import/openat.h: Update.
2460         * gnulib/import/opendir.c: Update.
2461         * gnulib/import/pathmax.h: Update.
2462         * gnulib/import/pipe-safer.c: Update.
2463         * gnulib/import/rawmemchr.c: Update.
2464         * gnulib/import/readdir.c: Update.
2465         * gnulib/import/readlink.c: Update.
2466         * gnulib/import/realloc.c: Update.
2467         * gnulib/import/ref-add.sin: Update.
2468         * gnulib/import/ref-del.sin: Update.
2469         * gnulib/import/rename.c: Update.
2470         * gnulib/import/rewinddir.c: Update.
2471         * gnulib/import/rmdir.c: Update.
2472         * gnulib/import/same-inode.h: Update.
2473         * gnulib/import/save-cwd.c: Update.
2474         * gnulib/import/save-cwd.h: Update.
2475         * gnulib/import/scratch_buffer.h: Update.
2476         * gnulib/import/secure_getenv.c: Update.
2477         * gnulib/import/setenv.c: Update.
2478         * gnulib/import/signal.in.h: Update.
2479         * gnulib/import/stat-time.c: Update.
2480         * gnulib/import/stat-time.h: Update.
2481         * gnulib/import/stat-w32.c: Update.
2482         * gnulib/import/stat-w32.h: Update.
2483         * gnulib/import/stat.c: Update.
2484         * gnulib/import/stdbool.in.h: Update.
2485         * gnulib/import/stddef.in.h: Update.
2486         * gnulib/import/stdint.in.h: Update.
2487         * gnulib/import/stdio.in.h: Update.
2488         * gnulib/import/stdlib.in.h: Update.
2489         * gnulib/import/str-two-way.h: Update.
2490         * gnulib/import/strchrnul.c: Update.
2491         * gnulib/import/strdup.c: Update.
2492         * gnulib/import/streq.h: Update.
2493         * gnulib/import/strerror-override.c: Update.
2494         * gnulib/import/strerror-override.h: Update.
2495         * gnulib/import/strerror.c: Update.
2496         * gnulib/import/string.in.h: Update.
2497         * gnulib/import/stripslash.c: Update.
2498         * gnulib/import/strnlen1.c: Update.
2499         * gnulib/import/strnlen1.h: Update.
2500         * gnulib/import/strstr.c: Update.
2501         * gnulib/import/strtok_r.c: Update.
2502         * gnulib/import/sys_stat.in.h: Update.
2503         * gnulib/import/sys_time.in.h: Update.
2504         * gnulib/import/sys_types.in.h: Update.
2505         * gnulib/import/tempname.c: Update.
2506         * gnulib/import/tempname.h: Update.
2507         * gnulib/import/time.in.h: Update.
2508         * gnulib/import/unistd--.h: Update.
2509         * gnulib/import/unistd-safer.h: Update.
2510         * gnulib/import/unistd.in.h: Update.
2511         * gnulib/import/unsetenv.c: Update.
2512         * gnulib/import/verify.h: Update.
2513         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2514         * gnulib/import/wchar.in.h: Update.
2515         * gnulib/import/wctype.in.h: Update.
2516         * gnulib/import/xalloc-oversized.h: Update.
2517         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2518         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2519
2520 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2521
2522         * record-btrace.c (get_thread_current_frame): Remove
2523         old_inferior_ptid.
2524
2525 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2526
2527         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2528         with check_tag to 1 if and only if the type is tagged and the
2529         component being searched cannot been found in the current
2530         view. Otherwise, always call ada_to_fixed_type with
2531         check_tag to 0.
2532
2533 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2534
2535         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2536         declaration.
2537         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2538         * ada-varobj.c (ada_varobj_get_number_of_children,
2539         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2540
2541 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2542
2543         * ada-valprint.c (ada_value_print): Use type instead of
2544         enclosing type.
2545
2546 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2547
2548         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2549         an array of access to unconstrained array.
2550
2551 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2552
2553         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2554         (ada_check_typedef): Use it.
2555
2556 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2557
2558         * ada-varobj.c (ada_varobj_describe_struct_child)
2559         (ada_varobj_describe_child): Handle union case like struct one.
2560
2561 2018-09-10  Tom Tromey  <tom@tromey.com>
2562
2563         PR python/18380:
2564         * python/python.c (_initialize_python): Make example in "python"
2565         help work in Python 3.
2566
2567 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2568
2569         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2570         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2571         $(EXEEXT) to the script, as it is not a program.
2572
2573 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2574
2575         * python/py-prettyprint.c (pretty_print_one_value): Return
2576         gdbpy_ref<>.
2577         (print_string_repr): Adjust.
2578         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2579         * python/python-internal.h (apply_varobj_pretty_printer): Return
2580         gdbpy_ref<>.
2581         * varobj.c (varobj_value_get_print_value): Adjust.
2582
2583 2018-09-08  Tom Tromey  <tom@tromey.com>
2584
2585         PR python/16047:
2586         * python/py-prettyprint.c (pretty_print_one_value): Check for
2587         to_string method.
2588
2589 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2590
2591         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2592         replace_operator_with_call.
2593
2594 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2595
2596         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2597
2598 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2599
2600         * ada-typeprint.c (print_range): Print the bounds using TYPE
2601         rather than its TYPE_TARGET_TYPE.
2602
2603 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2604
2605         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2606         call to ada_to_fixed_value_create.
2607
2608 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2609
2610         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2611
2612 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2613
2614         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2615         by calls to error.
2616
2617 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2618
2619         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2620         Move update of loop variable "fi".
2621
2622 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2623
2624         * ada-lang.c (value_assign_to_component): In the case of
2625         big-endian targets, extract the bits of the given VAL
2626         using an src_offset of zero if container is not a scalar.
2627
2628 2018-09-06  Simon Ser  <contact@emersion.fr>
2629
2630         PR gdb/23105
2631         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2632         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2633         * fbsd-tdep.c (fbsd_make_note_desc): New.
2634         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2635         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2636         * target.h (enum target_object) Add FreeBSD-specific
2637         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2638
2639 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2640
2641         * compile/compile-c.h (generate_c_for_variable_locations):
2642         Change reference to pointer.
2643         * compile/compile-c-support.c (compile_program) <compute>:
2644         Likewise.
2645         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2646         (generate_c_for_for_one_variable): Likewise
2647         (generate_c_for_variable_locations): Likewise
2648         * compile/compile-c-types.c (compile_c_instance::convert_type):
2649         Likewise
2650         * compile/compile-cplus-symbols.c (convert_one_symbol):
2651         std::move the scope passed to enter_scope.
2652         * compile/compile-cplus-types.c
2653         (compile_cplus_instance::enter_scope): Make parameter
2654         rvalue-reference.
2655         (compile_cplus_instance::new_scope): Change reference to
2656         pointer.
2657         (compile_cplus_instance::convert_type): Likewise
2658         (compile_cplus_convert_typedef): std::move the scope passed to
2659         enter_scope.
2660         (compile_cplus_convert_struct_or_union): Likewise.
2661         (compile_cplus_convert_enum): Likewise.
2662         (compile_cplus_convert_namespace): Likewise.
2663         * compile/compile-cplus.h (compile_cplus_instance)
2664         <enter_scope>: Make parameter rvalue-reference.
2665         * compile/compile-internal.h (compile_instance)
2666         <get_cached_type>: Likewise
2667         * compile/compile-loc2c.c (push): Likewise
2668         (pushf): Likewise
2669         (unary): Likewise
2670         (binary): Likewise
2671         (print_label): Likewise
2672         (pushf_register_address): Likewise
2673         (pushf_register): Likewise
2674         (do_compile_dwarf_expr_to_c): Likewise
2675         (compile_dwarf_expr_to_c): Likewise
2676         (compile_dwarf_bounds_to_c): Likewise
2677         * compile/compile.c (compile_instance::get_cached_type):
2678         Likewise
2679         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2680         (compile_dwarf_bounds_to_c): Likewise
2681         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2682         (dwarf2_compile_property_to_c): Likewise
2683         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2684         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2685         Likewise
2686
2687 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2688
2689         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2690         * tui/tui-data.c (init_content_element): Don't initialize it.
2691
2692 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2693
2694         * tui/tui-data.h (struct tui_win_info)
2695         <detail::opaque>: Remove.
2696         * tui/tui-data.c (init_win_info): Remove assignment.
2697
2698 2018-09-05  Tom Tromey  <tom@tromey.com>
2699
2700         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2701         -Wformat-nonliteral.
2702         * target-float.c (host_float_ops<T>::to_string)
2703         (host_float_ops<T>::from_string): Use
2704         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2705         * configure: Rebuild.
2706
2707 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2708
2709         * printcmd.c (printf_c_string): Use
2710         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2711         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2712
2713 2018-09-05  Tom Tromey  <tom@tromey.com>
2714
2715         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2716
2717 2018-09-05  Tom de Vries  <tdevries@suse.de>
2718
2719         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2720         with resolve_abstract_p == true.
2721         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2722         defaulting to false. Propagate resolve_abstract_p to
2723         dwarf2_fetch_die_loc_sect_off.
2724         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2725         parameter, defaulting to false.
2726         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2727         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2728         parameter.
2729         * dwarf2read.h (struct die_info): Forward-declare.
2730         (die_info_ptr): New typedef.
2731         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2732
2733 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2734
2735         GDB 8.2 released.
2736
2737 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2738             Pedro Alves  <palves@redhat.com>
2739
2740         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2741         "aclocal-m4-deps.mk".  Include file here.
2742         $(srcdir)/aclocal.m4: Add "configure.ac".
2743         * gnulib/aclocal-m4-deps.mk: New file.
2744         * gnulib/update-gnulib.sh: Automatically update
2745         "aclocal-m4-deps.mk".
2746
2747 2018-09-04  Tom Tromey  <tom@tromey.com>
2748
2749         * configure: Rebuild.
2750         * configure.ac: Remove multi-ice code.
2751
2752 2018-09-04  Tom Tromey  <tom@tromey.com>
2753
2754         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2755         (ada-exp.o): Update.
2756
2757 2018-09-04  Tom Tromey  <tom@tromey.com>
2758
2759         * Makefile.in (printcmd.o, target-float.o): Remove.
2760         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2761
2762 2018-09-04  Tom Tromey  <tom@tromey.com>
2763
2764         * gnulib/Makefile.in: Remove obsolete comment.
2765         * Makefile.in: Remove obsolete comment.
2766
2767 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2768
2769         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2770         line with '+'.
2771
2772 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2773
2774         * riscv-tdep.c: Add 'prologue-value.h' include.
2775         (struct riscv_unwind_cache): New struct.
2776         (riscv_debug_unwinder): New global.
2777         (riscv_scan_prologue): Update arguments, capture register details
2778         from prologue scan.
2779         (riscv_skip_prologue): Reformat arguments line, move end of
2780         prologue calculation into riscv_scan_prologue.
2781         (riscv_frame_cache): Update return type, create
2782         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2783         details.
2784         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2785         (riscv_frame_prev_register): Use the trad_frame within the
2786         riscv_unwind_cache.
2787         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2788         flag.
2789
2790 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2791
2792         * trad-frame.h (trad_frame_set_realreg): Declare.
2793         (trad_frame_set_addr): Declare.
2794         * trad-frame.c (trad_frame_set_realreg): Define new function.
2795         (trad_frame_set_addr): Define new function.
2796         (trad_frame_set_reg_realreg): Use new function.
2797         (trad_frame_set_reg_addr): Use new function.
2798
2799 2018-09-01  Keith Seitz  <keiths@redhat.com>
2800
2801         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2802         pulongest instead of "%lld".
2803         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2804         ATTRIBUTE_UNUSED.
2805
2806 2018-08-31  Tom Tromey  <tom@tromey.com>
2807
2808         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2809         variant part type.
2810
2811 2018-08-31  Pedro Alves  <palves@redhat.com>
2812
2813         * gdbarch.h: Regenerate.
2814
2815 2018-08-31  Pedro Alves  <palves@redhat.com>
2816
2817         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2818         * target.h (Hardware watchpoint interfaces): Describe
2819         continuable/steppable/non-steppable watchpoints.
2820         * gdbarch.h, gdbarch.c: Regenerate.
2821
2822 2018-08-31  Pedro Alves  <palves@redhat.com>
2823
2824         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2825         Delete.
2826         * s390-linux-nat.c
2827         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2828         * target.h (target_ops::have_continuable_watchpoint): Delete.
2829         (target_have_continuable_watchpoint): Delete.
2830         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2831         * target-delegates.c: Regenerate.
2832
2833 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2834
2835         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2836         the files present in "gnulib/import/m4/".
2837
2838 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2839
2840         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2841         c.sw, c.swsp, and c.sdsp.
2842
2843 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2844
2845         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2846         (riscv_read_misa_reg): Don't cache value read into inferior data.
2847         (riscv_new_inferior_data): Delete.
2848         (riscv_inferior_data_cleanup): Delete.
2849         (riscv_inferior_data): Delete.
2850         (riscv_invalidate_inferior_data): Delete.
2851         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2852
2853 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2854
2855         * compile/compile-cplus-types.c
2856         (compile_cplus_instance::leave_scope): Take the address of scope
2857         object.
2858         (compile_cplus_instance::convert_qualified_base): Compare quals
2859         to 0.
2860
2861 2018-08-30  Keith Seitz  <keiths@redhat.com>
2862
2863         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2864         Use "%s" and host_address_to_string instead of "%p" in printf.
2865
2866 2018-08-29  Keith Seitz  <keiths@redhat.com>
2867
2868         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2869         and compile-cplus-types.c.
2870         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2871         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2872         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2873         Declare.
2874         * compile/compile-c-support.c: Include compile-cplus.h.
2875         (load_libcompile): Templatize.
2876         (get_compile_context): "New" function.
2877         (c_get_compile_context): Use get_compile_context.
2878         (cplus_get_compile_context): New function.
2879         (cplus_push_user_expression, cplus_pop_user_expression)
2880         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2881         (cplus_compute_program): Define new structs/functions.
2882         * compile/compile-cplus-symmbols.c: New file.
2883         * compile/compile-cplus-types.c: New file.
2884         * compile/compile-cplus.h: New file.
2885         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2886         Declare.
2887         * compile/compile-object-load.c (get_out_value_type): Use
2888         strncmp_iw when comparing symbol names.
2889         (compile_object_load): Add mst_bss and mst_data.
2890         * compile/compile.c (_initialize_compile): Remove
2891         -Wno-implicit-function-declaration from `compile_args'.
2892         * compile/gcc-cp-plugin.h: New file.
2893         * NEWS: Mention C++ compile support and new debug options.
2894
2895 2018-08-29  Keith Seitz  <keiths@redhat.com>
2896
2897         * linespec.c (collect_info::add_symbol): Make virtual.
2898         (struct symbol_searcher_collect_info): New struct.
2899         (symbol_searcher::find_all_symbols): New method.
2900         * symtab.h (class symbol_searcher): New class.
2901
2902 2018-08-29  Keith Seitz  <keiths@redhat.com>
2903
2904         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2905         Change to vector of block_symbol.  Update all users.
2906         (struct collect_info) <symbols>: Likewise.
2907         (collect_info::add_symbol): Take block_symbol as argument.
2908         Update all callers.
2909         (decode_compound_collector) <m_symbols>: Change type to vector
2910         of block_symbol.  Update all users.
2911         (decode_compound_collector::operator ()): Change parameter type
2912         to block_symbol.
2913         (find_method, find_function_symbols, find_linespec_symbols)
2914         (find_label_symbols_in_block, find_label_symbols): Change symbol
2915         vectors to block_symbol vectors.
2916         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2917         block_symbol.
2918
2919 2018-08-29  Keith Seitz  <keiths@redhat.com>
2920
2921         * linespec.c (symbolp): Remove typedef and VEC definitions.
2922         (bound_minimal_symbol_d): Likewise.
2923
2924 2018-08-29  Keith Seitz  <keiths@redhat.com>
2925
2926         * linespec.c (decode_compound_collector::decode_compound_collector):
2927         Remove initialization for `m_symtabs'.
2928         (decode_compound_collector::release_symbols): Change return type
2929         to std::vector.  Update all callers.
2930         (class decode_compound_collector) <m_symbols>: Change type to
2931         std::vector.
2932         (lookup_prefix_sym): Change return type to std::vector.  Update all
2933         callers.
2934         (compare_symbols): Remove.
2935         (std_compare_symbols): Rename to `compare_symbols'.
2936         (find_method): Change `sym_classes' parameter to std::vector.
2937         Update all callers.  Use std::sort to sort sym_classes.
2938         (find_linespec_symbols): Remove cleanup.
2939
2940 2018-08-29  Keith Seitz  <keiths@redhat.com>
2941
2942         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2943         std::vector.  Update all users.
2944         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2945         (struct collect_info) <minimal_symbols>: Likewise.
2946         (compare_msymbols): Return bool.  Change parameters to const
2947         bound_minimal_symbol references.
2948         (find_method, find_function_symbols, find_linespec_symbols): Change
2949         `minsyms' parameter to std::vector.  Update all callers.
2950
2951 2018-08-29  Keith Seitz  <keiths@redhat.com>
2952
2953         * linespec.c (struct linespec) <label_symbols>: Change type to
2954         std::vector.  Update all users.
2955         (find_label_symbols_in_block): Change `result' parameter to
2956         std::vector.  Update all callers.
2957         (find_label_symbols): Return std::vector.  Update all callers.
2958
2959 2018-08-29  Keith Seitz  <keiths@redhat.com>
2960
2961         * linespec.c (struct linespec) <function_symbols>: Change type to
2962         std::vector.  Update all users.
2963         (struct collect_info) <function_symbols>: Likewise.
2964         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2965         (std_compare_symbols): New function.
2966         (find_method, find_function_symbols, find_linespec_symbols)
2967         (find_label_symbols_in_block): Change `symbols' parameter to
2968         std::vector.  Update all callers.
2969         (find_label_symbols): Likewise for `function_symbols' and
2970         `label_funcs_ret'.
2971
2972 2018-08-29  Keith Seitz  <keiths@redhat.com>
2973
2974         * linespec.c (symtab_vector_up): Define.
2975         (struct linespec) <file_symtabs>: Change type to std::vector *.
2976         Update all uses.
2977         (struct collect_info) <file_symtabs>: Likewise.
2978         (collect_symtabs_from_filename): Return symtab_vector_up.
2979         Update all callers.
2980         (decode_objc): Remove cleanup.
2981         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2982         (symtab_collector::release_symtabs): Return symtab_vector_up.
2983         Update all callers.
2984         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2985         Update all users.
2986         (collect_symtabs_from_filename, symtabs_from_filename): Return
2987         symtab_vector_up.  Update all callers.
2988
2989 2018-08-29  Tom Tromey  <tom@tromey.com>
2990
2991         * csky-tdep.c (csky_analyze_prologue): Use
2992         core_addr_to_string_nz.
2993
2994 2018-08-29  Tom Tromey  <tom@tromey.com>
2995
2996         * windows-nat.c (struct xlate_exception) <them>: Change type to
2997         DWORD.
2998         (xlate): Fix formatting.  Remove last entry.
2999         (struct xlate_exception, xlate): Comment out.
3000         (windows_nat_target::resume): Use ranged for.
3001
3002 2018-08-29  Jim Wilson  <jimw@sifive.com>
3003
3004         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3005         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3006         of NT_PRFPREG.
3007         (riscv_linux_nat_target::store_registers): Likewise.
3008
3009 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3010
3011         PR gdb/23555
3012         PR gdb/23558
3013         * gnulib/aclocal.m4: Regenerate.
3014         * gnulib/config.in: Regenerate.
3015         * gnulib/configure: Regenerate.
3016         * gnulib/import/Makefile.am: Update.
3017         * gnulib/import/Makefile.in: Update.
3018         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3019         * gnulib/import/_Noreturn.h: ... this.
3020         * gnulib/import/alloca.in.h: Update.
3021         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3022         * gnulib/import/arg-nonnull.h: ... this.
3023         * gnulib/import/assure.h: Update.
3024         * gnulib/import/at-func.c: Update.
3025         * gnulib/import/basename-lgpl.c: Update.
3026         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3027         * gnulib/import/c++defs.h: ... this.
3028         * gnulib/import/canonicalize-lgpl.c: Update.
3029         * gnulib/import/cdefs.h: Update.
3030         * gnulib/import/chdir-long.c: Update.
3031         * gnulib/import/chdir-long.h: Update.
3032         * gnulib/import/cloexec.c: Update.
3033         * gnulib/import/cloexec.h: Update.
3034         * gnulib/import/close.c: Update.
3035         * gnulib/import/closedir.c: Update.
3036         * gnulib/import/config.charset: Update.
3037         * gnulib/import/dirent-private.h: Update.
3038         * gnulib/import/dirent.in.h: Update.
3039         * gnulib/import/dirfd.c: Update.
3040         * gnulib/import/dirname-lgpl.c: Update.
3041         * gnulib/import/dirname.h: Update.
3042         * gnulib/import/dosname.h: Update.
3043         * gnulib/import/dup-safer-flag.c: Update.
3044         * gnulib/import/dup-safer.c: Update.
3045         * gnulib/import/dup.c: Update.
3046         * gnulib/import/dup2.c: Update.
3047         * gnulib/import/errno.in.h: Update.
3048         * gnulib/import/error.c: Update.
3049         * gnulib/import/error.h: Update.
3050         * gnulib/import/exitfail.c: Update.
3051         * gnulib/import/exitfail.h: Update.
3052         * gnulib/import/extra/update-copyright: Update.
3053         * gnulib/import/fchdir.c: Update.
3054         * gnulib/import/fcntl.c: Update.
3055         * gnulib/import/fcntl.in.h: Update.
3056         * gnulib/import/fd-hook.c: Update.
3057         * gnulib/import/fd-hook.h: Update.
3058         * gnulib/import/fd-safer-flag.c: Update.
3059         * gnulib/import/fd-safer.c: Update.
3060         * gnulib/import/fdopendir.c: Update.
3061         * gnulib/import/filename.h: Update.
3062         * gnulib/import/filenamecat-lgpl.c: Update.
3063         * gnulib/import/filenamecat.h: Update.
3064         * gnulib/import/flexmember.h: Update.
3065         * gnulib/import/float+.h: Update.
3066         * gnulib/import/float.c: Update.
3067         * gnulib/import/float.in.h: Update.
3068         * gnulib/import/fnmatch.c: Update.
3069         * gnulib/import/fnmatch.in.h: Update.
3070         * gnulib/import/fnmatch_loop.c: Update.
3071         * gnulib/import/fpucw.h: Update.
3072         * gnulib/import/frexp.c: Update.
3073         * gnulib/import/frexpl.c: Update.
3074         * gnulib/import/fstat.c: Update.
3075         * gnulib/import/fstatat.c: Update.
3076         * gnulib/import/getcwd-lgpl.c: Update.
3077         * gnulib/import/getcwd.c: Update.
3078         * gnulib/import/getdtablesize.c: Update.
3079         * gnulib/import/getlogin_r.c: Update.
3080         * gnulib/import/getprogname.c: Update.
3081         * gnulib/import/getprogname.h: Update.
3082         * gnulib/import/gettext.h: Update.
3083         * gnulib/import/gettimeofday.c: Update.
3084         * gnulib/import/glob-libc.h: Update.
3085         * gnulib/import/glob.c: Update.
3086         * gnulib/import/glob.in.h: Update.
3087         * gnulib/import/glob_internal.h: Update.
3088         * gnulib/import/glob_pattern_p.c: Update.
3089         * gnulib/import/globfree.c: Update.
3090         * gnulib/import/hard-locale.c: Update.
3091         * gnulib/import/hard-locale.h: Update.
3092         * gnulib/import/intprops.h: Update.
3093         * gnulib/import/inttypes.in.h: Update.
3094         * gnulib/import/isnan.c: Update.
3095         * gnulib/import/isnand-nolibm.h: Update.
3096         * gnulib/import/isnand.c: Update.
3097         * gnulib/import/isnanl-nolibm.h: Update.
3098         * gnulib/import/isnanl.c: Update.
3099         * gnulib/import/itold.c: Update.
3100         * gnulib/import/libc-config.h: Update.
3101         * gnulib/import/limits.in.h: Update.
3102         * gnulib/import/localcharset.c: Update.
3103         * gnulib/import/localcharset.h: Update.
3104         * gnulib/import/localtime-buffer.c: Update.
3105         * gnulib/import/localtime-buffer.h: Update.
3106         * gnulib/import/lstat.c: Update.
3107         * gnulib/import/m4/00gnulib.m4: Update.
3108         * gnulib/import/m4/__inline.m4: Update.
3109         * gnulib/import/m4/absolute-header.m4: Update.
3110         * gnulib/import/m4/alloca.m4: Update.
3111         * gnulib/import/m4/builtin-expect.m4: Update.
3112         * gnulib/import/m4/canonicalize.m4: Update.
3113         * gnulib/import/m4/chdir-long.m4: Update.
3114         * gnulib/import/m4/close.m4: Update.
3115         * gnulib/import/m4/closedir.m4: Update.
3116         * gnulib/import/m4/configmake.m4: Update.
3117         * gnulib/import/m4/d-ino.m4: Update.
3118         * gnulib/import/m4/d-type.m4: Update.
3119         * gnulib/import/m4/dirent_h.m4: Update.
3120         * gnulib/import/m4/dirfd.m4: Update.
3121         * gnulib/import/m4/dirname.m4: Update.
3122         * gnulib/import/m4/double-slash-root.m4: Update.
3123         * gnulib/import/m4/dup.m4: Update.
3124         * gnulib/import/m4/dup2.m4: Update.
3125         * gnulib/import/m4/eealloc.m4: Update.
3126         * gnulib/import/m4/environ.m4: Update.
3127         * gnulib/import/m4/errno_h.m4: Update.
3128         * gnulib/import/m4/error.m4: Update.
3129         * gnulib/import/m4/exponentd.m4: Update.
3130         * gnulib/import/m4/exponentl.m4: Update.
3131         * gnulib/import/m4/extensions.m4: Update.
3132         * gnulib/import/m4/extern-inline.m4: Update.
3133         * gnulib/import/m4/fchdir.m4: Update.
3134         * gnulib/import/m4/fcntl-o.m4: Update.
3135         * gnulib/import/m4/fcntl.m4: Update.
3136         * gnulib/import/m4/fcntl_h.m4: Update.
3137         * gnulib/import/m4/fdopendir.m4: Update.
3138         * gnulib/import/m4/filenamecat.m4: Update.
3139         * gnulib/import/m4/flexmember.m4: Update.
3140         * gnulib/import/m4/float_h.m4: Update.
3141         * gnulib/import/m4/fnmatch.m4: Update.
3142         * gnulib/import/m4/fnmatch_h.m4: Update.
3143         * gnulib/import/m4/fpieee.m4: Update.
3144         * gnulib/import/m4/frexp.m4: Update.
3145         * gnulib/import/m4/frexpl.m4: Update.
3146         * gnulib/import/m4/fstat.m4: Update.
3147         * gnulib/import/m4/fstatat.m4: Update.
3148         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3149         * gnulib/import/m4/getcwd-path-max.m4: Update.
3150         * gnulib/import/m4/getcwd.m4: Update.
3151         * gnulib/import/m4/getdtablesize.m4: Update.
3152         * gnulib/import/m4/getlogin.m4: Update.
3153         * gnulib/import/m4/getlogin_r.m4: Update.
3154         * gnulib/import/m4/getpagesize.m4: Update.
3155         * gnulib/import/m4/getprogname.m4: Update.
3156         * gnulib/import/m4/gettimeofday.m4: Update.
3157         * gnulib/import/m4/glibc21.m4: Update.
3158         * gnulib/import/m4/glob.m4: Update.
3159         * gnulib/import/m4/glob_h.m4: Update.
3160         * gnulib/import/m4/gnulib-cache.m4: Update.
3161         * gnulib/import/m4/gnulib-common.m4: Update.
3162         * gnulib/import/m4/gnulib-comp.m4: Update.
3163         * gnulib/import/m4/gnulib-tool.m4: Update.
3164         * gnulib/import/m4/hard-locale.m4: Update.
3165         * gnulib/import/m4/include_next.m4: Update.
3166         * gnulib/import/m4/inttypes-pri.m4: Update.
3167         * gnulib/import/m4/inttypes.m4: Update.
3168         * gnulib/import/m4/isnand.m4: Update.
3169         * gnulib/import/m4/isnanl.m4: Update.
3170         * gnulib/import/m4/largefile.m4: Update.
3171         * gnulib/import/m4/limits-h.m4: Update.
3172         * gnulib/import/m4/localcharset.m4: Update.
3173         * gnulib/import/m4/locale-fr.m4: Update.
3174         * gnulib/import/m4/locale-ja.m4: Update.
3175         * gnulib/import/m4/locale-zh.m4: Update.
3176         * gnulib/import/m4/localtime-buffer.m4: Update.
3177         * gnulib/import/m4/longlong.m4: Update.
3178         * gnulib/import/m4/lstat.m4: Update.
3179         * gnulib/import/m4/malloc.m4: Update.
3180         * gnulib/import/m4/malloca.m4: Update.
3181         * gnulib/import/m4/math_h.m4: Update.
3182         * gnulib/import/m4/mbrtowc.m4: Update.
3183         * gnulib/import/m4/mbsinit.m4: Update.
3184         * gnulib/import/m4/mbsrtowcs.m4: Update.
3185         * gnulib/import/m4/mbstate_t.m4: Update.
3186         * gnulib/import/m4/memchr.m4: Update.
3187         * gnulib/import/m4/memmem.m4: Update.
3188         * gnulib/import/m4/mempcpy.m4: Update.
3189         * gnulib/import/m4/memrchr.m4: Update.
3190         * gnulib/import/m4/mkdir.m4: Update.
3191         * gnulib/import/m4/mkstemp.m4: Update.
3192         * gnulib/import/m4/mmap-anon.m4: Update.
3193         * gnulib/import/m4/mode_t.m4: Update.
3194         * gnulib/import/m4/msvc-inval.m4: Update.
3195         * gnulib/import/m4/msvc-nothrow.m4: Update.
3196         * gnulib/import/m4/multiarch.m4: Update.
3197         * gnulib/import/m4/nocrash.m4: Update.
3198         * gnulib/import/m4/off_t.m4: Update.
3199         * gnulib/import/m4/onceonly.m4: Update.
3200         * gnulib/import/m4/open-cloexec.m4: Update.
3201         * gnulib/import/m4/open.m4: Update.
3202         * gnulib/import/m4/openat.m4: Update.
3203         * gnulib/import/m4/opendir.m4: Update.
3204         * gnulib/import/m4/pathmax.m4: Update.
3205         * gnulib/import/m4/rawmemchr.m4: Update.
3206         * gnulib/import/m4/readdir.m4: Update.
3207         * gnulib/import/m4/readlink.m4: Update.
3208         * gnulib/import/m4/realloc.m4: Update.
3209         * gnulib/import/m4/rename.m4: Update.
3210         * gnulib/import/m4/rewinddir.m4: Update.
3211         * gnulib/import/m4/rmdir.m4: Update.
3212         * gnulib/import/m4/save-cwd.m4: Update.
3213         * gnulib/import/m4/secure_getenv.m4: Update.
3214         * gnulib/import/m4/setenv.m4: Update.
3215         * gnulib/import/m4/signal_h.m4: Update.
3216         * gnulib/import/m4/ssize_t.m4: Update.
3217         * gnulib/import/m4/stat-time.m4: Update.
3218         * gnulib/import/m4/stat.m4: Update.
3219         * gnulib/import/m4/std-gnu11.m4: Update.
3220         * gnulib/import/m4/stdbool.m4: Update.
3221         * gnulib/import/m4/stddef_h.m4: Update.
3222         * gnulib/import/m4/stdint.m4: Update.
3223         * gnulib/import/m4/stdio_h.m4: Update.
3224         * gnulib/import/m4/stdlib_h.m4: Update.
3225         * gnulib/import/m4/strchrnul.m4: Update.
3226         * gnulib/import/m4/strdup.m4: Update.
3227         * gnulib/import/m4/strerror.m4: Update.
3228         * gnulib/import/m4/string_h.m4: Update.
3229         * gnulib/import/m4/strstr.m4: Update.
3230         * gnulib/import/m4/strtok_r.m4: Update.
3231         * gnulib/import/m4/sys_socket_h.m4: Update.
3232         * gnulib/import/m4/sys_stat_h.m4: Update.
3233         * gnulib/import/m4/sys_time_h.m4: Update.
3234         * gnulib/import/m4/sys_types_h.m4: Update.
3235         * gnulib/import/m4/tempname.m4: Update.
3236         * gnulib/import/m4/time_h.m4: Update.
3237         * gnulib/import/m4/unistd-safer.m4: Update.
3238         * gnulib/import/m4/unistd_h.m4: Update.
3239         * gnulib/import/m4/warn-on-use.m4: Update.
3240         * gnulib/import/m4/wchar_h.m4: Update.
3241         * gnulib/import/m4/wchar_t.m4: Update.
3242         * gnulib/import/m4/wctype_h.m4: Update.
3243         * gnulib/import/m4/wint_t.m4: Update.
3244         * gnulib/import/malloc.c: Update.
3245         * gnulib/import/malloc/scratch_buffer.h: Update.
3246         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3247         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3248         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3249         * gnulib/import/malloca.c: Update.
3250         * gnulib/import/malloca.h: Update.
3251         * gnulib/import/malloca.valgrind: Update.
3252         * gnulib/import/math.in.h: Update.
3253         * gnulib/import/mbrtowc.c: Update.
3254         * gnulib/import/mbsinit.c: Update.
3255         * gnulib/import/mbsrtowcs-impl.h: Update.
3256         * gnulib/import/mbsrtowcs-state.c: Update.
3257         * gnulib/import/mbsrtowcs.c: Update.
3258         * gnulib/import/memchr.c: Update.
3259         * gnulib/import/memmem.c: Update.
3260         * gnulib/import/mempcpy.c: Update.
3261         * gnulib/import/memrchr.c: Update.
3262         * gnulib/import/mkdir.c: Update.
3263         * gnulib/import/mkstemp.c: Update.
3264         * gnulib/import/msvc-inval.c: Update.
3265         * gnulib/import/msvc-inval.h: Update.
3266         * gnulib/import/msvc-nothrow.c: Update.
3267         * gnulib/import/msvc-nothrow.h: Update.
3268         * gnulib/import/open.c: Update.
3269         * gnulib/import/openat-die.c: Update.
3270         * gnulib/import/openat-priv.h: Update.
3271         * gnulib/import/openat-proc.c: Update.
3272         * gnulib/import/openat.c: Update.
3273         * gnulib/import/openat.h: Update.
3274         * gnulib/import/opendir.c: Update.
3275         * gnulib/import/pathmax.h: Update.
3276         * gnulib/import/pipe-safer.c: Update.
3277         * gnulib/import/rawmemchr.c: Update.
3278         * gnulib/import/readdir.c: Update.
3279         * gnulib/import/readlink.c: Update.
3280         * gnulib/import/realloc.c: Update.
3281         * gnulib/import/ref-add.sin: Update.
3282         * gnulib/import/ref-del.sin: Update.
3283         * gnulib/import/rename.c: Update.
3284         * gnulib/import/rewinddir.c: Update.
3285         * gnulib/import/rmdir.c: Update.
3286         * gnulib/import/same-inode.h: Update.
3287         * gnulib/import/save-cwd.c: Update.
3288         * gnulib/import/save-cwd.h: Update.
3289         * gnulib/import/scratch_buffer.h: Update.
3290         * gnulib/import/secure_getenv.c: Update.
3291         * gnulib/import/setenv.c: Update.
3292         * gnulib/import/signal.in.h: Update.
3293         * gnulib/import/stat-time.c: Update.
3294         * gnulib/import/stat-time.h: Update.
3295         * gnulib/import/stat-w32.c: Update.
3296         * gnulib/import/stat-w32.h: Update.
3297         * gnulib/import/stat.c: Update.
3298         * gnulib/import/stdbool.in.h: Update.
3299         * gnulib/import/stddef.in.h: Update.
3300         * gnulib/import/stdint.in.h: Update.
3301         * gnulib/import/stdio.in.h: Update.
3302         * gnulib/import/stdlib.in.h: Update.
3303         * gnulib/import/str-two-way.h: Update.
3304         * gnulib/import/strchrnul.c: Update.
3305         * gnulib/import/strdup.c: Update.
3306         * gnulib/import/streq.h: Update.
3307         * gnulib/import/strerror-override.c: Update.
3308         * gnulib/import/strerror-override.h: Update.
3309         * gnulib/import/strerror.c: Update.
3310         * gnulib/import/string.in.h: Update.
3311         * gnulib/import/stripslash.c: Update.
3312         * gnulib/import/strnlen1.c: Update.
3313         * gnulib/import/strnlen1.h: Update.
3314         * gnulib/import/strstr.c: Update.
3315         * gnulib/import/strtok_r.c: Update.
3316         * gnulib/import/sys_stat.in.h: Update.
3317         * gnulib/import/sys_time.in.h: Update.
3318         * gnulib/import/sys_types.in.h: Update.
3319         * gnulib/import/tempname.c: Update.
3320         * gnulib/import/tempname.h: Update.
3321         * gnulib/import/time.in.h: Update.
3322         * gnulib/import/unistd--.h: Update.
3323         * gnulib/import/unistd-safer.h: Update.
3324         * gnulib/import/unistd.in.h: Update.
3325         * gnulib/import/unsetenv.c: Update.
3326         * gnulib/import/verify.h: Update.
3327         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3328         * gnulib/import/wchar.in.h: Update.
3329         * gnulib/import/wctype.in.h: Update.
3330         * gnulib/import/xalloc-oversized.h: Update.
3331         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3332         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3333
3334 2018-08-16  Gary Benson <gbenson@redhat.com>
3335
3336         PR gdb/13000:
3337         * gdb/main.c (captured_main_1): Exit with nonzero status
3338         in batch mode if the last command to be executed failed.
3339         * NEWS: Mention the above.
3340
3341 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3342
3343         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3344         end of warning message.
3345
3346 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3347
3348         PR gdb/22943:
3349         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3350         (aarch64_extract_return_value): Use
3351         aapcs_is_vfp_call_or_return_candidate.
3352         (aarch64_return_in_memory): Likewise.
3353         (aarch64_store_return_value): Likewise.
3354
3355 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3356
3357         * aarch64-tdep.c
3358         (aapcs_is_vfp_call_or_return_candidate): Make static
3359         (pass_in_v_or_stack): Remove function.
3360         (pass_in_v_vfp_candidate): New function.
3361         (aarch64_push_dummy_call): Check for float register candidates.
3362
3363 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3364
3365         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3366         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3367         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3368
3369 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3370
3371         PR build/23399
3372         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3373         (struct ipa_sym_addresses): Rename to...
3374         (struct ipa_sym_addresses_common): ... this.
3375         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3376
3377 2018-08-28  Tom Tromey  <tom@tromey.com>
3378
3379         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3380         (token_fifo): Now a std::vector.
3381         (yylex, c_parse): Update.
3382         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3383         (token_fifo): Now a std::vector.
3384         (yylex, d_parse): Update.
3385         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3386         (token_fifo): Now a std::vector.
3387         (yylex, go_parse): Update.
3388
3389 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3390
3391         * parser-defs.h (struct type_stack) <elements>: Change type to
3392         std::vector<union type_stack_elt>.
3393         <depth, size>: Remove.
3394         * parse.c (parse_exp_in_context_1): Adjust.
3395         (type_stack_reserve): Remove.
3396         (check_type_stack_depth): Remove.
3397         (insert_into_type_stack): Adjust to std::vector.
3398         (insert_type): Likewise.
3399         (push_type): Likewise.
3400         (push_type_int): Likewise.
3401         (insert_type_address_space): Likewise.
3402         (pop_type): Likewise.
3403         (pop_type_int): Likewise.
3404         (pop_typelist): Likewise.
3405         (pop_type_stack): Likewise.
3406         (append_type_stack): Likewise.
3407         (push_type_stack): Likewise.
3408         (get_type_stack): Likewise.
3409         (type_stack_cleanup): Likewise.
3410         (push_typelist): Likewise.
3411         (follow_types): Likewise.
3412         (_initialize_parse): Likewise.
3413
3414 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3415
3416         * NEWS: Mention csky target.
3417
3418 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3419             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3420             Don Breazeal  <donb@codesourcery.com>
3421
3422         * csky-linux-tdep.c: New file.
3423         * csky-tdep.c: Likewise.
3424         * csky-tdep.h: Likewise.
3425         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3426         csky-tdep.o.
3427         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3428         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3429         * configure.tgt: Add csky support.
3430
3431 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3432
3433         * python/py-framefilter.c (py_print_frame): Print frame architecture
3434         when printing on an MI output.
3435
3436 2018-08-27  Tom Tromey  <tom@tromey.com>
3437
3438         PR build/23087:
3439         * configure: Rebuild.
3440         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3441
3442 2018-08-27  Tom Tromey  <tom@tromey.com>
3443
3444         * aarch64-linux-tdep.c
3445         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3446         casts to int.
3447
3448 2018-08-27  Tom Tromey  <tom@tromey.com>
3449
3450         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3451         unsigned.
3452         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3453         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3454         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3455         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3456         unsigned.
3457
3458 2018-08-27  Tom Tromey  <tom@tromey.com>
3459
3460         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3461         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3462
3463 2018-08-27  Tom Tromey  <tom@tromey.com>
3464
3465         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3466         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3467         ULONGEST_MAX.
3468         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3469         ULONGEST_MAX.
3470         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3471         ULONGEST_MAX.
3472         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3473         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3474         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3475         ULONGEST_MAX.
3476         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3477         (ppc64_linux_sigaction_tramp_frame)
3478         (ppc32_linux_sighandler_tramp_frame)
3479         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3480         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3481         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3482         * mn10300-linux-tdep.c (am33_linux_sigframe)
3483         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3484         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3485         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3486         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3487         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3488         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3489         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3490         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3491         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3492         * microblaze-linux-tdep.c
3493         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3494         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3495         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3496         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3497         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3498         * common/common-types.h (ULONGEST_MAX): New define.
3499         (CORE_ADDR_MAX): Fix formatting.
3500         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3501         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3502         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3503         (arm_linux_rt_sigreturn_tramp_frame)
3504         (arm_eabi_linux_sigreturn_tramp_frame)
3505         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3506         (thumb2_eabi_linux_sigreturn_tramp_frame)
3507         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3508         (arm_linux_restart_syscall_tramp_frame)
3509         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3510         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3511         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3512         ULONGEST_MAX.
3513         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3514
3515 2018-08-27  Tom Tromey  <tom@tromey.com>
3516
3517         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3518         CORE_ADDR_MAX.
3519         * mips-tdep.c (mips_deal_with_atomic_sequence)
3520         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3521         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3522         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3523         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3524         CORE_ADDR_MAX.
3525         * aarch64-tdep.c (aarch64_software_single_step): Use
3526         CORE_ADDR_MAX.
3527
3528 2018-08-27  Tom Tromey  <tom@tromey.com>
3529
3530         * linespec.c (complete_linespec_component): Add cast to "char".
3531         * completer.c (completion_tracker::build_completion_result): Add
3532         cast to "char".
3533
3534 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3535
3536         * solist.h (struct solist, struct target_so_ops): Fix
3537         indentation.
3538
3539 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3540
3541         * ada-tasks.c (ada_task_info_s): Remove typedef.
3542         (DEF_VEC_O(ada_task_info_s)): Remove.
3543         (struct ada_tasks_inferior_data): Initialize fields.
3544         <task_list>: Make an std::vector.
3545         (get_ada_tasks_inferior_data): Allocate with new.
3546         (ada_get_task_number): Adjust.
3547         (get_task_number_from_id): Likewise.
3548         (valid_task_id): Likewise.
3549         (ada_get_task_info_from_ptid): Likewise.
3550         (iterate_over_live_ada_tasks): Likewise.
3551         (add_ada_task): Likewise.
3552         (read_known_tasks): Likewise.
3553         (ada_build_task_list): Likewise.
3554         (print_ada_task_info): Likewise.
3555         (info_task): Likewise.
3556         (task_command_1): Likewise.
3557
3558 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3559
3560         * ada-lang.c (add_angle_brackets): Return std::string.
3561
3562 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3563
3564         * python/py-threadevent.c (py_get_event_thread): Initialize
3565         pythread.
3566
3567 2018-08-24  Pedro Alves  <palves@redhat.com>
3568
3569         * python/py-bpevent.c (create_breakpoint_event_object): Use
3570         copy-initialization.
3571         * python/py-continueevent.c (emit_continue_event): Use
3572         copy-initialization.
3573         * python/py-exitedevent.c (create_exited_event_object): Return a
3574         gdbpy_ref<>.
3575         (emit_exited_event): Use copy-initialization.
3576         * python/py-inferior.c (python_new_inferior)
3577         (python_inferior_deleted, add_thread_object): Use
3578         copy-initialization.
3579         * python/py-infevents.c (create_inferior_call_event_object)
3580         (create_register_changed_event_object)
3581         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3582         (emit_inferior_call_event, emit_memory_changed_event)
3583         (emit_register_changed_event): Use copy-initialization.
3584         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3585         Return a gdbpy_ref<>.
3586         (emit_new_objfile_event): Use copy-initialization.
3587         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3588         (emit_clear_objfiles_event): Use copy-initialization.
3589         * python/py-signalevent.c (create_signal_event_object): Use
3590         copy-initialization.
3591         * python/py-threadevent.c (create_thread_event_object): Use
3592         copy-initialization.
3593
3594 2018-08-24  Pedro Alves  <palves@redhat.com>
3595             Simon Marchi  <simon.marchi@ericsson.com>
3596
3597         PR gdb/23379
3598         * python/py-continueevent.c: Include "gdbthread.h".
3599         (create_continue_event_object): Add intro comment.  Add 'ptid'
3600         parameter.  Use it to find thread to pass to
3601         create_thread_event_object.
3602         (emit_continue_event): Pass PTID down to
3603         create_continue_event_object.
3604         * python/py-event.h (py_get_event_thread): Declare.
3605         (create_thread_event_object): Remove default from 'thread'
3606         parameter.
3607         * python/py-stopevent.c (create_stop_event_object): Use
3608         py_get_event_thread.
3609         * python/py-threadevent.c (get_event_thread): Rename to ...
3610         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3611         and use it to find the thread.
3612         (create_thread_event_object): Assert that THREAD isn't null.
3613         Don't find the event thread here.
3614
3615 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3616
3617         * block.h (blockrange, blockranges): New struct declarations.
3618         (struct block): Add new field named `ranges'.
3619         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3620         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3621         macros for accessing ranges in struct block.
3622         (make_blockranges): New declaration.
3623         block.c (make_blockranges): New function.
3624         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3625         for block.
3626         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3627         * blockframe.c (cache_pc_function_block): New static global.
3628         (clear_pc_function_cache): Clear cache_pc_function_block.
3629         (find_pc_partial_function): Move comment to symtab.h.  Add
3630         support for non-contiguous blocks.
3631         * cli/cli-cmds.c (block.h): Include.
3632         (print_disassembly): Handle printing of non-contiguous blocks.
3633         (disassemble_current_function): Likewise.
3634         (disassemble_command): Likewise.
3635
3636         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3637         BLOCK_START.
3638         * blockframe.c (get_pc_function_start): Likewise.
3639         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3640         (gcc_symbol_address): Likewise.
3641         * compile/compile-object-run.c (compile_object_run): Likewise.
3642         * compile/compile.c (get_expr_block_and_pc): Likewise.
3643         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3644         (func_addr_to_tail_call_list): Likewise.
3645         * findvar.c (default_read_var_value): Likewise.
3646         * inline-frame.c (inline_frame_this_id): Likewise.
3647         (skip-inline_frames): Likewise.
3648         * infcmd.c (until_next_command): Likewise.
3649         * linespec.c (convert_linespec_to_sals): Likewise.
3650         * parse.c (parse_exp_in_context_1): Likewise.
3651         * printcmd.c (build_address_symbolic): likewise.
3652         (info_address_command): Likewise.
3653         symtab.c (find_function_start_sal): Likewise.
3654         (skip_prologue_sal): Likewise.
3655         (find_function_alias_target): Likewise.
3656         (find_gnu_ifunc): Likewise.
3657         * stack.c (find_frame_funname): Likewise.
3658         * symtab.c (fixup_symbol_section): Likewise.
3659         (find_function_start_sal): Likewise.
3660         (skip_prologue_sal): Likewsie.
3661         (find_function_alias_target): Likewise.
3662         (find_gnu_ifunc): Likewise.
3663         * tracepoint.c (info_scope_command): Likewise.
3664         * value.c (value_fn_field): Likewise.
3665
3666         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3667         in place of find_pc_partial_function.
3668         * blockframe.c (find_function_entry_range_from_pc): New function.
3669         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3670         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3671         for each range in a block.
3672
3673
3674 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3675
3676         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3677         incrementation.
3678
3679 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3680
3681         * solib-svr4.c (read_program_headers_from_bfd): Return
3682         gdb::optional<gdb::byte_vector>.
3683         (svr4_exec_displacement): Adjust.
3684
3685 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3686
3687         * solib-svr4.c (read_program_header): Return
3688         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3689         (find_program_interpreter): Return
3690         gdb::optional<gdb::byte_vector>.
3691         (scan_dyntag_auxv): Adjust.
3692         (enable_break): Adjust.
3693         (svr4_exec_displacement): Adjust.
3694
3695 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3696
3697         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3698         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3699
3700 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3701
3702         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3703         string_vprintf.
3704         * guile/scm-utils.c (gdbscm_printf): Likewise.
3705         * serial.c (serial_printf): Likewise.
3706         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3707
3708 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3709
3710         * stack.c (print_frame): Print frame architecture when printing on
3711         an MI output.
3712         * NEWS: Mention new "arch" attribute in frame output.
3713
3714 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3715
3716         * arch/aarch64.h (aarch64_regnum): Update comment.
3717
3718 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3719
3720         * NEWS: Add SVE to 8.2 section.
3721
3722 2018-08-21  Pedro Alves  <palves@redhat.com>
3723
3724         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3725         out from gdbscm_parse_function_args.
3726         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3727         gdbscm_parse_function_args_1.
3728
3729 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3730
3731         PR gdb/17816
3732         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3733         operator.
3734
3735 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3736
3737         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3738
3739 2018-08-19  Michael Spang  <spang@google.com>
3740
3741         PR gdb/11786
3742         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3743         for PT_TLS segments.
3744
3745 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3746
3747         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3748         dwarf_variable_value.
3749         * dwarf2-frame.c (class dwarf_expr_executor):
3750         Add override for dwarf_variable_value.
3751         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3752         (class symbol_needs_eval_context): Likewise.
3753         (indirect_synthetic_pointer): Add forward declaration.
3754         (sect_variable_value): New function.
3755         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3756         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3757         for DW_OP_GNU_variable_value.
3758
3759 2018-08-16  Tom Tromey  <tom@tromey.com>
3760
3761         * top.c (read_command_file): Update.
3762         (command_line_input): Remove "repeat" argument.
3763         * ada-lang.c (get_selections): Update.
3764         * linespec.c (decode_line_2): Update.
3765         * defs.h (command_line_input): Remove argument.
3766         * cli/cli-script.c (read_next_line): Update.
3767         * python/py-gdb-readline.c: Update.
3768
3769 2018-08-17  Tom Tromey  <tom@tromey.com>
3770
3771         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3772         command_line_input.
3773
3774 2018-08-15  Tom Tromey  <tom@tromey.com>
3775
3776         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3777
3778 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3779
3780         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3781         If used, use find_pc_partial_function to find address range
3782         to disassemble.
3783         * mi/mi-main.c (mi_cmd_list_features): Report
3784         "data-disassemble-a-option" feature.
3785         * NEWS: Mention new -data-disassemble option -a.
3786
3787 2018-08-13  Tom Tromey  <tom@tromey.com>
3788
3789         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3790
3791 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3792
3793         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3794         (aarch64_linux_collect_sve_regset): Likewise.
3795         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3796         * regcache.h (regcache_map_entry_size): New function.
3797
3798 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3799
3800         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3801         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3802         (SVE_HEADER_VL_LENGTH): Likewise.
3803         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3804         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3805         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3806         (SVE_HEADER_SIZE_OFFSET): Likewise.
3807         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3808         (SVE_HEADER_VL_OFFSET): Likewise.
3809         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3810         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3811         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3812         (SVE_HEADER_SIZE): Likewise.
3813         (aarch64_linux_core_read_vq): Add function.
3814         (aarch64_linux_core_read_description): Check for SVE section.
3815
3816 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3817
3818         * aarch64-fbsd-tdep.c
3819         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3820         collect_size.
3821         * aarch64-linux-tdep.c
3822         (aarch64_linux_iterate_over_regset_sections): Likewise.
3823         * alpha-linux-tdep.c
3824         (alpha_linux_iterate_over_regset_sections):
3825         * alpha-nbsd-tdep.c
3826         (alphanbsd_iterate_over_regset_sections): Likewise.
3827         * amd64-fbsd-tdep.c
3828         (amd64fbsd_iterate_over_regset_sections): Likewise.
3829         * amd64-linux-tdep.c
3830         (amd64_linux_iterate_over_regset_sections): Likewise.
3831         * arm-bsd-tdep.c
3832         (armbsd_iterate_over_regset_sections): Likewise.
3833         * arm-fbsd-tdep.c
3834         (arm_fbsd_iterate_over_regset_sections): Likewise.
3835         * arm-linux-tdep.c
3836         (arm_linux_iterate_over_regset_sections): Likewise.
3837         * corelow.c (get_core_registers_cb): Likewise.
3838         (core_target::fetch_registers): Likewise.
3839         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3840         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3841         * gdbarch.h (void): Regenerate.
3842         * gdbarch.sh: Add supply_size and collect_size.
3843         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3844         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3845         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3846         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3847         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3848         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3849         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3850         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3851         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3852         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3853         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3854         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3855         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3856         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3857         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3858         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3859         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3860         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3861         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3862         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3863         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3864         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3865         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3866         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3867         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3868         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3869         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3870         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3871         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3872         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3873
3874 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3875
3876         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3877         with string_printf.
3878
3879 2018-08-10  Keith Seitz  <keiths@redhat.com>
3880
3881         * compile/compile-c-support.c (add_code_header, add_code_footer):
3882         Move into policy class.
3883         (c_push_user_expression, pop_user_expression_nop)
3884         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3885         (compile_program): New host class.
3886         (c_compile_program): New typedef.
3887         (c_compute_porgram): Use c_compile_program.
3888
3889 2018-08-10  Keith Seitz  <keiths@redhat.com>
3890
3891         * compile/compile-internal.h (compile_instance::~compile_instance):
3892         Remove calls to htab_delete.
3893         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3894         * compile.c (compile_instance::compile_instance): Initialize
3895         htab unique pointers.
3896         (compile_instance::get_cached_type, compile_instance::insert_type)
3897         (compile_instance::error_symbol_once): Update for unique_ptr.
3898
3899 2018-08-10  Keith Seitz  <keiths@redhat.com>
3900
3901         * compile/compile-c-symbols.c (struct symbol_error)
3902         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3903         (compile_instance::insert_symbol_error)
3904         (compile_instance::error_symbol_once): Move to ...
3905         * compile/compile.c: ... here.
3906
3907 2018-08-10  Keith Seitz  <keiths@redhat.com>
3908
3909         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3910         instead of `new_compile_instance'.
3911         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3912         Update description.
3913         If the symbol error map is not initialized, create it.
3914         (generate_c_for_for_one_symbol): Do not check/initialize
3915         the symbol error map.
3916         * compile/compile-c-types.c (compile_c_instance): Make a class.
3917         Update all callers.
3918         (compile_instance::compile_instance): Initialize the type cache.
3919         (get_cached_type): New function.
3920         (insert_type): Update description.
3921         (compile_c_instance::m_default_cflags): Define.
3922         (convert_type): Update description.  Use get_cached_type.
3923         (delete_instance): Moved to destructor.
3924         (new_compile_instance): Moved to constructor.
3925         * compile/compile-c.h (compile_c_instance): Make class inheriting
3926         from compile_instance.
3927         <base>: Remove field.
3928         <type_map, symbol_err_map>: Move to base class.
3929         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3930         * compile/compile-internal.h (compile_instance): Make class.
3931         <type_map_t, symbol_err_map_t>: Define.
3932         <fe>: Rename to `m_gcc_fe'.
3933         <scope, block, gcc_target_options>: Add `m_' prefix.
3934         <m_type_map, m_symbol_err_map>: New fields, moved from
3935         compile_c_instance.
3936         <destroy>: Remove.
3937         (convert_type, new_compile_instance): Remove.
3938         * compile/compile.c (cleanup_compile_instance): Remove.
3939         (compile_to_object): Use unique_ptr to eliminate cleanups.
3940         (compile_instance::set_print_callback, compile_instance::version)
3941         (compile_instance::set_verbose)
3942         (compile_instance::set_driver_filename)
3943         (compile_instance::set_triplet_regexp)
3944         (compile_instance::set_arguments)
3945         (compile_instance::set_source_file)
3946         (compile_instance::compile): Define.
3947
3948 2018-08-10  Keith Seitz  <keiths@redhat.com>
3949
3950         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3951         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3952         gcc-c-fe.def to define C plugin.
3953         (delete_instance): Delete `c_plugin'.
3954         (new_compile_instance): Initialize `c_plugin'.
3955         * compile/compile-c.h: Include gcc_c_plugin.h.
3956         (struct compile_c_instance) <c_plugin>: New member.
3957         * gcc-c-plugin.h: New file.
3958         Update all callers with API change.
3959
3960 2018-08-10  Keith Seitz  <keiths@redhat.com>
3961
3962         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3963         (HFILES_NO_SRCDIR): ... to here.
3964         Add compile-internal.h and compile-c.h.
3965         * compile/compile-c-support.c: Include compile-c.h.
3966         * compile/compile-c-symbols.c: Include compile-c.h.
3967         (generate_c_for_variable_locations): Update comment.
3968         * compile/compile-c-types.c: Include compile-c.h.
3969         * compile/compile-c.h: New file -- moved C language declarations
3970         from other files here.
3971         * compile/compile-internal.h: Do not include hashtab.h or
3972         common/enum-flags.h.
3973         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3974         (gcc_convert_symbol, gcc_symbol_address)
3975         (generate_c_for_variable_locations, c_get_mode_for_size)
3976         (c_get_range_decl_name): Definitions moved to compile-c.h.
3977         * compile/compile-loc2c.c: Include compile-c.h.
3978
3979 2018-08-10  Keith Seitz  <keiths@redhat.com>
3980
3981         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3982         (c_symbol_substitution_name): ... this.
3983         Update all callers.
3984
3985 2018-08-10  Keith Seitz  <keiths@redhat.com>
3986
3987         * compile/compile-c-support.c (c_compute_program): Use
3988         unique_xmalloc_ptr to eliminate cleanup.
3989         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3990         Return a unique_xmalloc_ptr and eliminate cleanup.
3991         * compile/compile-internal.h (generate_c_for_variable_locations):
3992         Return unique_xmalloc_ptr and update description.
3993
3994 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3995
3996         * corelow.c (core_target::get_core_register_section): Rename
3997         min_size to section_min_size.
3998
3999 2018-08-09  Jim Wilson  <jimw@sifive.com>
4000
4001         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4002         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4003         * NEWS: Mention new GNU/Linux RISC-V target.
4004         * configure.host: Add riscv*-*-linux*.
4005         * configure.nat: Add riscv*.
4006         * configure.tgt: Add riscv*-*-linux*.
4007         * riscv-linux-nat.c: New file.
4008         * riscv-linux-tdep.c: New file.
4009
4010 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4011
4012         * infrun.c (resume): Make static, add forward declaration.
4013         (proceed): Update header comment.
4014         * infrun.h (resume): Delete declaration.
4015
4016 2018-08-09  Tom Tromey  <tom@tromey.com>
4017
4018         * riscv-tdep.h: Minor formatting fixes.
4019
4020 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4021
4022         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4023         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4024         (test_mkdir_recursive): Likewise.
4025         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4026
4027 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4028
4029         * valarith.c (value_subscripted_rvalue): If an array is not in
4030         memory, and we don't know the upper bound, then we can't know that
4031         the requested element exists or not.
4032
4033 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4034
4035         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4036         (target_options_to_string): Add comment.
4037
4038 2018-08-08  Tom Tromey  <tom@tromey.com>
4039
4040         * unittests/scoped_mmap-selftests.c: Check result of "write".
4041
4042 2018-08-08  Jim Wilson  <jimw@sifive.com>
4043
4044         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4045         (decode_register_index_short): New.
4046         (decode_j_type_insn, decode_cj_type_insn): New.
4047         (decode_b_type_insn, decode_cb_type_insn): New.
4048         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4049         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4050         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4051         is_c_sw_insn instead of is_sw_insn.
4052         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4053         (riscv_software_single_step): New.
4054         * riscv-tdep.h (riscv_software_single_step): Declare.
4055
4056         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4057         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4058
4059 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4060
4061         PR gdb/18050:
4062         * target.c (dispose_inferior): Don't dispose of inferiors that are
4063         already killed.
4064
4065 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4066
4067         * remote.c (remote_target::download_tracepoint): Change char* to
4068         const char*.
4069
4070 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4071
4072         * target.h (target_options_to_string): Return an std::string.
4073         * target.c (str_comma_list_concat_elem): Return void, use
4074         std::string.
4075         (do_option): Likewise.
4076         (target_options_to_string): Return an std::string.
4077         * linux-nat.c (linux_nat_target::wait): Adjust.
4078         * target-debug.h (target_debug_print_options): Adjust.
4079
4080 2018-08-07  Tom Tromey  <tom@tromey.com>
4081
4082         * Makefile.in (CPPFLAGS): New variable.
4083         (INTERNAL_CPPFLAGS): Use it.
4084
4085 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4086
4087         * NEWS: Mention the index cache.
4088
4089 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4090
4091         * common/pathstuff.h (get_standard_cache_dir): New.
4092         * common/pathstuff.c (get_standard_cache_dir): New.
4093         * build-id.h (build_id_to_string): New.
4094         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4095         DEBUG_STR_SUFFIX): Move to here.
4096         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4097         DEBUG_STR_SUFFIX): Move from there.
4098         (write_psymtabs_to_index): Make non-static, add basename
4099         parameter.  Write to temporary files, rename when done.
4100         (save_gdb_index_command): Adjust call to
4101         write_psymtabs_to_index.
4102         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4103         field.
4104         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4105         (get_gdb_index_contents_from_cache): New.
4106         (get_gdb_index_contents_from_cache_dwz): New.
4107         (dwarf2_initialize_objfile): Read index from cache.
4108         (dwarf2_build_psymtabs): Save to index.
4109         * dwarf-index-cache.h: New file.
4110         * dwarf-index-cache.c: New file.
4111         * dwarf-index-write.h: New file.
4112
4113 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4114
4115         * gnulib/aclocal.m4: Re-generate.
4116         * gnulib/config.in: Re-generate.
4117         * gnulib/configure: Re-generate.
4118         * gnulib/import/Makefile.am: Re-generate.
4119         * gnulib/import/Makefile.in: Re-generate.
4120         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4121         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4122         * gnulib/import/m4/mkdir.m4: New file.
4123         * gnulib/import/mkdir.c: New file.
4124         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4125         module.
4126
4127 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4128
4129         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4130         * common/scoped_mmap.c: New file.
4131         * common/scoped_mmap.h (destroy): New method.
4132         (~scoped_mmap, reset): Use destroy.
4133         (scoped_mmap): New move constructor.
4134         (mmap_file): New declaration.
4135         * unittests/scoped_mmap-selftests.c (test_normal,
4136         test_invalid_filename, run_tests): New functions.
4137         (_initialize_scoped_mmap_selftests): Register selftest.
4138
4139 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4140
4141         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4142         (read_gdb_index_from_buffer): ... this.  Remove section
4143         parameter, add buffer parameter.
4144         (get_gdb_index_contents_ftype,
4145         get_gdb_index_contents_dwz_ftype): New typedefs.
4146         (dwarf2_read_gdb_index): Add callback parameters to get the
4147         index contents.
4148         (get_gdb_index_contents_from_section): New.
4149         (dwarf2_initialize_objfile): Update call to
4150         dwarf2_read_gdb_index.
4151
4152 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4153
4154         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4155         (gdb_open_cloexec): Likewise.
4156         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4157         (commandline_from_pid): Likewise.
4158         (linux_xfer_osdata_threads): Likewise.
4159         (linux_xfer_osdata_fds): Likewise.
4160         * ada-lang.c (is_package_name): Likewise.
4161         * auxv.c (procfs_xfer_auxv): Likewise.
4162         * breakpoint.c (print_one_breakpoint_location): Use
4163         uiout::field_fmt.
4164         (print_one_catch_solib): Use string_printf.
4165         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4166         (add_pe_forwarded_sym): Likewise.
4167         * dwarf2read.c (create_type_unit_group): Likewise.
4168         (build_error_marker_type): Likewise.
4169         * infcall.c (get_function_name): Likewise.
4170         * valprint.c (print_converted_chars_to_obstack): Likewise.
4171         * xtensa-tdep.c (xtensa_register_type): Likewise.
4172
4173 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4174
4175         * remote.c (remote_target::download_tracepoint): Fix format
4176         string errors.
4177
4178 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4179
4180         * tracefile.c: Include common/byte-vector.h.
4181         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4182         with trace_regblock_size if needed.  Update uses of buf.
4183
4184 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4185
4186         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4187         std::vector<unsigned char>.
4188         * tracepoint.c (collection_list::collection_list): Remove
4189         m_regs_mask initializer from initializer list.  Resize
4190         m_regs_mask using the largest remote register number.
4191         (collection_list::add_remote_register): Remove size check on
4192         m_regs_mask.  Use at to access element.
4193         (collection_list::stringify): Change type of temp_buf to
4194         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4195         stringify the register mask.  Use pack_hex_byte for the register
4196         mask.
4197
4198 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4199
4200         * tracepoint.h (class collection_list) <add_register>: Remove.
4201         <add_remote_register, add_ax_registers, add_local_register>:
4202         Declare.
4203         <add_memrange>: Add scope parameter.
4204         * tracepoint.c (encode_actions_1): Likewise.
4205         (collection_list::add_register): Rename to ...
4206         (collection_list::add_remote_register): ... this.  Update
4207         comment.
4208         (collection_list::add_ax_registers, add_local_register): New
4209         methods.
4210         (collection_list::add_memrange): Add scope parameter.  Call
4211         add_local_register instead of add_register.
4212         (finalize_tracepoint_aexpr): New function.
4213         (collection_list::collect_symbol): Update calls to add_memrange.
4214         Call add_local_register instead of add_register.  Call
4215         add_ax_registers.  Call finalize_tracepoint_aexpr.
4216         (encode_actions_1): Get remote regnos for $reg action.  Call
4217         add_remote_register, add_ax_registers, and add_local_register.
4218         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4219         (validate_actionline): Call finalize_tracepoint_aexpr.
4220
4221 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4222
4223         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4224         Replace array buf with gdb::char_vector buf, of size
4225         get_remote_packet_size ().  Replace references to buf and
4226         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4227         and xsnprintf with snprintf.  Raise errors if the buffer is too
4228         small.
4229
4230 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4231
4232         * remote.c (remote_target::download_tracepoint): Fix the has_more
4233         predicate in the QTDP action list iteration.
4234
4235 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4236
4237         * remote.c (remote_target::download_tracepoint): Fix indentation
4238         in for block.
4239
4240 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4241
4242         * proc-api.c (_initialize_proc_api): Remove c, unused.
4243         * procfs.c (procfs_init_inferior): Remove signals, unused.
4244         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4245         unused.
4246
4247 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4248             Andrew Burgess  <andrew.burgess@embecosm.com>
4249
4250         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4251         'W_STOPCODE (0)' as this could be ambiguous.
4252
4253 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4254
4255         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4256         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4257         "ai_socktype").
4258
4259 2018-08-02  Tom Tromey  <tom@tromey.com>
4260
4261         PR symtab/16842.
4262         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4263         symbols.
4264         (process_structure_scope): Likewise.
4265
4266 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4267
4268         PR gdb/22629:
4269         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4270         kill inferior.
4271
4272 2018-08-02  Tom Tromey  <tom@tromey.com>
4273
4274         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4275         (darwin_suspend_inferior, darwin_resume_inferior)
4276         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4277         (darwin_check_new_threads): Check result of get_darwin_inferior.
4278
4279 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4280
4281         GDB 8.1.1 released.
4282
4283 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4284
4285         * varobj.c (varobj_get_path_expr_parent): Report an error if
4286         parent is a dynamic varobj.
4287
4288 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4289
4290         * gnulib/aclocal.m4: Re-generate.
4291         * gnulib/config.in: Re-generate.
4292         * gnulib/configure: Re-generate.
4293         * gnulib/import/Makefile.in: Re-generate.
4294         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4295         * gnulib/import/m4/onceonly.m4: Re-generate.
4296
4297 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4298
4299         * target-descriptions.c (struct xml_test_tdesc): New.
4300         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4301         (record_xml_tdesc): Update.
4302         (maintenance_check_xml_descriptions): Update.
4303         * target-descriptions.h (record_xml_tdesc): Update comment.
4304
4305 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4306
4307         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4308         checking array bounds are defined.
4309
4310 2018-07-30  Tom Tromey  <tom@tromey.com>
4311
4312         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4313         irreflexivity violation.
4314
4315 2018-07-30  Tom Tromey  <tom@tromey.com>
4316
4317         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4318         * value.c (unpack_long): Remove lint code.
4319         * valops.c (value_ind): Remove lint code.
4320         * valarith.c (value_x_binop, value_x_unop, value_equal)
4321         (value_pos): Remove lint code.
4322
4323 2018-07-28  Tom de Vries  <tdevries@suse.de>
4324
4325         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4326         with undefined upper bound as <optimized out>.
4327
4328 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4329
4330         * gcore.in: Rename variable "name" to "prefix".  Expand
4331         "usage" text.
4332
4333 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4334
4335         * windows-nat.c (windows_nat_target::create_inferior): Update to
4336         call close() in global namespace.
4337
4338 2018-07-26  Tom Tromey  <tom@tromey.com>
4339
4340         * dwarf-index-write.c (add_address_entry): Don't add objfile
4341         offsets.
4342         * dbxread.c (find_stab_function): Rename from
4343         find_stab_function_addr.  Return a bound_minimal_symbol.
4344         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4345         Don't add objfile offsets.
4346         (end_psymtab): Use raw_text_low, raw_text_high,
4347         MSYMBOL_VALUE_RAW_ADDRESS.
4348         (read_ofile_symtab): Update.
4349         (process_one_symbol): Update.
4350         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4351         offsets.
4352         (dw2_relocate): Remove.
4353         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4354         searching addrmap.
4355         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4356         Update.
4357         (process_psymtab_comp_unit_reader, add_partial_symbol)
4358         (add_partial_subprogram, dwarf2_ranges_read): Update.
4359         (load_partial_dies): Update.
4360         (add_address_entry): Don't add objfile offsets.
4361         (dwarf2_build_include_psymtabs): Update.
4362         (create_addrmap_from_aranges): Don't add objfile offsets.
4363         (dw2_find_pc_sect_compunit_symtab): Update.
4364         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4365         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4366         Update.
4367         (parse_partial_symbols): Don't add objfile offsets.  Use
4368         raw_text_low, raw_text_high.  Update.
4369         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4370         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4371         or call 'relocate' quick function.  Clear psymbol_map.
4372         * psympriv.h (struct partial_symbol) <address>: Add section
4373         offset.
4374         <set_unrelocated_address>: Rename from set_address.
4375         <raw_text_low, raw_text_high>: New methods.
4376         <text_low, text_high>: Add objfile parameter.
4377         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4378         set_unrelocated_address.
4379         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4380         (find_pc_psymbol): Update.
4381         (fixup_psymbol_section, relocate_psymtabs): Remove.
4382         (dump_psymtab, psym_functions): Update.
4383         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4384         parameter.
4385         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4386         (start_psymtab_common): Update.
4387         * symfile-debug.c (debug_qf_relocate): Remove.
4388         (debug_sym_quick_functions): Update.
4389         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4390         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4391         Update.
4392
4393 2018-07-26  Tom Tromey  <tromey@redhat.com>
4394
4395         * dbxread.c (end_psymtab): Use text_high_valid and
4396         text_low_valid.
4397         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4398         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4399         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4400         Update comment.
4401         <text_low_valid, text_high_valid>: New fields.
4402         <set_text_low, set_text_high>: Update.
4403         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4404
4405 2018-07-26  Tom Tromey  <tom@tromey.com>
4406
4407         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4408         Update.
4409         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4410         textlow and texthigh fields.
4411         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4412         Update.
4413         * mdebugread.c (parse_lines, parse_partial_symbols)
4414         (psymtab_to_symtab_1): Update.
4415         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4416         Rename fields.  Update comment.  Now private.
4417         <text_low, text_high, set_text_low, set_text_high>: New methods.
4418         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4419         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4420         (start_psymtab_common, maintenance_info_psymtabs)
4421         (maintenance_check_psymtabs): Update.
4422         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4423         texthigh fields.
4424         (scan_xcoff_symtab): Update.
4425
4426 2018-07-26  Tom Tromey  <tromey@redhat.com>
4427
4428         * psympriv.h (struct partial_symbol) <unrelocated_address,
4429         address, set_address>: New methods.
4430         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4431         (fixup_psymbol_section, relocate_psymtabs): Update.
4432         (print_partial_symbols): Add 'objfile' parameter.  Update.
4433         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4434         Update.
4435
4436 2018-07-26  Tom Tromey  <tom@tromey.com>
4437
4438         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4439         (debug_names::write_psymbols): Update.
4440         * psympriv.h (struct partial_symbol): Derive from
4441         general_symbol_info.
4442         <obj_section>: New method.
4443         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4444         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4445         (find_pc_sect_psymbol, fixup_psymbol_section)
4446         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4447         (print_partial_symbols, recursively_search_psymtabs)
4448         (compare_psymbols, psymbol_hash, psymbol_compare)
4449         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4450         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4451
4452 2018-07-26  Tom Tromey  <tromey@redhat.com>
4453
4454         * dbxread.c (end_psymtab): Remove dead code.
4455
4456 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4457
4458         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4459         DWARF unwinders are disabled.
4460         * dwarf2-frame.c: Add dwarf2read.h include.
4461         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4462         disabled.
4463         (dwarf2_frame_unwinders_enabled_p): Define.
4464         (show_dwarf_unwinders_enabled_p): New function.
4465         (_initialize_dwarf2_frame): Register switch to control DWARF
4466         unwinder use.
4467         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4468         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4469         (show_dwarf_cmdlist): Remove static keyword.
4470         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4471         (show_dwarf_cmdlist): Declare.
4472         * NEWS: Document new feature.
4473
4474 2018-07-26  Tom de Vries  <tdevries@suse.de>
4475
4476         PR breakpoints/23366
4477         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4478
4479 2018-07-26  Tom de Vries  <tdevries@suse.de>
4480
4481         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4482         DW_AT_count can't be translated to a dynamic prop.
4483
4484 2018-07-25  Tom de Vries  <tdevries@suse.de>
4485
4486         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4487         try/catch.
4488
4489 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4490
4491         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4492
4493 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4494
4495         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4496
4497 2018-07-24  Keith Seitz  <keiths@redhat.comt
4498
4499         PR symtab/23010
4500         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4501         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4502         instead of add_symbol_to_list.
4503         (read_file_scope): Call prepare_one_comp_unit before reading
4504         any other DIEs.
4505
4506 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4507
4508         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4509
4510 2018-07-24  Tom Tromey  <tom@tromey.com>
4511
4512         * utils.c (malloc, realloc, free): Don't declare.
4513         * configure, config.in: Rebuild.
4514         * configure.ac: Don't check for declarations of free, malloc, or
4515         realloc.
4516
4517 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4518
4519         * aarch64-linux-nat.c
4520         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4521         variable.
4522         * arm-linux-nat.c (fetch_regs): Likewise.
4523         (store_regs): Likewise.
4524         (fetch_vfp_regs): Likewise.
4525         (store_vfp_regs): Likewise.
4526         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4527         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4528         (arm_linux_nat_target::insert_watchpoint): Likewise.
4529         (arm_linux_nat_target::remove_watchpoint): Likewise.
4530         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4531         Likewise.
4532         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4533         Likewise.
4534         * ppc-linux-nat.c (fetch_register): Likewise.
4535         (fetch_all_gp_regs): Likewise.
4536         (fetch_ppc_registers): Likewise.
4537         (store_all_gp_regs): Likewise.
4538         (store_ppc_registers): Likewise.
4539         (hwdebug_insert_point): Likewise.
4540         (can_use_watchpoint_cond_accel): Likewise.
4541         * remote-sim.c (gdb_os_write_stdout): Likewise.
4542
4543 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4544             Tom Tromey  <tom@tromey.com>
4545
4546         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4547         test for it.
4548         * configure: Rebuild.
4549
4550 2018-07-22  Tom Tromey  <tom@tromey.com>
4551
4552         * regformats/regdat.sh: Define xmltarget_${name} inside
4553         #ifndef IN_PROCESS_AGENT.
4554
4555 2018-07-22  Tom Tromey  <tom@tromey.com>
4556
4557         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4558
4559 2018-07-22  Tom Tromey  <tom@tromey.com>
4560
4561         * symfile.c (reread_symbols): Notify iter, not objfile.
4562
4563 2018-07-22  Tom Tromey  <tom@tromey.com>
4564
4565         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4566         Use arch_ops.
4567         (ravenscar_thread_target::prepare_to_store): Likewise.
4568
4569 2018-07-22  Tom Tromey  <tom@tromey.com>
4570
4571         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4572         unused variable.  Call value_fetch_lazy when needed.
4573         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4574         Remove unused variable.  Call value_fetch_lazy when needed.
4575
4576 2018-07-22  Tom Tromey  <tom@tromey.com>
4577
4578         * m32c-tdep.c (mark_dma): Return void.
4579         (make_regs): Remove unused declarations.
4580
4581 2018-07-22  Tom Tromey  <tom@tromey.com>
4582
4583         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4584         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4585         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4586         bkscm_get_valid_block_smob_arg_unsafe for effect.
4587
4588 2018-07-22  Tom Tromey  <tom@tromey.com>
4589
4590         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4591         value_type.
4592
4593 2018-07-22  Tom Tromey  <tom@tromey.com>
4594
4595         * windows-nat.c (saved_context): Conditionally define.
4596         * remote.c (remote_target::remote_btrace_maybe_reopen):
4597         Conditionally declare "warned".
4598         * inflow.c (sigquit_ours): Conditionally define.
4599         (new_tty): Move "tty" declaration inside #if.
4600         * guile/guile.c (guile_datadir): Conditionally define.
4601         * charset.c (set_be_le_names): Move some declarations inside #if.
4602         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4603         #if.
4604         (parse_xml_btrace_conf): Likewise.
4605
4606 2018-07-22  Tom Tromey  <tom@tromey.com>
4607
4608         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4609
4610 2018-07-22  Tom Tromey  <tom@tromey.com>
4611
4612         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4613         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4614         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4615         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4616         * stack.c (frame_apply_level_command): Remove unused variable.
4617         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4618         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4619         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4620         unused variable.
4621         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4622         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4623         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4624         variable.
4625         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4626         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4627         variable.
4628         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4629         Remove unused variable.
4630         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4631         variable.
4632         * common/tdesc.c (print_xml_feature::visit): Remove unused
4633         variable.
4634         * compile/compile-object-load.c (store_regs): Remove unused
4635         variables.
4636         * complaints.c (clear_complaints): Remove unused variable.
4637         * corelow.c (core_target_open): Remove unused variable.
4638         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4639         variable.
4640         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4641         variable.
4642         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4643         variable.
4644         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4645         variable.
4646         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4647         variable.
4648         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4649         variable.
4650         * ia64-tdep.c (examine_prologue): Remove unused variable.
4651         * infcall.c (run_inferior_call): Remove unused variable.
4652         * inferior.c (exit_inferior): Remove unused variable.
4653         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4654         * linespec.c (decode_line_2): Remove unused variable.
4655         * linux-nat.c (super_close): Remove.
4656         * linux-tdep.c (linux_info_proc): Remove unused variable.
4657         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4658         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4659         Remove unused variable.
4660         * parse.c (find_minsym_type_and_address): Remove unused variable.
4661         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4662         variable.
4663         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4664         variable.
4665         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4666         variables.
4667         * record-btrace.c (record_btrace_target::store_registers): Remove
4668         unused variable.
4669         (cmd_show_record_btrace_cpu): Remove unused variable.
4670         * riscv-tdep.c (riscv_register_reggroup_p)
4671         (riscv_push_dummy_call, riscv_return_value): Remove unused
4672         variable.
4673         * rust-exp.y (literal): Remove unused variable.
4674         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4675         unused variable.
4676         <STRUCTOP_ANONYMOUS>: Likewise.
4677         * s390-linux-tdep.c (s390_linux_init_abi_31)
4678         (s390_linux_init_abi_64): Remove unused variable.
4679         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4680         (file_select_thread, net_windows_open, _initialize_ser_windows):
4681         Remove unused variables.
4682         * symtab.c (find_pc_sect_line): Remove unused variable.
4683         * target-memory.c (compute_garbled_blocks): Remove unused
4684         variable.
4685         (target_write_memory_blocks): Remove unused variable.
4686         * target.c (target_stack::unpush): Remove unused variables.
4687         * tracepoint.c (start_tracing, all_tracepoint_actions)
4688         (merge_uploaded_trace_state_variables)
4689         (print_one_static_tracepoint_marker): Remove unused variable.
4690         * unittests/basic_string_view/element_access/char/1.cc (test01):
4691         Remove unused variable.
4692         * windows-nat.c (windows_continue, windows_add_all_dlls)
4693         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4694         Remove unused variables.
4695
4696 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4697
4698         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4699         attr_profile in HAVE_ELF.
4700         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4701         HAVE_ELF.
4702
4703 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4704
4705         * frame.c (frame_register_unwind): Change parameter name.
4706         (frame_unwind_register): Likewise.
4707         (frame_unwind_register_value): Likewise.
4708         (frame_unwind_register_signed): Likewise.
4709         (frame_unwind_register_unsigned): Likewise.
4710         * frame.h (frame_register_unwind): Likewise.
4711         (frame_unwind_register): Likewise.
4712         (frame_unwind_register_value): Likewise.
4713         (frame_unwind_register_signed): Likewise.
4714         (frame_unwind_register_unsigned): Likewise.
4715         (frame_unwind_arch): Likewise.
4716
4717 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4718
4719         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4720         ISA maintenance.
4721
4722 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4723
4724         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4725         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4726         hand.
4727
4728 2018-07-20  Keith Seitz  <keiths@redhat.com>
4729
4730         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4731         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4732         m_compunit_symtab, m_language>: Add "m_" prefix.
4733         Update all uses.
4734         * buildsym.c: Update all uses.
4735
4736 2018-07-20  Tom Tromey  <tom@tromey.com>
4737
4738         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4739         * buildsym.h (record_line_ftype): Remove typedef.
4740
4741 2018-07-20  Tom Tromey  <tom@tromey.com>
4742
4743         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4744         (end_expandable_symtab): Likewise.
4745         (end_symtab_get_static_block): Likewise.
4746         (end_symtab_from_static_block): Likewise.
4747         * buildsym-legacy.c (augment_type_symtab): Remove.
4748         (end_expandable_symtab): Remove.
4749         (end_symtab_get_static_block): Remove.
4750         (end_symtab_from_static_block): Remove.
4751
4752 2018-07-20  Tom Tromey  <tom@tromey.com>
4753
4754         * dwarf2read.c: Include buildsym.h.
4755         (struct dwarf2_cu) <builder>: New method.
4756         (fixup_go_packaging): Update.
4757         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4758         use scoped_free_pendings.
4759         (using_directives): Add "cu" parameter, remove "language".
4760         (read_import_statement, setup_type_unit_groups, )
4761         (read_func_scope, read_lexical_block_scope)
4762         (dwarf2_record_block_ranges, read_namespace): Update.
4763         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4764         (lnp_state_machine::handle_end_sequence): Update.
4765         (class lnp_state_machine) <m_cu>: New member.
4766         <m_record_line_callback>: Remove.
4767         <m_currently_recording_lines>: New member.
4768         (lnp_state_machine::handle_set_file): Update.
4769         (noop_record_line): Remove.
4770         (dwarf_record_line_p): Add cu parameter.
4771         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4772         (lnp_state_machine::record_line)
4773         (lnp_state_machine::lnp_state_machine)
4774         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4775         (dwarf_decode_lines): Update.
4776         (dwarf2_start_subfile): Add cu parameter.
4777         (dwarf2_start_symtab, new_symbol): Update.
4778         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4779         Remove dwarf2_per_objfile parameter.
4780         (dwarf_decode_macros): Update.
4781
4782 2018-07-20  Tom Tromey  <tom@tromey.com>
4783
4784         * stabsread.c (define_symbol): Update.
4785         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4786         * dwarf2read.c (new_symbol): Update.
4787         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4788         * cp-namespace.c: Include buildsym.h.
4789         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4790         * buildsym-legacy.c (get_buildsym_compunit): New function.
4791
4792 2018-07-20  Tom Tromey  <tom@tromey.com>
4793
4794         * xcoffread.c: Include buildsym-legacy.h.
4795         * windows-nat.c: Include buildsym-legacy.h.
4796         * stabsread.c: Include buildsym-legacy.h.
4797         * mdebugread.c: Include buildsym-legacy.h.
4798         * buildsym-legacy.h: New file.
4799         * buildsym-legacy.c: New file, from buildsym.c.
4800         * go32-nat.c: Include buildsym-legacy.h.
4801         * dwarf2read.c: Include buildsym-legacy.h.
4802         * dbxread.c: Include buildsym-legacy.h.
4803         * cp-namespace.c: Include buildsym-legacy.h.
4804         * coffread.c: Include buildsym-legacy.h.
4805         * buildsym.h: Move some contents to buildsym-legacy.h.
4806         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4807         buildsym-legacy.c.
4808         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4809
4810 2018-07-20  Tom Tromey  <tom@tromey.com>
4811
4812         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4813         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4814         (buildsym_compunit::buildsym_compunit)
4815         (buildsym_compunit::~buildsym_compunit)
4816         (buildsym_compunit::get_macro_table): Define.
4817
4818 2018-07-20  Tom Tromey  <tom@tromey.com>
4819
4820         * buildsym.c (reset_symtab_globals): Remove.
4821         (buildsym_compunit::end_symtab_from_static_block): Update.
4822         (buildsym_compunit::augment_type_symtab): Update.
4823         (end_symtab_from_static_block): Call free_buildsym_compunit.
4824         (augment_type_symtab, end_symtab, end_expandable_symtab):
4825         Likewise.
4826
4827 2018-07-20  Tom Tromey  <tom@tromey.com>
4828
4829         * arch-utils.c: Do not include buildsym.h.
4830         * mipsread.c: Do not include buildsym.h.
4831         * machoread.c: Do not include buildsym.h.
4832         * elfread.c: Do not include buildsym.h.
4833
4834 2018-07-20  Tom Tromey  <tom@tromey.com>
4835
4836         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4837         initialization.
4838         (buildsym_compunit): Add new constructor.
4839         (struct buildsym_compunit) <get_last_source_file, finish_block,
4840         record_block_range, start_subfile, patch_subfile_names,
4841         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4842         set_last_source_start_addr, get_last_source_start_addr,
4843         get_local_using_directives, set_local_using_directives,
4844         get_global_using_directives, outermost_context_p,
4845         get_current_context_stack, get_context_stack_depth,
4846         get_current_subfile, get_local_symbols, get_file_symbols,
4847         get_global_symbols, record_debugformat, record_producer,
4848         push_context, pop_context, end_symtab_get_static_block,
4849         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4850         New public methods.
4851         <record_pending_block, finish_block_internal, make_blockvector,
4852         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4853         private methods.
4854         Update all users.
4855
4856 2018-05-22  Tom Tromey  <tom@tromey.com>
4857
4858         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4859         parameter.
4860         (finish_block_internal): Update.
4861
4862 2018-07-20  Tom Tromey  <tom@tromey.com>
4863
4864         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4865         parameter.
4866         (finish_block_internal): Update.
4867
4868 2018-07-20  Tom Tromey  <tom@tromey.com>
4869
4870         * buildsym.h (EXTERN): Don't define or undef.
4871         * buildsym.c (EXTERN): Don't define.
4872
4873 2018-07-20  Tom Tromey  <tom@tromey.com>
4874
4875         * buildsym.c: Remove TODO comment.
4876
4877 2018-07-20  Tom Tromey  <tom@tromey.com>
4878
4879         * coffread.c (coff_symtab_read): Update.
4880         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4881         (xcoff_new_init): Update.
4882         * mipsread.c (mipscoff_new_init): Update.
4883         * mdebugread.c (mdebug_build_psymtabs): Update.
4884         * elfread.c (elf_new_init): Update.
4885         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4886         Update.
4887         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4888         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4889         (stabsect_build_psymtabs): Update.
4890         * buildsym.h (buildsym_init): Don't declare.
4891         * buildsym.c: Update comment.
4892         (prepare_for_building): Remove.
4893         (start_symtab, restart_symtab): Update.
4894         (reset_symtab_globals): Update comment.
4895         (buildsym_init): Remove.
4896
4897 2018-07-20  Tom Tromey  <tom@tromey.com>
4898
4899         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4900         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4901         (read_enum_type, common_block_start, common_block_end)
4902         (cleanup_undefined_types_1, finish_global_stabs): Update.
4903         * mdebugread.c (psymtab_to_symtab_1): Update.
4904         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4905         (read_lexical_block_scope, new_symbol): Update.
4906         * dbxread.c (process_one_symbol): Update.
4907         * coffread.c (coff_symtab_read, process_coff_symbol)
4908         (coff_read_enum_type): Update.
4909         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4910         declare.
4911         (get_local_symbols, get_file_symbols, get_global_symbols): New
4912         functions.
4913         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4914         m_global_symbols.
4915         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4916         (~scoped_free_pendings): Update.
4917         (finish_block, prepare_for_building, reset_symtab_globals)
4918         (end_symtab_get_static_block, end_symtab_with_blockvector)
4919         (augment_type_symtab, push_context): Update.
4920         (get_local_symbols, get_file_symbols, get_global_symbols): New
4921         functions.
4922         (buildsym_init): Update.
4923
4924 2018-07-20  Tom Tromey  <tom@tromey.com>
4925
4926         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4927         (process_full_type_unit): Likewise.
4928         (dwarf2_start_symtab): Set list_in_scope.
4929
4930 2018-07-20  Tom Tromey  <tom@tromey.com>
4931
4932         * dwarf2read.c (process_psymtab_comp_unit_reader)
4933         (build_type_psymtabs_reader): Do not set list_in_scope.
4934
4935 2018-07-20  Tom Tromey  <tom@tromey.com>
4936
4937         * buildsym.c (free_pendings): Remove.
4938         (add_symbol_to_list, scoped_free_pendings)
4939         (finish_block_internal, buildsym_init): Update.
4940
4941 2018-07-20  Tom Tromey  <tom@tromey.com>
4942
4943         * xcoffread.c (read_xcoff_symtab): Update.
4944         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4945         Update.
4946         * dbxread.c (process_one_symbol): Update.
4947         * coffread.c (coff_symtab_read): Update.
4948         * buildsym.h (finish_block): Update.
4949         * buildsym.c (finish_block): Remove "listhead" argument.
4950         (end_symtab_get_static_block): Update.
4951
4952 2018-07-20  Tom Tromey  <tom@tromey.com>
4953
4954         * buildsym.h (class scoped_free_pendings): Remove constructor.
4955         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4956         method.
4957         <m_pending_block_obstack, m_pending_blocks>: New members.
4958         (pending_block_obstack, pending_blocks): Remove.
4959         (scoped_free_pendings::scoped_free_pendings): Default.
4960         (~scoped_free_pendings): Update.
4961         (free_pending_blocks): Remove.
4962         (finish_block_internal, record_pending_block, make_blockvector)
4963         (end_symtab_get_static_block, augment_type_symtab, push_context)
4964         (buildsym_init): Update.
4965
4966 2018-07-20  Tom Tromey  <tom@tromey.com>
4967
4968         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4969         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4970         members.
4971         (pending_addrmap, pending_addrmap_obstack)
4972         (pending_addrmap_interesting): Remove.
4973         (scoped_free_pendings, record_block_range, make_blockvector)
4974         (prepare_for_building, reset_symtab_globals, buildsym_init):
4975         Update.
4976
4977 2018-07-20  Tom Tromey  <tom@tromey.com>
4978
4979         * xcoffread.c (process_linenos): Update.
4980         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4981         * mdebugread.c (psymtab_to_symtab_1): Update.
4982         * dwarf2read.c (setup_type_unit_groups)
4983         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4984         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4985         * dbxread.c (process_one_symbol): Update.
4986         * coffread.c (coff_symtab_read, enter_linenos)
4987         (process_coff_symbol): Update.
4988         * buildsym.h (current_subfile): Don't declare.
4989         (get_current_subfile): Declare.
4990         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4991         member.
4992         (start_subfile, free_buildsym_compunit, push_subfile)
4993         (prepare_for_building, start_symtab): Update.
4994         (get_current_subfile): New function.
4995
4996 2018-07-20  Tom Tromey  <tom@tromey.com>
4997
4998         * coffread.c (coff_symtab_read): Update.
4999         * xcoffread.c (read_xcoff_symtab): Update.
5000         * dwarf2read.c (new_symbol): Update.
5001         (read_func_scope, read_lexical_block_scope): Update.
5002         * dbxread.c (process_one_symbol): Update.
5003         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5004         (outermost_context_p): Remove macro.
5005         (outermost_context_p, get_current_context_stack)
5006         (get_context_stack_depth): Declare.
5007         (pop_context): Return struct context_stack.
5008         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5009         member.
5010         (context_stack_size): Remove.
5011         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5012         (prepare_for_building, end_symtab_get_static_block)
5013         (augment_type_symtab, push_context): Update.
5014         (pop_context): Return struct context_stack.
5015         (outermost_context_p, get_current_context_stack)
5016         (get_context_stack_depth): New functions.
5017         (buildsym_init): Update.
5018
5019 2018-07-20  Tom Tromey  <tom@tromey.com>
5020
5021         * rust-exp.y: Now a pure parser.  Update all rules.
5022         (%union): Move earlier.
5023         (current_parser, work_obstack): Remove globals.
5024         (rust_parser, ~rust_parser): Update.
5025         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5026         lex_character, lex_number, lex_string, lex_identifier,
5027         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5028         convert_name, convert_params_to_expression,
5029         convert_ast_to_expression, ast_basic_type, ast_operation,
5030         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5031         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5032         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5033         ast_array_type, ast_slice_type, ast_reference_type,
5034         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5035         (rust_parse): Update.
5036         (rustyyerror, rustyylex): Add parser parameter.
5037         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5038         (rust_lex_stringish_test, rust_lex_test_sequence)
5039         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5040         (rust_lex_test_push_back, rust_lex_tests): Update.
5041
5042 2018-07-19  Pedro Alves  <palves@redhat.com>
5043
5044         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5045         gdb::unique_xmalloc_ptr.
5046         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5047         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5048         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5049         copy-initialization.
5050         * guile/scm-pretty-print.c (ppscm_print_children): Use
5051         gdb::unique_xmalloc_ptr instead of cleanups.
5052         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5053         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5054         gdb::unique_xmalloc_ptr.
5055         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5056         Adjust to use gdb::unique_xmalloc_ptr.
5057         * guile/scm-utils.c (extract_arg): Adjust.
5058         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5059         gdb::unique_xmalloc_ptr instead of a cleanup.
5060
5061 2018-07-19  Tom Tromey  <tom@tromey.com>
5062
5063         * utils.c (do_value_free_to_mark)
5064         (make_cleanup_value_free_to_mark): Remove.
5065         * utils.h (make_cleanup_value_free_to_mark): Remove.
5066
5067 2018-07-19  Pedro Alves  <palves@redhat.com>
5068
5069         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5070         forwarding reference.
5071
5072 2018-07-18  Pedro Alves  <palves@redhat.com>
5073
5074         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5075         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5076         cleanup.
5077
5078 2018-07-18  Pedro Alves  <palves@redhat.com>
5079
5080         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5081         exceptions.
5082         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5083         (gdbscm_wrap): New.
5084         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5085         directly instead of a cleanup.
5086         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5087         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5088         (vlscm_binop_gdbthrow): New, factored out from ...
5089         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5090         (vlscm_rich_compare): Use gdbscm_wrap.
5091         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5092         instead of a cleanup.
5093         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5094         cleanup.
5095         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5096         Use xfree directly instead of a cleanup.
5097         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5098         Adjust to use gdbscm_wrap and scoped_value_mark.
5099         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5100         (gdbscm_value_address, gdbscm_value_dereference)
5101         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5102         scoped_value_mark.
5103         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5104         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5105         scoped_value_mark.
5106         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5107         gdbscm_wrap and scoped_value_mark.
5108         (gdbscm_value_to_string): Use xfree directly instead of a
5109         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5110         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5111         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5112         scoped_value_mark.
5113         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5114         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5115         scoped_value_mark.
5116         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5117         gdbscm_wrap.
5118
5119 2018-07-18  Tom de Vries  <tdevries@suse.de>
5120
5121         * findvar.c (default_read_var_value): Also resolve dynamic type for
5122         LOC_OPTIMIZED_OUT vars.
5123
5124 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5125
5126         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5127         decoding.
5128
5129 2018-07-17  Tom Tromey  <tom@tromey.com>
5130
5131         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5132         (compute_enum_list, pascm_set_param_value_x)
5133         (gdbscm_parameter_value): Update.
5134         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5135         (gdbscm_scm_to_host_string): Update.
5136         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5137         Update.
5138         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5139         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5140         * guile/scm-string.c (gdbscm_scm_to_string): Return
5141         unique_xmalloc_ptr.
5142         (gdbscm_scm_to_host_string): Likewise.
5143
5144 2018-07-17  Tom Tromey  <tom@tromey.com>
5145
5146         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5147         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5148         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5149         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5150         unique_xmalloc_ptr.
5151
5152 2018-07-17  Tom Tromey  <tom@tromey.com>
5153
5154         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5155         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5156         Update.
5157         * guile/scm-cmd.c (cmdscm_function): Update.
5158         * guile/scm-pretty-print.c
5159         (ppscm_print_exception_unless_memory_error): Update.
5160         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5161         Return unique_xmalloc_ptr.
5162
5163 2018-07-17  Tom Tromey  <tom@tromey.com>
5164
5165         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5166         Use string_printf.
5167
5168 2018-07-17  Jim Wilson  <jimw@sifive.com>
5169
5170         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5171         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5172         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5173         unecessary braces after EF_RISCV_RVC test.  Delete call to
5174         set_gdbarch_decr_pc_after_break.
5175
5176         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5177         RISCV_LAST_FP_REGNUM + 1.
5178         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5179
5180 2018-07-17  Tom Tromey  <tom@tromey.com>
5181
5182         * configure.ac: Remove --disable-gdbcli.
5183         * configure: Rebuild.
5184         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5185         (SUBDIR_CLI_CFLAGS): Remove.
5186         (SFILES): Use SUBDIR_CLI_SRCS.
5187         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5188
5189 2018-07-17  Tom Tromey  <tom@tromey.com>
5190
5191         PR gdb/18624:
5192         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5193
5194 2018-07-16  Jim Wilson  <jimw@sifive.com>
5195
5196         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5197
5198 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5199
5200         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5201         variable.
5202         (libunwind_frame_sniffer): Likewise.
5203         (libunwind_frame_prev_register): Likewise.
5204         (libunwind_sigtramp_frame_sniffer): Likewise.
5205         * ia64-tdep.c (ia64_access_reg): Likewise.
5206         (ia64_access_rse_reg): Likewise.
5207         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5208         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5209
5210 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5211
5212         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5213
5214 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5215
5216         * remote-sim.c (gdbsim_target::close,
5217         gdbsim_target::mourn_inferior): Remove unused variables.
5218
5219 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5220
5221         * ia64-tdep.c (ktab_buf): New global.
5222         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5223         (get_kernel_table): Adjust.
5224
5225 2018-07-16  Tom Tromey  <tom@tromey.com>
5226
5227         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5228         * dwarf2read.c (using_directives, new_symbol): Use
5229         outermost_context_p.
5230         * dbxread.c (process_one_symbol): Use outermost_context_p.
5231         * coffread.c (coff_symtab_read): Use outermost_context_p.
5232
5233 2018-07-16  Tom Tromey  <tom@tromey.com>
5234
5235         * dwarf2read.c (using_directives, read_func_scope)
5236         (read_lexical_block_scope): Update.
5237         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5238         * buildsym.h (local_using_directives, global_using_directives):
5239         Don't declare.
5240         (get_local_using_directives, set_local_using_directives)
5241         (get_global_using_directives): Declare.
5242         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5243         m_global_using_directives>: New members.
5244         (finish_block_internal, prepare_for_building)
5245         (reset_symtab_globals, end_symtab_get_static_block)
5246         (push_context): Update.
5247         (get_local_using_directives, set_local_using_directives)
5248         (get_global_using_directives): New functions.
5249         (buildsym_init): Update.
5250
5251 2018-07-16  Tom Tromey  <tom@tromey.com>
5252
5253         * xcoffread.c (xcoff_initial_scan): Don't call
5254         free_pending_blocks.
5255         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5256         * buildsym.h (class scoped_free_pendings): Add constructor.
5257         (free_pending_blocks): Don't declare.
5258         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5259         (free_pending_blocks): Now static.
5260
5261 2018-07-16  Tom Tromey  <tom@tromey.com>
5262
5263         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5264         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5265         member.
5266         (struct subfile_stack): Remove.
5267         (subfile_stack): Remove.
5268         (push_subfile, pop_subfile, buildsym_init): Update.
5269
5270 2018-07-16  Tom Tromey  <tom@tromey.com>
5271
5272         * buildsym.c (push_subfile): Use gdb_assert.
5273         (pop_subfile): Use gdb_assert.
5274
5275 2018-07-16  Tom Tromey  <tom@tromey.com>
5276
5277         * buildsym.h (merge_symbol_lists): Remove.
5278         * buildsym.c (merge_symbol_lists): Remove.
5279
5280 2018-07-16  Tom Tromey  <tom@tromey.com>
5281
5282         * stabsread.c (scan_file_globals): Update comment.
5283         * stabsread.h (scan_file_globals): Move from buildsym.h.
5284         * buildsym.h (scan_file_globals): Move to stabsread.h.
5285
5286 2018-07-16  Tom Tromey  <tom@tromey.com>
5287
5288         * xcoffread.c (xcoff_new_init): Update.
5289         * mipsread.c (mipscoff_new_init): Update.
5290         * mdebugread.c (mdebug_build_psymtabs): Update.
5291         * elfread.c (elf_new_init): Update.
5292         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5293         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5294         * buildsym.h (buildsym_new_init): Don't declare.
5295         * buildsym.c (buildsym_new_init): Remove.
5296
5297 2018-07-16  Tom Tromey  <tom@tromey.com>
5298
5299         * stabsread.h (within_function): Move from buildsym.h.
5300         * stabsread.c (start_stabs): Clear within_function.
5301         * coffread.c (coff_start_symtab): Clear within_function.
5302         * buildsym.h (within_function): Move to stabsread.h.
5303         * buildsym.c (prepare_for_building): Update.
5304
5305 2018-07-16  Tom Tromey  <tom@tromey.com>
5306
5307         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5308         * dwarf2read.c (dwarf2_start_symtab): Don't set
5309         processing_gcc_compilation.
5310         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5311
5312 2018-07-16  Tom Tromey  <tom@tromey.com>
5313
5314         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5315         (next_symbol_text_func): Move from buildsym.h.
5316         * stabsread.c (hashname): Move from buildsym.c.
5317         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5318         (next_symbol_text_func, hashname): Move to stabsread.h.
5319         * buildsym.c: Don't include bcache.h
5320         (hashname): Move to stasbread.c.
5321
5322 2018-07-16  Tom Tromey  <tom@tromey.com>
5323
5324         * buildsym.h (context_stack_size): Don't declare.
5325         * buildsym.c (context_stack_size): New global.
5326
5327 2018-07-16  Tom Tromey  <tom@tromey.com>
5328
5329         * dbxread.c (processing_acc_compilation): New global.
5330         * buildsym.h (processing_acc_compilation): Don't declare.
5331
5332 2018-07-16  Tom Tromey  <tom@tromey.com>
5333
5334         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5335         * dbxread.c (read_ofile_symtab): Update.
5336         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5337         * buildsym.h (last_source_start_addr): Remove.
5338         (set_last_source_start_addr, get_last_source_start_addr):
5339         Declare.
5340         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5341         parameter.
5342         (struct buildsym_compunit) <m_last_source_start_addr>: New
5343         member.
5344         (prepare_for_building): Remove start_addr parameter.
5345         (start_symtab, restart_symtab, end_symtab_get_static_block)
5346         (end_symtab_with_blockvector): Update.
5347         (set_last_source_start_addr, get_last_source_start_addr): New
5348         functions.
5349
5350 2018-07-16  Tom Tromey  <tom@tromey.com>
5351
5352         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5353         member.
5354         (have_line_numbers): Remove.
5355         (record_line, prepare_for_building, end_symtab_get_static_block)
5356         (augment_type_symtab): Update.
5357
5358 2018-07-16  Tom Tromey  <tom@tromey.com>
5359
5360         * buildsym.c (~buildsym_compunit): Free the macro table.
5361         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5362         methods.
5363         <m_pending_macros>: New member.
5364         (pending_macros): Remove.
5365         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5366         (reset_symtab_globals, end_symtab_get_static_block)
5367         (end_symtab_with_blockvector, augment_type_symtab)
5368         (buildsym_init): Update.
5369
5370 2018-07-16  Tom Tromey  <tom@tromey.com>
5371
5372         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5373         parameter.
5374         (buildsym_compunit::set_last_source_file): New method.
5375         <m_last_source_file>: New member.
5376         (prepare_for_building): Remove "name" parameter.
5377         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5378         (last_source_file): Remove.
5379         (set_last_source_file, get_last_source_file): Update.
5380
5381 2018-07-16  Tom Tromey  <tom@tromey.com>
5382
5383         * buildsym.c (prepare_for_building): Add assert.
5384
5385 2018-07-16  Tom Tromey  <tom@tromey.com>
5386
5387         * buildsym.c (~buildsym_compunit): Update.
5388         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5389         (start_subfile, patch_subfile_names)
5390         (end_symtab_with_blockvector): Update.
5391
5392 2018-07-16  Tom Tromey  <tom@tromey.com>
5393
5394         * buildsym.c (struct buildsym_compunit): Add constructor,
5395         destructor, initializers.
5396         (start_buildsym_compunit): Remove.
5397         (free_buildsym_compunit): Use "delete".
5398         (start_symtab, restart_symtab): Use "new".
5399
5400 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5401
5402         * symfile.c (set_objfile_default_section_offset): Remove struct
5403         keyword.
5404
5405 2018-07-14  Stafford Horne  <shorne@gmail.com>
5406
5407         * (Responsible Maintainers): Add myself as or1k maintainer.
5408
5409 2018-07-13  Tom Tromey  <tom@tromey.com>
5410
5411         * symfile.c (set_objfile_default_section_offset): Use extra braces
5412         around initializer.
5413
5414 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5415
5416         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5417         non-branching basr.
5418
5419 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5420
5421         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5422         unittests/cli-utils-selftests.c
5423         * unittests/cli-utils-selftests.c: New file.
5424
5425 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5426
5427         * NEWS: Mention new commands. Mention change to 'thread apply'.
5428
5429 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5430
5431         * thread.c (thr_try_catch_cmd): New function.
5432         (thread_apply_all_command): Handle qcs flags.
5433         (thread_apply_command): Handle qcs flags.
5434         (taas_command): New function.
5435         (tfaas_command): New function.
5436         (_initialize_thread): Update to setup the new commands 'taas
5437         and 'tfaas'. Change doc string for 'thread apply'.
5438
5439 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5440
5441         * stack.c: (trailing_outermost_frame): New function, mostly
5442         extracted from backtrace_command_1.
5443         (leading_innermost_frame): New function.
5444         (backtrace_command_1): Update to call trailing_outermost_frame.
5445         (frame_apply_command_count): New function.
5446         (frame_apply_level_command): New function.
5447         (frame_apply_all_command): New function.
5448         (frame_apply_command): New function.
5449         (faas_command): New function.
5450         (frame_cmd_list): New variable.
5451         (_initialize_stack): Update to setup the new commands 'frame apply'
5452         and 'faas'.
5453
5454 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5455
5456         * cli-utils.c (number_or_range_parser::get_number): Only handle
5457         numbers or convenience var as numbers.
5458         (parse_flags): New function.
5459         (parse_flags_qcs): New function.
5460         (number_or_range_parser::finished): Ensure parsing end is detected
5461         before end of string.
5462         * cli-utils.h (parse_flags): New function.
5463         (parse_flags_qcs): New function.
5464         (number_or_range_parser): Remove m_finished bool.
5465         (number_or_range_parser::skip_range): Set m_in_range to false.
5466
5467 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5468
5469         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5470         on Windows.
5471
5472 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5473             Jan Kratochvil  <jan.kratochvil@redhat.com>
5474             Paul Fertser  <fercerpav@gmail.com>
5475             Tsutomu Seki  <sekiriki@gmail.com>
5476             Pedro Alves  <palves@redhat.com>
5477
5478         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5479         'unittests/parse-connection-spec-selftests.c'.
5480         (COMMON_SFILES): Add 'common/netstuff.c'.
5481         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5482         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5483         * common/netstuff.c: New file.
5484         * common/netstuff.h: New file.
5485         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5486         (wait_for_connect): Update comment.  New parameter
5487         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5488         Use 'sock' directly instead of 'scb->fd'.
5489         (try_connect): New function, with code from 'net_open'.
5490         (net_open): Rewrite main loop to deal with multiple
5491         sockets/addresses.  Handle IPv6-style hostnames; implement
5492         support for IPv6 connections.
5493         * unittests/parse-connection-spec-selftests.c: New file.
5494
5495 2018-07-11  Pedro Alves  <palves@redhat.com>
5496
5497         PR gdb/23377
5498         * remote.c (remote_target::remote_detach_pid): Call
5499         set_current_process.
5500
5501 2018-07-11  Pedro Alves  <palves@redhat.com>
5502
5503         * h8300-tdep.c (h8300_gdbarch_init): Remove
5504         set_gdbarch_ecoff_reg_to_regnum calls.
5505
5506 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5507
5508         PR c++/23373
5509         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5510         offsets/sizes for static members of a class/struct.
5511
5512 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5513
5514         * target-descriptions.c (tdesc_register_bitsize): Rename.
5515         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5516         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5517         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5518
5519 2018-07-10  Tom Tromey  <tom@tromey.com>
5520
5521         * breakpoint.c (moribund_locations): Now static and a
5522         std::vector.
5523         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5524         (build_bpstat_chain, update_global_location_list)
5525         (breakpoint_retire_moribund): Update.
5526         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5527         VEC.
5528
5529 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5530
5531         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5532         (riscv_register_reggroup_p): Use new function, remove unneeded
5533         parenthesis.
5534         (riscv_push_dummy_call): Extend assert to compare against xlen or
5535         flen based on register type.
5536
5537 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5538
5539         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5540
5541 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5542
5543         * remote.c (show_hardware_watchpoint_limit): New function.
5544         (show_hardware_watchpoint_length_limit): New function.
5545         (show_hardware_breakpoint_limit): New function.
5546         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5547         where appropriate, update help text.
5548
5549 2018-07-09  Tom Tromey  <tom@tromey.com>
5550
5551         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5552         (CLIBS): Don't mention NAT_CLIBS.
5553
5554 2018-07-09  Tom Tromey  <tom@tromey.com>
5555
5556         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5557         (LIBGDB_OBS, clean mostlyclean): Update.
5558         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5559
5560 2018-07-09  Tom Tromey  <tom@tromey.com>
5561
5562         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5563         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5564         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5565
5566 2018-07-09  Tom Tromey  <tom@tromey.com>
5567
5568         * Makefile.in (ALLDEPFILES): Remove exec.c.
5569         (COMMON_OBS): Remove exec.o.
5570         (COMMON_SFILES): Add exec.c.
5571
5572 2018-07-09  Tom Tromey  <tom@tromey.com>
5573
5574         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5575
5576 2018-07-09  Tom Tromey  <tom@tromey.com>
5577
5578         * Makefile.in (clean mostlyclean): Remove stamp-version.
5579         (version.c): Depend on stamp-version.
5580         (stamp-version): New rule, from version.c rule.
5581
5582 2018-07-09  Tom Tromey  <tom@tromey.com>
5583
5584         * Makefile.in (init.c): Depend on stamp-init.
5585         (stamp-init): New rule, from init.c rule.
5586         (clean mostlyclean): Remove stamp-init.
5587
5588 2018-07-09  Tom Tromey  <tom@tromey.com>
5589
5590         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5591         SUBDIR_GCC_COMPILE_SRCS.
5592
5593 2018-07-09  Tom Tromey  <tom@tromey.com>
5594
5595         * Makefile.in (init.c): Remove some unused sed rules.
5596
5597 2018-07-09  Tom Tromey  <tom@tromey.com>
5598
5599         * Makefile.in (TSOBS): Remove.
5600         (INIT_FILES): Update.
5601         (LIBGDB_OBS): Update.
5602         (COMMON_SFILES): Add inflow.c.
5603         (SFILES): Remove inflow.c.
5604
5605 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5606
5607         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5608
5609 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5610
5611         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5612         get_saveloc_name, is_signal_frame_name, step_name,
5613         init_remote_name, create_addr_space_name,
5614         destroy_addr_space_name, search_unwind_table_name,
5615         find_dyn_list_name): Constify.
5616
5617 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5618
5619         * darwin-nat.c (darwin_pthread_kill): New function.
5620         (darwin_resume_thread): Use darwin_pthread_kill.
5621
5622 2018-07-05  Tom de Vries  <tdevries@suse.de>
5623
5624         * macroexp.c (macro_buffer) <operator=>: New member function.
5625
5626 2018-07-04  Tom Tromey  <tom@tromey.com>
5627
5628         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5629
5630 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5631
5632         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5633         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5634         * maint.c: Likewise.
5635         * top.c: Likewise.
5636
5637 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5638
5639         * NEWS: Create a new section for the next release branch.
5640         Rename the section of the current branch, now that it has
5641         been cut.
5642
5643 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5644
5645         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5646         * version.in: Bump version to 8.2.50.DATE-git.
5647
5648 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5649             Pedro Alves  <palves@redhat.com>
5650
5651         * linux-nat.c (linux_init_ptrace): Rename to ...
5652         (linux_init_ptrace_procfs): ... this.  Call
5653         linux_proc_init_warnings.
5654         (linux_nat_target::post_attach)
5655         (linux_nat_target::post_startup_inferior): Adjust.
5656         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5657         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5658
5659 2018-07-04  Tom de Vries  <tdevries@suse.de>
5660
5661         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5662         check ...
5663         (read_comp_unit_head): ... here.
5664
5665 2018-07-03  Tom Tromey  <tom@tromey.com>
5666
5667         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5668         (stop_tracing, tstatus_command)
5669         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5670         (print_one_static_tracepoint_marker): Update.
5671         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5672         std::vector.
5673         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5674         VEC.
5675         (all_tracepoints, static_tracepoints_here): Return std::vector.
5676
5677 2018-07-03  Tom Tromey  <tom@tromey.com>
5678
5679         * common/ptid.c (ptid_equal): Remove.
5680         * common/ptid.h (ptid_equal): Don't declare.
5681         * ada-tasks.c: Update.
5682         * breakpoint.c: Update.
5683         * common/agent.c: Update.
5684         * corelow.c: Update.
5685         * darwin-nat-info.c: Update.
5686         * darwin-nat.c: Update.
5687         * dcache.c: Update.
5688         * dtrace-probe.c: Update.
5689         * dummy-frame.c: Update.
5690         * fbsd-nat.c: Update.
5691         * frame.c: Update.
5692         * gdbthread.h: Update.
5693         * gnu-nat.c: Update.
5694         * go32-nat.c: Update.
5695         * inf-loop.c: Update.
5696         * inf-ptrace.c: Update.
5697         * infcall.c: Update.
5698         * infcmd.c: Update.
5699         * inflow.c: Update.
5700         * infrun.c: Update.
5701         * linux-fork.c: Update.
5702         * linux-nat.c: Update.
5703         * linux-thread-db.c: Update.
5704         * mi/mi-cmd-var.c: Update.
5705         * mi/mi-interp.c: Update.
5706         * mi/mi-main.c: Update.
5707         * nto-procfs.c: Update.
5708         * ppc-linux-tdep.c: Update.
5709         * procfs.c: Update.
5710         * python/py-inferior.c: Update.
5711         * python/py-record-btrace.c: Update.
5712         * python/py-record.c: Update.
5713         * ravenscar-thread.c: Update.
5714         * regcache.c: Update.
5715         * remote-sim.c: Update.
5716         * remote.c: Update.
5717         * sol-thread.c: Update.
5718         * solib.c: Update.
5719         * target.c: Update.
5720         * tui/tui-stack.c: Update.
5721         * varobj.c: Update.
5722         * windows-nat.c: Update.
5723         * windows-tdep.c: Update.
5724
5725 2018-07-03  Tom Tromey  <tom@tromey.com>
5726
5727         * common/ptid.c (ptid_match): Remove.
5728         * common/ptid.h (ptid_match): Don't declare.
5729         * fbsd-nat.c: Update.
5730         * infcmd.c: Update.
5731         * infrun.c: Update.
5732         * linux-nat.c: Update.
5733         * record-btrace.c: Update.
5734         * regcache.c: Update.
5735         * remote.c: Update.
5736
5737 2018-07-03  Tom Tromey  <tom@tromey.com>
5738
5739         * common/ptid.c (ptid_tid_p): Remove.
5740         * common/ptid.h (ptid_tid_p): Don't declare.
5741         * sol-thread.c: Update.
5742
5743 2018-07-03  Tom Tromey  <tom@tromey.com>
5744
5745         * common/ptid.c (ptid_lwp_p): Remove.
5746         * common/ptid.h (ptid_lwp_p): Don't declare.
5747         * fbsd-nat.c: Update.
5748         * linux-nat.c: Update.
5749         * nat/linux-procfs.c: Update.
5750         * nat/x86-linux-dregs.c: Update.
5751         * sol-thread.c: Update.
5752
5753 2018-07-03  Tom Tromey  <tom@tromey.com>
5754
5755         * common/ptid.c (ptid_is_pid): Remove.
5756         * common/ptid.h (ptid_is_pid): Don't declare.
5757         * infrun.c: Update.
5758         * linux-nat.c: Update.
5759         * mi/mi-interp.c: Update.
5760         * remote.c: Update.
5761         * thread.c: Update.
5762
5763 2018-07-03  Tom Tromey  <tom@tromey.com>
5764
5765         * common/ptid.c (ptid_get_tid): Remove.
5766         * common/ptid.h (ptid_get_tid): Don't declare.
5767         * ada-tasks.c: Update.
5768         * aix-thread.c: Update.
5769         * bsd-uthread.c: Update.
5770         * darwin-nat.c: Update.
5771         * fbsd-nat.c: Update.
5772         * i386-darwin-nat.c: Update.
5773         * infrun.c: Update.
5774         * linux-tdep.c: Update.
5775         * nto-procfs.c: Update.
5776         * ppc-ravenscar-thread.c: Update.
5777         * python/py-infthread.c: Update.
5778         * ravenscar-thread.c: Update.
5779         * sol-thread.c: Update.
5780         * sparc-ravenscar-thread.c: Update.
5781         * windows-nat.c: Update.
5782
5783 2018-07-03  Tom Tromey  <tom@tromey.com>
5784
5785         * common/ptid.c (ptid_get_lwp): Remove.
5786         * common/ptid.h (ptid_get_lwp): Don't declare.
5787         * aarch64-linux-nat.c: Update.
5788         * ada-tasks.c: Update.
5789         * aix-thread.c: Update.
5790         * amd64-linux-nat.c: Update.
5791         * arm-linux-nat.c: Update.
5792         * corelow.c: Update.
5793         * fbsd-nat.c: Update.
5794         * fbsd-tdep.c: Update.
5795         * gnu-nat.c: Update.
5796         * i386-cygwin-tdep.c: Update.
5797         * i386-gnu-nat.c: Update.
5798         * i386-linux-nat.c: Update.
5799         * ia64-linux-nat.c: Update.
5800         * inf-ptrace.c: Update.
5801         * infrun.c: Update.
5802         * linux-fork.c: Update.
5803         * linux-nat.c: Update.
5804         * linux-tdep.c: Update.
5805         * linux-thread-db.c: Update.
5806         * mips-linux-nat.c: Update.
5807         * nat/aarch64-linux-hw-point.c: Update.
5808         * nat/aarch64-linux.c: Update.
5809         * nat/linux-btrace.c: Update.
5810         * nat/linux-osdata.c: Update.
5811         * nat/linux-procfs.c: Update.
5812         * nat/x86-linux-dregs.c: Update.
5813         * obsd-nat.c: Update.
5814         * ppc-fbsd-nat.c: Update.
5815         * ppc-linux-nat.c: Update.
5816         * procfs.c: Update.
5817         * python/py-infthread.c: Update.
5818         * ravenscar-thread.c: Update.
5819         * remote.c: Update.
5820         * s390-linux-nat.c: Update.
5821         * sol-thread.c: Update.
5822         * sol2-tdep.c: Update.
5823         * spu-linux-nat.c: Update.
5824         * x86-linux-nat.c: Update.
5825         * xtensa-linux-nat.c: Update.
5826
5827 2018-07-03  Tom Tromey  <tom@tromey.com>
5828
5829         * common/ptid.c (ptid_get_pid): Remove.
5830         * common/ptid.h (ptid_get_pid): Don't declare.
5831         * aarch64-linux-nat.c: Update.
5832         * ada-lang.c: Update.
5833         * aix-thread.c: Update.
5834         * alpha-bsd-nat.c: Update.
5835         * amd64-fbsd-nat.c: Update.
5836         * amd64-linux-nat.c: Update.
5837         * arm-linux-nat.c: Update.
5838         * arm-nbsd-nat.c: Update.
5839         * auxv.c: Update.
5840         * break-catch-syscall.c: Update.
5841         * breakpoint.c: Update.
5842         * bsd-uthread.c: Update.
5843         * corelow.c: Update.
5844         * ctf.c: Update.
5845         * darwin-nat.c: Update.
5846         * fbsd-nat.c: Update.
5847         * fbsd-tdep.c: Update.
5848         * gcore.c: Update.
5849         * gnu-nat.c: Update.
5850         * hppa-nbsd-nat.c: Update.
5851         * hppa-obsd-nat.c: Update.
5852         * i386-fbsd-nat.c: Update.
5853         * ia64-linux-nat.c: Update.
5854         * inf-ptrace.c: Update.
5855         * infcmd.c: Update.
5856         * inferior.c: Update.
5857         * inferior.h: Update.
5858         * inflow.c: Update.
5859         * infrun.c: Update.
5860         * linux-fork.c: Update.
5861         * linux-nat.c: Update.
5862         * linux-tdep.c: Update.
5863         * linux-thread-db.c: Update.
5864         * m68k-bsd-nat.c: Update.
5865         * mi/mi-interp.c: Update.
5866         * mi/mi-main.c: Update.
5867         * mips-linux-nat.c: Update.
5868         * mips-nbsd-nat.c: Update.
5869         * mips64-obsd-nat.c: Update.
5870         * nat/aarch64-linux-hw-point.c: Update.
5871         * nat/aarch64-linux.c: Update.
5872         * nat/linux-btrace.c: Update.
5873         * nat/linux-osdata.c: Update.
5874         * nat/linux-procfs.c: Update.
5875         * nat/x86-linux-dregs.c: Update.
5876         * nto-procfs.c: Update.
5877         * obsd-nat.c: Update.
5878         * ppc-linux-nat.c: Update.
5879         * ppc-nbsd-nat.c: Update.
5880         * ppc-obsd-nat.c: Update.
5881         * proc-service.c: Update.
5882         * procfs.c: Update.
5883         * python/py-inferior.c: Update.
5884         * python/py-infthread.c: Update.
5885         * ravenscar-thread.c: Update.
5886         * record.c: Update.
5887         * remote-sim.c: Update.
5888         * remote.c: Update.
5889         * rs6000-nat.c: Update.
5890         * s390-linux-nat.c: Update.
5891         * sh-nbsd-nat.c: Update.
5892         * sol-thread.c: Update.
5893         * sparc-nat.c: Update.
5894         * sparc64-tdep.c: Update.
5895         * spu-linux-nat.c: Update.
5896         * spu-tdep.c: Update.
5897         * target-debug.h: Update.
5898         * target.c: Update.
5899         * thread.c: Update.
5900         * tid-parse.c: Update.
5901         * tracefile-tfile.c: Update.
5902         * vax-bsd-nat.c: Update.
5903         * windows-nat.c: Update.
5904         * x86-linux-nat.c: Update.
5905         * x86-nat.c: Update.
5906
5907 2018-07-03  Tom Tromey  <tom@tromey.com>
5908
5909         * common/ptid.c (pid_to_ptid): Remove.
5910         * common/ptid.h (pid_to_ptid): Don't declare.
5911         * aix-thread.c: Update.
5912         * arm-linux-nat.c: Update.
5913         * common/ptid.c: Update.
5914         * common/ptid.h: Update.
5915         * corelow.c: Update.
5916         * ctf.c: Update.
5917         * darwin-nat.c: Update.
5918         * fbsd-nat.c: Update.
5919         * fork-child.c: Update.
5920         * gnu-nat.c: Update.
5921         * go32-nat.c: Update.
5922         * inf-ptrace.c: Update.
5923         * infcmd.c: Update.
5924         * inferior.c: Update.
5925         * infrun.c: Update.
5926         * linux-fork.c: Update.
5927         * linux-nat.c: Update.
5928         * nat/aarch64-linux-hw-point.c: Update.
5929         * nat/fork-inferior.c: Update.
5930         * nat/x86-linux-dregs.c: Update.
5931         * nto-procfs.c: Update.
5932         * obsd-nat.c: Update.
5933         * procfs.c: Update.
5934         * progspace.c: Update.
5935         * remote.c: Update.
5936         * rs6000-nat.c: Update.
5937         * s390-linux-nat.c: Update.
5938         * sol-thread.c: Update.
5939         * spu-linux-nat.c: Update.
5940         * target.c: Update.
5941         * top.c: Update.
5942         * tracefile-tfile.c: Update.
5943         * windows-nat.c: Update.
5944
5945 2018-07-03  Tom Tromey  <tom@tromey.com>
5946
5947         * common/ptid.h (ptid_build): Don't declare.
5948         * common/ptid.c (ptid_build): Remove.
5949         * aix-thread.c: Update.
5950         * bsd-kvm.c: Update.
5951         * bsd-uthread.c: Update.
5952         * common/agent.c: Update.
5953         * common/ptid.c: Update.
5954         * common/ptid.h: Update.
5955         * corelow.c: Update.
5956         * darwin-nat.c: Update.
5957         * fbsd-nat.c: Update.
5958         * gnu-nat.c: Update.
5959         * linux-fork.c: Update.
5960         * linux-nat.c: Update.
5961         * linux-thread-db.c: Update.
5962         * nat/linux-osdata.c: Update.
5963         * nat/linux-procfs.c: Update.
5964         * nto-procfs.c: Update.
5965         * obsd-nat.c: Update.
5966         * proc-service.c: Update.
5967         * procfs.c: Update.
5968         * ravenscar-thread.c: Update.
5969         * remote-sim.c: Update.
5970         * remote.c: Update.
5971         * sol-thread.c: Update.
5972         * target.c: Update.
5973         * windows-nat.c: Update.
5974
5975 2018-07-03  Tom Tromey  <tom@tromey.com>
5976
5977         * infrun.c (follow_exec): Use exit_inferior_silent.
5978         * inferior.c (exit_inferior_num_silent): Remove.
5979         * inferior.h (exit_inferior_num_silent): Don't declare.
5980
5981 2018-07-03  Tom Tromey  <tom@tromey.com>
5982
5983         PR cli/23340:
5984         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5985         inferior_ptid on error.
5986
5987 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5988             Simon Marchi  <simon.marchi@polymtl.ca>
5989
5990         PR tdep/8282
5991         * disasm.h (gdb_disassembler): Add
5992         `m_disassembler_options_holder'. member
5993         * disasm.c (get_all_disassembler_options): New function.
5994         (gdb_disassembler::gdb_disassembler): Use it.
5995         (gdb_buffered_insn_length_init_dis): Likewise.
5996         (gdb_buffered_insn_length): Adjust accordingly.
5997         (set_disassembler_options): Handle options with arguments.
5998         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5999         line if showing options with descriptions.
6000         (disassembler_options_completer): Adapt to using the
6001         `disasm_options_and_args_t' structure.
6002         * mips-tdep.c (mips_disassembler_options): New variable.
6003         (mips_disassembler_options_o32): Likewise.
6004         (mips_disassembler_options_n32): Likewise.
6005         (mips_disassembler_options_n64): Likewise.
6006         (gdb_print_insn_mips): Don't set `disassembler_options'.
6007         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6008         functions.
6009         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6010         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6011         `gdbarch_disassembler_options_implicit' and
6012         `gdbarch_valid_disassembler_options'.
6013         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6014         `disasm_options_and_args_t' structure.
6015         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6016         method.
6017         (valid_disassembler_options): Switch from `disasm_options_t' to
6018         the `disasm_options_and_args_t' structure.
6019         * NEWS: Document `set disassembler-options' support for the MIPS
6020         target.
6021         * gdbarch.h: Regenerate.
6022         * gdbarch.c: Regenerate.
6023
6024 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6025
6026         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6027
6028 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6029
6030         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6031         parameter in call to amd64_target_description.
6032         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6033         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6034         (amd64fbsd_init_abi): Likewise.
6035         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6036         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6037         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6038         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6039
6040 2018-06-29  Pedro Alves  <palves@redhat.com>
6041
6042         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6043         "segments" parameter.
6044         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6045         (_initialize_amd64_tdep): Update call to
6046         amd64_create_target_description.
6047         (amd64_target_description): Add "segments" parameter.  Adjust
6048         the implementation to use it.
6049         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6050         call to amd64_create_target_description.
6051         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6052         * gdb/arch/amd64.h (amd64_create_target_description): Add
6053         "segments" register.
6054         * gdb/arch/amd64.c (amd64_create_target_description): Add
6055         "segments" parameter.  Call create_feature_i386_64bit_segments
6056         only if SEGMENTS is true.
6057         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6058         call to amd64_create_target_description.
6059
6060 2018-06-29  Pedro Alves  <palves@redhat.com>
6061
6062         * thread.c (thread_target_id_str): New, factored out from ...
6063         (print_thread_info_1): ... here.  Use it to compute the max
6064         "Target Id" column width.
6065
6066 2018-06-29  Pedro Alves  <palves@redhat.com>
6067
6068         * remote.c (remote_target::extra_thread_info): Delete
6069         'display_buf' and 'n' locals.  from the cache, regardless of
6070         packet mechanims is in use.  Use cache for qThreadExtra and qP
6071         methods too.
6072
6073 2018-06-29  Pedro Alves  <palves@redhat.com>
6074
6075         * blockframe.c (find_pc_sect_containing_function): New function.
6076         * breakpoint.c (print_breakpoint_location): Don't call
6077         find_pc_sect_function.
6078         * linespec.c (create_sals_line_offset): Record the location's
6079         symbol in the sal.
6080         * linespec.c (convert_address_location_to_sals): Fill in sal's
6081         symbol with find_pc_sect_containing_function.
6082         * symtab.c (find_function_start_sal): Rename to ...
6083         (find_function_start_sal_1): ... this.
6084         (find_function_start_sal): Reimplement as wrapper around
6085         find_function_start_sal_1, and use
6086         find_pc_sect_containing_function to fill in the sal's symbol.
6087         (find_function_start_sal(symbol*, bool)): Adjust.
6088         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6089         comments.
6090         (find_pc_sect_containing_function): Declare.
6091
6092 2018-06-29  Pedro Alves  <palves@redhat.com>
6093
6094         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6095         true if the the location has no symbol.
6096
6097 2018-06-28  Tom Tromey  <tom@tromey.com>
6098
6099         * NEWS: Mention --enable-codesign.
6100         * silent-rules.mk (ECHO_SIGN): New variable.
6101         * configure.ac: Add --enable-codesign.
6102         * configure: Rebuild.
6103         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6104         (gdb$(EXEEXT)): Optionally invoke codesign.
6105
6106 2018-06-28  Pedro Alves  <palves@redhat.com>
6107
6108         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6109         comments.
6110         (switch_to_thread_no_regs): Adjust comment.
6111         * infcmd.c (stop_pc): Delete.
6112         (post_create_inferior, info_program_command): Replace references
6113         to stop_pc with references to thread_info->suspend.stop_pc.
6114         * inferior.h (stop_pc): Delete declaration.
6115         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6116         (handle_inferior_event_1, handle_signal_stop)
6117         (process_event_stop_test, keep_going_stepped_thread)
6118         (handle_step_into_function, handle_step_into_function_backward)
6119         (print_stop_location): Replace references to stop_pc with
6120         references to thread_info->suspend.stop_pc.
6121         (struct infcall_suspend_state) <stop_pc>: Delete field.
6122         (save_infcall_suspend_state, restore_infcall_suspend_state):
6123         Remove references to inf_stat->stop_pc.
6124         * linux-fork.c (fork_load_infrun_state): Likewise.
6125         * record-btrace.c (record_btrace_set_replay): Likewise.
6126         * record-full.c (record_full_goto_entry): Likewise.
6127         * remote.c (print_one_stopped_thread): Likewise.
6128         * target.c (target_resume): Extend comment.
6129         * thread.c (set_executing_thread): New.
6130         (set_executing): Use it.
6131         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6132         Remove references to stop_pc.
6133
6134 2018-06-28  Pedro Alves  <palves@redhat.com>
6135
6136         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6137         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6138
6139 2018-06-28  Tom Tromey  <tom@tromey.com>
6140
6141         * coffread.c (coff_symfile_finish): Update.
6142         * xcoffread.c (xcoff_symfile_finish): Update.
6143         * elfread.c (elf_symfile_finish): Update.
6144         * symfile.h (dwarf2_free_objfile): Don't declare.
6145         * dwarf2read.c (_initialize_dwarf2_read): Use
6146         register_objfile_data_with_cleanup.
6147         (dwarf2_free_objfile): Now static.  Change signature.
6148
6149 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6150
6151         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6152         option "-o" to add-symbol-file-load to add an offset to each
6153         section's load address.
6154         * symfile.c (set_objfile_default_section_offset): New function.
6155
6156 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6157
6158         * symfile.c (add_symbol_file_command): Make sure that sections
6159         with the same name are sorted in the same order.
6160
6161 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6162
6163         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6164         require the second argument.  If omitted, load sections at the
6165         addresses specified in the file.
6166
6167 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6168
6169         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6170         (_initialize_symfile): Add option "-o" to symbol-file to add an
6171         offset to each section of the symbol file.
6172
6173 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6174
6175         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6176
6177 2018-06-27  Tom Tromey  <tom@tromey.com>
6178
6179         * stack.c (_initialize_stack): Update "func" help text.
6180
6181 2018-06-27  Tom Tromey  <tom@tromey.com>
6182
6183         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6184         std::vector.
6185         (unwind_infopy_str, pyuw_create_unwind_info)
6186         (unwind_infopy_add_saved_register, pyuw_sniffer)
6187         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6188         Update.
6189         (struct saved_reg): Add constructor.
6190         <value>: Now a gdbpy_ref<>.
6191
6192 2018-06-27  Tom Tromey  <tom@tromey.com>
6193
6194         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6195
6196 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6197
6198         * gdb-gdb.py.in: Format using autopep8.
6199
6200 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6201
6202         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6203         (type_lookup_function): Recognize CORE_ADDR values.
6204
6205 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6206
6207         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6208         print tag_name.
6209
6210 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6211
6212         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6213         <__lt__>: Add.
6214
6215 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6216
6217         * gdb-gdb.py: Move to...
6218         * gdb-gdb.py.in: ... here.
6219         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6220         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6221         dependencies.
6222         (distclean): Remove gdb-gdb.py when cleaning.
6223         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6224         * configure: Re-generate.
6225
6226 2018-06-27  Pedro Alves  <palves@redhat.com>
6227
6228         * proc-service.c (get_ps_regcache): New.
6229         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6230         (ps_lsetfpregs): Use it.
6231
6232 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6233
6234         PR gdb/21695
6235         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6236         (dwarf_decode_lines_1): Adjust.
6237
6238 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6239
6240         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6241         override.
6242         <info_proc>: Likewise.
6243
6244 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6245
6246         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6247         to windows_fetch_one_register, and only handle the case of
6248         fetching one register.  Move the code that reloads the context
6249         and iterates over all registers if R is negative to...
6250         (windows_nat_target::fetch_registers): ... here.
6251         (do_windows_store_inferior_registers): Rename to
6252         windows_store_one_register, and only handle the case of storing
6253         one register.  Move the code that handles the case where r is
6254         negative to...
6255         (windows_nat_target::store_registers) ... here.
6256
6257 2018-06-26  Tom Tromey  <tom@tromey.com>
6258
6259         PR rust/22574:
6260         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6261         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6262         Update.
6263         (rust_internal_print_type): Add podata parameter.
6264         (rust_print_type): Update.
6265
6266 2018-06-26  Tom Tromey  <tom@tromey.com>
6267
6268         * typeprint.h (struct print_offset_data) <update, finish,
6269         maybe_print_hole>: New methods.
6270         <indentation>: New constant.
6271         * typeprint.c (print_offset_data::indentation): Define.
6272         (print_offset_data::maybe_print_hole, print_offset_data::update)
6273         (print_offset_data::finish): Move from c-typeprint.c and rename.
6274         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6275         (print_spaces_filtered_with_print_options): Update.
6276         (c_print_type_union_field_offset, maybe_print_hole)
6277         (c_print_type_struct_field_offset): Move to typeprint.c and
6278         rename.
6279         (c_type_print_base_struct_union): Update.
6280
6281 2018-06-25  Pedro Alves  <palves@redhat.com>
6282
6283         * gdbthread.h (thread_info_ref, delete_thread)
6284         (delete_thread_silent, first_thread_of_inferior)
6285         (any_thread_of_inferior, switch_to_thread)
6286         (enable_thread_stack_temporaries)
6287         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6288         (get_last_thread_stack_temporary)
6289         (value_in_thread_stack_temporaries, can_access_registers_thread):
6290         Spell out "struct thread_info" instead of just "thread_info".
6291         * inferior.h (notice_new_inferior): Likewise.
6292
6293 2018-06-25  Pedro Alves  <palves@redhat.com>
6294
6295         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6296         pass thread_info pointer to delete_thread.
6297         (windows_nat_target::detach): Pass inferior pointer to
6298         detach_inferior.
6299         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6300         delete_thread.
6301         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6302         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6303         and pass a thread_info pointer to delete_thread.
6304         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6305         pass thread_info pointer to delete_thread.
6306         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6307         delete_thread_silent call.
6308         * procfs.c (procfs_target::detach): Pass inferior pointer to
6309         detach_inferior.
6310         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6311         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6312         delete_thread_silent call.
6313         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6314         pass thread_info pointer to delete_thread.
6315         (windows_nat_target::detach): Pass inferior pointer to
6316         delete_inferior.
6317
6318 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6319
6320         * regcache.c (readable_regcache::read_part): Fix asserts.
6321         (reg_buffer::raw_collect_part): New function.
6322         (regcache::write_part): Fix asserts.
6323         (reg_buffer::raw_supply_part): New function.
6324         (regcache::transfer_regset_register): New helper function.
6325         (regcache::transfer_regset): Call new functions.
6326         (regcache_supply_regset): Use gdb_byte*.
6327         (regcache::supply_regset): Likewise.
6328         (regcache_collect_regset): Likewise.
6329         (regcache::collect_regset): Likewise.
6330         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6331         (reg_buffer::raw_supply_part): Likewise.
6332         (regcache::transfer_regset_register): Likewise.
6333         (regcache::transfer_regset): Use gdb_byte*.
6334
6335 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6336
6337         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6338
6339 2018-06-21  Pedro Alves  <palves@redhat.com>
6340
6341         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6342         instead of a ptid_t.  All callers adjusted.
6343         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6344         adjusted.
6345         (print_ada_task_info, display_current_task_id, task_command_1):
6346         Adjust.
6347         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6348         inferior_thread.
6349         (breakpoint_kind): Adjust.
6350         (remove_breakpoints_pid): Rename to ...
6351         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6352         pointer.  All callers adjusted.
6353         (bpstat_clear_actions): Use inferior_thread.
6354         (get_bpstat_thread): New.
6355         (bpstat_do_actions): Use it.
6356         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6357         to take a thread_info pointer.  All callers adjusted.
6358         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6359         (breakpoint_re_set_thread): Use inferior_thread.
6360         * breakpoint.h (struct inferior): Forward declare.
6361         (bpstat_stop_status): Update.
6362         (remove_breakpoints_pid): Delete.
6363         (remove_breakpoints_inf): New.
6364         * bsd-uthread.c (bsd_uthread_target::wait)
6365         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6366         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6367         (maint_btrace_packet_history_cmd)
6368         (maint_btrace_clear_packet_history_cmd): Adjust.
6369         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6370         inferior_thread.
6371         * cli/cli-interp.c: Include "inferior.h".
6372         * common/refcounted-object.h (struct
6373         refcounted_object_ref_policy): New.
6374         * compile/compile-object-load.c: Include gdbthread.h.
6375         (store_regs): Use inferior_thread.
6376         * corelow.c (core_target::close): Use current_inferior.
6377         (core_target_open): Adjust to use first_thread_of_inferior and use
6378         the current inferior.
6379         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6380         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6381         <thread>: ... this new field.  All references adjusted.
6382         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6383         Take a thread_info pointer instead of a ptid_t.
6384         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6385         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6386         thread_info pointer instead of a ptid_t.
6387         * elfread.c: Include "inferior.h".
6388         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6389         Use inferior_thread.
6390         * eval.c (evaluate_subexp): Likewise.
6391         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6392         inferior_thread.
6393         * gdb_proc_service.h (struct thread_info): Forward declare.
6394         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6395         <thread>: ... this new field.  All references adjusted.
6396         * gdbarch.h, gdbarch.c: Regenerate.
6397         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6398         'thread' parameter.  All implementations and callers adjusted.
6399         * gdbthread.h (thread_info) <set_running>: New method.
6400         (delete_thread, delete_thread_silent): Take a thread_info pointer
6401         instead of a ptid.
6402         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6403         (first_thread_of_process): Delete, replaced by ...
6404         (first_thread_of_inferior): ... this new function.  All callers
6405         adjusted.
6406         (any_live_thread_of_process): Delete, replaced by ...
6407         (any_live_thread_of_inferior): ... this new function.  All callers
6408         adjusted.
6409         (switch_to_thread, switch_to_no_thread): Declare.
6410         (is_executing): Delete.
6411         (enable_thread_stack_temporaries): Update comment.
6412         <enable_thread_stack_temporaries>: Take a thread_info pointer
6413         instead of a ptid_t.  Incref the thread.
6414         <~enable_thread_stack_temporaries>: Decref the thread.
6415         <m_ptid>: Delete
6416         <m_thr>: New.
6417         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6418         (get_last_thread_stack_temporary)
6419         (value_in_thread_stack_temporaries, can_access_registers_thread):
6420         Take a thread_info pointer instead of a ptid_t.  All callers
6421         adjusted.
6422         * infcall.c (get_call_return_value): Use inferior_thread.
6423         (run_inferior_call): Work with thread pointers instead of ptid_t.
6424         (call_function_by_hand_dummy): Work with thread pointers instead
6425         of ptid_t.  Use thread_info_ref.
6426         * infcmd.c (proceed_thread_callback): Access thread's state
6427         directly.
6428         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6429         access thread's state directly.
6430         (continue_command): Use inferior_thread.
6431         (info_program_command): Use find_thread_ptid and access thread
6432         state directly.
6433         (proceed_after_attach_callback): Use thread state directly.
6434         (notice_new_inferior): Take a thread_info pointer instead of a
6435         ptid_t.  All callers adjusted.
6436         (exit_inferior): Take an inferior pointer instead of a pid.  All
6437         callers adjusted.
6438         (exit_inferior_silent): New.
6439         (detach_inferior): Delete.
6440         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6441         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6442         (detach_inferior_command, kill_inferior_command): Use
6443         find_inferior_id instead of valid_gdb_inferior_id and
6444         gdb_inferior_id_to_pid.
6445         (inferior_command): Use inferior and thread pointers.
6446         * inferior.h (struct thread_info): Forward declare.
6447         (notice_new_inferior): Take a thread_info pointer instead of a
6448         ptid_t.  All callers adjusted.
6449         (detach_inferior): Delete declaration.
6450         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6451         instead of a pid.  All callers adjusted.
6452         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6453         (valid_gdb_inferior_id): Delete.
6454         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6455         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6456         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6457         ...
6458         <inf>: ... this new field.
6459         <step_ptid>: Delete, replaced by ...
6460         <step_thread>: ... this new field.
6461         (get_displaced_stepping_state): Take an inferior pointer instead
6462         of a pid.  All callers adjusted.
6463         (displaced_step_in_progress_any_inferior): Adjust.
6464         (displaced_step_in_progress_thread): Take a thread pointer instead
6465         of a ptid_t.  All callers adjusted.
6466         (displaced_step_in_progress, add_displaced_stepping_state): Take
6467         an inferior pointer instead of a pid.  All callers adjusted.
6468         (get_displaced_step_closure_by_addr): Adjust.
6469         (remove_displaced_stepping_state): Take an inferior pointer
6470         instead of a pid.  All callers adjusted.
6471         (displaced_step_prepare_throw, displaced_step_prepare)
6472         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6473         All callers adjusted.
6474         (start_step_over): Adjust.
6475         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6476         displaced step queue.
6477         (do_target_resume): Adjust.
6478         (fetch_inferior_event): Use inferior_thread.
6479         (context_switch, get_inferior_stop_soon): Take an
6480         execution_control_state pointer instead of a ptid_t.  All callers
6481         adjusted.
6482         (switch_to_thread_cleanup): Delete.
6483         (stop_all_threads): Use scoped_restore_current_thread.
6484         * inline-frame.c: Include "gdbthread.h".
6485         (inline_state) <inline_state>: Take a thread pointer instead of a
6486         ptid_t.  All callers adjusted.
6487         <ptid>: Delete, replaced by ...
6488         <thread>: ... this new field.
6489         (find_inline_frame_state): Take a thread pointer instead of a
6490         ptid_t.  All callers adjusted.
6491         (skip_inline_frames, step_into_inline_frame)
6492         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6493         pointer instead of a ptid_t.  All callers adjusted.
6494         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6495         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6496         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6497         pointers directly.
6498         * linux-nat.c (get_detach_signal): Likewise.
6499         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6500         (thread_db_notice_clone): Adjust.
6501         (thread_db_find_new_threads_silently)
6502         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6503         a thread pointer instead of a ptid_t.  All callers adjusted.
6504         * mi/mi-cmd-var.c: Include "inferior.h".
6505         (mi_cmd_var_update_iter): Update to use thread pointers.
6506         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6507         inferior directly.
6508         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6509         out to ...
6510         (mi_output_running): ... this new function.
6511         (mi_on_resume_1): Adjust to use it.
6512         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6513         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6514         directly.
6515         (interrupt_thread_callback): : Adjust to use thread and inferior
6516         pointers.
6517         * proc-service.c: Include "gdbthread.h".
6518         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6519         * progspace-and-thread.c: Include "inferior.h".
6520         * progspace.c: Include "inferior.h".
6521         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6522         hold a reference to an inferior_object.
6523         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6524         inferior_thread.
6525         * python/py-inferior.c (struct inferior_object): Give the type a
6526         tag name instead of a typedef.
6527         (python_on_normal_stop): No need to check if the current thread is
6528         listed.
6529         (inferior_to_inferior_object): Change return type to
6530         inferior_object.  All callers adjusted.
6531         (find_thread_object): Delete, bits factored out to ...
6532         (thread_to_thread_object): ... this new function.
6533         * python/py-infthread.c (create_thread_object): Use
6534         inferior_to_inferior_object.
6535         (thpy_is_stopped): Use thread pointer directly.
6536         (gdbpy_selected_thread): Use inferior_thread.
6537         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6538         field, replaced with ...
6539         <thread>: ... this new field.  All users adjusted.
6540         (btpy_insn_or_gap_new): Drop const.
6541         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6542         callers adjusted.
6543         * python/py-record.c: Include "gdbthread.h".
6544         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6545         a ptid_t.  All callers adjusted.
6546         (gdbpy_current_recording): Use inferior_thread.
6547         * python/py-record.h (recpy_record_object) <ptid>: Delete
6548         field, replaced with ...
6549         <thread>: ... this new field.  All users adjusted.
6550         (recpy_element_object) <ptid>: Delete
6551         field, replaced with ...
6552         <thread>: ... this new field.  All users adjusted.
6553         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6554         a ptid_t.  All callers adjusted.
6555         * python/py-threadevent.c: Include "gdbthread.h".
6556         (get_event_thread): Use thread_to_thread_object.
6557         * python/python-internal.h (struct inferior_object): Forward
6558         declare.
6559         (find_thread_object, find_inferior_object): Delete declarations.
6560         (thread_to_thread_object, inferior_to_inferior_object): New
6561         declarations.
6562         * record-btrace.c: Include "inferior.h".
6563         (require_btrace_thread): Use inferior_thread.
6564         (record_btrace_frame_sniffer)
6565         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6566         (get_thread_current_frame): Use scoped_restore_current_thread and
6567         switch_to_thread.
6568         (get_thread_current_frame): Use thread pointer directly.
6569         (record_btrace_replay_at_breakpoint): Use thread's inferior
6570         pointer directly.
6571         * record-full.c: Include "inferior.h".
6572         * regcache.c: Include "gdbthread.h".
6573         (get_thread_arch_regcache): Use the inferior's address space
6574         directly.
6575         (get_thread_regcache, registers_changed_thread): New.
6576         * regcache.h (get_thread_regcache(thread_info *thread)): New
6577         overload.
6578         (registers_changed_thread): New.
6579         (remote_target) <remote_detach_1>: Swap order of parameters.
6580         (remote_add_thread): <remote_add_thread>: Return the new thread.
6581         (get_remote_thread_info(ptid_t)): New overload.
6582         (remote_target::remote_notice_new_inferior): Use thread pointers
6583         directly.
6584         (remote_target::process_initial_stop_replies): Use
6585         thread_info::set_running.
6586         (remote_target::remote_detach_1, remote_target::detach)
6587         (extended_remote_target::detach): Adjust.
6588         * stack.c (frame_show_address): Use inferior_thread.
6589         * target-debug.h (target_debug_print_thread_info_pp): New.
6590         * target-delegates.c: Regenerate.
6591         * target.c (default_thread_address_space): Delete.
6592         (memory_xfer_partial_1): Use current_inferior.
6593         (target_detach): Use current_inferior.
6594         (target_thread_address_space): Delete.
6595         (generic_mourn_inferior): Use current_inferior.
6596         * target.h (struct target_ops) <thread_address_space>: Delete.
6597         (target_thread_address_space): Delete.
6598         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6599         pointers directly.
6600         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6601         thread pointer instead of a ptid_t.  Adjust all callers.
6602         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6603         (first_thread_of_process): Delete, replaced by ...
6604         (first_thread_of_inferior): ... this new function.  All callers
6605         adjusted.
6606         (any_thread_of_process): Rename to ...
6607         (any_thread_of_inferior): ... this, and take an inferior pointer.
6608         (any_live_thread_of_process): Rename to ...
6609         (any_live_thread_of_inferior): ... this, and take an inferior
6610         pointer.
6611         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6612         (value_in_thread_stack_temporaries)
6613         (get_last_thread_stack_temporary): Take a thread pointer instead
6614         of a ptid_t.  Adjust all callers.
6615         (thread_info::set_running): New.
6616         (validate_registers_access): Use inferior_thread.
6617         (can_access_registers_ptid): Rename to ...
6618         (can_access_registers_thread): ... this, and take a thread
6619         pointer.
6620         (print_thread_info_1): Adjust to compare thread pointers instead
6621         of ptids.
6622         (switch_to_no_thread, switch_to_thread): Make extern.
6623         (scoped_restore_current_thread::~scoped_restore_current_thread):
6624         Use m_thread pointer directly.
6625         (scoped_restore_current_thread::scoped_restore_current_thread):
6626         Use inferior_thread.
6627         (thread_command): Use thread pointer directly.
6628         (thread_num_make_value_helper): Use inferior_thread.
6629         * top.c (execute_command): Use inferior_thread.
6630         * tui/tui-interp.c: Include "inferior.h".
6631         * varobj.c (varobj_create): Use inferior_thread.
6632         (value_of_root_1): Use find_thread_global_id instead of
6633         global_thread_id_to_ptid.
6634
6635 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6636
6637         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6638         possible.
6639         (regcache::write_part): Likewise.
6640         (readable_regcache::cooked_read_part): Update comment.
6641         (readable_regcache::cooked_write_part): Likewise.
6642         * regcache.h: (readable_regcache::read_part): Likewise.
6643         (regcache::write_part): Likewise.
6644
6645 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6646             Dirk Schubert  <dirk.schubert@arm.com>
6647
6648         * aarch64-linux-nat.c (post_attach): New.
6649         (aarch64_linux_nat_target::post_attach): Override post_attach to
6650         record the number of hardware debug registers.
6651
6652 2018-06-20  Tom Tromey  <tom@tromey.com>
6653
6654         * python/py-param.c (add_setshow_generic): Make parameters const.
6655         (parmpy_init): Update.
6656
6657 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6658
6659         * regcache.h (regcache_cooked_read_ftype): Rename to...
6660         (register_read_ftype): ...this, change type to function_view.
6661         (class reg_buffer) <save>: Remove src parameter.
6662         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6663         parameter non-const in first overload.  Remove src parameter in
6664         second overload.
6665         * regcache.c (do_cooked_read): Remove.
6666         (readonly_detached_regcache::readonly_detached_regcache): Make
6667         parameter non-const, adjust call to other constructor.
6668         (reg_buffer::save): Remove src parameter.
6669         * frame.c (do_frame_register_read): Remove.
6670         (frame_save_as_regcache): Use lambda function.
6671         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6672         parameter to ppu2spu_data *.
6673         (ppu2spu_sniffer): Use lambda function.
6674
6675 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6676
6677         * record-full.c (record_full_target::insert_breakpoint): Remove
6678         "struct" keyword, add const.
6679
6680 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6681
6682         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6683         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6684         * configure.ac: Remove AC_PREREQ, add missing quoting.
6685         * gnulib/configure.ac: Modernize usage of
6686         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6687         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6688         (AUTOMAKE_VERSION): Bump to 1.15.1.
6689         * configure: Re-generate.
6690         * config.in: Re-generate.
6691         * aclocal.m4: Re-generate.
6692         * gnulib/aclocal.m4: Re-generate.
6693         * gnulib/config.in: Re-generate.
6694         * gnulib/configure: Re-generate.
6695         * gnulib/import/Makefile.in: Re-generate.
6696
6697 2018-06-19  Pedro Alves  <palves@redhat.com>
6698
6699         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6700         (lookup_minimal_symbol_by_pc_section): ... here with
6701         gdb_assert_not_reached added.
6702
6703 2018-06-19  Pedro Alves  <palves@redhat.com>
6704
6705         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6706         parameter with a block parameter.  Compare location's block symbol
6707         with the frame's block instead of addresses.
6708         (skip_inline_frames): Pass the current block instead of the
6709         frame's address.  Break out as soon as we determine the frame
6710         should not be skipped.
6711
6712 2018-06-18  Tom Tromey  <tom@tromey.com>
6713
6714         * solib-aix.c (solib_aix_get_section_offsets): Return
6715         unique_xmalloc_ptr.
6716         (solib_aix_solib_create_inferior_hook): Update.
6717
6718 2018-06-18  Tom Tromey  <tom@tromey.com>
6719
6720         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6721
6722 2018-06-18  Tom Tromey  <tom@tromey.com>
6723
6724         * solib-frv.c (frv_relocate_main_executable): Use
6725         unique_xmalloc_ptr.
6726         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6727         unique_xmalloc_ptr.
6728
6729 2018-06-18  Tom Tromey  <tom@tromey.com>
6730
6731         * objfiles.h (inhibit_section_map_updates): Update.
6732         (resume_section_map_updates, resume_section_map_updates_cleanup):
6733         Remove.
6734         * solib-svr4.c (svr4_handle_solib_event): Update.
6735         * objfiles.c (inhibit_section_map_updates): Return
6736         scoped_restore_tmpl<int>.
6737         (resume_section_map_updates, resume_section_map_updates_cleanup):
6738         Remove.
6739
6740 2018-06-18  Tom Tromey  <tom@tromey.com>
6741
6742         * valprint.h (read_string): Update.
6743         * valprint.c (read_string): Change type of "buffer".
6744         (val_print_string): Update.
6745         * python/py-value.c (valpy_string): Update.
6746         * language.h (struct language_defn) <la_get_string>: Change
6747         type of "buffer".
6748         (default_get_string, c_get_string): Update.
6749         * language.c (default_get_string): Change type of "buffer".
6750         * guile/scm-value.c (gdbscm_value_to_string): Update.
6751         * c-lang.c (c_get_string): Change type of "buffer".
6752
6753 2018-06-18  Tom Tromey  <tom@tromey.com>
6754
6755         * ser-mingw.c (struct pipe_state_destroyer): New.
6756         (pipe_state_up): New typedef.
6757         (cleanup_pipe_state): Remove.
6758         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6759
6760 2018-06-18  Tom Tromey  <tom@tromey.com>
6761
6762         * rust-lang.h (rust_yyerror): Don't declare.
6763         * rust-lang.c (rust_language_defn): Update.
6764         * rust-exp.y (yyerror): Now static.
6765         * parse.c (parse_exp_in_context_1): Update.
6766         * p-lang.h (p_yyerror): Don't declare.
6767         * p-lang.c (p_language_defn): Update.
6768         * p-exp.y (yyerror): Now static.
6769         * opencl-lang.c (opencl_language_defn): Update.
6770         * objc-lang.c (objc_language_defn): Update.
6771         * m2-lang.h (m2_yyerror): Don't declare.
6772         * m2-lang.c (m2_language_defn): Update.
6773         * m2-exp.y (yyerror): Now static.
6774         * language.h (struct language_defn) <la_error>: Remove.
6775         * language.c (unk_lang_error): Remove.
6776         (unknown_language_defn, auto_language_defn): Remove.
6777         * go-lang.h (go_yyerror): Don't declare.
6778         * go-lang.c (go_language_defn): Update.
6779         * go-exp.y (yyerror): Now static.
6780         * f-lang.h (f_yyerror): Don't declare.
6781         * f-lang.c (f_language_defn): Update.
6782         * f-exp.y (yyerror): Now static.
6783         * d-lang.h (d_yyerror): Don't declare.
6784         * d-lang.c (d_language_defn): Update.
6785         * d-exp.y (yyerror): Now static.
6786         * c-lang.h (c_yyerror): Don't declare.
6787         * c-lang.c (c_language_defn, cplus_language_defn)
6788         (asm_language_defn, minimal_language_defn): Update.
6789         * c-exp.y (yyerror): Now static.
6790         * ada-lang.h (ada_yyerror): Don't declare.
6791         * ada-lang.c (ada_language_defn): Update.
6792         * ada-exp.y (yyerror): Now static.
6793
6794 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6795
6796         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6797         (store_sveregs_to_thread): Likewise.
6798         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6799         (aarch64_linux_store_inferior_registers): Likewise.
6800         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6801         function.
6802         (aarch64_sve_regs_copy_to_regcache): Likewise.
6803         (aarch64_sve_regs_copy_from_regcache): Likewise.
6804         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6805         declaration.
6806         (aarch64_sve_regs_copy_to_regcache): Likewise.
6807         (aarch64_sve_regs_copy_from_regcache): Likewise.
6808         (sve_context): Structure from Linux headers.
6809         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6810         (SVE_SIG_ZREG_SIZE): Likewise.
6811         (SVE_SIG_PREG_SIZE): Likewise.
6812         (SVE_SIG_FFR_SIZE): Likewise.
6813         (SVE_SIG_REGS_OFFSET): Likewise.
6814         (SVE_SIG_ZREGS_OFFSET): Likewise.
6815         (SVE_SIG_ZREG_OFFSET): Likewise.
6816         (SVE_SIG_ZREGS_SIZE): Likewise.
6817         (SVE_SIG_PREGS_OFFSET): Likewise.
6818         (SVE_SIG_PREG_OFFSET): Likewise.
6819         (SVE_SIG_PREGS_SIZE): Likewise.
6820         (SVE_SIG_FFR_OFFSET): Likewise.
6821         (SVE_SIG_REGS_SIZE): Likewise.
6822         (SVE_SIG_CONTEXT_SIZE): Likewise.
6823         (SVE_PT_REGS_MASK): Likewise.
6824         (SVE_PT_REGS_FPSIMD): Likewise.
6825         (SVE_PT_REGS_SVE): Likewise.
6826         (SVE_PT_VL_INHERIT): Likewise.
6827         (SVE_PT_VL_ONEXEC): Likewise.
6828         (SVE_PT_REGS_OFFSET): Likewise.
6829         (SVE_PT_FPSIMD_OFFSET): Likewise.
6830         (SVE_PT_FPSIMD_SIZE): Likewise.
6831         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6832         (SVE_PT_SVE_PREG_SIZE): Likewise.
6833         (SVE_PT_SVE_FFR_SIZE): Likewise.
6834         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6835         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6836         (__SVE_SIG_TO_PT): Likewise.
6837         (SVE_PT_SVE_OFFSET): Likewise.
6838         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6839         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6840         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6841         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6842         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6843         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6844         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6845         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6846         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6847         (SVE_PT_SVE_SIZE): Likewise.
6848         (SVE_PT_SIZE): Likewise.
6849         (HAS_SVE_STATE): New define.
6850
6851 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6852
6853         * nat/aarch64-sve-linux-sigcontext.h: New file.
6854         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6855         new files.
6856         (SVE_VQ_MIN): Likewise.
6857         (SVE_VQ_MAX): Likewise.
6858         (SVE_VL_MIN): Likewise.
6859         (SVE_VL_MAX): Likewise.
6860         (SVE_NUM_ZREGS): Likewise.
6861         (SVE_NUM_PREGS): Likewise.
6862         (sve_vl_valid): Likewise.
6863         (struct user_sve_header): Likewise.
6864
6865 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6866             Richard Bunt <Richard.Bunt@arm.com>
6867
6868         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6869         was requested by GDB.
6870
6871 2018-06-15  Tom de Vries  <tdevries@suse.de>
6872
6873         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6874
6875 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6876
6877         * gnulib/update-gnulib.sh: Print expected versions of
6878         autoconf/aclocal.
6879
6880 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6881
6882         * arch-utils.c (default_type_align): Use type_length_units.
6883         * gdbtypes.c (type_align): Use type_length_units.
6884
6885 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6886
6887         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6888         of 'define' command.
6889
6890 2018-06-14  Tom de Vries  <tdevries@suse.de>
6891
6892         PR cli/22573
6893         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6894         get_no_prettyformat_print_options.
6895
6896 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6897
6898         * sparc-nat.h: Include target.h.
6899         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6900         <fetch_registers>: Remove this argument in function call.
6901         <store_registers>: Remove this argument in function call, remove
6902         extra semicolon.
6903         <low_forget_process>: Call sparc64_forget_process instead of
6904         sparc_forget_process.
6905
6906 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6907
6908         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6909         (procfs_target::make_corefile_notes): Adjust to new
6910         target_read_alloc return type.
6911
6912 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6913             Stephen Roberts  <stephen.roberts@arm.com>
6914
6915         PR gdb/22882
6916         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6917         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6918         Move should_notify_stop local into more inner scope.
6919
6920 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6921             Stephen Roberts  <stephen.roberts@arm.com>
6922
6923         PR gdb/22882
6924         * infrun.c (resume_1): Add call to mark_async_event_handler.
6925
6926 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6927
6928         * infrun.c (do_target_wait): Change old version of $pc printed.
6929
6930 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6931
6932         * dwarf2read.c (read_index_from_section): Rename to...
6933         (read_gdb_index_from_section): ... this, update all callers.
6934         (dwarf2_read_index): Rename to...
6935         (dwarf2_read_gdb_index): ... this, update all callers.
6936
6937 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6938
6939         * gdb/hppa-linux-nat.c
6940         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6941         hppa_linux_nat_target::fetch_registers.
6942
6943 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6944
6945         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6946         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6947         (AARCH64_DWARF_SVE_FFR): Likewise.
6948         (AARCH64_DWARF_SVE_P0): Likewise.
6949         (AARCH64_DWARF_SVE_Z0): Likewise.
6950
6951 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6952
6953         * common/common-regcache.h (raw_compare): New function.
6954         * regcache.c (regcache::raw_compare): Likewise.
6955         * regcache.h (regcache::raw_compare): New declaration.
6956
6957 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6958
6959         * common/common-regcache.h (reg_buffer_common): New structure.
6960         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6961         (reg_buffer::raw_supply): Likewise.
6962         (reg_buffer::raw_supply_integer): Likewise.
6963         (reg_buffer::raw_supply_zeroed): Likewise.
6964         (reg_buffer::raw_collect): Likewise.
6965         (reg_buffer::raw_collect_integer): Likewise.
6966         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6967         (reg_buffer::raw_supply): Likewise.
6968         (reg_buffer::raw_supply_integer): Likewise.
6969         (reg_buffer::raw_supply_zeroed): Likewise.
6970         (reg_buffer::raw_collect): Likewise.
6971         (reg_buffer::raw_collect_integer): Likewise.
6972
6973 2018-06-10  Tom Tromey  <tom@tromey.com>
6974
6975         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6976         (class remote_state) <stop_reply_queue>: Now std::vector.
6977         (remote_state::~remote_state)
6978         (remote_target::stop_reply_queue_length): Update.
6979         (struct queue_iter_param, remove_child_of_pending_fork)
6980         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6981         (check_pending_event_prevents_wildcard_vcont_callback)
6982         (remove_stop_reply_for_inferior)
6983         (remove_stop_reply_of_remote_state)
6984         (remote_notif_remove_once_on_match)
6985         (stop_reply_match_ptid_and_ws)
6986         (remote_kill_child_of_pending_fork): Remove.
6987         (remote_target::remove_new_fork_children)
6988         (remote_target::check_pending_events_prevent_wildcard_vcont)
6989         (remote_target::discard_pending_stop_replies)
6990         (remote_target::discard_pending_stop_replies_in_queue)
6991         (remote_target::remote_notif_remove_queued_reply)
6992         (remote_target::queued_stop_reply)
6993         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6994         (remote_target::wait, remote_target::kill_new_fork_children)
6995         (remote_target::async): Update.
6996
6997 2018-06-10  Tom Tromey  <tom@tromey.com>
6998
6999         * record-full.c (record_full_arch_list_cleanups): Remove.
7000         (record_full_message): Use try/catch.
7001         (record_full_wait_cleanups): Remove.
7002         (record_full_wait_1): Use try/catch.
7003         (record_full_restore): Likewise.
7004
7005 2018-06-10  Tom Tromey  <tom@tromey.com>
7006
7007         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7008         declare VEC.  Add constructor.
7009         <in_target_beneath>: Now bool.
7010         (record_full_breakpoints): Now a std::vector, static.
7011         (record_full_sync_record_breakpoints)
7012         (record_full_init_record_breakpoints)
7013         (record_full_target::insert_breakpoint)
7014         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7015
7016 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7017
7018         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7019         * serial.c (serial_interface_lookup): Remove struct keyword.
7020
7021 2018-06-10  Tom Tromey  <tom@tromey.com>
7022
7023         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7024         method.
7025         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7026         a method.
7027         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7028         method.
7029         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7030         "beneath" as a method.
7031         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7032         Use "beneath" as a method.
7033
7034 2018-06-10  Tom Tromey  <tom@tromey.com>
7035
7036         * tracefile.c (struct trace_file_writer_deleter): New.
7037         <operator()>: Rename from trace_file_writer_xfree.
7038         (trace_file_writer_up): New typedef.
7039         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7040
7041 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7042
7043         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7044         <m_registers, m_register_status>: Change type to
7045         std::unique_ptr.
7046         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7047         XCNEWVEC.
7048
7049 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7050
7051         * common/common-regcache.h (enum register_status): Add
7052         underlying type "signed char".
7053         * regcache.h (reg_buffer) <m_register_status>: Change type to
7054         register_status *.
7055         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7056         register_status instead of signed char.
7057         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7058         (reg_buffer::get_register_status): Remove cast.
7059         (readable_regcache::raw_read): Remove cast.
7060         (readable_regcache::cooked_read): Remove cast.
7061
7062 2018-06-09  Tom Tromey  <tom@tromey.com>
7063
7064         * source.c (reverse_search_command, forward_search_command): Use
7065         scoped_fd.
7066
7067 2018-06-09  Tom Tromey  <tom@tromey.com>
7068
7069         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7070         (serial_ops_list): Now static, std::vector.
7071         (serial_interface_lookup, serial_add_interface): Update.
7072
7073 2018-06-09  Tom Tromey  <tom@tromey.com>
7074
7075         * dwarf2read.c (process_cu_includes): Update.
7076         (process_full_comp_unit): Update.
7077         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7078         std::vector.
7079
7080 2018-06-08  Paul Koning  <paul_koning@dell.com>
7081
7082         PR gdb/23252
7083
7084         * python/python.c (do_start_initialization):
7085         Avoid call to internal Python API.
7086         (init__gdb_module): New function.
7087
7088 2018-06-08  Gary Benson <gbenson@redhat.com>
7089
7090         * linux-thread-db.c (valprint.h): New include.
7091         (struct check_thread_db_info): New structure.
7092         (check_thread_db_on_load, tdb_testinfo): New static globals.
7093         (check_thread_db, check_thread_db_callback): New functions.
7094         (try_thread_db_load_1): Run integrity checks if requested.
7095         (maintenance_check_libthread_db): New function.
7096         (_initialize_thread_db): Register "maint check libthread-db"
7097         and "maint set/show check-libthread-db".
7098         * NEWS: Mention the above new commands.
7099
7100 2018-06-08  Tom Tromey  <tom@tromey.com>
7101
7102         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7103         now a method.
7104
7105 2018-06-08  Tom Tromey  <tom@tromey.com>
7106
7107         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7108
7109 2018-06-08  Tom Tromey  <tom@tromey.com>
7110
7111         * common/btrace-common.h (struct btrace_data): Add constructor,
7112         destructor, move assignment operator.
7113         <empty, clear, fini>: New methods.
7114         <format>: Initialize.
7115         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7116         (btrace_data_empty): Don't declare.
7117         * common/btrace-common.c (btrace_data_init): Remove.
7118         (btrace_data::fini): Rename from btrace_data_fini.
7119         (btrace_data::empty): Rename from btrace_data_empty.
7120         (btrace_data::clear): Rename from btrace_data_clear.  Return
7121         bool.
7122         * btrace.h (make_cleanup_btrace_data): Don't declare.
7123         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7124         (parse_xml_btrace): Update.
7125         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7126         (maint_btrace_clear_packet_history_cmd): Update.
7127
7128 2018-06-07  Pedro Alves  <palves@redhat.com>
7129
7130         * target.h (target_ops) <beneath>: Now a method.  All references
7131         updated.
7132         (class target_stack): New.
7133         * target.c (g_target_stack): New.
7134         (g_current_top_target): Delete.
7135         (current_top_target): Get the top target out of g_target_stack.
7136         (target_stack::push, target_stack::unpush): New.
7137         (push_target, unpush_target): Reimplement.
7138         (target_is_pushed): Reimplement in terms of g_target_stack.
7139         (target_ops::beneath, target_stack::find_beneath): New.
7140
7141 2018-06-07  Pedro Alves  <palves@redhat.com>
7142
7143         * target.h (find_target_beneath): Delete declaration.
7144         * target.c (find_target_beneath): Delete definition.
7145         * aix-thread.c: All callers of find_target_beneath adjusted to
7146         call target_ops::beneath instead.
7147         * bsd-uthread.c: Likewise.
7148         * linux-thread-db.c: Likewise.
7149         * ravenscar-thread.c: Likewise.
7150         * sol-thread.c: Likewise.
7151         * spu-multiarch.c: Likewise.
7152
7153 2018-06-07  Pedro Alves  <palves@redhat.com>
7154
7155         * target.h (target_ops) <beneath>: Now a method.  All references
7156         updated.
7157         (target_ops) <m_beneath>: New.
7158         * target.c (target_ops::beneath): New.
7159         * corelow.c: Adjust all references to target_ops::beneath.
7160         * linux-thread-db.c: Likewise.
7161         * make-target-delegates: Likewise.
7162         * record-btrace.c: Likewise.
7163         * record-full.c: Likewise.
7164         * remote.c: Likewise.
7165         * target.c: Likewise.
7166         * target-delegates.c: Regenerate.
7167
7168 2018-06-07  Pedro Alves  <palves@redhat.com>
7169
7170         * target.h (target_stack): Delete.
7171         (current_top_target): Declare function.
7172         * target.c (target_stack): Delete.
7173         (g_current_top_target): New.
7174         (current_top_target): New function.
7175         * auxv.c: Use current_top_target instead of target_stack
7176         throughout.
7177         * avr-tdep.c: Likewise.
7178         * breakpoint.c: Likewise.
7179         * corefile.c: Likewise.
7180         * elfread.c: Likewise.
7181         * eval.c: Likewise.
7182         * exceptions.c: Likewise.
7183         * frame.c: Likewise.
7184         * gdbarch-selftests.c: Likewise.
7185         * gnu-v3-abi.c: Likewise.
7186         * ia64-tdep.c: Likewise.
7187         * ia64-vms-tdep.c: Likewise.
7188         * infcall.c: Likewise.
7189         * infcmd.c: Likewise.
7190         * infrun.c: Likewise.
7191         * linespec.c: Likewise.
7192         * linux-tdep.c: Likewise.
7193         * minsyms.c: Likewise.
7194         * ppc-linux-nat.c: Likewise.
7195         * ppc-linux-tdep.c: Likewise.
7196         * procfs.c: Likewise.
7197         * regcache.c: Likewise.
7198         * remote.c: Likewise.
7199         * rs6000-tdep.c: Likewise.
7200         * s390-linux-nat.c: Likewise.
7201         * s390-tdep.c: Likewise.
7202         * solib-aix.c: Likewise.
7203         * solib-darwin.c: Likewise.
7204         * solib-dsbt.c: Likewise.
7205         * solib-spu.c: Likewise.
7206         * solib-svr4.c: Likewise.
7207         * solib-target.c: Likewise.
7208         * sparc-tdep.c: Likewise.
7209         * sparc64-tdep.c: Likewise.
7210         * spu-tdep.c: Likewise.
7211         * symfile.c: Likewise.
7212         * symtab.c: Likewise.
7213         * target-descriptions.c: Likewise.
7214         * target-memory.c: Likewise.
7215         * target.c: Likewise.
7216         * target.h: Likewise.
7217         * tracefile-tfile.c: Likewise.
7218         * tracepoint.c: Likewise.
7219         * valops.c: Likewise.
7220         * valprint.c: Likewise.
7221         * value.c: Likewise.
7222         * windows-tdep.c: Likewise.
7223         * mi/mi-main.c: Likewise.
7224
7225 2018-06-07  Tom Tromey  <tom@tromey.com>
7226
7227         * valprint.h (build_address_symbolic): Declare.
7228         * printcmd.c (print_address_symbolic): Update.
7229         (build_address_symbolic): Change "name" and "filename" to
7230         std::string.
7231         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7232         Update.
7233         * defs.h (build_address_symbolic): Remove declaration.
7234
7235 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7236
7237         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7238         (aarch64_vnv_type): Add function.
7239         (aarch64_pseudo_register_name): Add V regs for SVE.
7240         (aarch64_pseudo_register_type): Likewise.
7241         (aarch64_pseudo_register_reggroup_p): Likewise.
7242         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7243         (aarch64_pseudo_read_value): Add V regs for SVE.
7244         (aarch64_pseudo_write_2): Use V0 offset for SVE
7245         (aarch64_pseudo_write): Add V regs for SVE.
7246         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7247
7248 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7249
7250         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7251         (sve_vl_from_vq): Likewise.
7252
7253 2018-06-05  Tom Tromey  <tom@tromey.com>
7254
7255         * cli/cli-cmds.c (show_version): Update.
7256         * top.c (print_gdb_version): Add "interactive" parameter.
7257         Update.
7258         * main.c (captured_main_1): Update.
7259         * top.h (print_gdb_version): Add "interactive" parameter and a
7260         comment.
7261
7262 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7263
7264         * common/enum-flags.h: Add trailing semicolon to example in
7265         comment.
7266
7267 2018-06-05  Tom Tromey  <tom@tromey.com>
7268
7269         PR cli/12326:
7270         * NEWS: Add entry about pager.
7271         * utils.c (pagination_disabled_for_command): New global.
7272         (prompt_for_continue): Allow "c" response to prompt.
7273         (reinitialize_more_filter): Clear
7274         pagination_disabled_for_command.
7275         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7276
7277 2018-06-04  Tom Tromey  <tom@tromey.com>
7278
7279         * ada-lang.h (ada_lookup_symbol_list): Update.
7280         * ada-lang.c (resolve_subexp): Update.
7281         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7282         parameter.
7283         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7284         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7285         results parameter to std::vector.
7286         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7287         Update.
7288         * ada-exp.y (block_lookup): Update.
7289         (select_possible_type_sym): Change type of syms.  Remove nsyms
7290         parameter.
7291         (write_var_or_type, write_name_assoc): Update.
7292
7293 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7294
7295         * windows-nat.c (windows_nat_target::xfer_partial): Return
7296         TARGET_XFER_E_IO if we need to delegate to the target beneath
7297         but BENEATH is NULL.
7298
7299 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7300
7301         * Makefile.in (config.status): Add configure.nat as a
7302         dependency.
7303
7304 2018-06-04  Tom Tromey  <tom@tromey.com>
7305
7306         * cp-name-parser.y (cpname_state): Add method declarations.
7307         (HANDLE_QUAL): Update.
7308         (cpname_state::d_grab, cpname_state::fill_comp)
7309         (cpname_state::make_operator, cpname_state::make_dtor)
7310         (cpname_state::make_builtin_type, cpname_state::make_name)
7311         (cpname_state::d_qualify, cpname_state::d_int_type)
7312         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7313         (%union): Move earlier.
7314
7315 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7316
7317         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7318
7319 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7320
7321         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7322         (aarch64_pseudo_write_1): Likewise.
7323         (aarch64_pseudo_read_value): Use helper.
7324         (aarch64_pseudo_write): Likewise.
7325
7326 2018-06-04  Pedro Alves  <palves@redhat.com>
7327
7328         * darwin-nat.c (darwin_ops): Delete.
7329         (darwin_attach_pid): Use get_native_target.
7330
7331 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7332
7333         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7334         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7335
7336 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7337
7338         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7339         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7340         (aarch64_gdbarch_init): Check for SVE.
7341         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7342
7343 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7344
7345         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7346         * aarch64-tdep.h (aarch64_read_description): Likewise.
7347         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7348         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7349         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7350         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7351         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7352
7353 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7354
7355         * value.c (value_fetch_lazy_bitfield): New.
7356         (value_fetch_lazy_memory): New.
7357         (value_fetch_lazy_register): New.
7358         (value_fetch_lazy): Factor out to smaller functions.
7359
7360 2018-06-01  Tom Tromey  <tom@tromey.com>
7361
7362         * cp-name-parser.y (backslashable, represented): Now const.
7363
7364 2018-06-01  Tom Tromey  <tom@tromey.com>
7365
7366         * cp-name-parser.y: Include parser-defs.h.
7367         (parser_fprintf): Remove declaration.
7368
7369 2018-06-01  Tom Tromey  <tom@tromey.com>
7370
7371         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7372         %parse-param.
7373         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7374         (global_result): Remove globals.
7375         (struct cpname_state): New.
7376         (yyparse): Don't declare.
7377         (yylex, yyerror): Move declarations after %union.
7378         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7379         (make_name): Add state parameter.
7380         Update all callers.
7381         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7382         parameter.
7383         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7384         Update.
7385         (yylex): Add lvalp, state parameters.
7386         (yyerror): Add state parameter.
7387         (cp_demangled_name_to_comp): Update.
7388
7389 2018-06-01  Tom Tromey  <tom@tromey.com>
7390
7391         * cp-name-parser.y (parser_fprintf): Declare.
7392         (GDB_YY_REMAP_PREFIX): Define.
7393         Include yy-remap.h.  Don't redefine yy* identifiers.
7394
7395 2018-06-01  Tom Tromey  <tom@tromey.com>
7396
7397         * python/py-type.c (typy_legacy_template_argument): Update.
7398         * cp-support.h (cp_demangled_name_to_comp): Update.
7399         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7400         parameter to be a "std::string *".
7401         (main): Update.
7402
7403 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7404
7405         * ada-lex.l: Include "diagnostics.h" instead of
7406         "common/diagnostics.h".
7407         * unittests/environ-selftests.c: Likewise.
7408         * common/diagnostics.h: Moved to ../include.
7409
7410 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7411
7412         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7413         to language_mode_manual while calling breakpoint_re_set_one.
7414
7415 2018-06-01  Tom Tromey  <tom@tromey.com>
7416
7417         * valops.c (value_cast_structs, destructor_name_p): Update.
7418         * symtab.c (gdb_mangle_name): Update.
7419         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7420         Update.
7421         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7422         (pascal_object_print_value_fields, pascal_object_print_value):
7423         Update.
7424         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7425         * linespec.c (find_methods): Update.
7426         * gdbtypes.h (type_name_no_tag): Remove.
7427         (type_name_or_error): Rename from type_name_no_tag_or_error.
7428         * gdbtypes.c (type_name_no_tag): Remove.
7429         (type_name_or_error): Rename from type_name_no_tag_or_error.
7430         (lookup_struct_elt_type, check_typedef): Update.
7431         * expprint.c (print_subexp_standard): Update.
7432         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7433         * d-namespace.c (d_lookup_nested_symbol): Update.
7434         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7435         (cp_print_class_member): Update.
7436         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7437         * completer.c (add_struct_fields): Update.
7438         * c-typeprint.c (cp_type_print_derivation_info)
7439         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7440         Update.
7441         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7442         (ada_prefer_type, ada_is_exception_sym): Update.
7443
7444 2018-06-01  Tom Tromey  <tom@tromey.com>
7445
7446         * valops.c (enum_constant_from_type, value_namespace_elt)
7447         (value_maybe_namespace_elt): Update.
7448         * valarith.c (find_size_for_pointer_math): Update.
7449         * target-descriptions.c (make_gdb_type): Update.
7450         * symmisc.c (print_symbol): Update.
7451         * stabsread.c (define_symbol, read_type)
7452         (complain_about_struct_wipeout, add_undefined_type)
7453         (cleanup_undefined_types_1): Update.
7454         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7455         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7456         (rust_internal_print_type, rust_composite_type)
7457         (rust_evaluate_funcall, rust_evaluate_subexp)
7458         (rust_inclusive_range_type_p): Update.
7459         * python/py-type.c (typy_get_tag): Update.
7460         * p-typeprint.c (pascal_type_print_base): Update.
7461         * mdebugread.c (parse_symbol, parse_type): Update.
7462         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7463         Update.
7464         * guile/scm-type.c (gdbscm_type_tag): Update.
7465         * go-lang.c (sixg_string_p): Update.
7466         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7467         Update.
7468         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7469         (TYPE_TAG_NAME): Remove.
7470         * gdbtypes.c (type_name_no_tag): Simplify.
7471         (check_typedef, check_types_equal, recursive_dump_type)
7472         (copy_type_recursive, arch_composite_type): Update.
7473         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7474         in summary mode when needed.
7475         * eval.c (evaluate_funcall): Update.
7476         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7477         (process_structure_scope, read_enumeration_type)
7478         (read_namespace_type, read_module_type, determine_prefix): Update.
7479         * cp-support.c (inspect_type): Update.
7480         * coffread.c (process_coff_symbol, decode_base_type): Update.
7481         * c-varobj.c (c_is_path_expr_parent): Update.
7482         * c-typeprint.c (c_type_print_base_struct_union): Update.
7483         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7484         summary when using C language.
7485         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7486         (gen_maybe_namespace_elt): Update.
7487         * ada-lang.c (ada_type_name): Simplify.
7488         (empty_record, ada_template_to_fixed_record_type_1)
7489         (template_to_static_fixed_type)
7490         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7491
7492 2018-06-01  Tom Tromey  <tom@tromey.com>
7493
7494         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7495         c_print_type.
7496         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7497         (c_print_type): Update.
7498         (c_print_type): New overload.
7499         (c_type_print_varspec_prefix, c_type_print_args)
7500         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7501         (c_type_print_base_struct_union, c_type_print_base_1)
7502         (cp_type_print_method_args): Add "language" parameter.
7503         (c_type_print_base): Update.
7504         * c-lang.h (c_print_type): Add new overload.
7505
7506 2018-06-01  Tom Tromey  <tom@tromey.com>
7507
7508         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7509         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7510
7511 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7512
7513         * aarch64-tdep.c (aarch64_sve_register_names): New const
7514         var.
7515         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7516         (AARCH64_SVE_Z_REGS_NUM): New define.
7517         (AARCH64_SVE_P_REGS_NUM): Likewise.
7518         (AARCH64_SVE_NUM_REGS): Likewise.
7519
7520 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7521
7522         * nat/linux-ptrace.h [__alpha__]
7523         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7524         definitions.
7525
7526 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7527
7528         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7529         the endianness selected.
7530         * NEWS: Document `set endian auto' mode operation update.
7531
7532 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7533
7534         * Makefile.in: Add new header.
7535         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7536         (sve_vl_from_vg): Likewise.
7537         (sve_vq_from_vl): Likewise.
7538         (sve_vl_from_vq): Likewise.
7539         (sve_vq_from_vg): Likewise.
7540         (sve_vg_from_vq): Likewise.
7541         * configure.nat: Add new c file.
7542         * nat/aarch64-sve-linux-ptrace.c: New file.
7543         * nat/aarch64-sve-linux-ptrace.h: New file.
7544
7545 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7546
7547         * aarch64-linux-nat.c (aarch64_linux_read_description):
7548         Add parmeter zero.
7549         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7550         Likewise.
7551         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7552         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7553         (aarch64_gdbarch_init): Add parmeter zero.
7554         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7555         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7556         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7557         parmeter.
7558         * doc/gdb.texinfo: Describe SVE feature
7559         * features/aarch64-sve.c: New file.
7560
7561 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7562
7563         PR gdb/23210
7564         * gdbarch.sh (significant_addr_bit): Default to zero when
7565         not set by target architecture.
7566         * gdbarch.c: Re-generated.
7567         * utils.c (address_significant): Update.
7568
7569 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7570
7571         * stack.c (func_command): Remove trailing newline in call to error.
7572
7573 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7574
7575         * regcache.h (regcache_raw_collect): Remove, update callers to
7576         use regcache::raw_collect.
7577         * regcache.c (regcache_raw_collect): Remove.
7578
7579 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7580
7581         * regcache.h (regcache_raw_supply): Remove, update callers to
7582         use detached_regcache::raw_supply.
7583         * regcache.c (regcache_raw_supply): Remove.
7584
7585 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7586
7587         * regcache.h (regcache_cooked_write_part): Remove, update
7588         callers to use regcache::cooked_write_part.
7589         * regcache.c (regcache_cooked_write_part): Remove.
7590
7591 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7592
7593         * regcache.h (regcache_cooked_read_part): Remove, update callers
7594         to use readable_regcache::cooked_read_part.
7595         * regcache.c (regcache_cooked_read_part): Remove.
7596
7597 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7598
7599         * regcache.h (regcache_cooked_read_value): Remove, update
7600         callers to use readable_regcache::cooked_read_value.
7601         * regcache.c (regcache_cooked_read_value): Remove.
7602
7603 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7604
7605         * regcache.h (regcache_cooked_write): Remove, update callers to
7606         use regcache::cooked_write.
7607         * regcache.c (regcache_cooked_write): Remove.
7608
7609 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7610
7611         * regcache.h (regcache_invalidate): Remove, update callers to
7612         use detached_regcache::invalidate instead.
7613         * regcache.c (regcache_invalidate): Remove.
7614
7615 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7616
7617         * regcache.h (regcache_raw_write_part): Remove, update callers
7618         to use regcache::raw_write_part instead.
7619         * regcache.c (regcache_raw_write_part): Remove.
7620
7621 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7622
7623         * regcache.h (regcache_raw_read_part): Remove, update callers to
7624         use readable_regcache::raw_read_part instead.
7625         * regcache.c (regcache_raw_read_part): Remove.
7626
7627 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7628
7629         * regcache.h (regcache_cooked_read): Remove, update callers to
7630         use readable_regcache::cooked_read instead.
7631         * regcache.c (regcache_cooked_read): Remove.
7632
7633 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7634
7635         * regcache.h (regcache_raw_write): Remove, update callers to use
7636         regcache::raw_write instead.
7637         * regcache.c (regcache_raw_write): Remove.
7638
7639 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7640
7641         * regcache.h (regcache_raw_read): Remove, update callers to use
7642         readable_regcache::raw_read instead.
7643         * regcache.c (regcache_raw_read): Remove.
7644
7645 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7646
7647         * regcache.h (regcache_raw_update): Remove, update callers to
7648         use readable_regcache::raw_update instead.
7649         * regcache.c (regcache_raw_update): Remove.
7650
7651 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7652
7653         * regcache.h (regcache_register_status): Remove, update callers
7654         to use reg_buffer::get_register_status directly instead.
7655         * regcache.c (regcache_register_status): Remove.
7656
7657 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7658
7659         * regcache.h (regcache_get_ptid): Remove, update all callers to
7660         call regcache::ptid instead.
7661         * regcache.c (regcache_get_ptid): Remove.
7662
7663 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7664
7665         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7666
7667 2018-05-30  Pedro Alves  <palves@redhat.com>
7668
7669         * common/common-exceptions.h (exception_rethrow): Use
7670         ATTRIBUTE_NORETURN.
7671
7672 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7673
7674         * breakpoint.c (print_solib_event, check_status_catch_solib):
7675         Remove struct keyword in range-based for loops.
7676         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7677         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7678         Likewise.
7679         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7680         Likewise.
7681         * symfile.c (addr_info_make_relative): Likewise.
7682         * thread.c (value_in_thread_stack_temporaries): Likewise.
7683
7684 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7685
7686         PR gdb/16841
7687         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7688         aggregate type to get its real type before accessing it.
7689
7690 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7691
7692         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7693         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7694         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7695         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7696         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7697         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7698         * printcmd.c (info_address_command): Likewise.
7699
7700 2018-05-29  Tom Tromey  <tom@tromey.com>
7701
7702         * windows-nat.c (handle_exception): Update fall-through comment.
7703
7704 2018-05-29  Tom Tromey  <tom@tromey.com>
7705
7706         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7707         (struct program_space) <added_solibs>: Now a std::vector.
7708         * breakpoint.c (print_solib_event): Update.
7709         (check_status_catch_solib): Update.
7710         * progspace.c (clear_program_space_solib_cache): Update.
7711         * solib.c (update_solib_list): Update.
7712
7713 2018-05-29  Tom Tromey  <tom@tromey.com>
7714
7715         * python/py-type.c (typy_richcompare): Update.
7716         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7717         * gdbtypes.h (types_deeply_equal): Return bool.
7718         (types_equal): Likewise.
7719         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7720         declare VEC.
7721         (check_types_equal): Change worklist to std::vector.  Return
7722         bool.
7723         (struct type_equality_entry): Add constructor.
7724         (compare_maybe_null_strings): Return bool.
7725         (check_types_worklist): Return bool.  Change worklist to
7726         std::vector.
7727         (types_deeply_equal): Use std::vector.
7728         (types_equal): Return bool.
7729         (compare_maybe_null_strings): Simplify.
7730
7731 2018-05-29  Tom Tromey  <tom@tromey.com>
7732
7733         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7734
7735 2018-05-29  Tom Tromey  <tom@tromey.com>
7736
7737         * objc-lang.h: Don't include cp-support.h.
7738         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7739         declare VEC.
7740
7741 2018-05-27  Tom Tromey  <tom@tromey.com>
7742
7743         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7744
7745 2018-05-25  Tom Tromey  <tom@tromey.com>
7746
7747         * value.c (value::location): Initialize.
7748
7749 2018-05-25  Tom Tromey  <tom@tromey.com>
7750
7751         * dbxread.c (init_bincl_list): Remove.
7752         (bincl_list): Now a std::vector.
7753         (bincls_allocated, next_bincl): Remove.
7754         (free_bincl_list, do_free_bincl_list_cleanup)
7755         (make_cleanup_free_bincl_list): Remove.
7756         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7757         unique_xmalloc_ptr.
7758         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7759         (struct header_file_location): Add constructor.
7760         (add_bincl_to_list): Remove.
7761
7762 2018-05-25  Tom Tromey  <tom@tromey.com>
7763
7764         * tui/tui.c (tui_enable): Update.
7765         * mi/mi-interp.c (mi_interp::init): Update.
7766         * interps.h (class interp) <name>: New method.
7767         <m_name>: Rename from name.
7768         (~scoped_restore_interp): Update.
7769         * interps.c (interp::interp): Update.
7770         (interp_add, interp_set, interp_lookup_existing)
7771         (current_interp_named_p): Update.
7772
7773 2018-05-25  Tom Tromey  <tom@tromey.com>
7774
7775         * interps.c (interp_name): Remove.
7776         * mi/mi-interp.c (mi_interp::init): Update.
7777         * interps.h (interp_name): Remove.
7778         (~scoped_restore_interp): Update.
7779         * tui/tui.c (tui_enable): Update.
7780
7781 2018-05-25  Tom Tromey  <tom@tromey.com>
7782
7783         * utils.c (fputs_maybe_filtered): Update.
7784         * linespec.c (decode_line_full): Update.
7785         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7786         (mi_print_breakpoint_for_event, mi_solib_loaded)
7787         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7788         (mi_user_selected_context_changed): Update.
7789         * mi/mi-main.c (mi_execute_command): Update.
7790         * cli/cli-script.c (execute_control_command): Update.
7791         * python/python.c (execute_gdb_command): Update.
7792         * solib.c (info_sharedlibrary_command): Update.
7793         * interps.c (interp_ui_out): Remove.
7794         * interps.h (interp_ui_out): Remove.
7795
7796 2018-05-25  Tom Tromey  <tom@tromey.com>
7797
7798         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7799         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7800         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7801
7802 2018-05-25  Tom Tromey  <tom@tromey.com>
7803
7804         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7805         * interps.c (interp_exec): Use scoped_restore.
7806
7807 2018-05-25  Tom Tromey  <tom@tromey.com>
7808
7809         * remote.c (remote_target::remote_file_get): Use
7810         gdb::byte_vector.
7811         (remote_target::remote_file_put): Likewise.
7812
7813 2018-05-25  Tom Tromey  <tom@tromey.com>
7814
7815         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7816         a std::string.
7817         (get_pe_section_index, add_pe_exported_sym): Update.
7818         (read_pe_exported_syms): Use gdb::def_vector.
7819
7820 2018-05-25  Tom Tromey  <tom@tromey.com>
7821
7822         * frame.c (remove_prev_frame): Remove.
7823         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7824
7825 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7826
7827         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7828         Remove prototypes.
7829         * mips-linux-nat.c (supply_fpregset): Always call
7830         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7831         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7832         `mips_fill_fpregset'.
7833         * mips-linux-tdep.c (mips_supply_fpregset)
7834         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7835         (mips_fill_fpregset_wrapper): Remove functions.
7836         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7837         (mips_linux_fpregset): Remove variable.
7838         (mips_linux_iterate_over_regset_sections): Use
7839         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7840         (mips_linux_o32_sigframe_init): Remove comment.
7841
7842 2018-05-25  Pedro Alves  <palves@redhat.com>
7843
7844         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7845         (struct readahead_cache, struct packet_reg, struct
7846         remote_arch_state, class remote_state): Move higher up in the
7847         file.
7848         (remote_target::m_remote_state): Now an object instead of a pointer.
7849         (remote_target::get_remote_state): Adjust.
7850
7851 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7852
7853         * stack.c (select_and_print_frame): Delete.
7854         (struct function_bounds): Move struct within function.
7855         (func_command): Most content moved into new function
7856         find_frame_for_function, use new function, print result, add
7857         function comment.
7858         (find_frame_for_function): New function, now returns a result.
7859
7860 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7861
7862         * stack.c (iterate_over_block_arg_vars): Fix comment.
7863         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7864
7865 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7866
7867         PR gdb/23203
7868         * frame.c
7869         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7870         Define.
7871         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7872         Define.
7873         * frame.h (class scoped_restore_selected_frame): New class.
7874         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7875         of any exception, use scoped_restore_selected_frame to restore the
7876         frame instead.
7877
7878 2018-05-24  Pedro Alves  <palves@redhat.com>
7879
7880         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7881         override.
7882
7883 2018-05-23  Tom Tromey  <tom@tromey.com>
7884
7885         * complaints.c (struct complaints): Remove.
7886         (symfile_complaint_book): Remove.
7887         (series): New global.
7888         (complaint_internal): Update.
7889         (clear_complaints): Update.
7890
7891 2018-05-23  Tom Tromey  <tom@tromey.com>
7892
7893         * complaints.c (counters): New global.
7894         (struct complain): Remove.
7895         (struct complaints) <root>: Remove.
7896         (complaint_sentinel): Remove.
7897         (symfile_complaint_book): Update.
7898         (find_complaint) Remove.
7899         (complaint_internal, clear_complaints): Update.
7900
7901 2018-05-23  Tom Tromey  <tom@tromey.com>
7902
7903         * complaints.c (struct complain) <file, line>: Remove.
7904         (find_complaint): Remove file, line parameters.
7905         (complaint_internal): Update.
7906
7907 2018-05-23  Tom Tromey  <tom@tromey.com>
7908
7909         * complaints.c (vcomplaint): Remove.
7910         (complaint_internal) Merge in contents of vcomplaint.
7911
7912 2018-05-23  Tom Tromey  <tom@tromey.com>
7913
7914         * complaints.c (struct complaints) <explanation>: Remove.
7915         (symfile_explanations): Remove.
7916         (symfile_complaint_book): Update.
7917         (vcomplaint): Update.
7918         (struct explanation): Remove.
7919
7920 2018-05-23  Tom Tromey  <tom@tromey.com>
7921
7922         * complaints.c (symfile_complaints): Remove.
7923         (complaint_internal): Remove "complaints" parameter.
7924         (clear_complaints, vcomplaint): Remove "c" parameter.
7925         (get_complaints): Remove.
7926         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7927         (dwarf2_debug_line_missing_file_complaint)
7928         (dwarf2_debug_line_missing_end_sequence_complaint)
7929         (dwarf2_complex_location_expr_complaint)
7930         (dwarf2_const_value_length_mismatch_complaint)
7931         (dwarf2_section_buffer_overflow_complaint)
7932         (dwarf2_macro_malformed_definition_complaint)
7933         (dwarf2_invalid_attrib_class_complaint)
7934         (create_addrmap_from_index, dw2_symtab_iter_next)
7935         (dw2_expand_marked_cus)
7936         (dw2_debug_names_iterator::find_vec_in_debug_names)
7937         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7938         (create_debug_type_hash_table, init_cutu_and_read_dies)
7939         (partial_die_parent_scope, add_partial_enumeration)
7940         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7941         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7942         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7943         (create_cus_hash_table, create_dwp_hash_table)
7944         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7945         (dwarf2_rnglists_process, dwarf2_ranges_process)
7946         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7947         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7948         (handle_struct_member_die, process_structure_scope)
7949         (read_array_type, read_common_block, read_module_type)
7950         (read_tag_pointer_type, read_typedef, read_base_type)
7951         (read_subrange_type, load_partial_dies, partial_die_info::read)
7952         (partial_die_info::read, partial_die_info::read)
7953         (partial_die_info::read, read_checked_initial_length_and_offset)
7954         (dwarf2_string_attr, read_formatted_entries)
7955         (dwarf_decode_line_header)
7956         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7957         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7958         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7959         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7960         (get_signatured_type, get_DW_AT_signature_type)
7961         (decode_locdesc, file_file_name, consume_improper_spaces)
7962         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7963         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7964         (dwarf2_symbol_mark_computed, set_die_type)
7965         (read_attribute_value): Update.
7966         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7967         Update.
7968         * dbxread.c (unknown_symtype_complaint)
7969         (lbrac_mismatch_complaint, repeated_header_complaint)
7970         (set_namestring, function_outside_compilation_unit_complaint)
7971         (read_dbx_symtab, process_one_symbol): Update.
7972         * gdbtypes.c (stub_noname_complaint): Update.
7973         * windows-nat.c (handle_unload_dll): Update.
7974         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7975         (decode_base_type): Update.
7976         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7977         (eb_complaint, record_include_begin, record_include_end)
7978         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7979         (process_xcoff_symbol, read_symbol)
7980         (function_outside_compilation_unit_complaint)
7981         (scan_xcoff_symtab): Update.
7982         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7983         * buildsym.c (finish_block_internal, make_blockvector)
7984         (end_symtab_get_static_block, augment_type_symtab): Update.
7985         * dtrace-probe.c (dtrace_process_dof)
7986         (dtrace_static_probe_ops::get_probes): Update.
7987         * complaints.h (struct complaint): Don't declare.
7988         (symfile_complaints): Remove.
7989         (complaint_internal): Remove "complaints" parameter.
7990         (complaint): Likewise.
7991         (clear_complaints): Likewise.
7992         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7993         (reread_symbols): Update.
7994         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7995         (dwarf2_frame_cache, decode_frame_entry): Update.
7996         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7997         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7998         (info_selectors_command): Update.
7999         * macrotab.c (macro_include, check_for_redefinition)
8000         (macro_undef): Update.
8001         * objfiles.c (filter_overlapping_sections): Update.
8002         * stabsread.c (invalid_cpp_abbrev_complaint)
8003         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8004         (define_symbol, error_type, read_type, rs6000_builtin_type)
8005         (stabs_method_name_from_physname, read_member_functions)
8006         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8007         (attach_fields_to_type, complain_about_struct_wipeout)
8008         (read_range_type, read_args, common_block_start)
8009         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8010         Update.
8011         * mdebugread.c (index_complaint, unknown_ext_complaint)
8012         (basic_type_complaint, bad_tag_guess_complaint)
8013         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8014         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8015         (parse_procedure, parse_lines)
8016         (function_outside_compilation_unit_complaint)
8017         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8018         (bad_tag_guess_complaint, reg_value_complaint): Update.
8019         * cp-support.c (demangled_name_complaint): Update.
8020         * macroscope.c (sal_macro_scope): Update.
8021         * dwarf-index-write.c (class debug_names): Update.
8022
8023 2018-05-23  Tom Tromey  <tom@tromey.com>
8024
8025         * complaints.c (clear_complaints): Remove "noisy" parameter.
8026         * complaints.h (clear_complaints): Update.
8027         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8028         (reread_symbols): Update.
8029
8030 2018-05-23  Tom Tromey  <tom@tromey.com>
8031
8032         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8033         SUBSEQUENT_MESSAGE.
8034         (vcomplaint, clear_complaints): Update.
8035         (symfile_explanations): Remove some messages.
8036
8037 2018-05-23  Tom Tromey  <tom@tromey.com>
8038
8039         * complaints.c (internal_complaint): Remove.
8040         * complaints.h (internal_complaint): Remove.
8041
8042 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8043
8044         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8045
8046 2018-05-22  Pedro Alves  <palves@redhat.com>
8047
8048         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8049         (remote_fileio_badfd, remote_fileio_return_errno)
8050         (remote_fileio_return_success, remote_fileio_func_open)
8051         (remote_fileio_func_open, remote_fileio_func_close)
8052         (remote_fileio_func_read, remote_fileio_func_write)
8053         (remote_fileio_func_lseek, remote_fileio_func_rename)
8054         (remote_fileio_func_unlink, remote_fileio_func_stat)
8055         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8056         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8057         remote_target parameter.
8058         (remote_fio_func_map) <func>: Add remote_target parameter.
8059         (do_remote_fileio_request, remote_fileio_request):
8060         * remote-fileio.h (remote_fileio_request):
8061         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8062         remote_target parameter.
8063         (remote_notif_process, handle_notification): Adjust to pass down
8064         the remote.
8065         (remote_notif_state_allocate): Add remote_target parameter.  Save
8066         it.
8067         * remote-notif.h (struct remote_target): Forward declare.
8068         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8069         remote_target parameter.
8070         (struct remote_notif_state) <remote>: New field.
8071         (remote_notif_ack, remote_notif_parse): Add remote_target
8072         parameter.
8073         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8074         remote_target parameter.
8075         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8076         (threads_listing_context, rmt_thread_action, protocol_feature)
8077         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8078         (packet_result, struct threads_listing_context, remote_state):
8079         Move definitions and declarations higher up.
8080         (remote_target) <~remote_target>: Declare.
8081         (remote_download_command_source, remote_file_put, remote_file_get)
8082         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8083         (remote_hostio_pread_vFile, remote_hostio_send_command)
8084         (remote_hostio_set_filesystem, remote_hostio_open)
8085         (remote_hostio_close, remote_hostio_unlink, remote_state)
8086         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8087         (get_memory_write_packet_size, get_memory_read_packet_size)
8088         (append_pending_thread_resumptions, remote_detach_1)
8089         (append_resumption, remote_resume_with_vcont)
8090         (add_current_inferior_and_thread, wait_ns, wait_as)
8091         (process_stop_reply, remote_notice_new_inferior)
8092         (process_initial_stop_replies, remote_add_thread)
8093         (btrace_sync_conf, remote_btrace_maybe_reopen)
8094         (remove_new_fork_children, kill_new_fork_children)
8095         (discard_pending_stop_replies, stop_reply_queue_length)
8096         (check_pending_events_prevent_wildcard_vcont)
8097         (discard_pending_stop_replies_in_queue, stop_reply)
8098         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8099         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8100         (remote_interrupt_as, remote_interrupt_ns)
8101         (remote_get_noisy_reply, remote_query_attached)
8102         (remote_add_inferior, remote_current_thread, get_current_thread)
8103         (set_thread, set_general_thread, set_continue_thread)
8104         (set_general_process, write_ptid)
8105         (remote_unpack_thread_info_response, remote_get_threadinfo)
8106         (parse_threadlist_response, remote_get_threadlist)
8107         (remote_threadlist_iterator, remote_get_threads_with_ql)
8108         (remote_get_threads_with_qxfer)
8109         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8110         (get_offsets, remote_check_symbols, remote_supported_packet)
8111         (remote_query_supported, remote_packet_size)
8112         (remote_serial_quit_handler, remote_detach_pid)
8113         (remote_vcont_probe, remote_resume_with_hc)
8114         (send_interrupt_sequence, interrupt_query)
8115         (remote_notif_get_pending_events, fetch_register_using_p)
8116         (send_g_packet, process_g_packet, fetch_registers_using_g)
8117         (store_register_using_P, store_registers_using_G)
8118         (set_remote_traceframe, check_binary_download)
8119         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8120         (remote_xfer_live_readonly_partial, remote_read_bytes)
8121         (remote_send_printf, remote_flash_write, readchar)
8122         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8123         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8124         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8125         (extended_remote_disable_randomization, extended_remote_run)
8126         (send_environment_packet, extended_remote_environment_support)
8127         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8128         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8129         (packet_command): Now methods of ...
8130         (remote_target): ... this class.
8131         (m_remote_state) <remote_target>: New field.
8132         (struct remote_state) <stop_reply_queue,
8133         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8134         fields.
8135         (remote_state::remote_state): Allocate stop_reply_queue.
8136         (remote_state): Delete global.
8137         (get_remote_state_raw): Delete.
8138         (remote_target::get_remote_state): Allocate m_remote_state on
8139         demand.
8140         (get_current_remote_target): New.
8141         (remote_ops, extended_remote_ops): Delete.
8142         (wait_forever_enabled_p, remote_async_inferior_event_token):
8143         Delete, moved to struct remote_state.
8144         (remote_target::close): Delete self.  Destruction bits split to
8145         ...
8146         (remote_target::~remote_target): ... this.
8147         (show_memory_packet_size): Adjust to use
8148         get_current_remote_target.
8149         (struct protocol_feature) <func>: Add remote_target parameter.
8150         All callers adjusted.
8151         (curr_quit_handler_target): New.
8152         (remote_serial_quit_handler): Reimplement.
8153         (remote_target::open_1): Adjust to use get_current_remote_target.
8154         Heap-allocate remote_target/extended_remote_target instances.
8155         (vcont_builder::vcont_builder): Add remote_target parameter, and
8156         save it in m_remote.  All callers adjusted.
8157         (vcont_builder::m_remote): New field.
8158         (vcont_builder::restart, vcont_builder::flush)
8159         (vcont_builder::push_action): Use it.
8160         (remote_target::commit_resume): Use it.
8161         (struct queue_iter_param) <remote>: New field.
8162         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8163         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8164         (check_pending_event_prevents_wildcard_vcont_callback)
8165         (remote_target::check_pending_events_prevent_wildcard_vcont)
8166         (remote_target::discard_pending_stop_replies)
8167         (remote_target::discard_pending_stop_replies_in_queue)
8168         (remote_target::remote_notif_remove_queued_reply): Fill in
8169         'remote' field.
8170         (remote_notif_get_pending_events): New.
8171         (remote_target::readchar, remote_target::remote_serial_write):
8172         Save/restore curr_quit_handler_target.
8173         (putpkt): New.
8174         (kill_new_fork_children): Fill in 'remote' field.
8175         (packet_command): Use get_current_remote_target, defer to
8176         remote_target method of same name.
8177         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8178         parameter, and save it in m_remote.  All callers adjusted.
8179         (scoped_remote_fd::release): Use m_remote.
8180         (scoped_remote_fd::m_remote): New field.
8181         (remote_file_put, remote_file_get, remote_file_delete): Use
8182         get_current_remote_target, defer to remote_target method of same
8183         name.
8184         (remote_btrace_reset): Add remote_state paremeter.  Update all
8185         callers.
8186         (remote_async_inferior_event_handler). Pass down 'data'.
8187         (remote_new_objfile): Use get_current_remote_target.
8188         (remote_target::vcont_r_supported): New.
8189         (set_range_stepping): Use get_current_remote_target and
8190         remote_target::vcont_r_supported.
8191         (_initialize_remote): Don't allocate 'remote_state' and
8192         'stop_reply_queue' globals.
8193         * remote.h (struct remote_target): Forward declare.
8194         (getpkt, putpkt, remote_notif_get_pending_events): Add
8195         'remote_target' parameter.
8196
8197 2018-05-22  Pedro Alves  <palves@redhat.com>
8198
8199         * remote.c (vcont_builder): Now a class.  Make all data members
8200         private.
8201         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8202         Declare methods.
8203         (vcont_builder_restart): Rename to ...
8204         (vcont_builder::restart): ... this.
8205         (vcont_builder_flush): Rename to ...
8206         (vcont_builder::flush): ... this.
8207         (vcont_builder_push_action): Rename to ...
8208         (vcont_builder::push_action): ... this.
8209         (remote_target::commit_resume): Adjust.
8210
8211 2018-05-22  Pedro Alves  <palves@redhat.com>
8212
8213         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8214         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8215         (get_fixed_memory_packet_size): New.
8216         (get_memory_packet_size): Use it.
8217         (set_memory_packet_size): Don't override the config size with
8218         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8219         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8220         Don't refer to get_memory_packet_size if not connected to a remote
8221         target.  Show "(default)" if configured size is 0.
8222
8223 2018-05-22  Pedro Alves  <palves@redhat.com>
8224
8225         * remote.c (remote_target::mourn_inferior): Move
8226         discard_pending_stop_replies call here from ...
8227         (_initialize_remote): ... here.
8228
8229 2018-05-22  Pedro Alves  <palves@redhat.com>
8230
8231         * remote.c (compare_section_command): Remove set_general_process
8232         call.
8233
8234 2018-05-22  Pedro Alves  <palves@redhat.com>
8235
8236         * remote.c (struct packet_reg, struct remote_arch_state):
8237         Move higher up in the file.
8238         (remote_state) <m_arch_states>: Store remote_arch_state values
8239         instead of remote_arch_state pointers.
8240         (remote_state::get_remote_arch_state): Adjust.
8241
8242 2018-05-22  Pedro Alves  <palves@redhat.com>
8243
8244         * remote.c: Include <unordered_map>.
8245         (remote_state): Now a class.
8246         (remote_state) <get_remote_arch_state>: Declare method.
8247         <get_remote_arch_state>: New field.
8248         (remote_arch_state) <remote_arch_state>: Declare ctor.
8249         <regs>: Now a unique_ptr.
8250         (remote_gdbarch_data_handle): Delete.
8251         (get_remote_arch_state): Delete.
8252         (remote_state::get_remote_arch_state): New.
8253         (get_remote_state): Adjust to call remote_state's
8254         get_remote_arch_state method.
8255         (init_remote_state): Delete, bits factored out to ...
8256         (remote_arch_state::remote_arch_state): ... this new method.
8257         (get_remote_packet_size, get_memory_packet_size)
8258         (process_g_packet, remote_target::fetch_registers)
8259         (remote_target::prepare_to_store, store_registers_using_G)
8260         (remote_target::store_registers, remote_target::get_trace_status):
8261         Adjust to call remote_state's method.
8262         (_initialize_remote): Remove reference to
8263         remote_gdbarch_data_handle.
8264
8265 2018-05-22  Pedro Alves  <palves@redhat.com>
8266
8267         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8268         pread>: New method declarations.
8269         (remote_target::open_1): Adjust.
8270         (readahead_cache_invalidate): Rename to ...
8271         (readahead_cache::invalidate): ... this, and adjust to be a class
8272         method.
8273         (readahead_cache_invalidate_fd): Rename to ...
8274         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8275         class method.
8276         (remote_hostio_pwrite): Adjust.
8277         (remote_hostio_pread_from_cache): Rename to ...
8278         (readahead_cache::pread): ... this, and adjust to be a class
8279         method.
8280         (remote_hostio_close): Adjust.
8281
8282 2018-05-22  Pedro Alves  <palves@redhat.com>
8283
8284         * remote.c (remote_hostio_close_cleanup): Delete.
8285         (class scoped_remote_fd): New.
8286         (remote_file_put, remote_file_get): Use it.
8287
8288 2018-05-22  Pedro Alves  <palves@redhat.com>
8289
8290         (struct vCont_action_support): Use bool and initialize all fields.
8291         (struct readahead_cache): Initialize all fields.
8292         (remote_state): Use bool and initialize all fields.
8293         (remote_state::remote_state, remote_state::~remote_state): New.
8294         (new_remote_state): Delete.
8295         (_initialize_remote): Use new to allocate remote_state.
8296
8297 2018-05-22  Pedro Alves  <palves@redhat.com>
8298             張俊芝  <zjz@zjz.name>
8299
8300         PR gdb/22973
8301         * c-exp.y: Include "c-support.h".
8302         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8303         of tolower.  Use c_ident_is_alpha to scan names.
8304         * c-lang.c: Include "c-support.h".
8305         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8306         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8307         * c-support.h: New file, with bits factored out from ...
8308         * cp-name-parser.y: ... this file.
8309         Include "c-support.h".
8310         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8311         c-support.h and renamed.
8312         (symbol_end, yylex): Adjust.
8313
8314 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8315
8316         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8317         parameter type to CORE_ADDR.
8318         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8319         parameter type in declaration to CORE_ADDR.
8320         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8321         target_auxv_search to get AT_HWCAP and use the result to get the
8322         target description.
8323         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8324         to CORE_ADDR. Remove the cast of the return value to unsigned
8325         long. Fix error predicate of target_auxv_search.
8326         (ppc_linux_nat_target::read_description): Change the type of the
8327         hwcap variable to CORE_ADDR.
8328
8329 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8330
8331         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8332         if the size of fpscr is larger than 32 bits.
8333
8334 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8335
8336         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8337         (ppc32_linux_vsxregmap): New global.
8338         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8339         regcache_supply_regset, and regcache_collect_regset.
8340         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8341         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8342         (fetch_vsx_register, store_vsx_register): Remove.
8343         (fetch_vsx_registers): Add regno parameter. Get regset using
8344         ppc_linux_vsxregset. Use regset to supply registers.
8345         (store_vsx_registers): Add regno parameter. Get regset using
8346         ppc_linux_vsxregset. Use regset to collect registers.
8347         (fetch_register): Call fetch_vsx_registers instead of
8348         fetch_vsx_register.
8349         (store_register): Call store_vsx_registers instead of
8350         store_vsx_register.
8351         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8352         new regno parameter.
8353         (store_ppc_registers): Call store_vsx_registers with -1 for the
8354         new regno parameter.
8355         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8356         (ppc_collect_vsxregset): Remove.
8357
8358 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8359
8360         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8361         offset fields.
8362         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8363         for vector register offset fields.
8364         (ppc64_fbsd_reg_offsets): Likewise.
8365         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8366         to vector register offset fields.
8367         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8368         to vector register offset fields.
8369         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8370         vector register offset fields.
8371         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8372         initializers for vector register offset fields.
8373         (rs6000_aix64_reg_offsets): Likewise.
8374         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8375         (ppc_supply_vrregset): Remove.
8376         (ppc_collect_vrregset): Remove.
8377         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8378         (ppc_linux_vrregset) : New function.
8379         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8380         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8381         (ppc32_linux_vrregset): Remove.
8382         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8383         and use result instead of ppc32_linux_vrregset.
8384         (ppc32_linux_reg_offsets): Remove initializers for vector register
8385         offset fields.
8386         (ppc64_linux_reg_offsets): Likewise.
8387         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8388         * ppc-linux-nat.c: Include regset.h.
8389         (gdb_vrregset_t): Adjust comment to account for little-endian
8390         mode.
8391         (supply_vrregset, fill_vrregset): Remove.
8392         (fetch_altivec_register, store_altivec_register): Remove.
8393         (fetch_altivec_registers): Add regno parameter. Get regset using
8394         ppc_linux_vrregset. Use regset to supply registers.
8395         (store_altivec_registers): Add regno parameter. Get regset using
8396         ppc_linux_vrregset. Use regset to collect registers.
8397         (fetch_register): Call fetch_altivec_registers instead of
8398         fetch_altivec_register.
8399         (store_register): Call store_altivec_registers instead of
8400         store_altivec_register.
8401         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8402         the new regno parameter.
8403         (store_ppc_registers): Call store_altivec_registers with -1 for
8404         the new regno parameter.
8405
8406 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8407
8408         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8409         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8410         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8411         (gdb_vrregset_t): Change array type size to
8412         PPC_LINUX_SIZEOF_VRREGSET.
8413         (gdb_vsxregset_t): Change array type size to
8414         PPC_LINUX_SIZEOF_VSXREGSET.
8415         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8416         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8417         PPC_LINUX_SIZEOF_VSXREGSET.
8418
8419 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8420
8421         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8422         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8423         nat/ppc-linux.c.
8424         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8425         ppc_linux_target_wordsize with tid.
8426         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8427         wordsize with tid.
8428         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8429         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8430         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8431         tid parameter. Remove static specifier.
8432         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8433         (ppc_linux_target_wordsize): New declaration.
8434
8435 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8436
8437         * arch/ppc-linux-common.c: New file.
8438         * arch/ppc-linux-common.h: New file.
8439         * arch/ppc-linux-tdesc.h: New file.
8440         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8441         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8442         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8443         arch/ppc-linux-tdesc.h.
8444         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8445         arch/ppc-linux-tdesc.h.
8446         (ppc_linux_nat_target::read_description): Remove target
8447         description matching code. Fill a ppc_linux_features struct and
8448         call ppc_linux_match_description with it. Move comment about ISA
8449         2.05 to ppc-linux-common.c.
8450         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8451         arch/ppc-linux-tdesc.h.
8452         (ppc_linux_core_read_description): Remove target description
8453         matching code. Fill a ppc_linux_features struct and call
8454         ppc_linux_match_description with it.
8455         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8456         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8457         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8458         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8459         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8460         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8461         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8462         (tdesc_powerpc_e500l): Remove.
8463
8464 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8465
8466         * ada-lang.c (catch_assert_command): Pass empty string instead
8467         of NULL for excep_string argument.
8468
8469 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8470
8471         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8472         the width of the requested register exceeds the width of the
8473         `ptrace' data type.
8474
8475 2018-05-21  Tom Tromey  <tom@tromey.com>
8476
8477         * printcmd.c (output_command): Remove.
8478         (output_command_const): Rename to output_command.
8479         * valprint.h (output_command): Rename from output_command_const.
8480         * tracepoint.c (trace_dump_actions): Call output_command.
8481
8482 2018-05-21  Tom Tromey  <tom@tromey.com>
8483
8484         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8485         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8486         * ada-lang.h (create_ada_exception_catchpoint): Update.
8487         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8488         std::string.
8489         (create_excep_cond_exprs, ~ada_catchpoint)
8490         (should_stop_exception, print_one_exception)
8491         (print_mention_exception, print_recreate_exception): Update.
8492         (ada_get_next_arg): Remove.
8493         (catch_ada_exception_command_split): Use std::string.  Change type
8494         of "excep_string", "cond_string".
8495         (catch_ada_exception_command): Update.
8496         (create_ada_exception_catchpoint): Change type of excep_string.
8497         (ada_exception_sal): Remove excep_string parameter.
8498         (~ada_catchpoint): Remove.
8499
8500 2018-05-21  Tom Tromey  <tom@tromey.com>
8501
8502         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8503         cleanup.
8504
8505 2018-05-21  Tom Tromey  <tom@tromey.com>
8506
8507         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8508         Return unique_xmalloc_ptr.
8509         (print_it_exception): Update.
8510
8511 2018-05-21  Tom Tromey  <tom@tromey.com>
8512
8513         * tracepoint.c (trace_dump_actions): Use std::string.
8514
8515 2018-05-21  Tom Tromey  <tom@tromey.com>
8516
8517         * symfile.c (reread_symbols): Use std::string for original_name.
8518
8519 2018-05-21  Tom Tromey  <tom@tromey.com>
8520
8521         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8522         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8523         constructor.
8524
8525 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8526
8527         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8528         instance to...
8529         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8530         * objfiles.c (get_objfile_bfd_data): Allocate
8531         objfile_per_bfd_storage with obstack_new when allocating on
8532         obstack.
8533
8534 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8535
8536         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8537         OBSTACK_ZALLOC.
8538         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8539         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8540         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8541         (add_pending): Likewise.
8542         (parse_symbol): Likewise.
8543         (parse_partial_symbols): Likewise.
8544         (psymtab_to_symtab_1): Likewise.
8545         (new_psymtab): Likewise.
8546         (elfmdebug_build_psymtabs): Likewise.
8547         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8548         * objfiles.c (get_objfile_bfd_data): Likewise.
8549         (objfile_register_static_link): Likewise.
8550         * psymtab.c (allocate_psymtab): Likewise.
8551         * stabsread.c (read_member_functions): Likewise.
8552         * xcoffread.c (xcoff_end_psymtab): Likewise.
8553
8554 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8555
8556         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8557         compiler supports std::is_trivially_constructible.
8558         * common/poison.h: Include obstack.h.
8559         (IsMallocable): Define to is_trivially_constructible if the
8560         compiler supports it, define to true_type otherwise.
8561         (xobnew): New.
8562         (XOBNEW): Redefine.
8563         (xobnewvec): New.
8564         (XOBNEWVEC): Redefine.
8565         * gdb_obstack.h (obstack_zalloc): New.
8566         (OBSTACK_ZALLOC): Redefine.
8567         (obstack_calloc): New.
8568         (OBSTACK_CALLOC): Redefine.
8569         (obstack_new): New.
8570         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8571         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8572         gdbarch.c.
8573         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8574         obstack_calloc/obstack_zalloc.
8575         (gdbarch_obstack_zalloc): Remove.
8576         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8577
8578 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8579
8580         * stack.c (backtrace_command_1): Remove useless variable int i.
8581
8582 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8583
8584         * stack.c (print_frame_info): Fix comment.
8585
8586 2018-05-18  Tom Tromey  <tom@tromey.com>
8587
8588         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8589         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8590         (~dwarf2_per_objfile): Update
8591         (dwarf2_get_dwz_file): Use new.
8592         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8593         unique_ptr.
8594
8595 2018-05-18  Tom Tromey  <tom@tromey.com>
8596
8597         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8598         unique_ptr.
8599         * dwarf2read.c (struct dwp_file): Add constructor and
8600         initializers.
8601         (open_and_init_dwp_file): Return a unique_ptr.
8602         (dwarf2_per_objfile, create_dwp_hash_table)
8603         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8604         (lookup_dwo_unit_in_dwp): Update.
8605         (open_and_init_dwp_file, get_dwp_file): Update.
8606
8607 2018-05-18  Tom Tromey  <tom@tromey.com>
8608
8609         * dwarf2read.c (dwarf2_per_objfile): Update.
8610         (struct mapped_index): Add initializers.
8611         (dwarf2_read_index): Use new.
8612         (dw2_symtab_iter_init): Update.
8613         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8614         unique_ptr.
8615
8616 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8617
8618         * dwarf2read.c (mapped_index) <total_size>: Remove.
8619
8620 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8621
8622         * unittests/format_pieces-selftests.c (test_format_specifier):
8623         Add ARI comments.
8624
8625 2018-05-18  Tom Tromey  <tom@tromey.com>
8626
8627         * c-typeprint.c (maybe_print_hole): New function.
8628         (c_print_type_struct_field_offset): Update.
8629         (c_type_print_base_struct_union): Call maybe_print_hole.
8630
8631 2018-05-17  Keith Seitz  <keiths@redhat.com>
8632
8633         * breakpoint.c (build_bpstat_chain): New function, moved from
8634         bpstat_stop_status.
8635         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8636         If no stop chain is passed, call build_bpstat_chain to build it.
8637         * breakpoint.h (build_bpstat_chain): Declare.
8638         (bpstat_stop_status): Move documentation here from breakpoint.c.
8639         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8640         build the stop chain and pass it to skip_inline_frames.
8641         Pass this stop chain to bpstat_stop_status.
8642         * inline-frame.c: Include breakpoint.h.
8643         (stopped_by_user_bp_inline_frame): New function.
8644         (skip_inline_frames): Add parameter `stop_chain'.
8645         Move documention to inline-frame.h.
8646         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8647         whether the frame should be elided.
8648         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8649         Add moved documentation and update for new parameter.
8650
8651 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8652
8653         PR cli/14975
8654         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8655         unittests/format_pieces-selftests.c.
8656         * common/format.h (format_piece) <operator==>: New.
8657         (format_pieces) <operator[]>: Remove.
8658         * common/format.c (format_pieces::format_pieces): Handle \e.
8659         * unittests/format_pieces-selftests.c: New.
8660
8661 2018-05-17  Tom Tromey  <tom@tromey.com>
8662
8663         PR symtab/23010:
8664         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8665         (dw2_instantiate_symtab): Add skip_partial parameter.
8666         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8667         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8668         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8669         (dw2_expand_symtabs_matching_one)
8670         (dw2_find_pc_sect_compunit_symtab)
8671         (dw2_debug_names_lookup_symbol)
8672         (dw2_debug_names_expand_symtabs_for_function): Update.
8673         (init_cutu_and_read_dies): Add skip_partial parameter.
8674         (process_psymtab_comp_unit, build_type_psymtabs_1)
8675         (process_skeletonless_type_unit, load_partial_comp_unit)
8676         (psymtab_to_symtab_1): Update.
8677         (load_full_comp_unit): Add skip_partial parameter.
8678         (process_imported_unit_die, dwarf2_read_addr_index)
8679         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8680         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8681         (read_signatured_type): Update.
8682
8683 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8684
8685         * value.c (release_value): Remove unused variable.
8686         (record_latest_value): Likewise.
8687         (access_value_history): Likewise.
8688         (preserve_values): Likewise.
8689
8690 2018-05-17  Tom Tromey  <tom@tromey.com>
8691
8692         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8693         Initialize.
8694
8695 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8696
8697         PR gdb/22286
8698         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8699         Also handle registers whose width is not a multiple of
8700         PTRACE_TYPE_RET.
8701         (linux_nat_trad_target::store_register): Likewise.
8702
8703 2018-05-16  Tom Tromey  <tom@tromey.com>
8704
8705         * gdbcore.h (core_bfd): Redefine.
8706         * corelow.c (core_target::close): Update.
8707         (core_target_open): Update.
8708         * progspace.h (struct program_space) <cbfd>: Now a
8709         gdb_bfd_ref_ptr.
8710
8711 2018-05-16  Tom Tromey  <tom@tromey.com>
8712
8713         PR cli/19551:
8714         * symfile-add-flags.h (enum symfile_add_flags)
8715         <SYMFILE_NOT_FILENAME>: New constant.
8716         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8717         objfile name from BFD.
8718         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8719         * minidebug.c (find_separate_debug_file_in_section): Put
8720         ".gnu_debugdata" into BFD's file name.
8721
8722 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8723
8724         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8725         Remove.
8726
8727 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8728
8729         PR binutils/21446
8730         * aarch64-tdep.c (aarch64_analyze_prologue,
8731         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8732         Indicate not interested in errors.
8733
8734 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8735
8736         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8737         Supply the MIPS_ZERO_REGNUM register.
8738
8739 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8740
8741         * mips-tdep.c (mask_address_var): Make variable static.
8742
8743 2018-05-14  Tom Tromey  <tom@tromey.com>
8744
8745         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8746
8747 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8748
8749         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8750         FXSAVE_ADDR for the mxcsr register.
8751
8752 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8753
8754         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8755
8756 2018-05-11  Pedro Alves  <palves@redhat.com>
8757
8758         * corelow.c (core_target) <core_target>: No longer inline.
8759         Initialize m_core_gdbarch, m_core_vec and build the section table
8760         here.
8761         <~core_target>: New.
8762         <core_gdbarch, get_core_register_section>: New methods.
8763         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8764         factored out from ...
8765         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8766         (core_ops): Delete.
8767         (sniff_core_bfd): Add gdbarch parameter.
8768         (core_close): Delete, merged into ...
8769         (core_target::close): ... here.  Delete self.
8770         (core_close_cleanup): Delete.
8771         (core_target_open): Allocate a core_target on the heap.  Use a
8772         unique_ptr instead of a cleanup.  Bits moved into the core_target
8773         ctor.  Adjust to use core_target methods instead of globals.
8774         (get_core_register_section): Rename to ...
8775         (core_target::get_core_register_section): ... this and adjust.
8776         (struct get_core_registers_cb_data): New.
8777         (get_core_registers_cb): Use it.  Use bool.
8778         (core_target::fetch_registers, core_target::files_info)
8779         (core_target::xfer_partial, core_target::read_description)
8780         (core_target::pid_to, core_target::thread_name): Adjust to
8781         reference class fields instead of globals.
8782         * target.h (struct target_ops_deleter, target_ops_up): New.
8783
8784 2018-05-11  Pedro Alves  <palves@redhat.com>
8785
8786         * corefile.c (core_file_command): Move to corelow.c.
8787         * corelow.c (the_core_target): Delete.
8788         (core_file_command): Moved from corefile.c.  Check exec_bfd
8789         instead of the_core_target.  Use target_detach instead of calling
8790         into the_core_target directly.
8791         (maybe_say_no_core_file_now): New.
8792         (core_target::detach): Use it.
8793         (_initialize_corelow): Remove references to the_core_target.
8794         * gdbcore.h (the_core_target): Delete.
8795
8796 2018-05-11  Tom Tromey  <tromey@redhat.com>
8797             Pedro Alves  <palves@redhat.com>
8798
8799         * corefile.c (core_bfd): Remove.
8800         * gdbcore.h (core_bfd): Now a macro.
8801         * progspace.h (struct program_space) <cbfd>: New field.
8802
8803 2018-05-11  Tom Tromey  <tom@tromey.com>
8804
8805         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8806         gdb::def_vector.
8807
8808 2018-05-10  Tom Tromey  <tom@tromey.com>
8809
8810         * configure: Rebuild.
8811         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8812
8813 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8814
8815         PR server/23158:
8816         * regformats/regdat.sh: Adjust script, following the addition
8817         of the new expedite_regs parameter to init_target_desc.
8818
8819 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8820     
8821         PR gdb/23127
8822         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8823         set_gdbarch_significant_addr_bit.
8824         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8825         set_gdbarch_significant_addr_bit.
8826         * utils.c (address_significant): Update to sign extend addr.
8827
8828 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8829
8830         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8831         (xtensa_linux_init_abi): Limit tdep->num_regs by
8832         tdep->num_nopriv_regs.
8833         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8834         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8835         not initialized.
8836
8837 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8838
8839         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8840
8841 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8842
8843         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8844         (I387_MXCSR_INIT_VAL): New constant.
8845         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8846         buffer if it was supplied by the inferior.
8847         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8848         (i387_xsave_get_clear_bv): New function.
8849         (i387_supply_xsave): Only read x87 control registers from the
8850         xsave buffer if the feature is enabled, and the state will have
8851         been written, otherwise, provide a suitable default.
8852         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8853         including x87 control registers.  Update control registers if they
8854         have changed from the default value, and mark features as enabled
8855         as required.
8856         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8857
8858 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8859
8860         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8861
8862 2018-05-07  Tom Tromey  <tom@tromey.com>
8863
8864         * configure: Rebuild.
8865         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8866
8867 2018-05-07  Tom Tromey  <tom@tromey.com>
8868
8869         PR tdep/20362:
8870         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8871         bit.  Use correct value for VDIV.
8872
8873 2018-05-04  Tom Tromey  <tom@tromey.com>
8874
8875         * configure: Rebuild.
8876         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8877
8878 2018-05-04  Tom Tromey  <tom@tromey.com>
8879
8880         * linux-record.c (record_linux_system_call) <case
8881         RECORD_SYS_RECVFROM>: Add "break".
8882
8883 2018-05-04  Tom Tromey  <tom@tromey.com>
8884
8885         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8886         Add missing "break".
8887         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8888         Add missing "break".
8889
8890 2018-05-04  Tom Tromey  <tom@tromey.com>
8891
8892         * rs6000-tdep.c (ppc_process_record_op4)
8893         (ppc_process_record_op63): Add fall-through comment.
8894
8895 2018-05-04  Tom Tromey  <tom@tromey.com>
8896
8897         * i386-tdep.c (i386_process_record): Add fall-through comment.
8898
8899 2018-05-04  Tom Tromey  <tom@tromey.com>
8900
8901         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8902         comment.
8903
8904 2018-05-04  Tom Tromey  <tom@tromey.com>
8905
8906         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8907         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8908         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8909         comment.
8910         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8911         comment.
8912         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8913         comment.
8914
8915 2018-05-04  Tom Tromey  <tom@tromey.com>
8916
8917         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8918
8919 2018-05-04  Tom Tromey  <tom@tromey.com>
8920
8921         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8922         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8923         * symfile.c (section_is_mapped): Fix fall-through comment.
8924         * stabsread.c (define_symbol, read_member_functions): Fix
8925         fall-through comment.
8926         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8927         comment.
8928         * remote.c (remote_wait_as): Fix fall-through comment.
8929         * p-exp.y (yylex): Fix fall-through comment.
8930         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8931         comment.
8932         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8933         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8934         * jv-exp.y (yylex): Fix fall-through comment.
8935         * go-exp.y (lex_one_token): Fix fall-through comment.
8936         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8937         fall-through comment.
8938         * f-exp.y (yylex): Fix fall-through comment.
8939         * dwarf2read.c (process_die): Fix fall-through comments.
8940         * dbxread.c (process_one_symbol): Fix fall-through comment.
8941         * d-exp.y (lex_one_token): Fix fall-through comment.
8942         * cp-name-parser.y (yylex): Fix fall-through comment.
8943         * coffread.c (coff_symtab_read): Fix fall-through comment.
8944         * c-exp.y (lex_one_token): Fix fall-through comment.
8945         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8946         comment.
8947         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8948         comment.
8949
8950 2018-05-04  Tom Tromey  <tom@tromey.com>
8951
8952         PR python/22730:
8953         * NEWS: Mention gdb.execute change.
8954         * gdbcmd.h (execute_control_command): Don't declare.
8955         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8956         execute_control_commands, execute_control_commands_to_string.
8957         * cli/cli-script.h (execute_control_commands)
8958         (execute_control_commands_to_string): Declare.
8959         (execute_control_command): Add from_tty parameter.
8960         * cli/cli-script.c (execute_control_commands)
8961         (execute_control_commands_to_string): New functions.
8962         (execute_user_command): Use execute_control_commands.
8963         (execute_control_command_1): Add "from_tty" parameter.  Update.
8964         (execute_control_command): Likewise.
8965
8966 2018-05-04  Tom Tromey  <tom@tromey.com>
8967
8968         PR python/22731:
8969         * NEWS: Mention that breakpoint commands are writable.
8970         * python/py-breakpoint.c (bppy_set_commands): New function.
8971         (breakpoint_object_getset) <"commands">: Use it.
8972
8973 2018-05-04  Tom Tromey  <tom@tromey.com>
8974
8975         * tracepoint.c (actions_command): Update.
8976         * mi/mi-cmd-break.c (mi_command_line_array)
8977         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8978         (mi_read_next_line): Remove.
8979         (mi_cmd_break_commands): Update.
8980         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8981         function_view.
8982         * cli/cli-script.c (get_command_line): Update.
8983         (process_next_line): Use function_view.  Constify.
8984         (recurse_read_control_structure, read_command_lines)
8985         (read_command_lines_1): Change argument types to function_view.
8986         (do_define_command, document_command): Update.
8987         * breakpoint.h (check_tracepoint_command): Don't declare.
8988         * breakpoint.c (check_tracepoint_command): Remove.
8989         (commands_command_1, create_tracepoint_from_upload): Update.
8990
8991 2018-05-04  Tom Tromey  <tom@tromey.com>
8992
8993         PR gdb/11750:
8994         * cli/cli-script.h (enum command_control_type) <define_control>:
8995         New constant.
8996         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8997         (build_command_line, execute_control_command_1)
8998         (process_next_line): Likewise.
8999         (do_define_command): New function, extracted from define_command.
9000         (define_command): Use it.
9001
9002 2018-05-04  Tom Tromey  <tom@tromey.com>
9003
9004         * tracepoint.c (actions_command): Update.
9005         * cli/cli-script.h (read_command_lines): Update.
9006         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9007         (MAX_TMPBUF): Remove define.
9008         (define_command): Use string_printf.
9009         (document_command): Likewise.
9010         * breakpoint.c (commands_command_1): Update.
9011
9012 2018-05-04  Tom Tromey  <tom@tromey.com>
9013
9014         * top.c (execute_command): Update.
9015         * cli/cli-script.h (print_command_lines): Now varargs.
9016         * cli/cli-script.c (print_command_lines): Now varargs.
9017         (execute_control_command_1) <case while_control, case if_control>:
9018         Update.
9019
9020 2018-05-04  Tom Tromey  <tom@tromey.com>
9021
9022         * tracepoint.c (all_tracepoint_actions): Rename from
9023         all_tracepoint_actions_and_cleanup.  Change return type.
9024         (actions_command, encode_actions_1, encode_actions)
9025         (trace_dump_actions, tdump_command): Update.
9026         * remote.c (remote_download_command_source): Update.
9027         * python/python.c (gdbpy_eval_from_control_command)
9028         (python_command, python_interactive_command): Update.
9029         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9030         * guile/guile.c (guile_command)
9031         (gdbscm_eval_from_control_command, guile_command): Update.
9032         * compile/compile.c (compile_code_command)
9033         (compile_print_command, compile_to_object): Update.
9034         * cli/cli-script.h (struct command_lines_deleter): New.
9035         (counted_command_line): New typedef.
9036         (struct command_line): Add constructor, destructor.
9037         <body_list>: Remove.
9038         <body_list_0, body_list_1>: New members.
9039         (command_line_up): Remove typedef.
9040         (read_command_lines, read_command_lines_1, get_command_line):
9041         Update.
9042         (copy_command_lines): Don't declare.
9043         * cli/cli-script.c (build_command_line): Use "new".
9044         (get_command_line): Return counted_command_line.
9045         (print_command_lines, execute_user_command)
9046         (execute_control_command_1, while_command, if_command): Update.
9047         (realloc_body_list): Remove.
9048         (process_next_line, recurse_read_control_structure): Update.
9049         (read_command_lines, read_command_lines_1): Return counted_command_line.
9050         (free_command_lines): Use "delete".
9051         (copy_command_lines): Remove.
9052         (define_command, document_command, show_user_1): Update.
9053         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9054         a counted_command_line.
9055         * breakpoint.h (counted_command_line): Remove typedef.
9056         (breakpoint_set_commands): Update.
9057         * breakpoint.c (check_no_tracepoint_commands)
9058         (validate_commands_for_breakpoint): Update.
9059         (breakpoint_set_commands): Change commands to be a
9060         counted_command_line.
9061         (commands_command_1, update_dprintf_command_list)
9062         (create_tracepoint_from_upload): Update.
9063
9064 2018-05-04  Tom Tromey  <tom@tromey.com>
9065
9066         * cli/cli-decode.h (cmd_list_element): New constructor.
9067         (~cmd_list_element): New destructor.
9068         (struct cmd_list_element): Add initializers.
9069         * cli/cli-decode.c (do_add_cmd): Use "new".
9070         (delete_cmd): Use "delete".
9071
9072 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9073             Pedro Alves <palves@redhat.com>
9074
9075         PR breakpoints/19806 and support for PR external/20207.
9076         * NEWS: Mention Aarch64 watchpoint improvements.
9077         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9078         watchpoints and PR external/20207 watchpoints.
9079         * nat/aarch64-linux-hw-point.c
9080         (kernel_supports_any_contiguous_range): New.
9081         (aarch64_watchpoint_offset): New.
9082         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9083         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9084         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9085         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9086         next_addr_orig_p.  Support PR external/20207 watchpoints.
9087         (aarch64_downgrade_regs): New.
9088         (aarch64_dr_state_insert_one_point): New parameters offset and
9089         addr_orig.
9090         (aarch64_dr_state_remove_one_point): Likewise.
9091         (aarch64_handle_breakpoint): Update caller.
9092         (aarch64_handle_aligned_watchpoint): Likewise.
9093         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9094         aligned_offset.
9095         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9096         aarch64_downgrade_regs.
9097         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9098         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9099         (DR_CONTROL_MASK): ... this.
9100         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9101         (unsigned int aarch64_watchpoint_offset): New prototype.
9102         (aarch64_linux_set_debug_regs): Remove const from state.
9103         * utils.c (align_up, align_down): Move to ...
9104         * common/common-utils.c (align_up, align_down): ... here.
9105         * utils.h (align_up, align_down): Move to ...
9106         * common/common-utils.h (align_up, align_down): ... here.
9107
9108 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9109
9110         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9111         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9112         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9113         Re-implement to match the ABI as summarized in GCC's
9114         gcc/config/sparc/sparc.c.  All callers updated.
9115         (sparc32_store_arguments): Remove assertion.
9116
9117 2018-05-04  Tom Tromey  <tom@tromey.com>
9118
9119         * printcmd.c: Don't include tui.h.
9120         (decode_format): Use skip_spaces.
9121
9122 2018-05-04  Tom Tromey  <tom@tromey.com>
9123
9124         PR gdb/22619:
9125         * printcmd.c (last_count): New global.
9126         (x_command): Use saved count when repeating.
9127
9128 2018-05-04  Tom Tromey  <tom@tromey.com>
9129
9130         * nto-procfs.c (do_closedir_cleanup): Remove.
9131         (procfs_pidlist): Use gdb_dir_up.
9132         * procfs.c (do_closedir_cleanup): Remove.
9133         (proc_update_threads): Use gdb_dir_up.
9134         * common/filestuff.h (struct gdb_dir_deleter): New.
9135         (gdb_dir_up): New typedef.
9136
9137 2018-05-04  Tom Tromey  <tom@tromey.com>
9138
9139         * ada-lang.c (print_mention_exception): Use std::string.
9140
9141 2018-05-04  Tom Tromey  <tom@tromey.com>
9142
9143         * ada-lang.c (create_excep_cond_exprs): Update.
9144         (ada_exception_catchpoint_cond_string): Use std::string.
9145
9146 2018-05-04  Tom Tromey  <tom@tromey.com>
9147
9148         * ada-lang.c (xget_renaming_scope): Return std::string.
9149         (old_renaming_is_invisible): Update.
9150
9151 2018-05-04  Tom Tromey  <tom@tromey.com>
9152
9153         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9154         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9155
9156 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9157
9158         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9159
9160 2018-05-04  Tom Tromey  <tom@tromey.com>
9161
9162         * remote.c (remote_query_supported_append): Change type.
9163         (remote_check_symbols): Update.
9164
9165 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9166
9167         PR gdb/11420
9168         * configure.ac: Prepend libpython.
9169         * python/python-config.py: Likewise.
9170         * configure: Regenerate.
9171
9172 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9173
9174         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9175
9176 2018-05-03  Pedro Alves  <palves@redhat.com>
9177
9178         * s390-linux-nat.c
9179         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9180         override.  Write 'true' instead of '1'.
9181         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9182         declaration.
9183
9184 2018-05-02  Pedro Alves  <palves@redhat.com>
9185
9186         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9187         add_inf_child_target.
9188         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9189         add_inf_child_target.
9190         * aix-thread.c (aix_thread_target_info): New.
9191         (aix_thread_target) <shortname, longname, doc>: Delete.
9192         <info>: New.
9193         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9194         add_inf_child_target.
9195         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9196         add_inf_child_target.
9197         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9198         add_inf_child_target.
9199         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9200         add_inf_child_target.
9201         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9202         add_inf_child_target.
9203         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9204         add_inf_child_target.
9205         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9206         add_inf_child_target.
9207         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9208         add_inf_child_target.
9209         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9210         add_inf_child_target.
9211         * bfd-target.c (target_bfd_target_info): New.
9212         (target_bfd) <shortname, longname, doc>: Delete.
9213         <info>: New.
9214         * bsd-kvm.c (bsd_kvm_target_info): New.
9215         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9216         <info>: New.
9217         (bsd_kvm_target::open): Rename to ...
9218         (bsd_kvm_target_open): ... this.  Adjust.
9219         * bsd-uthread.c (bsd_uthread_target_info): New.
9220         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9221         <info>: New.
9222         * corefile.c (core_file_command): Adjust.
9223         * corelow.c (core_target_info): New.
9224         (core_target) <shortname, longname, doc>: Delete.
9225         <info>: New.
9226         (core_target::open): Rename to ...
9227         (core_target_open): ... this.  Adjust.
9228         * ctf.c (ctf_target_info): New.
9229         (ctf_target) <shortname, longname, doc>: Delete.
9230         <info>: New.
9231         (ctf_target::open): Rename to ...
9232         (ctf_target_open): ... this.
9233         (_initialize_ctf): Adjust.
9234         * exec.c (exec_target_info): New.
9235         (exec_target) <shortname, longname, doc>: Delete.
9236         <info>: New.
9237         (exec_target::open): Rename to ...
9238         (exec_target_open): ... this.
9239         * gdbcore.h (core_target_open): Declare.
9240         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9241         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9242         add_inf_child_target.
9243         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9244         add_inf_child_target.
9245         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9246         add_inf_child_target.
9247         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9248         add_inf_child_target.
9249         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9250         add_inf_child_target.
9251         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9252         add_inf_child_target.
9253         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9254         add_inf_child_target.
9255         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9256         add_inf_child_target.
9257         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9258         add_inf_child_target.
9259         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9260         add_inf_child_target.
9261         * inf-child.c (inf_child_target_info): New.
9262         (inf_child_target::info): New.
9263         (inf_child_open_target): Remove 'target' parameter.  Use
9264         get_native_target instead.
9265         (inf_child_target::open): Delete.
9266         (add_inf_child_target): New.
9267         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9268         Delete.
9269         <info>: New.
9270         (add_inf_child_target): Declare.
9271         (inf_child_open_target): Declare.
9272         * linux-thread-db.c (thread_db_target_info): New.
9273         (thread_db_target) <shortname, longname, doc>: Delete.
9274         <info>: New.
9275         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9276         add_inf_child_target.
9277         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9278         add_inf_child_target.
9279         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9280         add_inf_child_target.
9281         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9282         add_inf_child_target.
9283         * make-target-delegates (print_class): Adjust.
9284         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9285         add_inf_child_target.
9286         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9287         add_inf_child_target.
9288         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9289         add_inf_child_target.
9290         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9291         add_inf_child_target.
9292         * nto-procfs.c (nto_native_target_info): New.
9293         (nto_procfs_target_native) <shortname, longname, doc>:
9294         Delete.
9295         <info>: New.
9296         (nto_procfs_target_info): New.
9297         (nto_procfs_target_procfs) <shortname, longname, doc>:
9298         Delete.
9299         <info>: New.
9300         (init_procfs_targets): Adjust.
9301         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9302         add_inf_child_target.
9303         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9304         add_inf_child_target.
9305         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9306         add_inf_child_target.
9307         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9308         add_inf_child_target.
9309         * ravenscar-thread.c (ravenscar_target_info): New.
9310         (ravenscar_thread_target) <shortname, longname, doc>:
9311         Delete.
9312         <info>: New.
9313         * record-btrace.c (record_btrace_target_info):
9314         (record_btrace_target) <shortname, longname, doc>: Delete.
9315         <info>: New.
9316         (record_btrace_target::open): Rename to ...
9317         (record_btrace_target_open): ... this.  Adjust.
9318         * record-full.c (record_longname, record_doc): New.
9319         (record_full_base_target) <shortname, longname, doc>: Delete.
9320         <info>: New.
9321         (record_full_target_info): New.
9322         (record_full_target): <shortname>: Delete.
9323         <info>: New.
9324         (record_full_core_open_1, record_full_open_1): Update comments.
9325         (record_full_base_target::open): Rename to ...
9326         (record_full_open): ... this.
9327         (cmd_record_full_restore): Update.
9328         (_initialize_record_full): Update.
9329         * remote-sim.c (remote_sim_target_info): New.
9330         (gdbsim_target) <shortname, longname, doc>: Delete.
9331         <info>: New.
9332         (gdbsim_target::open): Rename to ...
9333         (gdbsim_target_open): ... this.
9334         (_initialize_remote_sim): Adjust.
9335         * remote.c (remote_doc): New.
9336         (remote_target_info): New.
9337         (remote_target) <shortname, longname, doc>: Delete.
9338         <info>: New.
9339         (extended_remote_target_info): New.
9340         (extended_remote_target) <shortname, longname, doc>: Delete.
9341         <info>: New.
9342         (remote_target::open_1): Make static.  Adjust.
9343         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9344         * s390-linux-nat.c (_initialize_s390_nat): Use
9345         add_inf_child_target.
9346         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9347         add_inf_child_target.
9348         * sol-thread.c (thread_db_target_info): New.
9349         (sol_thread_target) <shortname, longname, doc>: Delete.
9350         <info>: New.
9351         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9352         add_inf_child_target.
9353         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9354         add_inf_child_target.
9355         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9356         add_inf_child_target.
9357         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9358         add_inf_child_target.
9359         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9360         add_inf_child_target.
9361         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9362         add_inf_child_target.
9363         * spu-linux-nat.c (_initialize_spu_nat): Use
9364         add_inf_child_target.
9365         * spu-multiarch.c (spu_multiarch_target_info): New.
9366         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9367         <info>: New.
9368         * target-delegates.c: Regenerate.
9369         * target.c: Include <unordered_map>.
9370         (target_ops_p): Delete.
9371         (DEF_VEC_P(target_ops_p)): Delete.
9372         (target_factories): New.
9373         (test_target_info): New.
9374         (test_target_ops::info): New.
9375         (open_target): Adjust to use target_factories.
9376         (add_target_with_completer): Rename to ...
9377         (add_target): ... this.  Change prototype.  Register target_info
9378         and open callback in target_factories.  Register target_info in
9379         command context instead of target_ops.
9380         (add_target): Delete old implementation.
9381         (add_deprecated_target_alias): Change prototype.  Adjust.
9382         (the_native_target): New.
9383         (set_native_target, get_native_target): New.
9384         (find_default_run_target): Use the_native_target.
9385         (find_attach_target, find_run_target): Simplify.
9386         (target_ops::open): Delete.
9387         (dummy_target_info): New.
9388         (dummy_target::shortname, dummy_target::longname)
9389         (dummy_target::doc): Delete.
9390         (dummy_target::info): New.
9391         (debug_target::shortname, debug_target::longname)
9392         (debug_target::doc): Delete.
9393         (debug_target::info): New.
9394         * target.h (struct target_info): New.
9395         (target_ops::~target_ops): Add comment.
9396         (target_ops::info): New.
9397         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9398         longer virtual.  Implement in terms of target_info.
9399         (set_native_target, get_native_target): Declare.
9400         (target_open_ftype): New.
9401         (add_target, add_target_with_completer)
9402         (add_deprecated_target_alias): Change prototype.
9403         (test_target) <shortname, longname, doc>: Delete.
9404         <info>: New.
9405         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9406         add_inf_child_target.
9407         * tracefile-tfile.c (tfile_target_info): New.
9408         (tfile_target) <shortname, longname, doc>: Delete.
9409         <info>: New.
9410         (tfile_target::open): Rename to ...
9411         (tfile_target_open): ... this.
9412         (_initialize_tracefile_tfile): Adjust.
9413         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9414         add_inf_child_target.
9415         * windows-nat.c (_initialize_windows_nat): Use
9416         add_inf_child_target.
9417         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9418         add_inf_child_target.
9419
9420 2018-05-02  Pedro Alves  <palves@redhat.com>
9421
9422         * linux-nat.h (linux_nat_target) <low_new_thread,
9423         low_delete_thread, low_new_fork, low_forget_process,
9424         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9425         New virtual methods.
9426         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9427         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9428         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9429         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9430         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9431         Delete.
9432         * linux-fork.c (delete_fork): Adjust to call low method.
9433         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9434         (linux_nat_new_fork, linux_nat_forget_process_hook)
9435         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9436         (linux_nat_status_is_event):
9437         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9438         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9439         to call low method.
9440         (sigtrap_is_event): Rename to ...
9441         (linux_nat_target::low_status_is_event): ... this.
9442         (linux_nat_set_status_is_event): Delete.
9443         (save_stop_reason, linux_nat_wait_1)
9444         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9445         low methods.
9446         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9447         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9448         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9449         (linux_nat_set_prepare_to_resume): Delete.
9450         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9451         low virtual methods.
9452         * amd64-linux-nat.c: Likewise.
9453         * arm-linux-nat.c: Likewise.
9454         * i386-linux-nat.c: Likewise.
9455         * ia64-linux-nat.c: Likewise.
9456         * mips-linux-nat.c: Likewise.
9457         * ppc-linux-nat.c: Likewise.
9458         * s390-linux-nat.c: Likewise.
9459         * sparc64-linux-nat.c: Likewise.
9460         * x86-linux-nat.c: Likewise.
9461         * x86-linux-nat.h: Include "nat/x86-linux.h".
9462         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9463         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9464         Override methods.
9465
9466 2018-05-02  Pedro Alves  <palves@redhat.com>
9467
9468         * target.h (target_ops)
9469         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9470         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9471         stopped_by_watchpoint, have_continuable_watchpoint,
9472         stopped_data_address, watchpoint_addr_within_range,
9473         can_accel_watchpoint_condition, can_run, thread_alive,
9474         has_all_memory, has_memory, has_stack, has_registers,
9475         has_execution, can_async_p, is_async_p, supports_non_stop,
9476         always_non_stop_p, can_execute_reverse, supports_multi_process,
9477         supports_enable_disable_tracepoint,
9478         supports_disable_randomization, supports_string_tracing,
9479         supports_evaluation_of_breakpoint_conditions,
9480         can_run_breakpoint_commands, filesystem_is_local,
9481         can_download_tracepoint, get_trace_state_variable_value,
9482         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9483         record_is_replaying, record_will_replay,
9484         augmented_libraries_svr4_read>: Adjust to return bool.
9485         * aarch64-linux-nat.c: All implementations adjusted.
9486         * aix-thread.c: All implementations adjusted.
9487         * arm-linux-nat.c: All implementations adjusted.
9488         * breakpoint.c: All implementations adjusted.
9489         * bsd-kvm.c: All implementations adjusted.
9490         * bsd-uthread.c: All implementations adjusted.
9491         * corelow.c: All implementations adjusted.
9492         * ctf.c: All implementations adjusted.
9493         * darwin-nat.c: All implementations adjusted.
9494         * darwin-nat.h: All implementations adjusted.
9495         * exec.c: All implementations adjusted.
9496         * fbsd-nat.c: All implementations adjusted.
9497         * fbsd-nat.h: All implementations adjusted.
9498         * gnu-nat.c: All implementations adjusted.
9499         * gnu-nat.h: All implementations adjusted.
9500         * go32-nat.c: All implementations adjusted.
9501         * ia64-linux-nat.c: All implementations adjusted.
9502         * inf-child.c: All implementations adjusted.
9503         * inf-child.h: All implementations adjusted.
9504         * inf-ptrace.c: All implementations adjusted.
9505         * inf-ptrace.h: All implementations adjusted.
9506         * linux-nat.c: All implementations adjusted.
9507         * linux-nat.h: All implementations adjusted.
9508         * mips-linux-nat.c: All implementations adjusted.
9509         * nto-procfs.c: All implementations adjusted.
9510         * ppc-linux-nat.c: All implementations adjusted.
9511         * procfs.c: All implementations adjusted.
9512         * ravenscar-thread.c: All implementations adjusted.
9513         * record-btrace.c: All implementations adjusted.
9514         * record-full.c: All implementations adjusted.
9515         * remote-sim.c: All implementations adjusted.
9516         * remote.c: All implementations adjusted.
9517         * s390-linux-nat.c: All implementations adjusted.
9518         * sol-thread.c: All implementations adjusted.
9519         * spu-multiarch.c: All implementations adjusted.
9520         * target-delegates.c: All implementations adjusted.
9521         * target.c: All implementations adjusted.
9522         * target.h: All implementations adjusted.
9523         * tracefile-tfile.c: All implementations adjusted.
9524         * tracefile.c: All implementations adjusted.
9525         * tracefile.h: All implementations adjusted.
9526         * windows-nat.c: All implementations adjusted.
9527         * x86-linux-nat.h: All implementations adjusted.
9528         * x86-nat.h: All implementations adjusted.
9529
9530 2018-05-02  Pedro Alves  <palves@redhat.com>
9531
9532         * make-target-delegates (scan_target_h): Don't trim lines here.
9533         Replace sequences of tabs and/or whitespace with a single
9534         whitespace.
9535         (top level, parsing methods): Trim each line before processing it
9536         here.
9537
9538 2018-05-02  Pedro Alves  <palves@redhat.com>
9539             John Baldwin  <jhb@freebsd.org>
9540
9541         * target.h (enum strata) <debug_stratum>: New.
9542         (struct target_ops) <all delegation methods>: Replace by C++
9543         virtual methods, and drop "to_" prefix.  All references updated
9544         throughout.
9545         <to_shortname, to_longname, to_doc, to_data,
9546         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9547         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9548         virtual methods.  All references updated throughout.
9549         <can_attach, supports_terminal_ours, can_create_inferior,
9550         get_thread_control_capabilities, attach_no_wait>: New
9551         virtual methods.
9552         <insert_breakpoint, remove_breakpoint>: Now
9553         TARGET_DEFAULT_NORETURN methods.
9554         <info_proc>: Now returns bool.
9555         <to_magic>: Delete.
9556         (OPS_MAGIC): Delete.
9557         (current_target): Delete.  All references replaced by references
9558         to ...
9559         (target_stack): ... this.  New.
9560         (target_shortname, target_longname): Adjust.
9561         (target_can_run): Now a function declaration.
9562         (default_child_has_all_memory, default_child_has_memory)
9563         (default_child_has_stack, default_child_has_registers)
9564         (default_child_has_execution): Remove target_ops parameter.
9565         (complete_target_initialization): Delete.
9566         (memory_breakpoint_target): New template class.
9567         (test_target_ops): Refactor as a C++ class with virtual methods.
9568         * make-target-delegates (NAME_PART): Tighten.
9569         (POINTER_PART, CP_SYMBOL): New.
9570         (SIMPLE_RETURN_PART): Reimplement.
9571         (VEC_RETURN_PART): Expect less.
9572         (RETURN_PART, VIRTUAL_PART): New.
9573         (METHOD): Adjust to C++ virtual methods.
9574         (scan_target_h): Remove reference to C99.
9575         (dname): Output "target_ops::" prefix.
9576         (write_function_header): Adjust to output a C++ class method.
9577         (write_declaration): New.
9578         (write_delegator): Adjust to output a C++ class method.
9579         (tdname): Output "dummy_target::" prefix.
9580         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9581         method.
9582         (tdefault_names, debug_names): Delete.
9583         (return_types, tdefaults, styles, argtypes_array): New.
9584         (top level): All methods are delegators.
9585         (print_class): New.
9586         (top level): Print dummy_target and debug_target classes.
9587         * target-delegates.c: Regenerate.
9588         * target-debug.h (target_debug_print_enum_info_proc_what)
9589         (target_debug_print_thread_control_capabilities)
9590         (target_debug_print_thread_info_p): New.
9591         * target.c (dummy_target): Delete.
9592         (the_dummy_target, the_debug_target): New.
9593         (target_stack): Now extern.
9594         (set_targetdebug): Push/unpush debug target.
9595         (default_child_has_all_memory, default_child_has_memory)
9596         (default_child_has_stack, default_child_has_registers)
9597         (default_child_has_execution): Remove target_ops parameter.
9598         (complete_target_initialization): Delete.
9599         (add_target_with_completer): No longer call
9600         complete_target_initialization.
9601         (target_supports_terminal_ours): Use regular delegation.
9602         (update_current_target): Delete.
9603         (push_target): No longer check magic number.  Don't call
9604         update_current_target.
9605         (unpush_target): Don't call update_current_target.
9606         (target_is_pushed): No longer check magic number.
9607         (target_require_runnable): Skip for all stratums over
9608         process_stratum.
9609         (target_ops::info_proc): New.
9610         (target_info_proc): Use find_target_at and
9611         find_default_run_target.
9612         (target_supports_disable_randomization): Use regular delegation.
9613         (target_get_osdata): Use find_target_at.
9614         (target_ops::open, target_ops::close, target_ops::can_attach)
9615         (target_ops::attach, target_ops::can_create_inferior)
9616         (target_ops::create_inferior, target_ops::can_run)
9617         (target_can_run): New.
9618         (default_fileio_target): Use regular delegation.
9619         (target_ops::fileio_open, target_ops::fileio_pwrite)
9620         (target_ops::fileio_pread, target_ops::fileio_fstat)
9621         (target_ops::fileio_close, target_ops::fileio_unlink)
9622         (target_ops::fileio_readlink): New.
9623         (target_fileio_open_1, target_fileio_unlink)
9624         (target_fileio_readlink): Always call the target method.  Handle
9625         FILEIO_ENOSYS.
9626         (return_zero, return_zero_has_execution): Delete.
9627         (init_dummy_target): Delete.
9628         (dummy_target::dummy_target, dummy_target::shortname)
9629         (dummy_target::longname, dummy_target::doc)
9630         (debug_target::debug_target, debug_target::shortname)
9631         (debug_target::longname, debug_target::doc): New.
9632         (target_supports_delete_record): Use regular delegation.
9633         (setup_target_debug): Delete.
9634         (maintenance_print_target_stack): Skip debug_stratum.
9635         (initialize_targets): Instantiate the_dummy_target and
9636         the_debug_target.
9637         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9638         use target_stack.
9639         (target_auxv_search, fprint_target_auxv): Adjust.
9640         (info_auxv_command): Adjust to use target_stack.
9641         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9642         * exceptions.c (print_flush): Handle a NULL target_stack.
9643         * regcache.c (target_ops_no_register): Refactor as class with
9644         virtual methods.
9645
9646         * exec.c (exec_target): New class.
9647         (exec_ops): Now an exec_target.
9648         (exec_open, exec_close_1, exec_get_section_table)
9649         (exec_xfer_partial, exec_files_info, exec_has_memory)
9650         (exec_make_note_section): Refactor as exec_target methods.
9651         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9652         Delete.
9653         (exec_target::find_memory_regions): New.
9654         (_initialize_exec): Don't call init_exec_ops.
9655         * gdbcore.h (exec_file_clear): Delete.
9656
9657         * corefile.c (core_target): Delete.
9658         (core_file_command): Adjust.
9659         * corelow.c (core_target): New class.
9660         (the_core_target): New.
9661         (core_close): Remove target_ops parameter.
9662         (core_close_cleanup): Adjust.
9663         (core_target::close): New.
9664         (core_open, core_detach, get_core_registers, core_files_info)
9665         (core_xfer_partial, core_thread_alive, core_read_description)
9666         (core_pid_to_str, core_thread_name, core_has_memory)
9667         (core_has_stack, core_has_registers, core_info_proc): Rework as
9668         core_target methods.
9669         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9670         (_initialize_corelow): Initialize the_core_target.
9671         * gdbcore.h (core_target): Delete.
9672         (the_core_target): New.
9673
9674         * ctf.c: (ctf_target): New class.
9675         (ctf_ops): Now a ctf_target.
9676         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9677         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9678         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9679         methods.
9680         (init_ctf_ops): Delete.
9681         (_initialize_ctf): Don't call it.
9682         * tracefile-tfile.c (tfile_target): New class.
9683         (tfile_ops): Now a tfile_target.
9684         (tfile_open, tfile_close, tfile_files_info)
9685         (tfile_get_tracepoint_status, tfile_trace_find)
9686         (tfile_fetch_registers, tfile_xfer_partial)
9687         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9688         Refactor as tfile_target methods.
9689         (tfile_xfer_partial_features): Remove target_ops parameter.
9690         (init_tfile_ops): Delete.
9691         (_initialize_tracefile_tfile): Don't call it.
9692         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9693         (tracefile_has_stack, tracefile_has_registers)
9694         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9695         tracefile_target methods.
9696         (init_tracefile_ops): Delete.
9697         (tracefile_target::tracefile_target): New.
9698         * tracefile.h: Include "target.h".
9699         (tracefile_target): New class.
9700         (init_tracefile_ops): Delete.
9701
9702         * spu-multiarch.c (spu_multiarch_target): New class.
9703         (spu_ops): Now a spu_multiarch_target.
9704         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9705         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9706         (spu_search_memory, spu_mourn_inferior): Refactor as
9707         spu_multiarch_target methods.
9708         (init_spu_ops): Delete.
9709         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9710         complete_target_initialization.
9711
9712         * ravenscar-thread.c (ravenscar_thread_target): New class.
9713         (ravenscar_ops): Now a ravenscar_thread_target.
9714         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9715         (ravenscar_thread_alive, ravenscar_pid_to_str)
9716         (ravenscar_fetch_registers, ravenscar_store_registers)
9717         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9718         (ravenscar_stopped_by_hw_breakpoint)
9719         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9720         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9721         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9722         methods.
9723         (init_ravenscar_thread_ops): Delete.
9724         (_initialize_ravenscar): Remove references to
9725         init_ravenscar_thread_ops and complete_target_initialization.
9726
9727         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9728         (bsd_uthread_target): New class.
9729         (bsd_uthread_ops): Now a bsd_uthread_target.
9730         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9731         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9732         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9733         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9734         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9735         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9736         (bsd_uthread_target): Delete function.
9737         (_initialize_bsd_uthread): Remove reference to
9738         complete_target_initialization.
9739
9740         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9741         (target_bfd): ... this new class.
9742         (target_bfd_xfer_partial, target_bfd_get_section_table)
9743         (target_bfd_close): Refactor as target_bfd methods.
9744         (target_bfd::~target_bfd): New.
9745         (target_bfd_reopen): Adjust.
9746         (target_bfd::close): New.
9747
9748         * record-btrace.c (record_btrace_target): New class.
9749         (record_btrace_ops): Now a record_btrace_target.
9750         (record_btrace_open, record_btrace_stop_recording)
9751         (record_btrace_disconnect, record_btrace_close)
9752         (record_btrace_async, record_btrace_info)
9753         (record_btrace_insn_history, record_btrace_insn_history_range)
9754         (record_btrace_insn_history_from, record_btrace_call_history)
9755         (record_btrace_call_history_range)
9756         (record_btrace_call_history_from, record_btrace_record_method)
9757         (record_btrace_is_replaying, record_btrace_will_replay)
9758         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9759         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9760         (record_btrace_store_registers, record_btrace_prepare_to_store)
9761         (record_btrace_to_get_unwinder)
9762         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9763         (record_btrace_commit_resume, record_btrace_wait)
9764         (record_btrace_stop, record_btrace_can_execute_reverse)
9765         (record_btrace_stopped_by_sw_breakpoint)
9766         (record_btrace_supports_stopped_by_sw_breakpoint)
9767         (record_btrace_stopped_by_hw_breakpoint)
9768         (record_btrace_supports_stopped_by_hw_breakpoint)
9769         (record_btrace_update_thread_list, record_btrace_thread_alive)
9770         (record_btrace_goto_begin, record_btrace_goto_end)
9771         (record_btrace_goto, record_btrace_stop_replaying_all)
9772         (record_btrace_execution_direction)
9773         (record_btrace_prepare_to_generate_core)
9774         (record_btrace_done_generating_core): Refactor as
9775         record_btrace_target methods.
9776         (init_record_btrace_ops): Delete.
9777         (_initialize_record_btrace): Remove reference to
9778         init_record_btrace_ops.
9779         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9780         the execution_direction global.
9781         (record_full_base_target, record_full_target)
9782         (record_full_core_target): New classes.
9783         (record_full_ops): Now a record_full_target.
9784         (record_full_core_ops): Now a record_full_core_target.
9785         (record_full_target::detach, record_full_target::disconnect)
9786         (record_full_core_target::disconnect)
9787         (record_full_target::mourn_inferior, record_full_target::kill):
9788         New.
9789         (record_full_open, record_full_close, record_full_async): Refactor
9790         as methods of the record_full_base_target class.
9791         (record_full_resume, record_full_commit_resume): Refactor
9792         as methods of the record_full_target class.
9793         (record_full_wait, record_full_stopped_by_watchpoint)
9794         (record_full_stopped_data_address)
9795         (record_full_stopped_by_sw_breakpoint)
9796         (record_full_supports_stopped_by_sw_breakpoint)
9797         (record_full_stopped_by_hw_breakpoint)
9798         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9799         methods of the record_full_base_target class.
9800         (record_full_store_registers, record_full_xfer_partial)
9801         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9802         Refactor as methods of the record_full_target class.
9803         (record_full_can_execute_reverse, record_full_get_bookmark)
9804         (record_full_goto_bookmark, record_full_execution_direction)
9805         (record_full_record_method, record_full_info, record_full_delete)
9806         (record_full_is_replaying, record_full_will_replay)
9807         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9808         (record_full_stop_replaying): Refactor as methods of the
9809         record_full_base_target class.
9810         (record_full_core_resume, record_full_core_kill)
9811         (record_full_core_fetch_registers)
9812         (record_full_core_prepare_to_store)
9813         (record_full_core_store_registers, record_full_core_xfer_partial)
9814         (record_full_core_insert_breakpoint)
9815         (record_full_core_remove_breakpoint)
9816         (record_full_core_has_execution): Refactor
9817         as methods of the record_full_core_target class.
9818         (record_full_base_target::supports_delete_record): New.
9819         (init_record_full_ops): Delete.
9820         (init_record_full_core_ops): Delete.
9821         (record_full_save): Refactor as method of the
9822         record_full_base_target class.
9823         (_initialize_record_full): Remove references to
9824         init_record_full_ops and init_record_full_core_ops.
9825
9826         * remote.c (remote_target, extended_remote_target): New classes.
9827         (remote_ops): Now a remote_target.
9828         (extended_remote_ops): Now an extended_remote_target.
9829         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9830         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9831         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9832         (remote_pass_signals, remote_set_syscall_catchpoint)
9833         (remote_program_signals, )
9834         (remote_thread_always_alive): Remove target_ops parameter.
9835         (remote_thread_alive, remote_thread_name)
9836         (remote_update_thread_list, remote_threads_extra_info)
9837         (remote_static_tracepoint_marker_at)
9838         (remote_static_tracepoint_markers_by_strid)
9839         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9840         (remote_open): Refactor as methods of remote_target.
9841         (extended_remote_open, extended_remote_detach)
9842         (extended_remote_attach, extended_remote_post_attach):
9843         (extended_remote_supports_disable_randomization)
9844         (extended_remote_create_inferior): : Refactor as method of
9845         extended_remote_target.
9846         (remote_set_permissions, remote_open_1, remote_detach)
9847         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9848         (remote_resume, remote_commit_resume, remote_stop)
9849         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9850         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9851         (remote_prepare_to_store, remote_store_registers)
9852         (remote_flash_erase, remote_flash_done, remote_files_info)
9853         (remote_kill, remote_mourn, remote_insert_breakpoint)
9854         (remote_remove_breakpoint, remote_insert_watchpoint)
9855         (remote_watchpoint_addr_within_range)
9856         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9857         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9858         (remote_supports_stopped_by_sw_breakpoint)
9859         (remote_stopped_by_hw_breakpoint)
9860         (remote_supports_stopped_by_hw_breakpoint)
9861         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9862         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9863         (remote_verify_memory): Refactor as methods of remote_target.
9864         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9865         parameter.
9866         (remote_xfer_partial, remote_get_memory_xfer_limit)
9867         (remote_search_memory, remote_rcmd, remote_memory_map)
9868         (remote_pid_to_str, remote_get_thread_local_address)
9869         (remote_get_tib_address, remote_read_description): Refactor as
9870         methods of remote_target.
9871         (remote_target::fileio_open, remote_target::fileio_pwrite)
9872         (remote_target::fileio_pread, remote_target::fileio_close): New.
9873         (remote_hostio_readlink, remote_hostio_fstat)
9874         (remote_filesystem_is_local, remote_can_execute_reverse)
9875         (remote_supports_non_stop, remote_supports_disable_randomization)
9876         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9877         (remote_supports_enable_disable_tracepoint)
9878         (remote_supports_string_tracing)
9879         (remote_can_run_breakpoint_commands, remote_trace_init)
9880         (remote_download_tracepoint, remote_can_download_tracepoint)
9881         (remote_download_trace_state_variable, remote_enable_tracepoint)
9882         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9883         (remote_trace_start, remote_get_trace_status)
9884         (remote_get_tracepoint_status, remote_trace_stop)
9885         (remote_trace_find, remote_get_trace_state_variable_value)
9886         (remote_save_trace_data, remote_get_raw_trace_data)
9887         (remote_set_disconnected_tracing, remote_core_of_thread)
9888         (remote_set_circular_trace_buffer, remote_traceframe_info)
9889         (remote_get_min_fast_tracepoint_insn_len)
9890         (remote_set_trace_buffer_size, remote_set_trace_notes)
9891         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9892         (remote_disable_btrace, remote_teardown_btrace)
9893         (remote_read_btrace, remote_btrace_conf)
9894         (remote_augmented_libraries_svr4_read, remote_load)
9895         (remote_pid_to_exec_file, remote_can_do_single_step)
9896         (remote_execution_direction, remote_thread_handle_to_thread_info):
9897         Refactor as methods of remote_target.
9898         (init_remote_ops, init_extended_remote_ops): Delete.
9899         (remote_can_async_p, remote_is_async_p, remote_async)
9900         (remote_thread_events, remote_upload_tracepoints)
9901         (remote_upload_trace_state_variables): Refactor as methods of
9902         remote_target.
9903         (_initialize_remote): Remove references to init_remote_ops and
9904         init_extended_remote_ops.
9905
9906         * remote-sim.c (gdbsim_target): New class.
9907         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9908         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9909         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9910         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9911         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9912         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9913         Refactor as methods of gdbsim_target.
9914         (gdbsim_ops): Now a gdbsim_target.
9915         (init_gdbsim_ops): Delete.
9916         (gdbsim_cntrl_c): Adjust.
9917         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9918
9919         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9920         (the_amd64_linux_nat_target): New.
9921         (amd64_linux_fetch_inferior_registers)
9922         (amd64_linux_store_inferior_registers): Refactor as methods of
9923         amd64_linux_nat_target.
9924         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9925         * i386-linux-nat.c: Don't include "linux-nat.h".
9926         (i386_linux_nat_target): New class.
9927         (the_i386_linux_nat_target): New.
9928         (i386_linux_fetch_inferior_registers)
9929         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9930         as methods of i386_linux_nat_target.
9931         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9932         * inf-child.c (inf_child_ops): Delete.
9933         (inf_child_fetch_inferior_registers)
9934         (inf_child_store_inferior_registers): Delete.
9935         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9936         methods of inf_child_target.
9937         (inf_child_target::supports_terminal_ours)
9938         (inf_child_target::terminal_init)
9939         (inf_child_target::terminal_inferior)
9940         (inf_child_target::terminal_ours_for_output)
9941         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9942         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9943         New.
9944         (inf_child_open, inf_child_disconnect, inf_child_close)
9945         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9946         (inf_child_post_startup_inferior, inf_child_can_run)
9947         (inf_child_pid_to_exec_file): Refactor as methods of
9948         inf_child_target.
9949         (inf_child_follow_fork): Delete.
9950         (inf_child_target::can_create_inferior)
9951         (inf_child_target::can_attach): New.
9952         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9953         (inf_child_target::has_stack, inf_child_target::has_registers)
9954         (inf_child_target::has_execution): New.
9955         (inf_child_fileio_open, inf_child_fileio_pwrite)
9956         (inf_child_fileio_pread, inf_child_fileio_fstat)
9957         (inf_child_fileio_close, inf_child_fileio_unlink)
9958         (inf_child_fileio_readlink, inf_child_use_agent)
9959         (inf_child_can_use_agent): Refactor as methods of
9960         inf_child_target.
9961         (return_zero, inf_child_target): Delete.
9962         (inf_child_target::inf_child_target): New.
9963         * inf-child.h: Include "target.h".
9964         (inf_child_target): Delete function prototype.
9965         (inf_child_target): New class.
9966         (inf_child_open_target, inf_child_mourn_inferior)
9967         (inf_child_maybe_unpush_target): Delete.
9968         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9969         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9970         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9971         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9972         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9973         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9974         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9975         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9976         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9977         methods of inf_ptrace_target.
9978         (inf_ptrace_target): Delete function.
9979         * inf-ptrace.h: Include "inf-child.h".
9980         (inf_ptrace_target): Delete function declaration.
9981         (inf_ptrace_target): New class.
9982         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9983         * linux-nat.c (linux_target): New.
9984         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9985         (linux_nat_target::~linux_nat_target): New.
9986         (linux_child_post_attach, linux_child_post_startup_inferior)
9987         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9988         (linux_child_remove_fork_catchpoint)
9989         (linux_child_insert_vfork_catchpoint)
9990         (linux_child_remove_vfork_catchpoint)
9991         (linux_child_insert_exec_catchpoint)
9992         (linux_child_remove_exec_catchpoint)
9993         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9994         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9995         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9996         (linux_nat_stopped_data_address)
9997         (linux_nat_stopped_by_sw_breakpoint)
9998         (linux_nat_supports_stopped_by_sw_breakpoint)
9999         (linux_nat_stopped_by_hw_breakpoint)
10000         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10001         (linux_nat_kill, linux_nat_mourn_inferior)
10002         (linux_nat_xfer_partial, linux_nat_thread_alive)
10003         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10004         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10005         (linux_child_static_tracepoint_markers_by_strid)
10006         (linux_nat_is_async_p, linux_nat_can_async_p)
10007         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10008         (linux_nat_supports_multi_process)
10009         (linux_nat_supports_disable_randomization, linux_nat_async)
10010         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10011         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10012         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10013         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10014         methods of linux_nat_target.
10015         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10016         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10017         parameter.
10018         (check_stopped_by_watchpoint): Adjust.
10019         (linux_xfer_partial): Delete.
10020         (linux_target_install_ops, linux_target, linux_nat_add_target):
10021         Delete.
10022         (linux_nat_target::linux_nat_target): New.
10023         * linux-nat.h: Include "inf-ptrace.h".
10024         (linux_nat_target): New.
10025         (linux_target, linux_target_install_ops, linux_nat_add_target):
10026         Delete function declarations.
10027         (linux_target): Declare global.
10028         * linux-thread-db.c (thread_db_target): New.
10029         (thread_db_target::thread_db_target): New.
10030         (thread_db_ops): Delete.
10031         (the_thread_db_target): New.
10032         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10033         (thread_db_update_thread_list, thread_db_pid_to_str)
10034         (thread_db_extra_thread_info)
10035         (thread_db_thread_handle_to_thread_info)
10036         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10037         (thread_db_resume): Refactor as methods of thread_db_target.
10038         (init_thread_db_ops): Delete.
10039         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10040         * x86-linux-nat.c: Don't include "linux-nat.h".
10041         (super_post_startup_inferior): Delete.
10042         (x86_linux_nat_target::~x86_linux_nat_target): New.
10043         (x86_linux_child_post_startup_inferior)
10044         (x86_linux_read_description, x86_linux_enable_btrace)
10045         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10046         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10047         methods of x86_linux_nat_target.
10048         (x86_linux_create_target): Delete.  Bits folded ...
10049         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10050         pointer.
10051         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10052         (x86_linux_nat_target): New class.
10053         (x86_linux_create_target): Delete.
10054         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10055         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10056         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10057         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10058         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10059         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10060         make extern.
10061         (x86_use_watchpoints): Delete.
10062         * x86-nat.h: Include "breakpoint.h" and "target.h".
10063         (x86_use_watchpoints): Delete.
10064         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10065         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10066         (x86_insert_watchpoint, x86_remove_watchpoint)
10067         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10068         (x86_stopped_by_hw_breakpoint): New declarations.
10069         (x86_nat_target): New template class.
10070
10071         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10072         (the_ppc_linux_nat_target): New.
10073         (ppc_linux_fetch_inferior_registers)
10074         (ppc_linux_can_use_hw_breakpoint)
10075         (ppc_linux_region_ok_for_hw_watchpoint)
10076         (ppc_linux_ranged_break_num_registers)
10077         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10078         (ppc_linux_insert_mask_watchpoint)
10079         (ppc_linux_remove_mask_watchpoint)
10080         (ppc_linux_can_accel_watchpoint_condition)
10081         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10082         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10083         (ppc_linux_watchpoint_addr_within_range)
10084         (ppc_linux_masked_watch_num_registers)
10085         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10086         (ppc_linux_read_description): Refactor as methods of
10087         ppc_linux_nat_target.
10088         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10089
10090         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10091         (procfs_target): New class.
10092         (the_procfs_target): New.
10093         (procfs_target): Delete function.
10094         (procfs_auxv_parse, procfs_attach, procfs_detach)
10095         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10096         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10097         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10098         (procfs_create_inferior, procfs_update_thread_list)
10099         (procfs_thread_alive, procfs_pid_to_str)
10100         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10101         (procfs_stopped_data_address, procfs_insert_watchpoint)
10102         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10103         (proc_find_memory_regions, procfs_info_proc)
10104         (procfs_make_note_section): Refactor as methods of procfs_target.
10105         (_initialize_procfs): Adjust.
10106         * sol-thread.c (sol_thread_target): New class.
10107         (sol_thread_ops): Now a sol_thread_target.
10108         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10109         (sol_thread_fetch_registers, sol_thread_store_registers)
10110         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10111         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10112         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10113         (init_sol_thread_ops): Delete.
10114         (_initialize_sol_thread): Adjust.  Remove references to
10115         init_sol_thread_ops and complete_target_initialization.
10116
10117         * windows-nat.c (windows_nat_target): New class.
10118         (windows_fetch_inferior_registers)
10119         (windows_store_inferior_registers, windows_resume, windows_wait)
10120         (windows_attach, windows_detach, windows_pid_to_exec_file)
10121         (windows_files_info, windows_create_inferior)
10122         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10123         (windows_close, windows_pid_to_str, windows_xfer_partial)
10124         (windows_get_tib_address, windows_get_ada_task_ptid)
10125         (windows_thread_name, windows_thread_alive): Refactor as
10126         windows_nat_target methods.
10127         (do_initial_windows_stuff): Adjust.
10128         (windows_target): Delete function.
10129         (_initialize_windows_nat): Adjust.
10130
10131         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10132         (darwin_mourn_inferior, darwin_kill_inferior)
10133         (darwin_create_inferior, darwin_attach, darwin_detach)
10134         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10135         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10136         (darwin_supports_multi_process): Refactor as darwin_nat_target
10137         methods.
10138         (darwin_resume_to, darwin_files_info): Delete.
10139         (_initialize_darwin_inferior): Rename to ...
10140         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10141         * darwin-nat.h: Include "inf-child.h".
10142         (darwin_nat_target): New class.
10143         (darwin_complete_target): Delete.
10144         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10145         (darwin_target): New.
10146         (i386_darwin_fetch_inferior_registers)
10147         (i386_darwin_store_inferior_registers): Refactor as methods of
10148         darwin_nat_target.
10149         (darwin_complete_target): Delete, with ...
10150         (_initialize_i386_darwin_nat): ... bits factored out here.
10151
10152         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10153         (the_alpha_linux_nat_target): New.
10154         (alpha_linux_register_u_offset): Refactor as
10155         alpha_linux_nat_target method.
10156         (_initialize_alpha_linux_nat): Adjust.
10157         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10158         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10159         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10160         methods of linux_nat_trad_target.
10161         (linux_trad_target): Delete.
10162         * linux-nat-trad.h (linux_trad_target): Delete function.
10163         (linux_nat_trad_target): New class.
10164         * mips-linux-nat.c (mips_linux_nat_target): New class.
10165         (super_fetch_registers, super_store_registers, super_close):
10166         Delete.
10167         (the_mips_linux_nat_target): New.
10168         (mips64_linux_regsets_fetch_registers)
10169         (mips64_linux_regsets_store_registers)
10170         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10171         (mips_linux_register_u_offset, mips_linux_read_description)
10172         (mips_linux_can_use_hw_breakpoint)
10173         (mips_linux_stopped_by_watchpoint)
10174         (mips_linux_stopped_data_address)
10175         (mips_linux_region_ok_for_hw_watchpoint)
10176         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10177         (mips_linux_close): Refactor as methods of mips_linux_nat.
10178         (_initialize_mips_linux_nat): Adjust to C++ification.
10179
10180         * aix-thread.c (aix_thread_target): New class.
10181         (aix_thread_ops): Now an aix_thread_target.
10182         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10183         (aix_thread_fetch_registers, aix_thread_store_registers)
10184         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10185         (aix_thread_thread_alive, aix_thread_pid_to_str)
10186         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10187         Refactor as methods of aix_thread_target.
10188         (init_aix_thread_ops): Delete.
10189         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10190         and complete_target_initialization.
10191         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10192         (rs6000_nat_target): New class.
10193         (the_rs6000_nat_target): New.
10194         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10195         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10196         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10197         (super_create_inferior): Delete.
10198         (_initialize_rs6000_nat): Adjust to C++ification.
10199
10200         * arm-linux-nat.c (arm_linux_nat_target): New class.
10201         (the_arm_linux_nat_target): New.
10202         (arm_linux_fetch_inferior_registers)
10203         (arm_linux_store_inferior_registers, arm_linux_read_description)
10204         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10205         (arm_linux_remove_hw_breakpoint)
10206         (arm_linux_region_ok_for_hw_watchpoint)
10207         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10208         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10209         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10210         arm_linux_nat_target.
10211         (_initialize_arm_linux_nat): Adjust to C++ification.
10212
10213         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10214         (the_aarch64_linux_nat_target): New.
10215         (aarch64_linux_fetch_inferior_registers)
10216         (aarch64_linux_store_inferior_registers)
10217         (aarch64_linux_child_post_startup_inferior)
10218         (aarch64_linux_read_description)
10219         (aarch64_linux_can_use_hw_breakpoint)
10220         (aarch64_linux_insert_hw_breakpoint)
10221         (aarch64_linux_remove_hw_breakpoint)
10222         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10223         (aarch64_linux_region_ok_for_hw_watchpoint)
10224         (aarch64_linux_stopped_data_address)
10225         (aarch64_linux_stopped_by_watchpoint)
10226         (aarch64_linux_watchpoint_addr_within_range)
10227         (aarch64_linux_can_do_single_step): Refactor as methods of
10228         aarch64_linux_nat_target.
10229         (super_post_startup_inferior): Delete.
10230         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10231
10232         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10233         (the_hppa_linux_nat_target): New.
10234         (hppa_linux_fetch_inferior_registers)
10235         (hppa_linux_store_inferior_registers): Refactor as methods of
10236         hppa_linux_nat_target.
10237         (_initialize_hppa_linux_nat): Adjust to C++ification.
10238
10239         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10240         (the_ia64_linux_nat_target): New.
10241         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10242         (ia64_linux_stopped_data_address)
10243         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10244         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10245         ia64_linux_nat_target methods.
10246         (super_xfer_partial): Delete.
10247         (_initialize_ia64_linux_nat): Adjust to C++ification.
10248
10249         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10250         (the_m32r_linux_nat_target): New.
10251         (m32r_linux_fetch_inferior_registers)
10252         (m32r_linux_store_inferior_registers): Refactor as
10253         m32r_linux_nat_target methods.
10254         (_initialize_m32r_linux_nat): Adjust to C++ification.
10255
10256         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10257         (the_m68k_linux_nat_target): New.
10258         (m68k_linux_fetch_inferior_registers)
10259         (m68k_linux_store_inferior_registers): Refactor as
10260         m68k_linux_nat_target methods.
10261         (_initialize_m68k_linux_nat): Adjust to C++ification.
10262
10263         * s390-linux-nat.c (s390_linux_nat_target): New class.
10264         (the_s390_linux_nat_target): New.
10265         (s390_linux_fetch_inferior_registers)
10266         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10267         (s390_insert_watchpoint, s390_remove_watchpoint)
10268         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10269         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10270         (s390_auxv_parse, s390_read_description): Refactor as methods of
10271         s390_linux_nat_target.
10272         (_initialize_s390_nat): Adjust to C++ification.
10273
10274         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10275         (the_sparc_linux_nat_target): New.
10276         (_initialize_sparc_linux_nat): Adjust to C++ification.
10277         * sparc-nat.c (sparc_fetch_inferior_registers)
10278         (sparc_store_inferior_registers): Remove target_ops parameter.
10279         * sparc-nat.h (sparc_fetch_inferior_registers)
10280         (sparc_store_inferior_registers): Remove target_ops parameter.
10281         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10282         (the_sparc64_linux_nat_target): New.
10283         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10284
10285         * spu-linux-nat.c (spu_linux_nat_target): New class.
10286         (the_spu_linux_nat_target): New.
10287         (spu_child_post_startup_inferior, spu_child_post_attach)
10288         (spu_child_wait, spu_fetch_inferior_registers)
10289         (spu_store_inferior_registers, spu_xfer_partial)
10290         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10291         methods.
10292         (_initialize_spu_nat): Adjust to C++ification.
10293
10294         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10295         (the_tilegx_linux_nat_target): New.
10296         (fetch_inferior_registers, store_inferior_registers):
10297         Refactor as methods.
10298         (_initialize_tile_linux_nat): Adjust to C++ification.
10299
10300         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10301         (the_xtensa_linux_nat_target): New.
10302         (xtensa_linux_fetch_inferior_registers)
10303         (xtensa_linux_store_inferior_registers): Refactor as
10304         xtensa_linux_nat_target methods.
10305         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10306
10307         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10308         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10309         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10310         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10311         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10312         (fbsd_stopped_by_sw_breakpoint)
10313         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10314         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10315         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10316         (fbsd_post_startup_inferior, fbsd_post_attach)
10317         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10318         (fbsd_set_syscall_catchpoint)
10319         (super_xfer_partial, super_resume, super_wait)
10320         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10321         (fbsd_handle_debug_trap): Remove target_ops parameter.
10322         (fbsd_nat_add_target): Delete.
10323         * fbsd-nat.h: Include "inf-ptrace.h".
10324         (fbsd_nat_add_target): Delete.
10325         (USE_SIGTRAP_SIGINFO): Define.
10326         (fbsd_nat_target): New class.
10327
10328         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10329         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10330         (amd64bsd_target): Delete.
10331         * amd64-bsd-nat.h: New file.
10332         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10333         "x86-bsd-nat.h".
10334         (amd64_fbsd_nat_target): New class.
10335         (the_amd64_fbsd_nat_target): New.
10336         (amd64fbsd_read_description): Refactor as method of
10337         amd64_fbsd_nat_target.
10338         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10339         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10340         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10341         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10342         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10343         (i386bsd_target): Delete.
10344         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10345         (i386bsd_fetch_inferior_registers)
10346         (i386bsd_store_inferior_registers): Declare.
10347         (i386_bsd_nat_target): New class.
10348         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10349         (the_i386_fbsd_nat_target): New.
10350         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10351         i386_fbsd_nat_target methods.
10352         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10353         (_initialize_i386fbsd_nat): Adjust to C++ification.
10354         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10355         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10356         (_initialize_x86_bsd_nat): Adjust to C++ification.
10357         * x86-bsd-nat.h: Include "x86-nat.h".
10358         (x86bsd_target): Delete declaration.
10359         (x86bsd_nat_target): New class.
10360
10361         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10362         (the_aarch64_fbsd_nat_target): New.
10363         (aarch64_fbsd_fetch_inferior_registers)
10364         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10365         aarch64_fbsd_nat_target.
10366         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10367         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10368         (the_alpha_bsd_nat_target): New.
10369         (alphabsd_fetch_inferior_registers)
10370         (alphabsd_store_inferior_registers): Refactor as
10371         alpha_bsd_nat_target methods.
10372         (_initialize_alphabsd_nat): Refactor as methods of
10373         alpha_bsd_nat_target.
10374         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10375         (the_amd64_nbsd_nat_target): New.
10376         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10377         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10378         (the_amd64_obsd_nat_target): New.
10379         (_initialize_amd64obsd_nat): Adjust to C++ification.
10380         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10381         (the_arm_fbsd_nat_target): New.
10382         (arm_fbsd_fetch_inferior_registers)
10383         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10384         (_initialize_arm_fbsd_nat): Refactor as methods of
10385         arm_fbsd_nat_target.
10386         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10387         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10388         (the_arm_netbsd_nat_target): New.
10389         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10390         arm_netbsd_nat_target.
10391         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10392         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10393         (the_hppa_nbsd_nat_target): New.
10394         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10395         hppa_nbsd_nat_target methods.
10396         (_initialize_hppanbsd_nat): Adjust to C++ification.
10397         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10398         (the_hppa_obsd_nat_target): New.
10399         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10400         methods of hppa_obsd_nat_target.
10401         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10402         add_target.
10403         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10404         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10405         add_target.
10406         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10407         (_initialize_i386obsd_nat): Use add_target.
10408         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10409         (the_m68k_bsd_nat_target): New.
10410         (m68kbsd_fetch_inferior_registers)
10411         (m68kbsd_store_inferior_registers): Refactor as methods of
10412         m68k_bsd_nat_target.
10413         (_initialize_m68kbsd_nat): Adjust to C++ification.
10414         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10415         (the_mips_fbsd_nat_target): New.
10416         (mips_fbsd_fetch_inferior_registers)
10417         (mips_fbsd_store_inferior_registers): Refactor as methods of
10418         mips_fbsd_nat_target.
10419         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10420         add_target.
10421         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10422         (the_mips_nbsd_nat_target): New.
10423         (mipsnbsd_fetch_inferior_registers)
10424         (mipsnbsd_store_inferior_registers): Refactor as methods of
10425         mips_nbsd_nat_target.
10426         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10427         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10428         (the_mips64_obsd_nat_target): New.
10429         (mips64obsd_fetch_inferior_registers)
10430         (mips64obsd_store_inferior_registers): Refactor as methods of
10431         mips64_obsd_nat_target.
10432         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10433         add_target.
10434         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10435         nbsd_nat_target.
10436         * nbsd-nat.h: Include "inf-ptrace.h".
10437         (nbsd_nat_target): New class.
10438         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10439         (obsd_wait): Refactor as methods of obsd_nat_target.
10440         (obsd_add_target): Delete.
10441         * obsd-nat.h: Include "inf-ptrace.h".
10442         (obsd_nat_target): New class.
10443         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10444         (the_ppc_fbsd_nat_target): New.
10445         (ppcfbsd_fetch_inferior_registers)
10446         (ppcfbsd_store_inferior_registers): Refactor as methods of
10447         ppc_fbsd_nat_target.
10448         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10449         add_target.
10450         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10451         (the_ppc_nbsd_nat_target): New.
10452         (ppcnbsd_fetch_inferior_registers)
10453         (ppcnbsd_store_inferior_registers): Refactor as methods of
10454         ppc_nbsd_nat_target.
10455         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10456         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10457         (the_ppc_obsd_nat_target): New.
10458         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10459         methods of ppc_obsd_nat_target.
10460         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10461         add_target.
10462         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10463         (the_sh_nbsd_nat_target): New.
10464         (shnbsd_fetch_inferior_registers)
10465         (shnbsd_store_inferior_registers): Refactor as methods of
10466         sh_nbsd_nat_target.
10467         (_initialize_shnbsd_nat): Adjust to C++ification.
10468         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10469         (inf_ptrace_xfer_partial): Delete.
10470         (sparc_xfer_partial, sparc_target): Delete.
10471         * sparc-nat.h (sparc_fetch_inferior_registers)
10472         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10473         (sparc_target): Delete function declaration.
10474         (sparc_target): New template class.
10475         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10476         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10477         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10478         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10479         add_target.
10480         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10481         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10482         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10483         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10484         add_target.
10485         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10486         (the_vax_bsd_nat_target): New.
10487         (vaxbsd_fetch_inferior_registers)
10488         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10489         methods.
10490         (_initialize_vaxbsd_nat): Adjust to C++ification.
10491
10492         * bsd-kvm.c (bsd_kvm_target): New class.
10493         (bsd_kvm_ops): Now a bsd_kvm_target.
10494         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10495         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10496         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10497         bsd_kvm_target.
10498         (bsd_kvm_return_one): Delete.
10499         (bsd_kvm_add_target): Adjust to C++ification.
10500
10501         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10502         (nto_procfs_target_procfs): New classes.
10503         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10504         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10505         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10506         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10507         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10508         (procfs_remove_hw_breakpoint, procfs_resume)
10509         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10510         (procfs_kill_inferior, procfs_store_registers)
10511         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10512         as methods of nto_procfs_target.
10513         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10514         (nto_native_ops): Delete.
10515         (procfs_open, procfs_native_open): Delete.
10516         (nto_native_ops): Now an nto_procfs_target_native.
10517         (init_procfs_targets): Adjust to C++ification.
10518         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10519         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10520         Refactor as methods of nto_procfs_target.
10521
10522         * go32-nat.c (go32_nat_target): New class.
10523         (the_go32_nat_target): New.
10524         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10525         (go32_store_registers, go32_xfer_partial, go32_files_info)
10526         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10527         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10528         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10529         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10530         (go32_target): Delete.
10531         (_initialize_go32_nat): Adjust to C++ification.
10532
10533         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10534         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10535         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10536         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10537         gnu_nat_target.
10538         (gnu_target): Delete.
10539         * gnu-nat.h (gnu_target): Delete.
10540         (gnu_nat_target): New class.
10541         * i386-gnu-nat.c (gnu_base_target): New.
10542         (i386_gnu_nat_target): New class.
10543         (the_i386_gnu_nat_target): New.
10544         (_initialize_i386gnu_nat): Adjust to C++ification.
10545
10546 2018-05-02  Pedro Alves  <palves@redhat.com>
10547
10548         * bfd-target.c (target_bfd_xclose): Rename to ...
10549         (target_bfd_close): ... this.
10550         (target_bfd_reopen): Adjust.
10551         * target.c (target_close): Remove references to to_xclose.
10552         * target.h (target_ops::to_xclose): Delete.
10553         (target_ops::to_close): Update comments.
10554
10555 2018-05-02  Pedro Alves  <palves@redhat.com>
10556
10557         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10558         "linux-nat.h".
10559         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10560         * inf-ptrace.c (inf_ptrace_register_u_offset)
10561         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10562         (inf_ptrace_store_register, inf_ptrace_store_registers)
10563         (inf_ptrace_trad_target): Move to ...
10564         * linux-nat-trad.c: ... this new file.
10565         * linux-nat-trad.h: New file.
10566         * linux-nat.c (linux_target_install_ops): Make extern.
10567         (linux_trad_target): Delete.
10568         * linux-nat.h (linux_trad_target): Delete declaration.
10569         (linux_target_install_ops): Declare.
10570         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10571         "linux-nat.h".
10572
10573 2018-05-02  Pedro Alves  <palves@redhat.com>
10574
10575         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10576         procfs_target/add_target here.
10577         * procfs.c (procfs_target): Make static.
10578         (_initialize_procfs): Call add_target here.
10579         * procfs.h (struct target_ops): Remove forward declaration.
10580         (procfs_target): Remove declaration.
10581         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10582
10583 2018-05-02  Pedro Alves  <palves@redhat.com>
10584
10585         * procfs.c (procfs_stopped_by_watchpoint)
10586         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10587         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10588         Forward declare.
10589         (procfs_use_watchpoints): Delete, move contents...
10590         (procfs_target): ... here.
10591         * procfs.h (procfs_use_watchpoints): Delete declaration.
10592         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10593         procfs_use_watchpoints.
10594         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10595         procfs_use_watchpoints.
10596
10597 2018-05-02  Tom Tromey  <tom@tromey.com>
10598
10599         PR python/20084:
10600         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10601         and var_zuinteger_unlimited.
10602         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10603         and PARAM_ZUINTEGER_UNLIMITED.
10604         (set_parameter_value): Handle var_zuinteger and
10605         var_zuinteger_unlimited.
10606         (add_setshow_generic): Likewise.
10607         (parmpy_init): Likewise.
10608
10609 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10610
10611         PR rust/23124
10612         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10613         pointer is not null before dereferencing it.
10614
10615 2018-04-30  Tom Tromey  <tom@tromey.com>
10616
10617         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10618         is_mi_like_p.
10619
10620 2018-04-30  Tom Tromey  <tom@tromey.com>
10621
10622         * breakpoint.c (mention): Remove use of is_mi_like_p.
10623         (print_mention_ranged_breakpoint): Likewise.
10624         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10625         of is_mi_like_p.
10626
10627 2018-04-30  Tom Tromey  <tom@tromey.com>
10628
10629         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10630
10631 2018-04-30  Tom Tromey  <tom@tromey.com>
10632
10633         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10634         (info_spu_event_command): Remove some uses of is_mi_like_p.
10635
10636 2018-04-30  Tom Tromey  <tom@tromey.com>
10637
10638         * python/py-framefilter.c (py_print_single_arg)
10639         (enumerate_locals, py_print_args, py_print_frame): Remove some
10640         uses of is_mi_like_p.
10641
10642 2018-04-30  Tom Tromey  <tom@tromey.com>
10643
10644         * ui-out.c: Update.
10645         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10646         * ui-out.h (ui_out::is_mi_like_p): Now const.
10647         (ui_out::do_is_mi_like_p): Now const.
10648         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10649
10650 2018-04-30  Tom Tromey  <tom@tromey.com>
10651
10652         * varobj.c (varobj_set_visualizer): Use new_reference.
10653         * python/python.c (gdbpy_decode_line): Use new_reference.
10654         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10655         new_reference.
10656
10657 2018-04-30  Tom Tromey  <tom@tromey.com>
10658
10659         * varobj.c (install_new_value): Use new_reference.
10660         * value.h (value_incref): Return void.  Swap intro comment with
10661         value_decref.
10662         * value.c (set_value_parent): Use new_reference.
10663         (value_incref): Return void.  Update intro comment.
10664         (release_value): Use new_reference.
10665         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10666
10667 2018-04-30  Tom Tromey  <tom@tromey.com>
10668
10669         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10670         * gdb_bfd.h (new_bfd_ref): Remove.
10671         (gdb_bfd_open): Update comment.
10672         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10673         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10674         (gdb_bfd_fdopenr): Use new_reference.
10675         * exec.c (exec_file_attach): Use new_reference.
10676
10677 2018-04-30  Tom Tromey  <tom@tromey.com>
10678
10679         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10680         method.
10681
10682 2018-04-30  Tom Tromey  <tom@tromey.com>
10683
10684         * jit.c (jit_read_code_entry): Use type_align.
10685         * i386-tdep.c (i386_gdbarch_init): Don't call
10686         set_gdbarch_long_long_align_bit.
10687         * gdbarch.sh: Remove long_long_align_bit.
10688         * gdbarch.c, gdbarch.h: Rebuild.
10689         * arc-tdep.c (arc_type_align): New function.
10690         (arc_gdbarch_init): Use arc_type_align.  Don't call
10691         set_gdbarch_long_long_align_bit.
10692
10693 2018-04-30  Tom Tromey  <tom@tromey.com>
10694
10695         * rust-lang.c (rust_type_alignment): Remove.
10696         (rust_composite_type): Use type_align.
10697
10698 2018-04-30  Tom Tromey  <tom@tromey.com>
10699
10700         * NEWS: Mention Type.align.
10701         * python/py-type.c (typy_get_alignof): New function.
10702         (type_object_getset): Add "alignof".
10703
10704 2018-04-30  Tom Tromey  <tom@tromey.com>
10705
10706         PR exp/17095:
10707         * NEWS: Update.
10708         * std-operator.def (UNOP_ALIGNOF): New operator.
10709         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10710         New.
10711         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10712         * c-lang.c (c_op_print_tab): Add alignof.
10713         * c-exp.y (ALIGNOF): New token.
10714         (exp): Add "ALIGNOF" production.
10715         (ident_tokens): Add _Alignof and alignof.
10716
10717 2018-04-30  Tom Tromey  <tom@tromey.com>
10718
10719         * i386-tdep.c (i386_type_align): New function.
10720         (i386_gdbarch_init): Update.
10721         * gdbarch.sh (type_align): New method.
10722         * gdbarch.c, gdbarch.h: Rebuild.
10723         * arch-utils.h (default_type_align): Declare.
10724         * arch-utils.c (default_type_align): New function.
10725         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10726         (struct type) <align_log2>: New field.
10727         <instance_flags>: Now a bitfield.
10728         (TYPE_RAW_ALIGN): New macro.
10729         (type_align, type_raw_align, set_type_align): Declare.
10730         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10731         functions.
10732         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10733         (get_alignment, maybe_set_alignment): New functions.
10734         (read_structure_type, read_enumeration_type, read_array_type)
10735         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10736         (read_subrange_type, read_base_type): Set type alignment.
10737
10738 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10739
10740         * dwarf2read.c (read_index_from_section): Use bool.
10741
10742 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10743
10744         PR gdb/22950
10745         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10746         with #ifdef.
10747
10748 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10749
10750         PR build/22873
10751         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10752         last step, and do it atomically.
10753
10754 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10755
10756         * compile/compile-c-types.c (convert_int, convert_float):
10757         Update for C FE v1.
10758
10759 2018-04-27  Tom Tromey  <tom@tromey.com>
10760
10761         PR rust/22545:
10762         * rust-lang.c (rust_inclusive_range_type_p): New function.
10763         (rust_range): Handle inclusive ranges.
10764         (rust_compute_range): Likewise.
10765         * rust-exp.y (struct rust_op) <inclusive>: New field.
10766         (DOTDOTEQ): New constant.
10767         (range_expr): Add "..=" productions.
10768         (operator_tokens): Add "..=" token.
10769         (ast_range): Add "inclusive" parameter.
10770         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10771         ranges.
10772         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10773         bounds values.
10774         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10775         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10776         Update comments.
10777         * expprint.c (print_subexp_standard): Handle new bounds values.
10778         (dump_subexp_body_standard): Likewise.
10779
10780 2018-04-27  Tom Tromey  <tom@tromey.com>
10781
10782         * configure: Rebuild.
10783         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10784         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10785         "OVERRIDE".
10786         (class symbol_needs_eval_context): Likewise.
10787         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10788         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10789         "virtual".
10790         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10791         "override".
10792         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10793         * aarch64-tdep.c (instruction_reader::read): Use "override".
10794         (instruction_reader_test::read): Likewise.
10795         * arm-tdep.c (instruction_reader::read): Use "override".
10796         (instruction_reader_thumb::read): Likewise.
10797
10798 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10799
10800         PR remote/9665
10801         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10802         instead of remote_send.
10803         (remote_send): Remove.
10804
10805 2018-04-26  Pedro Alves  <palves@redhat.com>
10806
10807         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10808         find_function_start_sal instead of find_pc_line.
10809
10810 2018-04-26  Pedro Alves  <palves@redhat.com>
10811
10812         * breakpoint.c (set_breakpoint_location_function): Handle
10813         mst_data_gnu_ifunc.
10814         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10815         * elfread.c (elf_symtab_read): Give data symbols with
10816         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10817         (elf_rel_plt_read): Update comment.
10818         * linespec.c (convert_linespec_to_sals): Handle
10819         mst_data_gnu_ifunc.
10820         (minsym_found): Handle mst_data_gnu_ifunc.
10821         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10822         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10823         * parse.c (find_minsym_type_and_address): Handle
10824         mst_data_gnu_ifunc.
10825         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10826         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10827         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10828         comment.
10829         <mst_data_gnu_ifunc>: New enumerator.
10830
10831 2018-04-26  Pedro Alves  <palves@redhat.com>
10832
10833         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10834         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10835         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10836         Handle it.
10837         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10838         (lookup_minimal_symbol_by_pc): Adjust.
10839         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10840         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10841         * minsyms.h (lookup_msym_prefer): New enum.
10842         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10843         parameter by a lookup_msym_prefer parameter.
10844
10845 2018-04-26  Pedro Alves  <palves@redhat.com>
10846
10847         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10848         ends in "@plt" instead of looking at the symbol's section.
10849
10850 2018-04-26  Pedro Alves  <palves@redhat.com>
10851
10852         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10853         all references.
10854         (find_pc_partial_function_gnu_ifunc): Rename to ...
10855         (find_pc_partial_function): ... this, and remove references to
10856         'is_gnu_ifunc_p'.
10857         (find_pc_partial_function): Delete old implementation.
10858         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10859
10860 2018-04-26  Pedro Alves  <palves@redhat.com>
10861
10862         * linespec.c (struct bound_minimal_symbol_search_key): New.
10863         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10864         skip first line if we found a GNU ifunc minimal symbol by name.
10865         (compare_msymbols): Change parameters to work with a destructured
10866         lhs minsym.
10867         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10868         functions.
10869
10870 2018-04-26  Pedro Alves  <palves@redhat.com>
10871
10872         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10873         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10874         address/name.
10875         (add_location_to_breakpoint): Store the minsym and the objfile in
10876         the breakpoint location.
10877         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10878         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10879         Record the minsym in the sal.
10880         * symtab.h (symtab_and_line) <msymbol>: New field.
10881
10882 2018-04-26  Pedro Alves  <palves@redhat.com>
10883
10884         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10885         unless we actually resolved the ifunc.
10886
10887 2018-04-26  Pedro Alves  <palves@redhat.com>
10888
10889         * c-exp.y (variable production): Prefer ifunc minsyms over
10890         regular function symbols.
10891         * symtab.c (find_gnu_ifunc): New function.
10892         * minsyms.h (lookup_msym_prefer): New enum.
10893         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10894         parameter by a lookup_msym_prefer parameter.
10895         * symtab.h (find_gnu_ifunc): New declaration.
10896
10897 2018-04-26  Pedro Alves  <palves@redhat.com>
10898
10899         * blockframe.c (find_gnu_ifunc_target_type): New function.
10900         (find_function_type): New.
10901         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10902         return a value with a memory address.
10903         (eval_call): For calls to GNU ifunc functions, try to find the
10904         type of the target function from the type that the resolver
10905         returns.
10906         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10907         symbols.
10908         * infcall.c (find_function_return_type): Delete.
10909         (find_function_addr): Add 'function_type' parameter.  For calls to
10910         GNU ifunc functions, try to find the type of the target function
10911         from the type that the resolver returns, and return it via
10912         FUNCTION_TYPE.
10913         (call_function_by_hand_dummy): Adjust to use the function type
10914         returned by find_function_addr.
10915         (find_function_addr): Add 'function_type' parameter and move
10916         description here.
10917         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10918         declarations.
10919
10920 2018-04-26  Pedro Alves  <palves@redhat.com>
10921
10922         * c-exp.y (variable production): Skip finding an alias for ifunc
10923         symbols.
10924
10925 2018-04-26  Pedro Alves  <palves@redhat.com>
10926
10927         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10928
10929 2018-04-25  Pedro Alves  <palves@redhat.com>
10930
10931         * infcmd.c (kill_command): Print the pid as string, not the whole
10932         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10933         message.
10934         * remote.c (remote_detach_1): Print the pid as string, not the
10935         whole thread's ptid.
10936
10937 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10938             Sergio Durigan Junior  <sergiodj@redhat.com>
10939             Pedro Alves  <palves@redhat.com>
10940
10941         * infcmd.c (kill_command): Print message when inferior has
10942         been killed.
10943         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10944         '1'.
10945         (add_inferior): Improve message printed when
10946         'print_inferior_events' is on.
10947         (exit_inferior): Remove message printed when
10948         'print_inferior_events' is on.
10949         (detach_inferior): Improve message printed when
10950         'print_inferior_events' is on.
10951         (initialize_inferiors): Use 'add_inferior_silent' to set
10952         'current_inferior_'.
10953         * inferior.h (print_inferior_events): Declare here as
10954         'extern'.
10955         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10956         '[Detaching...]' messages when 'print_inferior_events' is on.
10957         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10958         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10959         'Detaching after fork from child...', replace it by '... from
10960         parent...'.
10961         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10962         prefix/suffix when printing 'Detaching...' messages.  Print
10963         them when 'print_inferior_events' is on.
10964         * remote.c (remote_detach_1): Print message when detaching
10965         from inferior and '!is_fork_parent'.
10966
10967 2018-04-24  Tom Tromey  <tom@tromey.com>
10968
10969         * cli-out.h: Reindent.
10970
10971 2018-04-24  Tom Tromey  <tom@tromey.com>
10972
10973         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10974         (cli_ui_out::do_field_string): Use fputs_filtered.
10975         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10976
10977 2018-04-23  Tom Tromey  <tom@tromey.com>
10978
10979         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10980         gdb::unique_xmalloc_ptr.
10981
10982 2018-04-23  Tom Tromey  <tom@tromey.com>
10983
10984         * configure: Rebuild.
10985
10986 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10987
10988         PR gdb/23095
10989         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10990         prepare_for_testing.  Set normal_bp to r_debug_state if target
10991         is bsd.
10992
10993 2018-04-21  Pedro Alves  <palves@redhat.com>
10994             Rajendra SY  <rajendra.sy@gmail.com>
10995
10996         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10997         * remote.c (extended_remote_attach): In all-stop mode, mark the
10998         thread as executing.
10999
11000 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11001
11002         * thread.c (thread_apply_all_command): Fix comment.
11003         (thread_command): Fix comment.
11004
11005 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11006
11007         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11008         parameter.
11009         * features/aarch64-core.c (create_feature_aarch64_core):
11010         Regenerate.
11011         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11012         Likewise.
11013         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11014         Likewise.
11015         * features/i386/32bit-avx512.c
11016         (create_feature_i386_32bit_avx512): Likewise.
11017         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11018         Likewise.
11019         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11020         Likewise.
11021         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11022         Likewise.
11023         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11024         Likewise.
11025         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11026         Likewise.
11027         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11028         Likewise.
11029         * features/i386/64bit-avx512.c
11030         (create_feature_i386_64bit_avx512): Likewise.
11031         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11032         Likewise.
11033         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11034         Likewise.
11035         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11036         Likewise.
11037         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11038         Likewise.
11039         * features/i386/64bit-segments.c
11040         (create_feature_i386_64bit_segments): Likewise.
11041         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11042         Likewise.
11043         * features/i386/x32-core.c
11044         (create_feature_i386_x32_core): Likewise.
11045         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11046         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11047         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11048         * target-descriptions.c: In generated code, don't pass xml
11049         filename.
11050
11051 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11052
11053         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11054         (print_xml_feature::visit_post): Likewise.
11055         (print_xml_feature::visit): Likewise.
11056         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11057         (print_xml_feature): Add new class.
11058         * regformats/regdat.sh: Null xmltarget on feature targets.
11059         * target-descriptions.c (struct target_desc): Add xmltarget.
11060         (maintenance_check_tdesc_xml_convert): Add unittest function.
11061         (tdesc_get_features_xml): Add function to get xml.
11062         (maintenance_check_xml_descriptions): Test xml generation.
11063         * xml-tdesc.c (string_read_description_xml): Add function.
11064         * xml-tdesc.h (string_read_description_xml): Add declaration.
11065
11066 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11067
11068         * features/Makefile: Add feature marker to targets with new style
11069         target descriptions.
11070         * regformats/aarch64.dat: Regenerate.
11071         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11072         * regformats/i386/amd64-avx-linux.dat: Likewise.
11073         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11074         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11075         * regformats/i386/amd64-linux.dat: Likewise.
11076         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11077         * regformats/i386/amd64.dat: Likewise.
11078         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11079         * regformats/i386/i386-avx-linux.dat: Likewise.
11080         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11081         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11082         * regformats/i386/i386-linux.dat: Likewise.
11083         * regformats/i386/i386-mmx-linux.dat: Likewise.
11084         * regformats/i386/i386-mpx-linux.dat: Likewise.
11085         * regformats/i386/i386.dat: Likewise.
11086         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11087         * regformats/i386/x32-avx-linux.dat: Likewise.
11088         * regformats/i386/x32-linux.dat: Likewise.
11089         * regformats/tic6x-c62x-linux.dat: Likewise.
11090         * regformats/tic6x-c64x-linux.dat: Likewise.
11091         * regformats/tic6x-c64xp-linux.dat: Likewise.
11092         * regformats/regdat.sh: Parse feature marker.
11093
11094 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11095
11096         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11097         (tdesc_osabi_name): Likewise.
11098         * target-descriptions.c (tdesc_architecture_name): Add new
11099         function.
11100         (tdesc_osabi_name): Likewise.
11101
11102 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11103
11104         * common/tdesc.c (tdesc_predefined_type): Move to here.
11105         (tdesc_named_type): Likewise.
11106         (tdesc_create_vector): Likewise.
11107         (tdesc_create_struct): Likewise.
11108         (tdesc_set_struct_size): Likewise.
11109         (tdesc_create_union): Likewise.
11110         (tdesc_create_flags): Likewise.
11111         (tdesc_create_enum): Likewise.
11112         (tdesc_add_field): Likewise.
11113         (tdesc_add_typed_bitfield): Likewise.
11114         (tdesc_add_bitfield): Likewise.
11115         (tdesc_add_flag): Likewise.
11116         (tdesc_add_enum_value): Likewise.
11117         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11118         (struct tdesc_type_vector): Likewise.
11119         (struct tdesc_type_field): Likewise.
11120         (struct tdesc_type_with_fields): Likewise.
11121         (tdesc_create_enum): Add declaration.
11122         (tdesc_add_typed_bitfield): Likewise.
11123         (tdesc_add_enum_value): Likewise.
11124         * target-descriptions.c (tdesc_type_field): Move from here.
11125         (tdesc_type_builtin): Likewise.
11126         (tdesc_type_vector): Likewise.
11127         (tdesc_type_with_fields): Likewise.
11128         (tdesc_predefined_types): Likewise.
11129         (tdesc_named_type): Likewise.
11130         (tdesc_create_vector): Likewise.
11131         (tdesc_create_struct): Likewise.
11132         (tdesc_set_struct_size): Likewise.
11133         (tdesc_create_union): Likewise.
11134         (tdesc_create_flags): Likewise.
11135         (tdesc_create_enum): Likewise.
11136         (tdesc_add_field): Likewise.
11137         (tdesc_add_typed_bitfield): Likewise.
11138         (tdesc_add_bitfield): Likewise.
11139         (tdesc_add_flag): Likewise.
11140         (tdesc_add_enum_value): Likewise.
11141         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11142         (tdesc_add_typed_bitfield): Likewise.
11143         (tdesc_add_enum_value): Likewise.
11144
11145 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11146
11147         * common/tdesc.c (tdesc_feature::accept): Move to here.
11148         (tdesc_feature::operator==): Likewise.
11149         (tdesc_create_reg): Likewise.
11150         * common/tdesc.h (tdesc_type_kind): Likewise.
11151         (struct tdesc_type): Likewise.
11152         (struct tdesc_feature): Likewise.
11153         * regformats/regdat.sh: Create a feature.
11154         * target-descriptions.c (tdesc_type_kind): Move from here.
11155         (tdesc_type): Likewise.
11156         (tdesc_type_up): Likewise.
11157         (tdesc_feature): Likewise.
11158         (tdesc_create_reg): Likewise.
11159
11160 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11161
11162         * Makefile.in: Add arch/tdesc.c
11163         * common/tdesc.c: New file.
11164         * common/tdesc.h (tdesc_element_visitor): Move to here.
11165         (tdesc_element): Likewise.
11166         (tdesc_reg): Likewise.
11167         (tdesc_reg_up): Likewise.
11168         * regformats/regdef.h (reg): Add offset to constructors.
11169         * target-descriptions.c (tdesc_element_visitor): Move from here.
11170         (tdesc_element): Likewise.
11171         (tdesc_reg): Likewise.
11172         (tdesc_reg_up): Likewise.
11173
11174 2018-04-17  Tom Tromey  <tom@tromey.com>
11175
11176         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11177         discriminant field.
11178
11179 2018-04-17  Tom Tromey  <tom@tromey.com>
11180
11181         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11182
11183 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11184
11185         * symtab.c (print_symbol_info): Skip printing filename and line
11186         number when `last' is NULL.
11187         (symtab_symbol_info): Use empty string instead of NULL for first
11188         invocation of print_symbol_info.
11189         (rbreak_command): Pass NULL to `last' parameter of
11190         print_symbol_info.
11191
11192 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11193
11194         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11195         instead of nullptr.
11196
11197 2018-04-16  Pedro Alves  <palves@redhat.com>
11198
11199         * MAINTAINERS (sh): Remove.
11200         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11201         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11202         (ALLDEPFILES): Remove sh64-tdep.c.
11203         * NEWS: Mentions that support for SH-5/SH64 is removed.
11204         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11205         (sh*-*-openbsd*): Ditto.
11206         (sh64-*-elf*): Remove.
11207         (sh*): Remove.
11208         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11209         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11210         * sh-tdep.c: No longer include "sh64-tdep.h".
11211         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11212         * sh64-tdep.c, sh64-tdep.h: Remove files.
11213
11214 2018-04-16  Pedro Alves  <palves@redhat.com>
11215
11216         * MAINTAINERS: Remove m88k.
11217         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11218         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11219         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11220         * NEWS: Mention that support for m88k was removed.
11221         * configure.host (m88*-*-*): Remove support.
11222         * configure.nat (m88k-*-*): Remove support.
11223         * configure.tgt (m88*-*-openbsd*): Remove.
11224         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11225
11226 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11227
11228         * configure.tgt (x86_tobjs): New variable.
11229         (amd64_tobjs, i386_tobjs): Use it.
11230
11231 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11232
11233         * symtab.c (print_symbol_info): Precede the symbol definition by
11234         the line number when available.
11235         * NEWS: Advertise this enhancement.
11236
11237 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11238
11239         * NEWS (New options): announce set/show record btrace cpu.
11240         * btrace.c: Include record-btrace.h.
11241         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11242         the vendor is unknown.
11243         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11244         Maybe overwrite the btrace configuration's cpu.
11245         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11246         (btrace_fetch): Add cpu parameter.  Update callers.
11247         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11248         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11249         errata workarounds if the vendor is unknown.
11250         * python/py-record-btrace.c: Include record-btrace.h.
11251         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11252         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11253         * record-btrace.c (record_btrace_cpu_state_kind): New.
11254         (record_btrace_cpu): New.
11255         (set_record_btrace_cpu_cmdlist): New.
11256         (record_btrace_get_cpu): New.
11257         (require_btrace_thread, record_btrace_info)
11258         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11259         (cmd_set_record_btrace_cpu_none): New.
11260         (cmd_set_record_btrace_cpu_auto): New.
11261         (cmd_set_record_btrace_cpu): New.
11262         (cmd_show_record_btrace_cpu): New.
11263         (_initialize_record_btrace): Initialize set/show record btrace cpu
11264         commands.
11265         * record-btrace.h (record_btrace_get_cpu): New.
11266
11267 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11268
11269         * record.c (set_record_command): Fix typo in message.
11270
11271 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11272
11273         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11274
11275 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11276
11277         * infrun.c (process_event_stop_test): Call
11278         gdbarch_in_indirect_branch_thunk.
11279         * gdbarch.sh (in_indirect_branch_thunk): New.
11280         * gdbarch.c: Regenerated.
11281         * gdbarch.h: Regenerated.
11282         * x86-tdep.h: New.
11283         * x86-tdep.c: New.
11284         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11285         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11286         (ALLDEPFILES): Add x86-tdep.c.
11287         * arch-utils.h (default_in_indirect_branch_thunk): New.
11288         * arch-utils.c (default_in_indirect_branch_thunk): New.
11289         * i386-tdep: Include x86-tdep.h.
11290         (i386_in_indirect_branch_thunk): New.
11291         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11292         function.
11293         * amd64-tdep: Include x86-tdep.h.
11294         (amd64_in_indirect_branch_thunk): New.
11295         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11296
11297 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11298
11299         PR gdb/23053
11300         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11301         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11302         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11303         regression.
11304
11305 2018-04-12  Tom Tromey  <tom@tromey.com>
11306
11307         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11308         (rust_evaluate_subexp): Likewise.
11309
11310 2018-04-12  Pedro Alves  <palves@redhat.com>
11311
11312         * procfs.c (procfs_detach): Make forward declaration's prototype
11313         match definition's protototype.
11314         (proc_get_LDT_entry): Remove stale do_cleanups call.
11315
11316 2018-04-12  Pedro Alves  <palves@redhat.com>
11317
11318         * target.h (target_ops::to_has_exited): Delete.
11319         (target_has_exited): Delete.
11320         * target-delegates.c: Regenerate.
11321
11322 2018-04-11  Pedro Alves  <palves@redhat.com>
11323
11324         * target.c (fileio_fh_t::t): Add comment.
11325         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11326         (target_fileio_close): Handle a NULL target.
11327         (invalidate_fileio_fh): New.
11328         (target_close): Call it.
11329         * remote.c (remote_hostio_send_command): No longer check whether
11330         remote_desc is open.
11331
11332 2018-04-11  Pedro Alves  <palves@redhat.com>
11333
11334         * target.c (fileio_fh_t): Make it a named struct instead of a
11335         typedef.
11336         (fileio_fh_t::is_closed): New method.
11337         (DEF_VEC_O (fileio_fh_t)): Remove.
11338         (fileio_fhandles): Now a std::vector.
11339         (is_closed_fileio_fh): Delete.
11340         (acquire_fileio_fd): Adjust.  Rename parameters.
11341         (release_fileio_fd): Adjust.
11342         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11343         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11344         (target_fileio_close): Adjust.
11345
11346 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11347
11348         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11349         index.
11350
11351 2018-04-10  Pedro Alves  <palves@redhat.com>
11352
11353         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11354         (scoped_finish_thread_state): New class.
11355         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11356         cleanup.
11357         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11358         (fetch_inferior_event, normal_stop): Likewise.
11359         * thread.c (finish_thread_state_cleanup): Delete.
11360
11361 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11362             Pedro Alves  <palves@redhat.com>
11363
11364         * value.c: Include "selftest.h" and "common/array-view.h".
11365         (struct range) <operator ==>: New.
11366         (test_ranges_contain): New.
11367         (check_ranges_vector): New.
11368         (test_insert_into_bit_range_vector): New.
11369         (_initialize_values): Register selftests.
11370         * common/array-view.h (operator==, operator!=): New.
11371
11372 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11373
11374         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11375         an iterator.
11376         * inline-frame.c: Include <algorithm>.
11377         (struct inline_state): Add constructor.
11378         (inline_state_s): Remove.
11379         (DEF_VEC_O(inline_state_s)): Remove.
11380         (inline_states): Change type to std::vector.
11381         (find_inline_frame_state): Adjust to std::vector.
11382         (allocate_inline_frame_state): Remove.
11383         (clear_inline_frame_state): Adjust to std::vector.
11384         (skip_inline_frames): Adjust to std::vector.
11385
11386 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11387
11388         * tracepoint.h (struct trace_state_variable): Add constructor.
11389         <name>: Change type to std::string.
11390         * tracepoint.c (tsv_s): Remove.
11391         (DEF_VEC_O(tsv_s)): Remove.
11392         (tvariables): Change to std::vector.
11393         (create_trace_state_variable): Adjust to std::vector.
11394         (find_trace_state_variable): Likewise.
11395         (find_trace_state_variable_by_number): Likewise.
11396         (delete_trace_state_variable): Likewise.
11397         (trace_variable_command): Adjust to std::string.
11398         (delete_trace_variable_command): Likewise.
11399         (tvariables_info_1): Adjust to std::vector.
11400         (save_trace_state_variables): Likewise.
11401         (start_tracing): Likewise.
11402         (merge_uploaded_trace_state_variables): Adjust to std::vector
11403         and std::string.
11404         * target.h (struct target_ops)
11405         <to_download_trace_state_variable>: Pass reference to
11406         trace_state_variable.
11407         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11408         * target-delegates.c: Re-generate.
11409         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11410         (mi_tsv_deleted): Likewise.
11411         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11412         * remote.c (remote_download_trace_state_variable): Change
11413         pointer to reference and adjust.
11414         * make-target-delegates (parse_argtypes): Handle references.
11415         (write_function_header): Likewise.
11416         (munge_type): Likewise.
11417
11418 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11419
11420         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11421         string_view-selftests.c.
11422         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11423         testsuite.
11424         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11425         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11426         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11427         * unittests/basic_string_view/element_access/char/1.cc:
11428         Likewise.
11429         * unittests/basic_string_view/element_access/char/empty.cc:
11430         Likewise.
11431         * unittests/basic_string_view/element_access/char/front_back.cc:
11432         Likewise.
11433         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11434         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11435         Likewise.
11436         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11437         Likewise.
11438         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11439         Likewise.
11440         * unittests/basic_string_view/operations/compare/char/1.cc:
11441         Likewise.
11442         * unittests/basic_string_view/operations/compare/char/13650.cc:
11443         Likewise.
11444         * unittests/basic_string_view/operations/copy/char/1.cc:
11445         Likewise.
11446         * unittests/basic_string_view/operations/data/char/1.cc:
11447         Likewise.
11448         * unittests/basic_string_view/operations/find/char/1.cc:
11449         Likewise.
11450         * unittests/basic_string_view/operations/find/char/2.cc:
11451         Likewise.
11452         * unittests/basic_string_view/operations/find/char/3.cc:
11453         Likewise.
11454         * unittests/basic_string_view/operations/find/char/4.cc:
11455         Likewise.
11456         * unittests/basic_string_view/operations/rfind/char/1.cc:
11457         Likewise.
11458         * unittests/basic_string_view/operations/rfind/char/2.cc:
11459         Likewise.
11460         * unittests/basic_string_view/operations/rfind/char/3.cc:
11461         Likewise.
11462         * unittests/basic_string_view/operations/substr/char/1.cc:
11463         Likewise.
11464         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11465         * unittests/string_view-selftests.c: New file.
11466
11467 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11468
11469         * unittests/basic_string_view/capacity/1.cc: New file.
11470         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11471         * unittests/basic_string_view/cons/char/1.cc: New file.
11472         * unittests/basic_string_view/cons/char/2.cc: New file.
11473         * unittests/basic_string_view/cons/char/3.cc: New file.
11474         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11475         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11476         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11477         * unittests/basic_string_view/element_access/char/1.cc: New file.
11478         * unittests/basic_string_view/element_access/char/2.cc: New file.
11479         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11480         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11481         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11482         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11483         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11484         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11485         * unittests/basic_string_view/include.cc: New file.
11486         * unittests/basic_string_view/inserters/char/1.cc: New file.
11487         * unittests/basic_string_view/inserters/char/2.cc: New file.
11488         * unittests/basic_string_view/inserters/char/3.cc: New file.
11489         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11490         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11491         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11492         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11493         * unittests/basic_string_view/literals/types.cc: New file.
11494         * unittests/basic_string_view/literals/values.cc: New file.
11495         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11496         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11497         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11498         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11499         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11500         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11501         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11502         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11503         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11504         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11505         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11506         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11507         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11508         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11509         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11510         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11511         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11512         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11513         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11514         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11515         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11516         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11517         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11518         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11519         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11520         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11521         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11522         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11523         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11524         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11525         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11526         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11527         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11528         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11529         * unittests/basic_string_view/operators/char/2.cc: New file.
11530         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11531         * unittests/basic_string_view/range_access/char/1.cc: New file.
11532         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11533         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11534         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11535         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11536         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11537         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11538         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11539         * unittests/basic_string_view/typedefs.cc: New file.
11540         * unittests/basic_string_view/types/1.cc: New file.
11541
11542 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11543
11544         * common/gdb_string_view.h: Remove libstdc++ implementation
11545         details, adjust to gdb reality.
11546         * common/gdb_string_view.tcc: Likewise.
11547         * cli/cli-script.c (struct string_view): Remove.
11548         (user_args) <m_args>: Change element type to gdb::string_view.
11549         (user_args::insert_args): Adjust.
11550
11551 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11552
11553         * common/gdb_string_view.h: New file.
11554         * common/gdb_string_view.tcc: New file.
11555
11556 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11557
11558         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11559         * configure: Re-generate.
11560
11561 2018-04-09  Pedro Alves  <palves@redhat.com>
11562
11563         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11564         (set_target_gdbarch): Call
11565         gdb::observers::architecture_changed.notify instead of
11566         observer_notify_architecture_changed.
11567
11568 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11569
11570         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11571         (do_restore_current_traceframe_cleanup): Remove.
11572         (restore_current_traceframe_cleanup_dtor): Remove.
11573         (make_cleanup_restore_current_traceframe): Remove.
11574         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11575         New.
11576         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11577         * infrun.c (fetch_inferior_event): Use
11578         scoped_restore_current_traceframe.
11579
11580 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11581
11582         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11583         Remove.
11584         <n_allocated_type_units>: Remove.
11585         <all_type_units>: Change to std::vector.
11586         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11587         to std::vector change.
11588         (dwarf2_per_objfile::get_cutu): Likewise.
11589         (dwarf2_per_objfile::get_tu): Likewise.
11590         (create_signatured_type_table_from_index): Likewise.
11591         (create_signatured_type_table_from_debug_names): Likewise.
11592         (dw2_symtab_iter_next): Likewise.
11593         (dw2_print_stats): Likewise.
11594         (dw2_expand_all_symtabs): Likewise.
11595         (dw2_expand_marked_cus): Likewise.
11596         (dw2_debug_names_iterator::next): Likewise.
11597         (dwarf2_initialize_objfile): Likewise.
11598         (add_signatured_type_cu_to_table): Likewise.
11599         (create_all_type_units): Likewise.
11600         (add_type_unit): Likewise.
11601         (struct tu_abbrev_offset): Add constructor.
11602         (build_type_psymtabs_1): Adjust to std::vector change.
11603         (print_tu_stats): Likewise.
11604         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11605         (write_debug_names): Likewise.
11606
11607 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11608
11609         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11610         Make an std::vector.
11611         <n_comp_units>: Remove.
11612         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11613         to std::vector change.
11614         (dwarf2_per_objfile::get_cutu): Likewise.
11615         (dwarf2_per_objfile::get_cu): Likewise.
11616         (create_cus_from_index): Likewise.
11617         (create_addrmap_from_index): Likewise.
11618         (create_addrmap_from_aranges): Likewise.
11619         (dwarf2_read_index): Likewise.
11620         (dw2_find_last_source_symtab): Likewise.
11621         (dw2_map_symtabs_matching_filename): Likewise.
11622         (dw2_symtab_iter_next): Likewise.
11623         (dw2_print_stats): Likewise.
11624         (dw2_expand_all_symtabs): Likewise.
11625         (dw2_expand_symtabs_with_fullname): Likewise.
11626         (dw2_expand_marked_cus): Likewise.
11627         (dw2_map_symbol_filenames): Likewise.
11628         (create_cus_from_debug_names): Likewise.
11629         (dwarf2_read_debug_names): Likewise.
11630         (dw2_debug_names_iterator::next): Likewise.
11631         (dwarf2_initialize_objfile): Likewise.
11632         (set_partial_user): Likewise.
11633         (dwarf2_build_psymtabs_hard): Likewise.
11634         (read_comp_units_from_section): Remove arguments, adjust to
11635         std::vector change.
11636         (create_all_comp_units): Adjust to std::vector and
11637         read_comp_units_from_section changes.
11638         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11639         change.
11640         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11641         (psyms_seen_size): Likewise.
11642         (write_gdbindex): Likewise.
11643         (write_debug_names): Likewise.
11644
11645 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11646
11647         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11648         with dwarf2_per_objfile.
11649         (create_cus_from_index): Likewise.
11650         (create_signatured_type_table_from_index): Likewise.
11651         (dwarf2_read_index): Likewise.
11652         (dwarf2_initialize_objfile): Likewise.
11653         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11654         per_cu rather than get_dwarf2_per_objfile.
11655
11656 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11657
11658         * dwarf2read.h (struct signatured_type): Forward declare.
11659         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11660         New methods.
11661         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11662         (dw2_get_cutu): ...this.
11663         (dwarf2_per_objfile::get_cu): Rename from...
11664         (dw2_get_cu): ...this.
11665         (dwarf2_per_objfile::get_tu): New.
11666         (create_addrmap_from_index): Adjust.
11667         (create_addrmap_from_aranges): Adjust.
11668         (dw2_find_last_source_symtab): Adjust.
11669         (dw2_map_symtabs_matching_filename): Adjust.
11670         (dw2_symtab_iter_next): Adjust.
11671         (dw2_print_stats): Adjust.
11672         (dw2_expand_all_symtabs): Adjust.
11673         (dw2_expand_symtabs_with_fullname): Adjust.
11674         (dw2_expand_marked_cus): Adjust.
11675         (dw_expand_symtabs_matching_file_matcher): Adjust.
11676         (dw2_map_symbol_filenames): Adjust.
11677         (dw2_debug_names_iterator::next): Adjust.
11678         (dwarf2_initialize_objfile): Adjust.
11679         (set_partial_user): Adjust.
11680         (dwarf2_build_psymtabs_hard): Adjust.
11681
11682 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11683
11684         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11685         Remove unused variables.
11686         (dw2_map_symtabs_matching_filename): Likewise.
11687         (dwarf2_record_block_ranges): Likewise.
11688         (dwarf2_read_addr_index): Likewise.
11689         (follow_die_offset): Likewise.
11690
11691 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11692
11693         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11694         to symbol_file_add_main.
11695
11696 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11697
11698         PR mi/22299
11699         * mi/mi-console.c (do_fputc_async_safe): New.
11700         (mi_console_file::write_async_safe): New.
11701         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11702         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11703         New.
11704         * ui-file.c (ui_file::putstrn): Adjust call to
11705         fputstrn_unfiltered.
11706         * utils.c (printchar): Replace do_fputs and do_fprintf
11707         parameters by do_fputc.
11708         (fputstr_filtered): Adjust call to printchar.
11709         (fputstr_unfiltered): Likewise.
11710         (fputstrn_filtered): Likewise.
11711         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11712         printchar.
11713         * utils.h (do_fputc_ftype): New typedef.
11714         (fputstrn_unfiltered): Add do_fputc parameter.
11715
11716 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11717
11718         * regformats/i386/i386-avx.dat: Remove.
11719
11720 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11721
11722         PR gdb/22979
11723         * amd64-tdep.c (amd64_none_init_abi): New function.
11724         (amd64_x32_none_init_abi): New function.
11725         (_initialize_amd64_tdep): Register handlers for x86-64 and
11726         x64_32 with GDB_OSABI_NONE.
11727         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11728         GDB_OSABI_NONE osabi.
11729
11730 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11731
11732         PR gdb/22980
11733         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11734         GDB_OSABI_NONE.
11735         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11736         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11737
11738 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11739
11740         * common/byte-vector.h (char_vector): New type.
11741         * target.h (target_read_alloc): Return
11742         gdb::optional<byte_vector>.
11743         (target_read_stralloc): Return gdb::optional<char_vector>.
11744         (target_get_osdata): Return gdb::optional<char_vector>.
11745         * target.c (target_read_alloc_1): Templatize.  Replacement
11746         manual memory management with vector.
11747         (target_read_alloc): Change return type, adjust.
11748         (target_read_stralloc): Change return type, adjust.
11749         (target_get_osdata): Change return type, adjust.
11750         * auxv.c (struct auxv_info) <length>: Remove.
11751         <data>: Change type to gdb::optional<byte_vector>.
11752         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11753         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11754         (target_auxv_search): Adjust.
11755         (fprint_target_auxv): Adjust.
11756         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11757         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11758         (linux_make_corefile_notes): Adjust.
11759         * osdata.c (get_osdata): Adjust.
11760         * remote.c (remote_get_threads_with_qxfer): Adjust.
11761         (remote_memory_map): Adjust.
11762         (remote_traceframe_info): Adjust.
11763         (btrace_read_config): Adjust.
11764         (remote_read_btrace): Adjust.
11765         (remote_pid_to_exec_file): Adjust.
11766         * solib-aix.c (solib_aix_get_library_list): Adjust.
11767         * solib-dsbt.c (decode_loadmap): Don't free buf.
11768         (dsbt_get_initial_loadmaps): Adjust.
11769         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11770         * solib-target.c (solib_target_current_sos): Adjust.
11771         * tracepoint.c (sdata_make_value): Adjust.
11772         * xml-support.c (xinclude_start_include): Adjust.
11773         (xml_fetch_content_from_file): Adjust.
11774         * xml-support.h (xml_fetch_another): Change return type.
11775         (xml_fetch_content_from_file): Change return type.
11776         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11777         * xml-tdesc.c (file_read_description_xml): Adjust.
11778         (fetch_available_features_from_target): Change return type.
11779         (target_fetch_description_xml): Adjust.
11780         (target_read_description_xml): Adjust.
11781
11782 2018-04-06  Tom Tromey  <tom@tromey.com>
11783
11784         * value.c (~value): Update.
11785         (struct value) <contents>: Now unique_xmalloc_ptr.
11786         (value_contents_bits_eq, allocate_value_contents)
11787         (value_contents_raw, value_contents_all_raw)
11788         (value_contents_for_printing, value_contents_for_printing_const)
11789         (set_value_enclosing_type): Update.
11790
11791 2018-04-06  Tom Tromey  <tom@tromey.com>
11792
11793         * value.c (range_s): Remove typedef, VEC.
11794         (struct range): Add operator<.
11795         (range_lessthan): Remove.
11796         (ranges_contain): Change type.
11797         (~value): Update.
11798         (struct value) <unavailable, optimized_out>: Now std::vector.
11799         (value_entirely_available)
11800         (value_entirely_covered_by_range_vector)
11801         (value_entirely_unavailable, value_entirely_optimized_out):
11802         Update.
11803         (insert_into_bit_range_vector): Change argument type.
11804         (find_first_range_overlap): Likewise.
11805         (struct ranges_and_idx, value_contents_bits_eq)
11806         (require_not_optimized_out, require_available): Update.
11807         (ranges_copy_adjusted): Change argument types.
11808         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11809
11810 2018-04-06  Tom Tromey  <tom@tromey.com>
11811
11812         * value.c (~value): Update.
11813         (struct value) <parent>: Now a value_ref_ptr.
11814         (value_parent, set_value_parent, value_address, value_copy):
11815         Update.
11816
11817 2018-04-06  Tom Tromey  <tom@tromey.com>
11818
11819         * value.c (struct value): Add constructor, destructor, and member
11820         initializers.
11821         (allocate_value_lazy, value_decref): Update.
11822
11823 2018-04-06  Tom Tromey  <tom@tromey.com>
11824
11825         * value.c (struct value) <released, next>: Remove.
11826         (all_values): Now a std::vector.
11827         (allocate_value_lazy): Update.
11828         (value_next): Remove.
11829         (value_mark, value_free_to_mark, release_value)
11830         (value_release_to_mark): Update.
11831
11832 2018-04-06  Tom Tromey  <tom@tromey.com>
11833
11834         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11835         (free_value_chain): Remove.
11836         * value.c (free_value_chain): Remove.
11837         (value_release_to_mark): Return a std::vector.
11838         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11839         std::vector.
11840         (check_condition): Update.
11841         * eval.c (fetch_subexp_value): Change "val_chain" to a
11842         std::vector.
11843         * breakpoint.c (update_watchpoint): Update.
11844         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11845
11846 2018-04-06  Tom Tromey  <tom@tromey.com>
11847
11848         * value.h (free_all_values): Remove.
11849         * value.c (free_all_values): Remove.
11850
11851 2018-04-06  Tom Tromey  <tom@tromey.com>
11852
11853         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11854         (value_history_chain, value_history_count): Remove.
11855         (value_history): New global.
11856         (record_latest_value, access_value_history, show_values)
11857         (preserve_values): Update.
11858
11859 2018-04-06  Tom Tromey  <tom@tromey.com>
11860
11861         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11862         * varobj.c (varobj_set_display_format, varobj_set_value)
11863         (install_default_visualizer, construct_visualizer)
11864         (install_new_value, ~varobj, varobj_get_value_type)
11865         (my_value_of_variable, varobj_editable_p): Update.
11866         * c-varobj.c (c_describe_child, c_value_of_variable)
11867         (cplus_number_of_children, cplus_describe_child): Update.
11868         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11869         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11870         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11871
11872 2018-04-06  Tom Tromey  <tom@tromey.com>
11873
11874         * printcmd.c (last_examine_address): Change type to
11875         value_ref_ptr.
11876         (do_examine, x_command): Update.
11877
11878 2018-04-06  Tom Tromey  <tom@tromey.com>
11879
11880         * value.c (release_value): Update.
11881         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11882         (struct bpstats) <val>: Now a value_ref_ptr.
11883         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11884         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11885         (~watchpoint, print_it_watchpoint, watch_command_1)
11886         (invalidate_bp_value_on_memory_change): Update.
11887
11888 2018-04-06  Tom Tromey  <tom@tromey.com>
11889
11890         * varobj.c (varobj_clear_saved_item)
11891         (update_dynamic_varobj_children, install_new_value, ~varobj):
11892         Update.
11893         * value.h (value_incref): Move declaration earlier.
11894         (value_decref): Rename from value_free.
11895         (struct value_ref_policy): New.
11896         (value_ref_ptr): New typedef.
11897         (struct value_deleter): Remove.
11898         (gdb_value_up): Remove typedef.
11899         (release_value): Change return type.
11900         (release_value_or_incref): Remove.
11901         * value.c (set_value_parent): Update.
11902         (value_incref): Change return type.
11903         (value_decref): Rename from value_free.
11904         (value_free_to_mark, free_all_values, free_value_chain): Update.
11905         (release_value): Return value_ref_ptr.
11906         (release_value_or_incref): Remove.
11907         (record_latest_value, set_internalvar, clear_internalvar):
11908         Update.
11909         * stack.c (info_frame_command): Don't call value_free.
11910         * python/py-value.c (valpy_dealloc, valpy_new)
11911         (value_to_value_object): Update.
11912         * printcmd.c (do_examine): Update.
11913         * opencl-lang.c (lval_func_free_closure): Update.
11914         * mi/mi-main.c (register_changed_p): Don't call value_free.
11915         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11916         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11917         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11918         value_free.
11919         * guile/scm-value.c (vlscm_free_value_smob)
11920         (vlscm_scm_from_value): Update.
11921         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11922         (frame_unwind_register_unsigned, get_frame_register_bytes)
11923         (put_frame_register_bytes): Don't call value_free.
11924         * findvar.c (address_from_register): Don't call value_free.
11925         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11926         * dwarf2loc.c (entry_data_value_free_closure)
11927         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11928         (dwarf2_evaluate_loc_desc_full): Update.
11929         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11930         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11931         (~watchpoint, watch_command_1)
11932         (invalidate_bp_value_on_memory_change): Update.
11933         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11934
11935 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11936
11937         PR gdb/23022
11938         * warning.m4: Add -Wno-error=deprecated-register.
11939         * configure: Re-generate.
11940
11941 2018-04-05  Tom Tromey  <tom@tromey.com>
11942
11943         * linespec.h: Remove include of "vec.h".
11944
11945 2018-04-05  Tom Tromey  <tom@tromey.com>
11946
11947         * linespec.c (typep): Remove typedef.
11948         (find_methods, find_superclass_methods): Take a std::vector.
11949         (find_method): Use std::vector.
11950
11951 2018-04-05  Tom Tromey  <tom@tromey.com>
11952
11953         * utils.c (compare_strings): Remove.
11954         * utils.h (compare_strings): Remove.
11955         * objc-lang.h (find_imps): Update.
11956         * objc-lang.c (find_methods): Take a std::vector.
11957         (uniquify_strings, find_imps): Likewise.
11958         * linespec.c (find_methods): Take a std::vector.
11959         (decode_objc): Use std::vector.
11960         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11961         a std::vector.
11962         (find_method, find_function_symbols): Use std::vector.
11963
11964 2018-04-05  Tom Tromey  <tom@tromey.com>
11965
11966         * completer.c (completion_tracker::completion_tracker): Remove
11967         cast.
11968         (completion_tracker::discard_completions): Likewise.
11969         * breakpoint.c (ambiguous_names_p): Remove cast.
11970         * ada-lang.c (_initialize_ada_language): Remove cast.
11971         * utils.h (streq): Update.
11972         (streq_hash): Add new declaration.
11973         * utils.c (streq): Return bool.
11974         (streq_hash): New function.
11975
11976 2018-04-05  Tom Tromey  <tom@tromey.com>
11977
11978         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11979         Remove a string copy.
11980
11981 2018-04-05  Tom Tromey  <tom@tromey.com>
11982
11983         * linespec.c (filter_results): Use std::vector.
11984         (decode_line_2, decode_line_full): Update.
11985
11986 2018-04-05  Tom Tromey  <tom@tromey.com>
11987
11988         * linespec.c (canonical_to_fullform): Return std::string.
11989         (filter_results): Update.
11990         (struct decode_line_2_item): Add constructor.
11991         <fullform, displayform>: Now std::string.
11992         (decode_line_2_compare_items): Now a std::sort comparator.
11993         (decode_line_2): Update.
11994
11995 2018-04-05  Tom Tromey  <tom@tromey.com>
11996
11997         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11998         (unexpected_linespec_error): Update.
11999         (linespec_parse_basic, parse_linespec): Update.
12000
12001 2018-04-05  Tom Tromey  <tom@tromey.com>
12002
12003         * linespec.c (linespec_parse_basic): Reindent.
12004
12005 2018-04-05  Tom Tromey  <tom@tromey.com>
12006
12007         * minsyms.h (iterate_over_minimal_symbols): Update.
12008         * minsyms.c (iterate_over_minimal_symbols): Take a
12009         gdb::function_view.
12010         * linespec.c (struct collect_minsyms): Remove.
12011         (compare_msyms): Now a std::sort comparator.
12012         (add_minsym): Add parameters.
12013         (search_minsyms_for_name): Update.  Use std::vector.
12014
12015 2018-04-03  Tom Tromey  <tom@tromey.com>
12016
12017         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12018         gdb::byte_vector.
12019
12020 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12021
12022         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12023
12024 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12025
12026         PR gdb/16959
12027         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12028         printing static type.
12029
12030 2018-04-01  Tom Tromey  <tom@tromey.com>
12031
12032         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12033         (rs6000_xfer_shared_libraries): Update.
12034
12035 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12036
12037         * common/gdb_vecs.h (char_ptr): Remove.
12038         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12039
12040 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12041
12042         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12043         with std::vector.
12044         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12045
12046 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12047
12048         * tracepoint.h (struct uploaded_tp): Initialize fields.
12049         <actions, step_actions, cmd_strings>: Change type to
12050         std::vector<char *>.
12051         * tracepoint.c (get_uploaded_tp): Allocate with new.
12052         (free_uploaded_tps): Free with delete.
12053         (parse_tracepoint_definition): Adjust to std::vector change.
12054         * breakpoint.c (read_uploaded_action): Likewise.
12055         (create_tracepoint_from_upload): Likewise.
12056         * ctf.c (ctf_write_uploaded_tp): Likewise.
12057         (SET_ARRAY_FIELD): Likewise.
12058         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12059
12060 2018-03-30  Tom Tromey  <tom@tromey.com>
12061
12062         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12063         std::unique_ptr.
12064         (svr4_keep_data_in_core): Update.
12065         (svr4_read_so_list): Update.
12066
12067 2018-03-30  Tom Tromey  <tom@tromey.com>
12068
12069         * windows-nat.c (handle_output_debug_string, handle_exception):
12070         Update.
12071         * target.h (target_read_string): Update.
12072         * target.c (target_read_string): Change "string" to
12073         unique_xmalloc_ptr.
12074         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12075         Update.
12076         * solib-frv.c (frv_current_sos): Update.
12077         * solib-dsbt.c (dsbt_current_sos): Update.
12078         * solib-darwin.c (darwin_current_sos): Update.
12079         * linux-thread-db.c (inferior_has_bug): Update.
12080         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12081         Update.  Remove alloca.
12082         * ada-lang.c (ada_main_name): Update.
12083
12084 2018-03-30  Tom Tromey  <tom@tromey.com>
12085
12086         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12087         (struct dwo_file_deleter): New.
12088         (dwo_file_up): New typedef.
12089         (open_and_init_dwo_file): Use dwo_file_up.
12090         (free_dwo_file_cleanup): Remove.
12091
12092 2018-03-30  Tom Tromey  <tom@tromey.com>
12093
12094         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12095         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12096
12097 2018-03-30  Tom Tromey  <tom@tromey.com>
12098
12099         * dwarf2read.c (class free_cached_comp_units): New class.
12100         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12101         (free_cached_comp_units): Remove function.
12102
12103 2018-03-30  Tom Tromey  <tom@tromey.com>
12104
12105         * utils.h (make_cleanup_unpush_target): Remove.
12106         * inf-ptrace.c (struct target_unpusher): New.
12107         (target_unpush_up) New typedef.
12108         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12109         target_unpush_up.
12110         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12111
12112 2018-03-27  Tom Tromey  <tom@tromey.com>
12113
12114         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12115
12116 2018-03-27  Pedro Alves  <palves@redhat.com>
12117             Tom Tromey  <tom@tromey.com>
12118
12119         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12120         destructor.  Now a class.
12121         (gdb_readline_wrapper_cleanup): Remove function.
12122         (gdb_readline_wrapper): Remove cleanups.
12123
12124 2018-03-27  Tom Tromey  <tom@tromey.com>
12125
12126         * typeprint.h (struct type_print_options) <local_typedefs,
12127         global_typedefs>: Remove "struct" keyword.
12128         (class typedef_hash_table): New class.
12129         (recursively_update_typedef_hash, add_template_parameters)
12130         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12131         (find_typedef_in_hash): Don't declare.
12132         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12133         (typedef_hash_table::recursively_update): Rename from
12134         recursively_update_typedef_hash.  Now a member.
12135         (typedef_hash_table::add_template_parameters): Rename from
12136         add_template_parameters.  Now a member.
12137         (typedef_hash_table::typedef_hash_table): Now a constructor;
12138         rename from create_typedef_hash.
12139         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12140         rename from free_typedef_hash.
12141         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12142         (do_free_global_table): Remove.
12143         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12144         from copy_type_recursive.
12145         (create_global_typedef_table): Remove.
12146         (typedef_hash_table::find_global_typedef): Now a member of
12147         typedef_hash_table.
12148         (typedef_hash_table::find_typedef): Rename from
12149         find_typedef_in_hash; now a member.
12150         (whatis_exp): Update.
12151         * extension.h (struct ext_lang_type_printers): Add constructor and
12152         destructor.
12153         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12154         declare.
12155         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12156         Now a constructor; rename from start_ext_lang_type_printers.
12157         (ext_lang_type_printers): Now a destructor; rename from
12158         free_ext_lang_type_printers.
12159         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12160         Update.
12161         (c_type_print_base_struct_union): Update.  Remove cleanups.
12162
12163 2018-03-27  Tom Tromey  <tom@tromey.com>
12164
12165         * dwarf-index-write.c: Include <cmath>.
12166
12167 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12168
12169         * NEWS: Add entry describing new "set|show varsize-limit" command.
12170         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12171         command.
12172         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12173         "set variable".
12174
12175 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12176
12177         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12178         dwarf-index-write.c
12179         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12180         * dwarf-index-common.c: New file.
12181         * dwarf-index-common.h: New file.
12182         * dwarf-index-write.c: New file.
12183         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12184         (struct dwarf2_section_info): Move from here.
12185         (dwarf2_section_info_def): Likewise.
12186         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12187         (offset_type): Likewise.
12188         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12189         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12190         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12191         (byte_swap): Likewise.
12192         (MAYBE_SWAP): Likewise.
12193         (dwarf2_per_cu_ptr): Likewise.
12194         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12195         (struct tu_stats): Likewise.
12196         (struct dwarf2_per_objfile): Likewise.
12197         (struct dwarf2_per_cu_data): Likewise.
12198         (struct signatured_type): Likewise.
12199         (sig_type_ptr): Likewise.
12200         (DEF_VEC_P (sig_type_ptr)): Likewise.
12201         (INDEX4_SUFFIX): Likewise.
12202         (INDEX5_SUFFIX): Likewise.
12203         (DEBUG_STR_SUFFIX): Likewise.
12204         (dwarf2_read_section): Make non-static.
12205         (mapped_index_string_hash): Move from here.
12206         (dwarf5_djb_hash): Likewise.
12207         (file_write): Likewise.
12208         (class data_buf): Likewise.
12209         (struct symtab_index_entry): Likewise.
12210         (struct mapped_symtab): Likewise.
12211         (find_slot): Likewise.
12212         (hash_expand): Likewise.
12213         (add_index_entry): Likewise.
12214         (uniquify_cu_indices): Likewise.
12215         (class c_str_view): Likewise.
12216         (class c_str_view_hasher): Likewise.
12217         (class vector_hasher): Likewise.
12218         (write_hash_table): Likewise.
12219         (psym_index_map): Likewise.
12220         (struct addrmap_index_data): Likewise.
12221         (add_address_entry): Likewise.
12222         (add_address_entry_worker): Likewise.
12223         (write_address_map): Likewise.
12224         (symbol_kind): Likewise.
12225         (write_psymbols): Likewise.
12226         (struct signatured_type_index_data): Likewise.
12227         (write_one_signatured_type): Likewise.
12228         (recursively_count_psymbols): Likewise.
12229         (recursively_write_psymbols): Likewise.
12230         (class debug_names): Likewise.
12231         (check_dwarf64_offsets): Likewise.
12232         (psyms_seen_size): Likewise.
12233         (write_gdbindex): Likewise.
12234         (write_debug_names): Likewise.
12235         (assert_file_size): Likewise.
12236         (write_psymtabs_to_index): Likewise.
12237         (save_gdb_index_command): Likewise.
12238         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12239         command.
12240         * dwarf2read.h: New file.
12241
12242 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12243
12244         PR gdb/22670
12245         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12246         symbol name if the CU's language stores symbol names in linkage
12247         format.
12248         * language.h (struct language_defn)
12249         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12250         all instances of this struct.
12251
12252 2018-03-26  Tom Tromey  <tom@tromey.com>
12253
12254         * stack.c (backtrace_command_1): Remove verbose code.
12255
12256 2018-03-26  Tom Tromey  <tom@tromey.com>
12257
12258         * python/py-framefilter.c (py_print_type): Don't catch
12259         exceptions.  Return void.
12260         (py_print_value): Likewise.
12261         (py_print_single_arg): Likewise.
12262         (enumerate_args): Don't catch exceptions.
12263         (py_print_args): Likewise.
12264         (py_print_frame): Likewise.
12265         (gdbpy_apply_frame_filter): Catch exceptions here.
12266
12267 2018-03-26  Tom Tromey  <tom@tromey.com>
12268
12269         * stack.c (_initialize_stack): Remove trailing newlines from help
12270         text.  Add "Usage" line to "backtrace" help.
12271
12272 2018-03-26  Tom Tromey  <tom@tromey.com>
12273
12274         PR python/16486:
12275         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12276
12277 2018-03-26  Tom Tromey  <tom@tromey.com>
12278
12279         * python/py-framefilter.c (py_print_single_arg): Return
12280         EXT_LANG_BT_ERROR from catch.
12281
12282 2018-03-26  Tom Tromey  <tom@tromey.com>
12283
12284         PR backtrace/15584:
12285         * stack.c (backtrace_command_1): Move some code into no-filters
12286         "if".
12287
12288 2018-03-26  Tom Tromey  <tom@tromey.com>
12289
12290         * python/py-framefilter.c (throw_quit_or_print_exception): New
12291         function.
12292         (gdbpy_apply_frame_filter): Use it.
12293
12294 2018-03-26  Tom Tromey  <tom@tromey.com>
12295
12296         PR cli/17716:
12297         * python/py-framefilter.c (py_print_type, py_print_value)
12298         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12299         RETURN_MASK_ERROR.
12300
12301 2018-03-26  Tom Tromey  <tom@tromey.com>
12302
12303         * python/py-framefilter.c (enumerate_args): Use
12304         gdb::unique_xmalloc_ptr.
12305
12306 2018-03-26  Tom Tromey  <tom@tromey.com>
12307
12308         * python/py-framefilter.c (py_print_frame): Return
12309         EXT_LANG_BT_OK.
12310         (gdbpy_apply_frame_filter): Update comment.
12311         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12312         Remove.
12313         <EXT_LANG_BT_NO_FILTERS>: Change value.
12314
12315 2018-03-26  Tom Tromey  <tom@tromey.com>
12316
12317         PR backtrace/15582:
12318         * stack.c (backtrace_command): Parse "hide" argument.
12319         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12320         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12321         constant.
12322
12323 2018-03-26  Tom Tromey  <tom@tromey.com>
12324
12325         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12326         add "flags".
12327         (backtrace_command): Remove "fulltrace", add "flags".
12328
12329 2018-03-26  Tom Tromey  <tom@tromey.com>
12330
12331         * stack.c (backtrace_command): Rewrite command line parsing.
12332
12333 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12334
12335         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12336
12337 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12338
12339         * filename-seen-cache.h: Add include guard.
12340
12341 2018-03-26  Keith Seitz  <keiths@redhat.com>
12342
12343         * symfile.c (place_section): Remove "struct" from section_addr_info
12344         in comment.
12345         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12346         "struct" keyword from section_addr_info.
12347
12348 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12349
12350         * regformats/regdef.h (reg): Add constructors.
12351
12352 2018-03-25  Pedro Alves  <palves@redhat.com>
12353
12354         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12355         if then/else bodies in var_func_name extraction.
12356
12357 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12358
12359         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12360         lookup_minimal_symbol() to find symbol entry.
12361         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12362
12363 2018-03-23  Keith Seitz  <keiths@redhat.com>
12364
12365         PR c++/22968
12366         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12367         nested type definitions for C++, too.
12368
12369 2018-03-23  Tom Tromey  <tom@tromey.com>
12370
12371         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12372         a typedef.
12373         (macho_register_oso): Remove.
12374         (macho_symtab_read): Take a std::vector.
12375         (oso_el_compare_name): Now a std::sort comparator.
12376         (macho_symfile_read_all_oso): Take a std::vector.
12377         (macho_symfile_read): Use std::vector.  Remove cleanups.
12378
12379 2018-03-22  Tom Tromey  <tom@tromey.com>
12380
12381         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12382         (record_full_goto_bookmark): Use std::string.
12383
12384 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12385
12386         PR tdep/18295
12387         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12388         a single mask.
12389
12390 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12391
12392         * rs6000-tdep.c (store_insn_p): New function.
12393         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12394         and cr_reg to their unshifted values. Use store_insn_p to
12395         match LR saves using either R1 or fdata->alloca_reg. Use
12396         store_insn_p to match CR saves. Set alloca_reg_offset
12397         when alloca_reg and framep are set. Remove lr_reg shift
12398         when assigning to fdata->lr_register.
12399
12400 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12401
12402         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12403         command line args instead of emitting a warning.
12404
12405 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12406
12407         * tracepoint.h (struct static_tracepoint_marker): Initialize
12408         fields, define default constructor, move constructor and move
12409         assignment, disable the rest.
12410         <str_id, extra>: Make std::string.
12411         (release_static_tracepoint_marker): Remove.
12412         (free_current_marker): Remove.
12413         * tracepoint.c (free_current_marker): Remove.
12414         (parse_static_tracepoint_marker_definition): Adjust to
12415         std::string, use new hex2str overload.
12416         (release_static_tracepoint_marker): Remove.
12417         (print_one_static_tracepoint_marker): Get marker by reference
12418         and adjust to std::string.
12419         (info_static_tracepoint_markers_command): Adjust to std::vector
12420         changes
12421         * target.h (static_tracepoint_marker_p): Remove typedef.
12422         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12423         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12424         bool.
12425         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12426         * target-debug.h
12427         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12428         (target_debug_print_std_vector_static_tracepoint_marker): New.
12429         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12430         to...
12431         (target_debug_print_static_tracepoint_marker_p): ... this.
12432         * target-delegates.c: Re-generate.
12433         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12434         Make std::string.
12435         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12436         (decode_static_tracepoint_spec): Adjust to std::vector.
12437         (tracepoint_print_one_detail): Adjust to std::string.
12438         (strace_marker_decode_location): Adjust to std::string.
12439         (update_static_tracepoint): Adjust to std::string, remove call
12440         to release_static_tracepoint_marker.
12441         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12442         Adjust to std::vector.
12443         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12444         (remote_static_tracepoint_markers_by_strid): Adjust to
12445         std::vector.
12446         * common/rsp-low.h (hex2str): New overload with explicit count
12447         of bytes.
12448         * common/rsp-low.c (hex2str): New overload with explicit count
12449         of bytes.
12450         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12451         (_initialize_rsp_low_selftests): Add test_hex2str test.
12452         * unittests/tracepoint-selftests.c
12453         (test_parse_static_tracepoint_marker_definition): Adjust to
12454         std::string.
12455
12456 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12457
12458         * tracepoint.c (parse_static_tracepoint_marker_definition):
12459         Consider case where the definition is followed by more
12460         definitions.
12461         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12462         tracepoint-selftests.c.
12463         * unittests/tracepoint-selftests.c: New.
12464
12465 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12466
12467         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12468         Carvalho.
12469
12470 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12471
12472         * symtab.c (find_pc_sect_line): fixed indentation.
12473
12474 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12475
12476         * symtab.c (find_pc_sect_line): now uses binary search.
12477
12478 2018-03-19  Tom Tromey  <tom@tromey.com>
12479
12480         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12481         "IDENT" production.
12482
12483 2018-03-19  Pedro Alves  <palves@redhat.com>
12484             Tom Tromey  <tom@tromey.com>
12485
12486         * unittests/observable-selftests.c: New file.
12487         * common/observable.h: New file.
12488         * observable.h: New file.
12489         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12490         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12491         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12492         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12493         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12494         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12495         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12496         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12497         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12498         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12499         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12500         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12501         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12502         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12503         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12504         tui/tui-interp.c, valops.c: Update all users.
12505         * tui/tui-hooks.c (tui_bp_created_observer)
12506         (tui_bp_deleted_observer, tui_bp_modified_observer)
12507         (tui_inferior_exit_observer, tui_before_prompt_observer)
12508         (tui_normal_stop_observer, tui_register_changed_observer):
12509         Remove.
12510         (tui_observers_token): New global.
12511         (attach_or_detach, tui_attach_detach_observers): New functions.
12512         (tui_install_hooks, tui_remove_hooks): Use
12513         tui_attach_detach_observers.
12514         * record-btrace.c (record_btrace_thread_observer): Remove.
12515         (record_btrace_thread_observer_token): New global.
12516         * observer.sh: Remove.
12517         * observer.c: Rename to observable.c.
12518         * observable.c (namespace gdb_observers): Define new objects.
12519         (observer_debug): Move into gdb_observers namespace.
12520         (struct observer, struct observer_list, xalloc_observer_list_node)
12521         (xfree_observer_list_node, generic_observer_attach)
12522         (generic_observer_detach, generic_observer_notify): Remove.
12523         (_initialize_observer): Update.
12524         Don't include observer.inc.
12525         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12526         (clean mostlyclean): Likewise.
12527         (observer.h, observer.inc): Remove targets.
12528         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12529         (COMMON_SFILES): Use observable.c, not observer.c.
12530         * .gitignore: Remove observer.h.
12531
12532 2018-03-18  Tom Tromey  <tom@tromey.com>
12533
12534         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12535         gdb::def_vector.
12536         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12537
12538 2018-03-17  Tom Tromey  <tom@tromey.com>
12539
12540         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12541
12542 2018-03-17  Tom Tromey  <tom@tromey.com>
12543
12544         * target.c (class scoped_target_fd): New.
12545         (target_fileio_close_cleanup): Remove.
12546         (target_fileio_read_alloc_1): Use scoped_target_fd.
12547
12548 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12549
12550         * silent-rules.mk: New.
12551         * Makefile.in: Include silent-rules.mk
12552         (srcdir, VPATH, top_srcdir): Move up.
12553         (COMPILE): Add ECHO_CXX.
12554         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12555         (init.c): Add ECHO_INIT_C.
12556         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12557         (version.c): Add ECHO_GEN.
12558         (printcmd.o): Add ECHO_CXX.
12559         (target-float.o): Add ECHO_CXX.
12560         (ada-exp.o): Add ECHO_CXX.
12561         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12562         (insight$(EXEEXT)): Add ECHO_CXXLD.
12563         * gnulib/configure.ac: Add AM_SILENT_RULES.
12564         * gnulib/aclocal.m4: Re-generate.
12565         * gnulib/configure: Re-generate.
12566         * gnulib/import/Makefile.in: Re-generate.
12567
12568 2018-03-16  Tom Tromey  <tom@tromey.com>
12569
12570         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12571         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12572         * utils.c (do_free_section_addr_info)
12573         (make_cleanup_free_section_addr_info): Remove.
12574         * symfile.h (struct other_sections): Add constructor.
12575         (struct section_addr_info): Remove.
12576         (section_addr_info): New typedef.
12577         (struct sym_fns) <sym_offsets>: Change type of parameter.
12578         (build_section_addr_info_from_objfile)
12579         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12580         (default_symfile_offsets, symbol_file_add)
12581         (symbol_file_add_from_bfd)
12582         (build_section_addr_info_from_section_table): Update.
12583         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12584         * symfile.c (alloc_section_addr_info): Remove.
12585         (build_section_addr_info_from_section_table): Change return type.
12586         Update.
12587         (build_section_addr_info_from_bfd)
12588         (build_section_addr_info_from_objfile): Likewise.
12589         (free_section_addr_info): Remove.
12590         (relative_addr_info_to_section_offsets): Change type of "addrs".
12591         (addrs_section_compar): Now a std::sort comparator.
12592         (addrs_section_sort): Change return type.
12593         (addr_info_make_relative): Change type of "addrs".  Update.
12594         (default_symfile_offsets, syms_from_objfile_1)
12595         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12596         (symbol_file_add_separate): Update.
12597         (symbol_file_add): Change type of "addrs".  Update.
12598         (add_symbol_file_command): Update.  Remove cleanups.
12599         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12600         cleanups.
12601         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12602         * solib.c (solib_read_symbols): Update.
12603         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12604         * machoread.c (macho_symfile_offsets): Update.
12605         * jit.c (jit_bfd_try_read_symtab): Update.
12606
12607 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12608
12609         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12610         unittests/utils-selftests.c.
12611         * unittests/utils-selftests.c: New file.
12612
12613 2018-03-14  Tom Tromey  <tom@tromey.com>
12614
12615         PR cli/14977:
12616         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12617         for NULL.
12618
12619 2018-03-14  Tom Tromey  <tom@tromey.com>
12620
12621         PR cli/19918:
12622         * printcmd.c (printf_pointer): Allow "-" in format.
12623
12624 2018-03-14  Tom Tromey  <tom@tromey.com>
12625
12626         * printcmd.c (_initialize_printcmd): Add usage to printf.
12627
12628 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12629
12630         * MAINTAINERS: Update my email address.
12631
12632 2018-03-13  Tom Tromey  <tom@tromey.com>
12633
12634         * machoread.c (macho_check_dsym): Change filenamep to a
12635         std::string*.
12636         (macho_symfile_read): Update.
12637         * symfile.c (load_command): Use std::string.
12638
12639 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12640
12641         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12642         to error message string.
12643         (riscv_register_name): Use xsnprintf instead of sprintf.
12644         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12645         internal_error.
12646         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12647         error.
12648         (riscv_push_dummy_call): Likewise.
12649
12650 2018-03-12  Tom Tromey  <tom@tromey.com>
12651
12652         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12653         Use gdb::byte_vector.
12654         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12655
12656 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12657
12658         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12659         parameter type to readable_regcache.
12660         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12661         the declaration.
12662
12663 2018-03-11  Tom Tromey  <tom@tromey.com>
12664
12665         * dwarf2read.c (struct nextfield): Add initializers.
12666         (struct nextfnfield): Remove.
12667         (struct fnfieldlist): Add initializers.  Remove "length" and
12668         "head", use std::vector.
12669         (struct decl_field_list): Remove.
12670         (struct field_info): Add initializers.
12671         <fields, baseclasses>: Now std::vector.
12672         <nbaseclasses, nfnfields, typedef_field_list_count,
12673         nested_types_list_count>: Remove.
12674         (dwarf2_add_field, dwarf2_add_type_defn)
12675         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12676         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12677         (process_structure_scope): Update.
12678
12679 2018-03-11  Tom Tromey  <tom@tromey.com>
12680
12681         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12682         for use by std::sort.
12683         (build_type_psymtabs_1): Use std::vector.
12684
12685 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12686
12687         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12688         and LIBMPFR in the printed configuration.
12689
12690 2018-03-08  Tom Tromey  <tom@tromey.com>
12691
12692         * source.c (get_filename_and_charpos): Use scoped_fd.
12693         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12694         (procfs_pidlist): Likewise.
12695         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12696         (iterate_over_mappings): Likewise.
12697
12698 2018-03-08  Tom Tromey  <tom@tromey.com>
12699
12700         * infcall.c (struct call_return_meta_info)
12701         <stack_temporaries_enabled>: Remove.
12702         (get_call_return_value, call_function_by_hand_dummy): Update.
12703         * thread.c (disable_thread_stack_temporaries): Remove.
12704         (enable_thread_stack_temporaries): Remove.
12705         (thread_stack_temporaries_enabled_p): Return bool.
12706         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12707         (get_last_thread_stack_temporary): Update.
12708         * eval.c (evaluate_subexp): Update.
12709         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12710         class, not a function.
12711         (value_ptr, value_vec): Remove typedefs.
12712         (class thread_info) <stack_temporaries_enabled>: Now bool.
12713         <stack_temporaries>: Now a std::vector.
12714         (thread_stack_temporaries_enabled_p)
12715         (value_in_thread_stack_temporaries): Return bool.
12716
12717 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12718
12719         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12720         (getpkt_or_notif_sane_1): Likewise.
12721
12722 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12723
12724         * build-id.c (build_id_to_debug_bfd): Use std::string.
12725
12726 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12727
12728         * build-id.c (find_separate_debug_file_by_buildid): Return
12729         std::string.
12730         * build-id.h (find_separate_debug_file_by_buildid): Return
12731         std::string.
12732         * coffread.c (coff_symfile_read): Adjust to std::string.
12733         * elfread.c (elf_symfile_read): Adjust to std::string.
12734         * symfile.c (separate_debug_file_exists): Change parameter to
12735         std::string.
12736         (find_separate_debug_file): Return std::string.
12737         (find_separate_debug_file_by_debuglink): Return std::string.
12738         * symfile.h (find_separate_debug_file_by_debuglink): Return
12739         std::string.
12740
12741 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12742
12743         * common/xml-utils.c (xml_escape_text): Move code to...
12744         (xml_escape_text_append): ... this new function.
12745         * common/xml-utils.h (xml_escape_text_append): New declaration.
12746         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12747         New function.
12748         (_initialize_xml_utils): register test_xml_escape_text_append as
12749         a selftest.
12750
12751 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12752
12753         * defs.h: Remove MAX_REGISTER_SIZE.
12754         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12755         asserts.
12756         * python/py-unwind.c (pyuw_sniffer): Likewise.
12757
12758 2018-03-07  Tom Tromey  <tom@tromey.com>
12759
12760         * linux-tdep.c (linux_info_proc): Update.
12761         * target.h (struct target_ops) <to_fileio_readlink>: Return
12762         optional<string>.
12763         (target_fileio_readlink): Return optional<string>.
12764         * remote.c (remote_hostio_readlink): Return optional<string>.
12765         * inf-child.c (inf_child_fileio_readlink): Return
12766         optional<string>.
12767         * target.c (target_fileio_readlink): Return optional<string>.
12768
12769 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12770
12771         * regcache.c (cooked_read_test): Add riscv to the list of
12772         architectures that have a save_reggroup.
12773
12774 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12775
12776         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12777         value is not a dynamic class object.
12778
12779 2018-03-06  Tom Tromey  <tom@tromey.com>
12780
12781         * rust-exp.y: Formatting fixes.
12782
12783 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12784
12785         * riscv-tdep.c (riscv_register_name): Remove target description
12786         support.
12787         (riscv_gdbarch_init): Remove target description check.
12788
12789 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12790
12791         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12792         comment.
12793         * riscv-tdep.h: Likewise.
12794
12795 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12796
12797         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12798         (riscv_pseudo_register_write): Delete.
12799         (riscv_gdbarch_init): Remove all use of pseudo registers.
12800
12801 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12802
12803         * record-btrace.c (btrace_print_lines): Replace cleanup
12804         parameter with RAII equivalents.
12805         (btrace_insn_history): Replace cleanup with RAII equivalents.
12806         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12807         make_cleanup_ui_out_tuple_begin_end): Remove.
12808         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12809         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12810         make_cleanup_ui_out_list_begin_end): Remove.
12811
12812 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12813
12814         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12815         parameter types to std::vector.  Use bool.
12816         (record_btrace_wait): Replace VEC(tp_t) with
12817         std::vector<thread_info *>.
12818         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12819
12820 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12821
12822         * record-btrace.c (record_btrace_disable_callback): Remove.
12823         (struct scoped_btrace_disable): New.
12824         (record_btrace_open): Use scoped_btrace_disable.
12825
12826 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12827
12828         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12829         reading values from registers.
12830
12831 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12832
12833         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12834         where appropriate.
12835
12836 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12837
12838         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12839         change parameter type.  Use GDB's print functions, and use
12840         core_addr_to_string where appropriate.
12841         (riscv_push_dummy_call): Use core_addr_to_string where
12842         appropriate, update call to riscv_print_arg_location, and reindent
12843         a few lines.
12844         (riscv_return_value): Update call to riscv_print_arg_location.
12845
12846 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12847             Tim Newsome <tim@sifive.com>
12848             Albert Ou <a0u@eecs.berkeley.edu>
12849             Darius Rad <darius@bluespec.com>
12850
12851         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12852         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12853         (ALLDEPFILES): Add riscv-tdep.c
12854         * configure.tgt: Add riscv support.
12855         * riscv-tdep.c: New file.
12856         * riscv-tdep.h: New file.
12857         * NEWS: Mention new target.
12858         * MAINTAINERS: Add entry for riscv.
12859
12860 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12861
12862         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12863         fields within aggregates.
12864
12865 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12866
12867         * record-btrace.c (btrace_print_lines): Change type of flags to
12868         gdb_disassembly_flags.
12869
12870 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12871
12872         * fbsd-nat.c: Include "inf-ptrace.h".
12873         (USE_SIGTRAP_SIGINFO): Conditionally define.
12874         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12875         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12876         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12877         function.
12878         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12879         Likewise.
12880         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12881         Likewise.
12882         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12883         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12884         "supports_stopped_by_hw_breakpoint" target methods.
12885
12886 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12887
12888         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12889         * fbsd-nat.c (debug_fbsd_nat): New variable.
12890         (show_fbsd_nat_debug): New function.
12891         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12892         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12893
12894 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12895
12896         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12897         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12898         prototype.
12899         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12900         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12901         method.
12902
12903 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12904
12905         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12906         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12907
12908 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12909
12910         * charset.c (struct charset_vector): New.
12911         (charsets): Change type to charset_vector.
12912         (find_charset_names): Adjust.
12913         (add_one): Adjust.
12914         (_initialize_charset): Adjust.
12915
12916 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12917
12918         * progspace.h (struct program_space) <deleted_solibs>: Change
12919         type to std::vector<std::string>.
12920         * progspace.c (clear_program_space_solib_cache): Adjust.
12921         * breakpoint.c (print_solib_event): Adjust.
12922         (check_status_catch_solib): Adjust.
12923         * solib.c (update_solib_list): Adjust.
12924         * ui-out.h (class ui_out) <field_string>: New overload.
12925         * ui-out.c (ui_out::field_string): New overload.
12926
12927 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12928
12929         * progspace.h (struct program_space): Add constructor and
12930         destructor, initialize fields.
12931         (add_program_space): Remove.
12932         * progspace.c (add_program_space): Rename to...
12933         (program_space::program_space): ... this.
12934         (release_program_space): Rename to...
12935         (program_space::~program_space): ... this.
12936         (delete_program_space): Use delete to delete program_space.
12937         (initialize_progspace): Use new to allocate program_space.
12938         * inferior.c (add_inferior_with_spaces): Likewise.
12939         (clone_inferior_command): Likewise.
12940         * infrun.c (follow_fork_inferior): Likewise.
12941         (handle_vfork_child_exec_or_exit): Likewise.
12942
12943 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12944
12945         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12946         (delim_string_to_char_ptr_vec): Return std::vector of
12947         gdb::unique_xmalloc_ptr.
12948         (dirnames_to_char_ptr_vec_append): Take std::vector of
12949         gdb::unique_xmalloc_ptr.
12950         (dirnames_to_char_ptr_vec): Return std::vector of
12951         gdb::unique_xmalloc_ptr.
12952         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12953         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12954         (delim_string_to_char_ptr_vec): Return an std::vector of
12955         gdb::unique_xmalloc_ptr, adjust the code.
12956         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12957         gdb::unique_xmalloc_ptr, adjust the code.
12958         (dirnames_to_char_ptr_vec): Return an std::vector of
12959         gdb::unique_xmalloc_ptr, adjust the code.
12960         * auto-load.c (auto_load_safe_path_vec): Change type to
12961         std::vector of gdb::unique_xmalloc_ptr.
12962         (auto_load_expand_dir_vars): Return an std::vector of
12963         gdb::unique_xmalloc_ptr, adjust the code.
12964         (auto_load_safe_path_vec_update): Adjust.
12965         (filename_is_in_auto_load_safe_path_vec): Adjust.
12966         (auto_load_objfile_script_1): Adjust.
12967         * build-id.c (build_id_to_debug_bfd): Adjust.
12968         * linux-thread-db.c (thread_db_load_search): Adjust.
12969         * source.c (add_path): Adjust.
12970         (openp): Adjust.
12971         * symfile.c (find_separate_debug_file): Adjust.
12972         * utils.c (do_free_char_ptr_vec): Remove.
12973         (make_cleanup_free_char_ptr_vec): Remove.
12974
12975 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12976
12977         PR gdb/22907
12978         * common/pathstuff.c: Conditionally include "<windows.h>".
12979
12980 2018-03-01  Georg Sauthoff  <mail@georg.so>
12981
12982         PR gdb/22888
12983         * gcore.in: Quote variables and switch interpreter to bash.
12984
12985 2018-03-01  Tom Tromey  <tom@tromey.com>
12986
12987         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12988         assertion.  Add assertion for discriminant_index.
12989         (quirk_rust_enum): Use correct base type name in univariant case.
12990
12991 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12992
12993         * record.c (get_call_history_modifiers): Return a
12994         record_print_flags.
12995         (cmd_record_call_history): Adjust.
12996         * record-btrace.c (record_btrace_call_history): Adjust.
12997         (record_btrace_call_history_range): Adjust.
12998         (record_btrace_call_history_from): Adjust.
12999         * target-debug.h (target_debug_print_record_print_flags): New.
13000         * target-delegates.c: Re-generate.
13001         * target.c (target_call_history): Change flags type.
13002         (target_call_history_from): Likewise.
13003         (target_call_history_range): Likewise.
13004         * target.h (struct target_ops) <target_call_history>: Likewise.
13005         (target_call_history_from): Likewise.
13006         (target_call_history_range): Likewise.
13007
13008 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13009             Simon Marchi  <simon.marchi@polymtl.ca>
13010
13011         * common/common-utils.c: Include "sys/stat.h".
13012         (is_regular_file): Move here from "source.c"; change return
13013         type to "bool".
13014         * common/common-utils.h (is_regular_file): New prototype.
13015         * common/pathstuff.c (contains_dir_separator): New function.
13016         * common/pathstuff.h (contains_dir_separator): New prototype.
13017         * source.c: Don't include "sys/stat.h".
13018         (is_regular_file): Move to "common/common-utils.c".
13019
13020 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13021
13022         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13023         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13024         * auto-load.c: Include "common/pathstuff.h".
13025         * common/common-def.h (current_directory): Move here.
13026         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13027         function.
13028         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13029         prototype.
13030         * common/pathstuff.c: New file.
13031         * common/pathstuff.h: New file.
13032         * compile/compile.c: Include "common/pathstuff.h".
13033         * defs.h (current_directory): Move to "common/common-defs.h".
13034         * dwarf2read.c: Include "common/pathstuff.h".
13035         * exec.c: Likewise.
13036         * guile/scm-safe-call.c: Likewise.
13037         * linux-thread-db.c: Likewise.
13038         * main.c: Likewise.
13039         * nto-tdep.c: Likewise.
13040         * objfiles.c: Likewise.
13041         * source.c: Likewise.
13042         * symtab.c: Likewise.
13043         * utils.c: Include "common/pathstuff.h".
13044         (gdb_realpath): Move to "common/pathstuff.c".
13045         (gdb_realpath_keepfile): Likewise.
13046         (gdb_abspath): Likewise.
13047         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13048         (gdb_realpath_keepfile): Likewise.
13049         (gdb_abspath): Likewise.
13050
13051 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13052
13053         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13054         wildcard process pid for super_resume for kernels with a
13055         specific bug.
13056
13057 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13058
13059         * compile/compile.c (get_args): Add additional comments
13060         explaining function.
13061
13062 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13063             Tom Tromey  <tom@tromey.com>
13064
13065         * target.h (memory_write_request_s): Remove typedef.  Don't define
13066         VEC.
13067         (target_write_memory_blocks): Change argument to std::vector.
13068         (struct memory_write_request): Add constructor.
13069         * target-memory.c (compare_block_starting_address): Return bool.
13070         Change argument types.
13071         (claim_memory): Change arguments to use std::vector.
13072         (split_regular_and_flash_blocks, blocks_to_erase)
13073         (compute_garbled_blocks): Likewise.
13074         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13075         (target_write_memory_blocks): Change argument to std::vector.
13076         * symfile.c (struct load_section_data): Add constructor and
13077         destructor.  Use std::vector for "requests".
13078         (struct load_progress_data): Add initializers.
13079         (load_section_callback): Update.  Use "new".
13080         (clear_memory_write_data): Remove.
13081         (generic_load): Update.
13082
13083 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13084
13085         * arch/aarch64.h: Use common/tdesc.h.
13086
13087 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13088
13089         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13090         architecture with a 64-bit ABI.
13091
13092 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13093
13094         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13095         ahead of target description loading.
13096
13097 2018-02-26  Tom Tromey  <tom@tromey.com>
13098
13099         * stack.c (backtrace_command_1): Update.
13100         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13101         of "flags".
13102         * python/py-framefilter.c (py_print_frame)
13103         (gdbpy_apply_frame_filter): Change type of "flags".
13104         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13105         of "flags".
13106         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13107         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13108         * extension.h (enum frame_filter_flag): Rename from
13109         frame_filter_flags.
13110         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13111         (apply_ext_lang_frame_filter): Change type of "flags".
13112         * extension.c (apply_ext_lang_frame_filter): Change type of
13113         "flags".
13114         * extension-priv.h (struct extension_language_ops)
13115         <apply_frame_filter>: Change type of "flags".
13116
13117 2018-02-26  Tom Tromey  <tom@tromey.com>
13118
13119         PR python/16497:
13120         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13121         off-by-one in py_end computation.
13122         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13123         PRINT_MORE_FRAMES.
13124         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13125         constant.
13126
13127 2018-02-26  Tom Tromey  <tom@tromey.com>
13128
13129         * dwarf2read.c (struct variant_field): New.
13130         (struct nextfield) <variant>: New field.
13131         (dwarf2_add_field): Handle DW_TAG_variant_part.
13132         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13133         discriminated union.
13134         (read_structure_type): Handle DW_TAG_variant_part.
13135         (handle_struct_member_die): New function, extracted from
13136         process_structure_scope.  Handle DW_TAG_variant.
13137         (process_structure_scope): Handle discriminated unions.  Call
13138         handle_struct_member_die.
13139
13140 2018-02-26  Tom Tromey  <tom@tromey.com>
13141
13142         * rust-lang.h (rust_last_path_segment): Declare.
13143         * rust-lang.c (rust_last_path_segment): Now public.  Change
13144         contract.
13145         (struct disr_info): Remove.
13146         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13147         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13148         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13149         (rust_enum_p, rust_enum_variant): New function.
13150         (rust_underscore_fields): Remove "offset" parameter.
13151         (rust_print_enum): New function.
13152         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13153         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13154         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13155         enums.
13156         (rust_internal_print_type): New function, from rust_print_type.
13157         Remove enum code.
13158         (rust_print_type): Call rust_internal_print_type.
13159         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13160         Update enum handling.
13161         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13162         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13163         (rust_union_quirks): New functions.
13164         (process_full_comp_unit, process_full_type_unit): Call
13165         rust_union_quirks.
13166         (process_structure_scope): Update rust_unions if necessary.
13167
13168 2018-02-26  Tom Tromey  <tom@tromey.com>
13169
13170         * value.h (value_union_variant): Declare.
13171         * valops.c (value_union_variant): New function.
13172         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13173         (struct discriminant_info): New.
13174         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13175         enumerator.
13176         (struct main_type) <flag_discriminated_union>: New field.
13177
13178 2018-02-26  Tom Tromey  <tom@tromey.com>
13179
13180         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13181         unittests/unpack-selftests.c.
13182         * unittests/unpack-selftests.c: New file.
13183         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13184
13185 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13186
13187         * dwarf2read.c (struct partial_die_info) <read>: New method.
13188         (read_partial_die): Remove the declaration.
13189         (load_partial_dies): Update.
13190         (partial_die_info::partial_die_info):
13191         (read_partial_die): Change it to partial_die_info::read.
13192
13193 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13194
13195         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13196         (fixup_partial_die): Remove declaration.
13197         (scan_partial_symbols): Update.
13198         (partial_die_parent_scope): Likewise.
13199         (partial_die_full_name): Likewise.
13200         (fixup_partial_die): Change it to partial_die_info::fixup.
13201
13202 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13203
13204         * dwarf2read.c (read_partial_die): Update the declaration.
13205         (load_partial_dies): Caller update.
13206         (read_partial_die): Remove one argument abbrev_len.
13207
13208 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13209
13210         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13211         assignment operator.
13212         (load_partial_dies): Use ctor and copy ctor.
13213         (read_partial_die): Update.
13214         (dwarf2_cu::find_partial_die): Use ctor.
13215
13216 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13217
13218         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13219         (find_partial_die_in_comp_unit): Change it to
13220         dwarf2_cu::find_partial_die.
13221         (find_partial_die): Update.
13222
13223 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13224
13225         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13226         is NULL.
13227
13228 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13229
13230         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13231
13232 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13233
13234         * arch/amd64.h: Use common/tdesc.h.
13235         * arch/i386.c: Likewise.
13236         * arch/i386.h: Likewise.
13237         * arch/tic6x.c: Likewise.
13238         * arch/tdesc.h: Move file from here...
13239         * common/tdesc.h: ...to here.
13240         * features/aarch64-core.c: Regenerate.
13241         * features/aarch64-fpu.c: Regenerate.
13242         * features/i386/32bit-avx.c: Regenerate.
13243         * features/i386/32bit-avx512.c: Regenerate.
13244         * features/i386/32bit-core.c: Regenerate.
13245         * features/i386/32bit-linux.c: Regenerate.
13246         * features/i386/32bit-mpx.c: Regenerate.
13247         * features/i386/32bit-pkeys.c: Regenerate.
13248         * features/i386/32bit-sse.c: Regenerate.
13249         * features/i386/64bit-avx.c: Regenerate.
13250         * features/i386/64bit-avx512.c: Regenerate.
13251         * features/i386/64bit-core.c: Regenerate.
13252         * features/i386/64bit-linux.c: Regenerate.
13253         * features/i386/64bit-mpx.c: Regenerate.
13254         * features/i386/64bit-pkeys.c: Regenerate.
13255         * features/i386/64bit-segments.c: Regenerate.
13256         * features/i386/64bit-sse.c: Regenerate.
13257         * features/i386/x32-core.c: Regenerate.
13258         * features/tic6x-c6xp.c: Regenerate.
13259         * features/tic6x-core.c: Regenerate.
13260         * features/tic6x-gp.c: Regenerate.
13261         * target-descriptions.c: Use common/tdesc.h.
13262         * target-descriptions.h: Likewise.
13263
13264 2018-02-24  Tom Tromey  <tom@tromey.com>
13265
13266         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13267         (try_thread_db_load_from_dir, thread_db_load_search): Use
13268         std::string.
13269         (info_auto_load_libthread_db_compare): Return bool.  Change
13270         argument types.
13271         (info_auto_load_libthread_db): Use std::vector, std::string.
13272         Remove cleanups.
13273
13274 2018-02-24  Tom Tromey  <tom@tromey.com>
13275
13276         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13277         std::string.
13278         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13279         std::string*.
13280         * gdbarch.c: Rebuild.
13281         * gdbarch.h: Rebuild.
13282         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13283         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13284         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13285         std::string*.
13286
13287 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13288
13289         * gdbtypes.h (sect_offset): Change type to uint64_t.
13290         (sect_offset_str): New function.
13291         * dwarf2read.c (create_addrmap_from_aranges): Use
13292         sect_offset_str.
13293         (error_check_comp_unit_head): Likewise.
13294         (create_debug_type_hash_table): Likewise.
13295         (read_cutu_die_from_dwo): Likewise.
13296         (init_cutu_and_read_dies): Likewise.
13297         (init_cutu_and_read_dies_no_follow): Likewise.
13298         (process_psymtab_comp_unit_reader): Likewise.
13299         (partial_die_parent_scope): Likewise.
13300         (peek_die_abbrev): Likewise.
13301         (process_queue): Likewise.
13302         (dwarf2_physname): Likewise.
13303         (read_namespace_alias): Likewise.
13304         (read_import_statement): Likewise.
13305         (create_dwo_cu_reader): Likewise.
13306         (create_cus_hash_table): Likewise.
13307         (lookup_dwo_cutu): Likewise.
13308         (inherit_abstract_dies): Likewise.
13309         (read_func_scope): Likewise.
13310         (read_call_site_scope): Likewise.
13311         (dwarf2_add_member_fn): Likewise.
13312         (read_common_block): Likewise.
13313         (read_module_type): Likewise.
13314         (read_typedef): Likewise.
13315         (read_subrange_type): Likewise.
13316         (load_partial_dies): Likewise.
13317         (read_partial_die): Likewise.
13318         (find_partial_die): Likewise.
13319         (read_str_index): Likewise.
13320         (dwarf2_string_attr): Likewise.
13321         (build_error_marker_type): Likewise.
13322         (lookup_die_type): Likewise.
13323         (dump_die_shallow): Likewise.
13324         (follow_die_ref): Likewise.
13325         (dwarf2_fetch_die_loc_sect_off): Likewise.
13326         (dwarf2_fetch_constant_bytes): Likewise.
13327         (follow_die_sig): Likewise.
13328         (get_signatured_type): Likewise.
13329         (get_DW_AT_signature_type): Likewise.
13330         (dwarf2_find_containing_comp_unit): Likewise.
13331         (set_die_type): Likewise.
13332
13333 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13334
13335         * arch/aarch64.c: Include "common-defs.h".
13336         * arch/amd64.c: Likewise.
13337         * arch/i386.c: Likewise.
13338
13339 2018-02-21  Tom Tromey  <tom@tromey.com>
13340
13341         * value.h: (extract_field_op): Update.
13342         * eval.c (extract_field_op): Return a const char *.
13343         * expression.h (parse_expression_for_completion): Update.
13344         * completer.c (complete_expression): Update.
13345         (add_struct_fields): Make fieldname const.
13346         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13347         (mark_completion_tag, parse_exp_in_context_1): Update.
13348         (parse_expression_for_completion): Change "name" to
13349         unique_xmalloc_ptr*.
13350
13351 2018-02-21  Tom Tromey  <tom@tromey.com>
13352
13353         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13354
13355 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13356
13357         * avr-tdep.c (avr_read_pc): Change parameter type to
13358         readable_regcache.
13359         * gdbarch.sh (read_pc): Likewise.
13360         * gdbarch.c: Re-generated.
13361         * gdbarch.h: Re-generated.
13362         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13363         readable_regcache.
13364         * ia64-tdep.c (ia64_read_pc): Likewise.
13365         * mips-tdep.c (mips_read_pc): Likewise.
13366         * spu-tdep.c (spu_read_pc): Likewise.
13367
13368 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13369
13370         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13371         * regcache-dump.c: New file.
13372         * regcache.c: Move register_dump to regcache-dump.c.
13373         (maintenance_print_registers): Likewise.
13374         (maintenance_print_raw_registers): Likewise.
13375         (maintenance_print_cooked_registers): Likewise.
13376         (maintenance_print_register_groups): Likewise.
13377         (maintenance_print_remote_registers): Likewise.
13378         (_initialize_regcache): Likewise.
13379         * regcache.h (register_dump): Moved from regcache.c.
13380
13381 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13382
13383         * regcache.c (regcache::regcache): Update.
13384         (regcache::invalidate): Move it to detached_regcache::invalidate.
13385         (get_thread_arch_aspace_regcache): Update.
13386         (regcache::raw_update): Update.
13387         (regcache::cooked_read): Remove some code.
13388         (regcache::cooked_read_value): Likewise.
13389         (regcache::raw_write): Remove assert on m_readonly_p.
13390         (regcache::raw_supply_integer): Move it to
13391         detached_regcache::raw_supply_integer.
13392         (regcache::raw_supply_zeroed): Likewise.
13393         * regcache.h (detached_regcache) <raw_supply_integer>: New
13394         declaration.
13395         <raw_supply_zeroed, invalidate>: Likewise.
13396         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13397         <invalidate>: Likewise.
13398         <m_readonly_p>: Removed.
13399
13400 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13401
13402         * infcmd.c (get_return_value): Let stop_regs point to
13403         get_current_regcache.
13404         * regcache.c (regcache::regcache): Remove.
13405         (register_dump_reg_buffer): New class.
13406         (regcache_print): Adjust.
13407         * regcache.h (regcache): Remove constructors.
13408
13409 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13410
13411         * regcache.c (class register_dump): New class.
13412         (register_dump_regcache, register_dump_none): New class.
13413         (register_dump_remote, register_dump_groups): New class.
13414         (regcache_print): Update.
13415         * regcache.h (regcache_dump_what): Move it to regcache.c.
13416         (regcache) <dump>: Remove.
13417
13418 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13419
13420         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13421          reg_buffer_rw *.
13422         (jit_unwind_reg_set_impl): Call raw_supply.
13423         (jit_frame_sniffer): Use reg_buffer_rw.
13424         * record-full.c (record_full_core_regbuf): Change its type.
13425         (record_full_core_open_1): Use reg_buffer_rw.
13426         (record_full_close): Likewise.
13427         (record_full_core_fetch_registers): Use regcache->raw_supply.
13428         (record_full_core_store_registers): Likewise.
13429         * regcache.c (regcache::get_register_status): Move it to
13430         reg_buffer.
13431         (regcache_raw_set_cached_value): Remove.
13432         (regcache::raw_set_cached_value): Remove.
13433         (regcache::raw_write): Call raw_supply.
13434         (regcache::raw_supply): Move it to reg_buffer_rw.
13435         * regcache.h (regcache_raw_set_cached_value): Remove.
13436         (reg_buffer_rw): New class.
13437
13438 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13439
13440         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13441         readonly_detached_regcache.
13442         (dummy_frame_prev_register): Use regcache->cooked_read.
13443         * frame.c (frame_save_as_regcache): Change return type.
13444         (frame_pop): Update.
13445         * frame.h (frame_save_as_regcache): Update declaration.
13446         * inferior.h (get_infcall_suspend_state_regcache): Update
13447         declaration.
13448         * infrun.c (infcall_suspend_state) <registers>: use
13449         readonly_detached_regcache.
13450         (save_infcall_suspend_state): Don't use regcache_dup.
13451         (get_infcall_suspend_state_regcache): Change return type.
13452         * linux-fork.c (struct fork_info) <savedregs>: Change to
13453         readonly_detached_regcache.
13454         <pc>: New field.
13455         (fork_save_infrun_state): Don't use regcache_dup.
13456         (info_checkpoints_command): Adjust.
13457         * mi/mi-main.c (register_changed_p): Update declaration.
13458         (mi_cmd_data_list_changed_registers): Use
13459         readonly_detached_regcache.
13460         (register_changed_p): Change parameter type to
13461         readonly_detached_regcache.
13462         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13463         readonly_detached_regcache.
13464         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13465         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13466         New.
13467         (regcache::save): Move it to reg_buffer.
13468         (regcache::restore): Change parameter type.
13469         (regcache_dup): Remove.
13470         * regcache.h (reg_buffer) <save>: New method.
13471         (readonly_detached_regcache): New class.
13472         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13473         readonly_detached_regcache.
13474         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13475
13476 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13477
13478         * frame.c (frame_save_as_regcache): Use regcache method save.
13479         (frame_pop): Use regcache method restore.
13480         * infrun.c (restore_infcall_suspend_state): Likewise.
13481         * linux-fork.c (fork_load_infrun_state): Likewise.
13482         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13483         save.
13484         * regcache.c (regcache_save): Remove.
13485         (regcache::restore): More asserts.
13486         (regcache_cpy): Remove.
13487         * regcache.h (regcache_save): Remove the declaration.
13488         (regcache::restore): Move from private to public.
13489         Remove the friend declaration of regcache_cpy.
13490         (regcache_cpy): Remove declaration.
13491
13492 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13493
13494         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13495         parameter type to 'readable_regcache *'.
13496         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13497         * arm-tdep.c (arm_neon_quad_read): Likewise.
13498         (arm_pseudo_read): Likewise.
13499         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13500         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13501         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13502         * gdbarch.c: Re-generated.
13503         * gdbarch.h: Re-generated.
13504         * gdbarch.sh (pseudo_register_read): Change parameter type to
13505         'readable_regcache *'.
13506         (pseudo_register_read_value): Likewise.
13507         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13508         (h8300_pseudo_register_read): Likewise.
13509         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13510         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13511         (i386_pseudo_register_read_into_value): Likewise.
13512         (i386_pseudo_register_read_value): Likewise.
13513         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13514         declaration.
13515         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13516         * m32c-tdep.c (m32c_raw_read): Likewise.
13517         (m32c_read_flg): Likewise.
13518         (m32c_banked_register): Likewise.
13519         (m32c_banked_read): Likewise.
13520         (m32c_sb_read): Likewise.
13521         (m32c_part_read): Likewise.
13522         (m32c_cat_read): Likewise.
13523         (m32c_r3r2r1r0_read): Likewise.
13524         (m32c_pseudo_register_read): Likewise.
13525         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13526         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13527         (mep_pseudo_cr64_read): Likewise.
13528         (mep_pseudo_register_read): Likewise.
13529         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13530         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13531         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13532         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13533         (regcache::cooked_read): Likewise.
13534         (regcache::cooked_read_value): Likewise.
13535         (regcache_cooked_read_signed):
13536         (regcache::cooked_read): Likewise.
13537         * regcache.h (readable_regcache): New class.
13538         (regcache): Inherit readable_regcache.  Move some methods to
13539         readable_regcache.
13540         * rl78-tdep.c (rl78_pseudo_register_read): Change
13541         parameter type to 'readable_regcache *'.
13542         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13543         (e500_pseudo_register_read): Change parameter type to
13544         'readable_regcache *'.
13545         (dfp_pseudo_register_read): Likewise.
13546         (vsx_pseudo_register_read): Likewise.
13547         (efpr_pseudo_register_read): Likewise.
13548         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13549         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13550         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13551         (sh64_pseudo_register_read): Likewise.
13552         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13553         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13554         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13555         (spu_pseudo_register_read): Likewise.
13556         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13557         (xtensa_pseudo_register_read): Likewise.
13558
13559 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13560
13561         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13562         (regcache::arch): Move it to reg_buffer::arch.
13563         (regcache::register_buffer): Likewise.
13564         (regcache::assert_regnum): Likewise.
13565         (regcache::num_raw_registers): Likewise.
13566         * regcache.h (reg_buffer): New class.
13567         (regcache): Inherit reg_buffer.
13568
13569 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13570
13571         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13572         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13573
13574 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13575
13576         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13577
13578 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13579
13580         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13581         (SFILES): Remove common/*.c files.
13582         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13583         * common/common.host: Add common reference.
13584         * configure.ac: Likewise.
13585         * configure: Regenerate.
13586
13587 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13588
13589         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13590         (block_initialize_namespace): Use new.
13591         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13592         (dwarf2_free_objfile): Use delete.
13593         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13594         (copy_type_recursive): Use new.
13595         * gdb_obstack.h (allocate_on_obstack): New.
13596
13597 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13598
13599         PR gdb/22849
13600         * inferior.c (exit_inferior_1): Reset inf->control.
13601
13602 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13603
13604         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13605         declaration.
13606
13607 2018-02-14  Pedro Alves  <palves@redhat.com>
13608
13609         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13610         frame_cleanup_after_sniffer on exception.
13611
13612 2018-02-14  Tom Tromey  <tom@tromey.com>
13613
13614         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13615         const.
13616         (solib_bfd_open): Make pathname const.
13617         * solib.c (solib_bfd_open): Make pathname const.
13618         * solib-spu.c (spu_bfd_fopen): Make name const.
13619         (spu_bfd_open): Make pathname const.
13620         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13621         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13622
13623 2018-02-14  Tom Tromey  <tom@tromey.com>
13624
13625         * symfile.c (symfile_bfd_open): Update.
13626         * source.h (openp, source_full_path_of, find_and_open_source):
13627         Change argument type to unique_xmalloc_ptr.
13628         * source.c (openp): Take a unique_xmalloc_ptr.
13629         (source_full_path_of, find_and_open_source): Likewise.
13630         (open_source_file, symtab_to_fullname): Update.
13631         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13632         unique_xmalloc_ptr.
13633         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13634         (exec_file_find): Update.
13635         * psymtab.c (psymtab_to_fullname): Update.
13636         * nto-tdep.h (nto_find_and_open_solib): Update.
13637         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13638         unique_xmalloc_ptr.
13639         * exec.c (exec_file_attach): Update.
13640         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13641         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13642
13643 2018-02-14  Tom Tromey  <tom@tromey.com>
13644
13645         * solib.c: Include source.h.
13646         * nto-tdep.c: Include source.h.
13647         * mi/mi-cmd-env.c: Include source.h.
13648         * infcmd.c: Include source.h.
13649         * exec.c: Include source.h.
13650         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13651         (add_path, directory_switch, source_path, init_source_path): Move
13652         declarations...
13653         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13654         (add_path, directory_switch, source_path, init_source_path):
13655         ...here.
13656
13657 2018-02-14  Tom Tromey  <tom@tromey.com>
13658
13659         * solist.h (exec_file_find, solib_find): Return
13660         unique_xmalloc_ptr.
13661         (solib_bfd_fopen): Take a const char *.
13662         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13663         (exec_file_find, solib_find): Likewise.
13664         (solib_bfd_fopen): Do not take ownership of "pathname".
13665         (solib_bfd_open): Use unique_xmalloc_ptr.
13666         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13667         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13668         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13669         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13670
13671 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13672
13673         * ada-lang.c (name_match_type_from_name): Remove reference to
13674         ada_name_for_lookup in function's documentation.
13675         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13676
13677 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13678
13679         * defs.h (enum openp_flags): New enum.
13680         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13681         Move to enum openp_flags.
13682         (openp_flags): New enum flags.
13683         (openp): Change parameter type to openp_flags.
13684         * source.c (openp): Change parameter type to openp_flags.
13685         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13686         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13687
13688 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13689
13690         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13691         per-command.
13692
13693 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13694
13695         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13696         into...
13697         (class dwarf2_queue_guard): ...the destructor of this new class.
13698         (dw2_do_instantiate_symtab): Create instance of the new class
13699         dwarf2_queue_guard, remove cleanup.
13700
13701 2018-02-09  Tom Tromey  <tom@tromey.com>
13702
13703         * source.c (find_source_lines): Don't reference past the end of
13704         the vector.
13705
13706 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13707
13708         * remote.c (remote_btrace_maybe_reopen): Change error message.
13709         * btrace.c (btrace_enable): Likewise.
13710         (parse_xml_btrace): Likewise.
13711         (parse_xml_btrace_conf): Likewise.
13712
13713 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13714
13715         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13716         (linux_enable_pt, linux_enable_bts): Call
13717         diagnose_perf_event_open_fail.
13718
13719 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13720
13721         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13722         Remove parameter and change return type.  Update callers.  Move it.
13723         (linux_enable_bts, linux_enable_pt): Improve error message.
13724         (linux_enable_pt): Remove zero buffer size check.
13725         (linux_enable_btrace): Improve error messages.  Remove NULL return
13726         check.
13727
13728 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13729
13730         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13731         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13732         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13733         (linux_supports_pt, linux_supports_btrace): Remove.
13734         (linux_enable_bts): Call cpu_supports_bts.
13735         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13736         * remote.c (remote_supports_btrace): Remove.
13737         (init_remote_ops): Remove remote_supports_btrace.
13738         * target-delegates.c: Regenerated.
13739         * target.c (target_supports_btrace): Remove.
13740         * target.h (target_ops) <to_supports_btrace>: Remove
13741         (target_supports_btrace): Remove.
13742         * x86-linux-nat.c (x86_linux_create_target): Remove
13743         linux_supports_btrace.
13744
13745 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13746
13747         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13748         btrace failed.
13749         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13750         exception and use message in own exception.
13751
13752 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13753
13754         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13755         (perf_event_pt_event_type): Use gdb_file_up.
13756         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13757         scoped_fd, and scoped_mmap.
13758
13759 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13760
13761         * common/scoped_mmap.h: New.
13762         * unittests/scoped_mmap-selftest.c: New.
13763         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13764         unittests/scoped_mmap-selftest.c.
13765
13766 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13767
13768         * common/scoped_fd.h: New.
13769         * unittests/scoped_fd-selftest.c: New.
13770         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13771         unittests/scoped_fd-selftest.c.
13772
13773 2018-02-09  Tom Tromey  <tom@tromey.com>
13774
13775         * auto-load.c (auto_load_section_scripts): Use
13776         gdb::unique_xmalloc_ptr.
13777
13778 2018-02-09  Tom Tromey  <tom@tromey.com>
13779
13780         * auto-load.c (execute_script_contents): Use std::string.
13781
13782 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13783
13784         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13785         Python function, rather than a new command.
13786
13787 2018-02-08  Tom Tromey  <tom@tromey.com>
13788
13789         * solib.c (solib_find_1): Use std::string.
13790         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13791
13792 2018-02-08  Tom Tromey  <tom@tromey.com>
13793
13794         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13795
13796 2018-02-08  Tom Tromey  <tom@tromey.com>
13797
13798         * source.c (find_source_lines): Use gdb::def_vector.
13799
13800 2018-02-08  Tom Tromey  <tom@tromey.com>
13801
13802         * macrocmd.c (struct temporary_macro_definition): New.
13803         (macro_define_command): Use temporary_macro_definition.  Remove
13804         cleanups.
13805         (free_macro_definition_ptr): Remove.
13806
13807 2018-02-08  Tom Tromey  <tom@tromey.com>
13808
13809         * macroexp.c (maybe_expand): Use std::string.
13810
13811 2018-02-08  Tom Tromey  <tom@tromey.com>
13812
13813         * macroexp.c (struct macro_buffer): Add initializers for some
13814         members.
13815         (init_buffer, init_shared_buffer, free_buffer)
13816         (free_buffer_return_text): Remove.
13817         (macro_buffer): New constructors.
13818         (~macro_buffer): New destructor.
13819         (macro_buffer::set_shared): New method.
13820         (macro_buffer::resize_buffer, macro_buffer::appendc)
13821         (macro_buffer::appendmem): Now methods, not free functions.
13822         (set_token, append_tokens_without_splicing, stringify)
13823         (macro_stringify): Update.
13824         (gather_arguments): Change return type.  Remove argc_p argument,
13825         add args_ptr argument.  Use std::vector.
13826         (substitute_args): Remove argc argument.  Accept std::vector.
13827         (expand): Update.  Use std::vector.
13828         (scan, macro_expand, macro_expand_next): Update.
13829
13830 2018-02-08  Tom Tromey  <tom@tromey.com>
13831
13832         * symtab.c (default_collect_symbol_completion_matches_break_on):
13833         Use unique_xmalloc_ptr.
13834         * macroscope.h: (sal_macro_scope, user_macro_scope)
13835         (default_macro_scope): Return unique_xmalloc_ptr.
13836         * macroscope.c (sal_macro_scope, user_macro_scope)
13837         (default_macro_scope): Return unique_xmalloc_ptr.
13838         * macroexp.h (macro_expand, macro_expand_once): Return
13839         unique_xmalloc_ptr.
13840         * macroexp.c (macro_expand, macro_expand_once): Return
13841         unique_xmalloc_ptr.
13842         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13843         (info_macro_command, info_macros_command): Use
13844         unique_xmalloc_ptr.
13845         * compile/compile-c-support.c (write_macro_definitions): Use
13846         unique_xmalloc_ptr.
13847         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13848
13849 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13850
13851         * value.c (value_static_field): Assign field type instead of
13852         containing type when returning an optimized out value.
13853
13854 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13855
13856         * ft32-tdep.c (ft32_read_pc): Remove.
13857         (ft32_write_pc): Remove.
13858         (ft32_gdbarch_init): Update.
13859         * m32r-tdep.c (m32r_read_pc): Remove.
13860         (m32r_gdbarch_init): Update.
13861         * mep-tdep.c (mep_read_pc): Remove.
13862         (mep_gdbarch_init): Update.
13863         * microblaze-tdep.c (microblaze_write_pc): Remove.
13864         (microblaze_gdbarch_init): Update.
13865         * mn10300-tdep.c (mn10300_read_pc): Remove.
13866         (mn10300_write_pc): Remove.
13867         (mn10300_gdbarch_init): Update.
13868         * moxie-tdep.c (moxie_read_pc): Remove.
13869         (moxie_write_pc): Remove.
13870         (moxie_gdbarch_init): Update.
13871
13872 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13873
13874         * expprint.c (print_subexp_standard): Handle
13875         OP_F77_UNDETERMINED_ARGLIST.
13876         (dump_subexp_body_standard): Likewise.
13877
13878 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13879
13880         * target-descriptions.c (tdesc_element_visitor) Add empty
13881         implementations.
13882         (tdesc_type): Move make_gdb_type from here.
13883         (tdesc_type_builtin): Likewise.
13884         (tdesc_type_vector): Likewise.
13885         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13886         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13887         (make_gdb_type_union): Likewise.
13888         (make_gdb_type_flags): Likewise.
13889         (make_gdb_type_enum): Likewise.
13890         (make_gdb_type): New function.
13891         (tdesc_register_type): Use static make_gdb_type.
13892
13893 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13894
13895         * infcmd.c (default_print_one_register_info): Align natural-format
13896         column values consistently one under another.
13897         (pad_to_column): New function.
13898
13899 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13900
13901         * dwarf2read.c (dwarf2_physname): Move commment.
13902
13903 2018-02-01  Leszek Swirski  <leszeks@google.com>
13904
13905         * varobj.c (varobj_formatted_print_options): Allow recursive
13906         pretty printing if pretty printing is enabled.
13907
13908 2018-02-01  Leszek Swirski  <leszeks@google.com>
13909
13910         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13911         names after a structop as a filename.
13912
13913 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13914
13915         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13916         (arm_record_coproc_data_proc): Likewise.
13917
13918 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13919
13920         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13921
13922 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13923
13924         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13925         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13926
13927 2018-01-31  Pedro Alves  <palves@redhat.com>
13928
13929         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13930         * inflow.c (child_terminal_save_inferior): Wrap reference to
13931         tcgetpgrp in HAVE_TERMIOS_H.
13932         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13933         _WIN32.
13934         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13935         always iterate over all inferiors.
13936         (gdbsim_cntrl_c): Adjust.
13937         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13938
13939 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13940
13941         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13942         index type is objfile-owned if the element type is as well.
13943
13944 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13945
13946         GDB 8.1 released.
13947
13948 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13949
13950         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13951         "features/s390x-linux64.c".
13952         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13953         s390_linux32 and s390x_linux64.
13954         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13955         default tdesc.
13956         * s390-tdep.c: Include "features/s390-linux32.c" and
13957         "features/s390x-linux64.c".
13958         (s390_tdesc_valid): Add check for tdesc_has_registers.
13959         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13960         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13961         tdesc_s390x_linux64.
13962         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13963         tdesc_s390x_linux64 to...
13964         * s390-tdep.h: ...here.
13965
13966 2018-01-30  Pedro Alves  <palves@redhat.com>
13967
13968         PR gdb/13211
13969         * config.in, configure: Regenerate.
13970         * configure.ac: Check for getpgid.
13971         * go32-nat.c (go32_pass_ctrlc): New.
13972         (go32_target): Install it.
13973         * inf-child.c (inf_child_target): Install
13974         child_terminal_save_inferior, child_pass_ctrlc and
13975         child_interrupt.
13976         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13977         (inf_ptrace_target): No longer install it.
13978         * infcmd.c (interrupt_target_1): Adjust.
13979         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13980         (child_interrupt): Declare.
13981         (inferior::terminal_state): New.
13982         * inflow.c (struct terminal_info): Update comments.
13983         (inferior_process_group): Delete.
13984         (terminal_is_ours): Delete.
13985         (gdb_tty_state): New.
13986         (child_terminal_init): Adjust.
13987         (is_gdb_terminal, sharing_input_terminal_1)
13988         (sharing_input_terminal): New functions.
13989         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13990         Set the process's actual process group in the foreground if
13991         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13992         mark terminal as the inferior's if not sharing GDB's terminal.
13993         Don't check attach_flag.
13994         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13995         pass down a target_terminal_state.
13996         (child_terminal_save_inferior): New, factored out from ...
13997         (child_terminal_ours_1): ... this.  Handle
13998         target_terminal_state::is_ours_for_output.
13999         (child_interrupt, child_pass_ctrlc): New.
14000         (inflow_inferior_exit): Clear the inferior's terminal_state.
14001         (copy_terminal_info): Copy the inferior's terminal state.
14002         (_initialize_inflow): Remove reference to terminal_is_ours.
14003         * inflow.h (inferior_process_group): Delete.
14004         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14005         * procfs.c (procfs_target): Don't install procfs_interrupt.
14006         (procfs_interrupt): Delete.
14007         * remote.c (remote_serial_quit_handler): Adjust.
14008         (remote_interrupt): Remove ptid parameter.  Adjust.
14009         * target-delegates.c: Regenerate.
14010         * target.c: Include "terminal.h".
14011         (target_terminal::terminal_state): Rename to ...
14012         (target_terminal::m_terminal_state): ... this.
14013         (target_terminal::init): Adjust.
14014         (target_terminal::inferior): Adjust to per-inferior
14015         terminal_state.
14016         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14017         (target_terminal::ours, target_terminal::ours_for_output): Use
14018         target_terminal_is_ours_kind.
14019         (target_interrupt): Remove ptid parameter.  Adjust.
14020         (default_target_pass_ctrlc): Adjust.
14021         * target.h (target_ops::to_terminal_save_inferior): New field.
14022         (target_ops::to_interrupt): Remove ptid_t parameter.
14023         (target_interrupt): Remove ptid_t parameter.  Update comment.
14024         (target_pass_ctrlc): Update comment.
14025         * target/target.h (target_terminal_state): New scoped enum,
14026         factored out of ...
14027         (target_terminal::terminal_state): ... here.
14028         (target_terminal::inferior): Update comments.
14029         (target_terminal::restore_inferior): New.
14030         (target_terminal::is_inferior, target_terminal::is_ours)
14031         (target_terminal::is_ours_for_output): Adjust.
14032         (target_terminal::scoped_restore_terminal_state): Adjust to
14033         rename, and call restore_inferior() instead of inferior().
14034         (target_terminal::scoped_restore_terminal_state::m_state): Change
14035         type.
14036         (target_terminal::terminal_state): Rename to ...
14037         (target_terminal::m_terminal_state): ... this and change type.
14038
14039 2018-01-30  Pedro Alves  <palves@redhat.com>
14040
14041         * linux-nat.c (wait_for_signal): New function.
14042         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14043         directly.
14044         (async_terminal_is_ours)
14045         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14046         (linux_nat_add_target): Don't override
14047         to_terminal_inferior/to_terminal_ours.
14048
14049 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14050
14051         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14052
14053 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14054
14055         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14056         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14057         dwarf2_per_objfile_free here.
14058         (dwarf2_per_objfile_free): Remove.
14059         (_initialize_dwarf2_read): Don't register
14060         dwarf2_per_objfile_free as a registry cleanup.
14061
14062 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14063
14064         Avoid compilation errors in MinGW native builds
14065
14066         The error is triggered by including python-internal.h, and the
14067         error message is:
14068
14069              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14070                       from build-gnulib/import/math.h:27,
14071                       from d:/usr/Python26/include/pyport.h:235,
14072                       from d:/usr/Python26/include/Python.h:58,
14073                       from python/python-internal.h:94,
14074                       from python/py-arch.c:24:
14075              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14076         using ::hypot;
14077                 ^~~~~
14078
14079         This happens because Python headers define 'hypot' to expand t
14080         '_hypot' in the Windows builds.
14081         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14082         'hypoth'.  This avoids a compilation error.
14083
14084 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14085
14086         * MAINTAINERS (Write After Approval): Fix ordering.
14087
14088 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14089
14090         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14091
14092 2018-01-26  Alan Modra  <amodra@gmail.com>
14093
14094         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14095         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14096         Remove nop.  Make const.  Comment.
14097         (powerpc32_plt_stub_so_2): New.
14098         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14099         Correct count.  Update uses.
14100         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14101         Move common code reading PLT entry word.  Correct
14102         powerpc32_plt_stub PLT address calculation.
14103         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14104         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14105         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14106         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14107         (ppc64_standard_linkage8): Likewise.
14108         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14109         Correct insns description.
14110         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14111
14112 2018-01-24  Pedro Alves  <palves@redhat.com>
14113
14114         GCC PR libstdc++/83906
14115         * gdbtypes.c (operator==(const dynamic_prop &,
14116         const dynamic_prop &)): New.
14117         (operator==(const range_bounds &, const range_bounds &)): New.
14118         (check_types_equal): Use them instead of memcmp.
14119         * gdbtypes.h (operator==(const dynamic_prop &,
14120         const dynamic_prop &)): Declare.
14121         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14122         (operator==(const range_bounds &, const range_bounds &)): Declare.
14123         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14124
14125 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14126
14127         * s390-linux-tdep.c (s390_record_address_mask)
14128         (s390_record_calc_disp_common, s390_record_calc_disp)
14129         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14130         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14131         (s390_process_record): Move to s390-tdep.c.
14132         (s390_linux_init_abi_any): Adjust.
14133         * s390-tdep.c (s390_record_address_mask)
14134         (s390_record_calc_disp_common, s390_record_calc_disp)
14135         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14136         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14137         (s390_process_record): Moved from s390-linux-tdep.c
14138         (s390_gdbarch_init): Adjust.
14139
14140 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14141
14142         * s390-linux-nat.c (s390-tdep.h): New include.
14143         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14144         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14145         (ALLDEPFILES): Add s390-tdep.c.
14146         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14147         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14148         * s390-tdep.h: ...this.  New file.
14149         * s390-linux-tdep.c (s390-tdep.h): New include.
14150         (_initialize_s390_tdep): Rename to...
14151         (_initialize_s390_linux_tdep): ...this and adjust.
14152         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14153         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14154         s390-tdep.h.
14155         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14156         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14157         (s390_is_partial_instruction, s390_software_single_step)
14158         (is_non_branch_ril, s390_displaced_step_copy_insn)
14159         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14160         (s390_prologue_data, s390_addr, s390_store, s390_load)
14161         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14162         (s390_register_call_saved, s390_guess_tracepoint_registers)
14163         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14164         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14165         (s390_pseudo_register_name, s390_pseudo_register_type)
14166         (s390_pseudo_register_read, s390_pseudo_register_write)
14167         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14168         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14169         (s390_addr_bits_remove, s390_address_class_type_flags)
14170         (s390_address_class_type_flags_to_name)
14171         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14172         (s390_function_arg_float, s390_function_arg_vector)
14173         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14174         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14175         (s390_frame_align, s390_register_return_value, s390_return_value)
14176         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14177         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14178         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14179         (s390_trad_frame_prev_register, s390_unwind_cache)
14180         (s390_prologue_frame_unwind_cache)
14181         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14182         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14183         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14184         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14185         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14186         (s390_frame_base_address, s390_local_base_address)
14187         (s390_frame_base, s390_gcc_target_options)
14188         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14189         (s390_validate_reg_range, s390_tdesc_valid)
14190         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14191         * s390-tdep.c: ...this.  New file.
14192
14193 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14194
14195         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14196         (s390_process_record, s390_gdbarch_tdep_alloc)
14197         (s390_linux_init_abi_any): Use/set new hook.
14198
14199 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14200
14201         * s390-linux-tdep.c (osabi.h): New include.
14202         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14203         (s390_linux_init_abi_any): New functions.
14204         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14205
14206 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14207
14208         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14209         tdesc_has_registers check
14210
14211 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14212
14213         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14214         (s390_validate_reg_range): New macro.
14215         (s390_gdbarch_init): Adjust.
14216
14217 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14218
14219         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14220         (s390_gdbarch_tdep_alloc): Adjust.
14221         (s390_gdbarch_init): Adjust.
14222
14223 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14224
14225         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14226         <have_tdb>: Change type to bool.
14227         (s390_gdbarch_tdep_alloc): Adjust.
14228         (s390_gdbarch_init): Adjust.
14229
14230 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14231
14232         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14233         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14234         (s390_gdbarch_tdep_alloc): New function.
14235         (s390_gdbarch_init): Allocate tdep at start and use its fields
14236         instead of separate variables.
14237
14238 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14239
14240         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14241         when looking for cached gdbarch and add comment for remaining.
14242
14243 2018-01-22  Pedro Alves  <palves@redhat.com>
14244             Sergio Durigan Junior  <sergiodj@redhat.com>
14245
14246         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14247         case.
14248
14249 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14250
14251         * MAINTAINERS: Update my company e-mail address.
14252
14253 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14254
14255         * regcache.c (cooked_write_test): New function.
14256         (_initialize_regcache): Register the test.
14257
14258 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14259
14260         * ia64-tdep.c (ia64_pseudo_register_read): Call
14261         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14262         * m32c-tdep.c (m32c_cat_read): Likewise.
14263         (m32c_r3r2r1r0_read): Likewise.
14264         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14265         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14266
14267 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14268
14269         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14270         method raw_read instead of regcache_raw_read.
14271         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14272         * arm-tdep.c (arm_neon_quad_read): Likewise.
14273         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14274         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14275         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14276         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14277         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14278         (i386_pseudo_register_read_into_value): Likewise.
14279         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14280         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14281         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14282         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14283         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14284         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14285         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14286         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14287         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14288
14289 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14290
14291         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14292         * configure.tgt: Remove target mt.
14293         * mt-tdep.c: Remove.
14294         * regcache.c (cooked_read_test): Remove the check for mt.
14295
14296 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14297
14298         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14299         instead of gdbarch_pseudo_register_read_value.
14300
14301 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14302
14303         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14304         language is Ada.
14305
14306 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14307
14308         * linespec.c (create_sals_line_offset): Remove code that preserved
14309         the symtab_and_line's line number.
14310
14311 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14312
14313         * varobj.c (varobj_create): Don't set valid_block when creating a
14314         floating varobj.
14315
14316 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14317
14318         * varobj.c (varobj_create): Remove out of date comment.
14319
14320 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14321
14322         PR mi/20395
14323         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14324         updating innermost block.
14325         * parse.c (innermost_block_tracker::update): Take extra type
14326         parameter, and check types match before updating innermost block.
14327         (write_dollar_variable): Update innermost block for registers.
14328         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14329         (innermost_block_tracker::innermost_block_tracker): Initialise
14330         m_types member.
14331         (innermost_block_tracker::reset): Take type parameter.
14332         (innermost_block_tracker::update): Take type parameter, and pass
14333         type through as needed.
14334         (innermost_block_tracker::m_types): New member.
14335         * varobj.c (varobj_create): Pass type when reseting innermost
14336         block.
14337
14338 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14339
14340         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14341         * ada-lang.c (resolve_subexp): Likewise.
14342         * breakpoint.c (set_breakpoint_condition) Likewise.
14343         (watch_command_1) Likewise.
14344         * c-exp.y (variable): Likewise.
14345         * d-exp.y (PrimaryExpression): Likewise.
14346         * f-exp.y (variable): Likewise.
14347         * go-exp.y (variable): Likewise.
14348         * m2-exp.y (variable): Likewise.
14349         * objfiles.c (objfile::~objfile): Likewise.
14350         * p-exp.y (variable): Likewise.
14351         * parse.c (innermost_block): Change type.
14352         * parser-defs.h (class innermost_block_tracker): New.
14353         (innermost_block): Change to innermost_block_tracker.
14354         * printcmd.c (display_command): Switch to innermost_block API.
14355         (do_one_display): Likewise.
14356         * rust-exp.y (do_one_display): Likewise.
14357         * symfile.c (clear_symtab_users): Likewise.
14358         * varobj.c (varobj_create): Switch to innermost_block API, replace
14359         use of innermost_block with block stored on varobj object.
14360
14361 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14362
14363         * expression.h (innermost_block): Remove declaration.
14364         * varobj.c: Add 'parser-defs.h' include.
14365
14366 2018-01-19  Tom Tromey  <tom@tromey.com>
14367
14368         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14369         symbols in the static and global blocks.
14370
14371 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14372
14373         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14374         gdb_ptrace.h, and move including gdb_wait.h ...
14375         * nat/linux-ptrace.h: ... to here.
14376
14377 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14378
14379         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14380         inf_ptrace_detach_success.
14381         (inf_ptrace_detach_success): Add inferior parameter, use it
14382         instead of inferior_ptid, pass it to detach_inferior.
14383         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14384         parameter.
14385         * inferior.c (detach_inferior): Add overload that takes an
14386         inferior object.
14387         * inferior.h (detach_inferior): Likewise.
14388         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14389         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14390         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14391
14392 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14393
14394         * target.h (struct target_ops) <to_detach>: Add inferior
14395         parameter.
14396         (target_detach): Likewise.
14397         * target.c (dispose_inferior): Pass inferior down.
14398         (target_detach): Pass inferior down.  Assert that it is equal to
14399         the current inferior.
14400         * aix-thread.c (aix_thread_detach): Pass inferior down.
14401         * corefile.c (core_file_command): Pass current_inferior() down.
14402         * corelow.c (core_detach): Add inferior parameter.
14403         * darwin-nat.c (darwin_detach): Likewise.
14404         * gnu-nat.c (gnu_detach): Likewise.
14405         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14406         * infcmd.c (detach_command): Pass current_inferior() down to
14407         target_detach.
14408         * infrun.c (follow_fork_inferior): Pass parent_inf to
14409         target_detach.
14410         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14411         target_detach.
14412         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14413         * linux-thread-db.c (thread_db_detach): Likewise.
14414         * nto-procfs.c (procfs_detach): Likewise.
14415         * procfs.c (procfs_detach): Likewise.
14416         * record.c (record_detach): Likewise.
14417         * record.h (struct inferior): Forward-declare.
14418         (record_detach): Add inferior parameter.
14419         * remote-sim.c (gdbsim_detach): Likewise.
14420         * remote.c (remote_detach_1): Likewise.
14421         (remote_detach): Likewise.
14422         (extended_remote_detach): Likewise.
14423         * sol-thread.c (sol_thread_detach): Likewise.
14424         * target-debug.h (target_debug_print_inferior_p): New macro.
14425         * target-delegates.c: Re-generate.
14426         * top.c (kill_or_detach): Pass inferior down to target_detach.
14427         * windows-nat.c (windows_detach): Add inferior parameter.
14428
14429 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14430
14431         * target.h (struct target_ops) <to_detach>: Remove args
14432         parameter.
14433         (target_detach): Likewise.
14434         * target.c (dispose_inferior): Adjust.
14435         (target_detach): Remove args parameter, adjust.
14436         * aix-thread.c (aix_thread_detach): Adjust.
14437         * corefile.c (core_file_command): Adjust.
14438         * corelow.c (core_detach): Adjust.
14439         * darwin-nat.c (darwin_detach): Adjust.
14440         * gnu-nat.c (gnu_detach): Adjust.
14441         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14442         * infcmd.c (detach_command): Adjust
14443         * infrun.c (follow_fork_inferior): Adjust.
14444         (handle_vfork_child_exec_or_exit): Adjust.
14445         * linux-fork.c (linux_fork_detach): Remove args parameter.
14446         * linux-fork.h (linux_fork_detach): Likewise.
14447         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14448         * linux-thread-db.c (thread_db_detach): Likewise.
14449         * nto-procfs.c (procfs_detach): Likewise.
14450         * procfs.c (procfs_detach): Likewise.
14451         (do_detach): Remove signo parameter.
14452         * record.c (record_detach): Remove args parameter.
14453         * record.h (record_detach): Likewise.
14454         * remote-sim.c (gdbsim_detach): Likewise.
14455         * remote.c (remote_detach_1): Likewise.
14456         (remote_detach): Likewise.
14457         (extended_remote_detach): Likewise.
14458         * sol-thread.c (sol_thread_detach): Likewise.
14459         * target-delegates.c: Re-generate.
14460         * top.c (struct qt_args) <args>: Remove field.
14461         (kill_or_detach): Don't pass args.
14462         (quit_force): Don't set args.
14463         * windows-nat.c (windows_detach): Remove args parameter.
14464
14465 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14466
14467         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14468         (arm_linux_init_abi): Install it.
14469
14470 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14471
14472         * osabi.c (gdb_osabi_names): Extend the regexp for
14473         arm-linux-gnueabihf.
14474
14475 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14476
14477         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14478         m_abbrevs.
14479         (abbrev_table::add_abbrev): Update.
14480         (abbrev_table::lookup_abbrev): Update.
14481
14482 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14483
14484         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14485
14486 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14487
14488         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14489         to "std::string".
14490
14491 2018-01-17  Tom Tromey  <tom@tromey.com>
14492
14493         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14494
14495 2018-01-17  Tom Tromey  <tom@tromey.com>
14496
14497         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14498         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14499         (create_array_type_with_stride): Update.
14500         * dwarf2read.c (set_die_type): Update.
14501
14502 2018-01-17  Tom Tromey  <tom@tromey.com>
14503
14504         * dwarf2read.c (delayed_method_info): Remove typedef.
14505         (dwarf2_cu::method_info): Now a std::vector.
14506         (add_to_method_list): Update.
14507         (free_delayed_list): Remove.
14508         (compute_delayed_physnames): Update.
14509         (process_full_comp_unit, process_full_type_unit): Clear the method
14510         list.  Remove cleanups.
14511         (psymtab_include_file_name): Add name_holder parameter.  Use
14512         unique_xmalloc_ptr.
14513         (dwarf_decode_lines): Update.
14514
14515 2018-01-17  Tom Tromey  <tom@tromey.com>
14516             Simon Marchi  <simon.marchi@ericsson.com>
14517
14518         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14519         (dwarf2_per_objfile::free_cached_comp_units)
14520         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14521         (init_cutu_and_read_dies_no_follow): Update.
14522         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14523         (dwarf2_cu::~dwarf2_cu): New.
14524         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14525         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14526
14527 2018-01-17  Tom Tromey  <tom@tromey.com>
14528             Simon Marchi  <simon.marchi@ericsson.com>
14529
14530         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14531         (struct die_reader_specs) <abbrev_table>: New member.
14532         (struct abbrev_table): Add constructor.
14533         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14534         <abbrev_obstack>: Now an auto_obstack.
14535         (abbrev_table_up): New typedef.
14536         (init_cu_die_reader): Add abbrev_table parameter.
14537         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14538         Add result_dwo_abbrev_table.
14539         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14540         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14541         Update.
14542         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14543         parameter.
14544         (skip_children): Update.
14545         (abbrev_table::alloc_abbrev): Rename from
14546         abbrev_table_alloc_abbrev.
14547         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14548         (abbrev_table::lookup_abbrev): Rename from
14549         abbrev_table_lookup_abbrev.
14550         (abbrev_table_read_table): Return abbrev_table_up.
14551         (abbrev_table_free, abbrev_table_free_cleanup)
14552         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14553         (load_partial_dies): Update.
14554
14555 2018-01-17  Tom Tromey  <tom@tromey.com>
14556
14557         * dwarf2read.c (dwarf2_compute_name): Update comment.
14558         (read_func_scope, read_variable): Update.
14559         (new_symbol): Remove.
14560         (new_symbol_full): Rename to new_symbol.
14561
14562 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14563
14564         PR gdb/16577
14565         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14566         a warning instead of throwing an error, set section size to 0 and return
14567         NULL.
14568         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14569
14570 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14571
14572         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14573         std::string.
14574         (linux_ptrace_attach_fail_reason_string): Likewise.
14575         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14576         Likewise.
14577         (linux_ptrace_attach_fail_reason_string): Likewise.
14578         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14579
14580 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14581
14582         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14583
14584 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14585
14586         PR gdb/21559
14587         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14588         checking for fs_base/gs_base fields in struct user_regs_struct.
14589         * configure: Regenerate.
14590
14591 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14592
14593         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14594         function.
14595         (aarch64_linux_init_abi): Install it to gdbarch hook
14596         gcc_target_options.
14597
14598 2018-01-15  Pedro Alves  <palves@redhat.com>
14599
14600         * common/signals-state-save-restore.c
14601         (save_original_signals_state): Fix typos.
14602
14603 2017-01-12  Tom Tromey  <tom@tromey.com>
14604             Sergio Durigan Junior  <sergiodj@redhat.com>
14605
14606         * Makefile.in (install-only): Install gdb-add-index.
14607
14608 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14609
14610         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14611
14612 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14613
14614         * infrun.c (keep_going_pass_signal): Clear step-over info when
14615         insert_breakpoints fails.
14616
14617 2018-01-11  Pedro Alves  <palves@redhat.com>
14618
14619         PR gdb/22583
14620         * infrun.c (resume): Rename to ...
14621         (resume_1): ... this.
14622         (resume): Reimplement as wrapper around resume_1.
14623
14624 2018-01-11  Pedro Alves  <palves@redhat.com>
14625
14626         PR remote/22597
14627         * remote.c (remote_parse_stop_reply): Default to the last-set
14628         general thread instead of to 'magic_null_ptid'.
14629
14630 2018-01-10  Pedro Alves  <palves@redhat.com>
14631
14632         * language.h (language_get_symbol_name_matcher): Rename ...
14633         (get_symbol_name_matcher): ... this.
14634         * language.c (language_get_symbol_name_matcher): Ditto.
14635         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14636         callers adjusted.
14637
14638 2018-01-10  Pedro Alves  <palves@redhat.com>
14639
14640         PR gdb/22670
14641         * dwarf2read.c
14642         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14643         Adjust to use language_get_symbol_name_matcher instead of
14644         language_defn::la_get_symbol_name_matcher.
14645         * language.c (language_get_symbol_name_matcher): If in Ada mode
14646         and the lookup name is a verbatim match, return Ada's matcher.
14647         * language.h (language_get_symbol_name_matcher): Adjust comment.
14648         (ada_lookup_name_info::verbatim_p):: New method.
14649
14650 2018-01-10  Pedro Alves  <palves@redhat.com>
14651
14652         PR gdb/22670
14653         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14654         minsym's language is language_auto or language_cplus, pass down
14655         language_ada instead.
14656         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14657
14658 2018-01-10  Pedro Alves  <palves@redhat.com>
14659
14660         PR gdb/22670
14661         * minsyms.c (linkage_name_str): New function.
14662         (iterate_over_minimal_symbols): Use it.
14663
14664 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14665
14666         * NEWS: Document that 'info proc' now works on FreeBSD.
14667
14668 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14669
14670         * configure.ac: Check for kinfo_getfile in libutil.
14671         * configure: Regenerate.
14672         * config.in: Regenerate.
14673         * fbsd-nat.c: Include "fbsd-tdep.h".
14674         (fbsd_fetch_cmdline): New.
14675         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14676         rather than calling error.
14677         (fbsd_info_proc): New.
14678         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14679         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14680         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14681
14682 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14683
14684         * fbsd-nat.c (struct free_deleter): Remove.
14685         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14686
14687 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14688
14689         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14690         NULL for an empty pathname.
14691
14692 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14693
14694         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14695         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14696         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14697         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14698         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14699         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14700         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14701         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14702         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14703         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14704         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14705         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14706         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14707         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14708         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14709
14710 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14711
14712         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14713         (gnu_xfer_auxv): New function.
14714         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14715         TARGET_OBJECT_AUXV.
14716
14717 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14718             Simon Marchi  <simon.marchi@ericsson.com>
14719
14720         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14721         common/selftest.c.
14722         (COMMON_OBS): Remove selftest.o.
14723         * configure.ac: Append selftest-arch.c and common/selftest.c to
14724         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14725         * configure: Re-generated.
14726         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14727         GDB_SELF_TEST.
14728         (maintenance_info_selftests): Likewise.
14729
14730 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14731
14732         * ada-valprint.c (val_print_packed_array_elements): Use
14733         proper number of elements when printing an array indexed
14734         by an enumeration type.
14735
14736 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14737
14738         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14739         (dw2_get_file_names_reader): Adjust.
14740         (lookup_dwo_signatured_type): Adjust.
14741         (lookup_dwp_signatured_type): Adjust.
14742         (lookup_signatured_type): Adjust.
14743         (create_type_unit_group): Adjust.
14744         (get_type_unit_group): Adjust.
14745         (process_psymtab_comp_unit_reader): Adjust.
14746         (build_type_psymtabs_reader): Adjust.
14747         (scan_partial_symbols): Adjust.
14748         (add_partial_symbol): Adjust.
14749         (add_partial_subprogram): Adjust.
14750         (peek_die_abbrev): Adjust.
14751         (fixup_go_packaging): Adjust.
14752         (process_imported_unit_die): Adjust.
14753         (dwarf2_compute_name): Adjust.
14754         (dwarf2_physname): Adjust.
14755         (read_import_statement): Adjust.
14756         (handle_DW_AT_stmt_list): Adjust.
14757         (read_file_scope): Adjust.
14758         (read_func_scope): Adjust.
14759         (read_lexical_block_scope): Adjust.
14760         (read_call_site_scope): Adjust.
14761         (read_variable): Adjust.
14762         (dwarf2_rnglists_process): Adjust.
14763         (dwarf2_ranges_process): Adjust.
14764         (dwarf2_ranges_read): Adjust.
14765         (dwarf2_get_pc_bounds): Adjust.
14766         (dwarf2_record_block_ranges): Adjust.
14767         (dwarf2_add_field): Adjust.
14768         (dwarf2_add_member_fn): Adjust.
14769         (read_structure_type): Adjust.
14770         (process_structure_scope): Adjust.
14771         (read_enumeration_type): Adjust.
14772         (read_array_type): Adjust.
14773         (mark_common_block_symbol_computed): Adjust.
14774         (read_common_block): Adjust.
14775         (read_namespace_type): Adjust.
14776         (read_namespace): Adjust.
14777         (read_module_type): Adjust.
14778         (read_tag_pointer_type): Adjust.
14779         (read_tag_ptr_to_member_type): Adjust.
14780         (read_tag_string_type): Adjust.
14781         (read_subroutine_type): Adjust.
14782         (read_typedef): Adjust.
14783         (read_base_type): Adjust.
14784         (attr_to_dynamic_prop): Adjust.
14785         (read_subrange_type): Adjust.
14786         (read_unspecified_type): Adjust.
14787         (dwarf2_read_abbrevs): Adjust.
14788         (load_partial_dies): Adjust.
14789         (read_partial_die): Adjust.
14790         (find_partial_die): Adjust.
14791         (guess_partial_die_structure_name): Adjust.
14792         (fixup_partial_die): Adjust.
14793         (read_attribute_value): Adjust.
14794         (read_addr_index): Adjust.
14795         (read_addr_index_from_leb128): Adjust.
14796         (read_str_index): Adjust.
14797         (dwarf2_string_attr): Adjust.
14798         (get_debug_line_section): Adjust.
14799         (dwarf_decode_line_header): Adjust.
14800         (lnp_state_machine::check_line_address): Adjust.
14801         (dwarf_decode_lines_1): Adjust.
14802         (dwarf_decode_lines): Adjust.
14803         (dwarf2_start_symtab): Adjust.
14804         (var_decode_location): Adjust.
14805         (new_symbol_full): Adjust.
14806         (dwarf2_const_value_data): Adjust.
14807         (dwarf2_const_value_attr): Adjust.
14808         (dwarf2_const_value): Adjust.
14809         (die_type): Adjust.
14810         (die_containing_type): Adjust.
14811         (build_error_marker_type): Adjust.
14812         (lookup_die_type): Adjust.
14813         (guess_full_die_structure_name): Adjust.
14814         (anonymous_struct_prefix): Adjust.
14815         (determine_prefix): Adjust.
14816         (dwarf2_name): Adjust.
14817         (follow_die_ref_or_sig): Adjust.
14818         (follow_die_offset): Adjust.
14819         (follow_die_ref): Adjust.
14820         (follow_die_sig_1): Adjust.
14821         (follow_die_sig): Adjust.
14822         (get_signatured_type): Adjust.
14823         (get_DW_AT_signature_type): Adjust.
14824         (decode_locdesc): Adjust.
14825         (dwarf_decode_macros): Adjust.
14826         (cu_debug_loc_section): Adjust.
14827         (fill_in_loclist_baton): Adjust.
14828         (dwarf2_symbol_mark_computed): Adjust.
14829         (init_one_comp_unit): Don't assign
14830         dwarf2_cu::dwarf2_per_objfile.
14831         (set_die_type): Adjust.
14832
14833 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14834
14835         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14836         <dwarf2_per_objfile>: New field.
14837         (dwarf2_per_objfile): Remove global.
14838         (get_dwarf2_per_objfile): New function.
14839         (set_dwarf2_per_objfile): New function.
14840         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14841         dwarf2_per_objfile.
14842         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14843         (read_abbrev_offset): Likewise.
14844         (read_indirect_string): Likewise.
14845         (read_indirect_line_string): Likewise.
14846         (read_indirect_string_at_offset): Likewise.
14847         (read_indirect_string_from_dwz): Likewise.
14848         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14849         dwarf2_per_objfile.
14850         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14851         (create_all_comp_units): Change objfile parameter to
14852         dwarf2_per_objfile.
14853         (create_all_type_units): Likewise.
14854         (process_queue): Add dwarf2_per_objfile parameter.
14855         (read_and_check_comp_unit_head): Likewise.
14856         (lookup_dwo_unit_in_dwp): Likewise.
14857         (get_dwp_file): Likewise.
14858         (process_cu_includes): Likewise.
14859         (struct free_dwo_file_cleanup_data): New struct.
14860         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14861         set_dwarf2_per_objfile.
14862         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14863         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14864         context, adjust calls.
14865         (dw2_instantiate_symtab): Likewise.
14866         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14867         (dw2_get_cu): Likewise.
14868         (create_cu_from_index_list): Change objfile parameter to
14869         dwarf2_per_objfile.
14870         (create_cus_from_index_list): Get dwarf2_per_objfile from
14871         context, adjust calls.
14872         (create_cus_from_index): Likewise.
14873         (create_signatured_type_table_from_index): Change objfile
14874         parameter to dwarf2_per_objfile.
14875         (create_signatured_type_table_from_debug_names): Change objfile
14876         parameter to dwarf2_per_objfile.
14877         (create_addrmap_from_index): Likewise.
14878         (create_addrmap_from_aranges): Likewise.
14879         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14880         (dw2_setup): Remove.
14881         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14882         context.
14883         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14884         get_dwarf2_per_objfile.
14885         (dw2_forget_cached_source_info): Likewise.
14886         (dw2_map_symtabs_matching_filename): Likewise.
14887         (struct dw2_symtab_iterator) <index>: Remove.
14888         <dwarf2_per_objfile>: New field.
14889         (dw2_symtab_iter_init): Replace index parameter with
14890         dwarf2_per_objfile.
14891         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14892         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14893         (dw2_print_stats): Likewise.
14894         (dw2_dump): Likewise.
14895         (dw2_expand_symtabs_for_function): Likewise.
14896         (dw2_expand_all_symtabs): Likewise.
14897         (dw2_expand_symtabs_with_fullname): Likewise.
14898         (dw2_expand_marked_cus): Replace index and objfile parameters
14899         with dwarf2_per_objfile.
14900         (dw_expand_symtabs_matching_file_matcher): Add
14901         dwarf2_per_objfile parameter and adjust calls.
14902         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14903         adjust calls.
14904         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14905         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14906         adjust calls.
14907         (create_cus_from_debug_names_list): Replace objfile parameter
14908         with dwarf2_per_objfile and adjust calls.
14909         (create_cus_from_debug_names): Likewise.
14910         (dwarf2_read_debug_names): Likewise.
14911         (mapped_debug_names::namei_to_name): Adjust call.
14912         (dw2_debug_names_iterator::next): Likewise.
14913         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14914         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14915         (dw2_debug_names_dump): Likewise.
14916         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14917         (dw2_debug_names_expand_symtabs_matching): Likewise.
14918         (dwarf2_initialize_objfile): Likewise.
14919         (dwarf2_build_psymtabs): Likewise.
14920         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14921         this_cu.
14922         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14923         (read_and_check_comp_unit_head): Likewise.
14924         (read_abbrev_offset): Likewise.
14925         (create_debug_type_hash_table): Likewise.
14926         (create_debug_types_hash_table): Likewise.
14927         (create_all_type_units): Replace objfile parameter with
14928         dwarf2_per_objfile.
14929         (add_type_unit): Add dwarf2_per_objfile parameter.
14930         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14931         with dwarf2_per_objfile.
14932         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14933         (lookup_dwp_signatured_type): Likewise.
14934         (lookup_signatured_type): Likewise.
14935         (read_cutu_die_from_dwo): Likewise.
14936         (init_tu_and_read_dwo_dies): Likewise.
14937         (init_cutu_and_read_dies): Likewise.
14938         (init_cutu_and_read_dies_no_follow): Likewise.
14939         (allocate_type_unit_groups_table): Add objfile parameter.
14940         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14941         (get_type_unit_group): Likewise.
14942         (process_psymtab_comp_unit): Update call.
14943         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14944         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14945         (print_tu_stats): Likewise.
14946         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14947         in void* parameter.
14948         (build_type_psymtabs): Change objfile parameter to
14949         dwarf2_per_objfile.
14950         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14951         passed in void* parameter.
14952         (process_skeletonless_type_units): Change objfile parameter to
14953         dwarf2_per_objfile.
14954         (set_partial_user): Likewise.
14955         (dwarf2_build_psymtabs_hard): Likewise.
14956         (read_comp_units_from_section): Likewise.
14957         (create_all_comp_units): Likewise.
14958         (scan_partial_symbols): Update calls.
14959         (add_partial_symbol): Likewise.
14960         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14961         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14962         (process_queue): Add dwarf2_per_objfile parameter.
14963         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14964         (compute_compunit_symtab_includes): Likewise.
14965         (process_cu_includes): Add dwarf2_per_objfile parameter.
14966         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14967         (process_full_type_unit): Likewise.
14968         (process_imported_unit_die): Update call.
14969         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14970         (read_file_scope): Likewise.
14971         (allocate_dwo_file_hash_table): Add objfile parameter.
14972         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14973         (create_cus_hash_table): Likewise.
14974         (create_dwp_hash_table): Likewise.
14975         (create_dwo_unit_in_dwp_v1): Likewise.
14976         (create_dwp_v2_section): Likewise.
14977         (create_dwo_unit_in_dwp_v2): Likewise.
14978         (lookup_dwo_unit_in_dwp): Likewise.
14979         (try_open_dwop_file): Likewise.
14980         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14981         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14982         cleanup to include a reference to dwarf2_per_objfile.
14983         (open_dwp_file): Add dwarf2_per_objfile parameter.
14984         (open_and_init_dwp_file): Likewise.
14985         (get_dwp_file): Likewise.
14986         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14987         (queue_and_load_all_dwo_tus): Update call.
14988         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14989         data.
14990         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14991         (dwarf2_ranges_process): Likewise.
14992         (dwarf2_get_pc_bounds): Likewise.
14993         (mark_common_block_symbol_computed): Likewise.
14994         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14995         (dwarf2_read_abbrevs): Update call.
14996         (read_partial_die): Use dwarf2_per_objfile from cu.
14997         (find_partial_die): Likewise.
14998         (fixup_partial_die): Likewise.
14999         (read_attribute_value): Likewise.
15000         (read_indirect_string_at_offset_from): Add objfile parameter.
15001         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15002         parameter.
15003         (read_indirect_string_from_dwz): Add objfile parameter.
15004         (read_indirect_string): Add objfile parameter.
15005         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15006         (read_addr_index): Use dwarf2_per_objfile from cu.
15007         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15008         call dw2_setup.
15009         (read_str_index): Use dwarf2_per_objfile from cu.
15010         (get_debug_line_section): Likewise.
15011         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15012         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15013         (new_symbol_full): Use dwarf2_per_objfile from cu.
15014         (build_error_marker_type): Likewise.
15015         (lookup_die_type): Likewise.
15016         (determine_prefix): Likewise.
15017         (follow_die_offset): Likewise.
15018         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15019         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15020         (dwarf2_fetch_die_type_sect_off): Likewise.
15021         (dwarf2_get_die_type): Likewise.
15022         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15023         (get_signatured_type): Likewise.
15024         (get_DW_AT_signature_type): Likewise.
15025         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15026         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15027         (cu_debug_loc_section): Likewise.
15028         (fill_in_loclist_baton): Likewise.
15029         (dwarf2_symbol_mark_computed): Likewise.
15030         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15031         dwarf2_per_objfile.
15032         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15033         parameter.
15034         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15035         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15036         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15037         (set_die_type): Use dwarf2_free_objfile from cu.
15038         (get_die_type_at_offset): Likewise.
15039         (dwarf2_per_objfile_free): Don't assign global variable.
15040         (debug_names) <constructor>: Add dwarf2_per_objfile
15041         parameter, update m_debugstrlookup construction.
15042         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15043         parameter.
15044         <m_dwarf2_per_objfile>: New field.
15045         <lookup>: Use m_dwarf2_per_objfile.
15046         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15047         (psyms_seen_size): Likewise.
15048         (write_gdbindex): Replace objfile parameter with
15049         dwarf2_per_objfile.
15050         (write_debug_names): Likewise.
15051         (write_psymtabs_to_index): Likewise.
15052         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15053         calls.
15054
15055 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15056
15057         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15058         <dwarf2_per_objfile>: New field.
15059         (struct dwarf2_per_cu_data) <objfile>: Remove.
15060         <dwarf2_per_objfile>: New field.
15061         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15062         of objfile.
15063         (create_signatured_type_table_from_index): Likewise.
15064         (create_debug_type_hash_table): Likewise.
15065         (fill_in_sig_entry_from_dwo_entry): Likewise.
15066         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15067         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15068         objfile.
15069         (create_partial_symtab): Access objfile through
15070         dwarf2_per_objfile.
15071         (process_psymtab_comp_unit_reader): Likewise.
15072         (read_comp_units_from_section): Likewise.
15073         (scan_partial_symbols): Likewise.
15074         (add_partial_symbol): Likewise.
15075         (add_partial_subprogram): Likewise.
15076         (peek_die_abbrev): Likewise.
15077         (fixup_go_packaging): Likewise.
15078         (process_full_comp_unit): Likewise.
15079         (process_full_type_unit): Likewise.
15080         (process_imported_unit_die): Likewise.
15081         (dwarf2_compute_name): Likewise.
15082         (dwarf2_physname): Likewise.
15083         (read_import_statement): Likewise.
15084         (create_cus_hash_table): Assign dwarf2_physname instead of
15085         objfile.
15086         (read_func_scope): Access objfile through dwarf2_per_objfile.
15087         (read_lexical_block_scope): Likewise.
15088         (read_call_site_scope): Likewise.
15089         (read_variable): Likewise.
15090         (dwarf2_rnglists_process): Likewise.
15091         (dwarf2_ranges_process): Likewise.
15092         (dwarf2_ranges_read): Likewise.
15093         (dwarf2_record_block_ranges): Likewise.
15094         (dwarf2_add_field): Likewise.
15095         (dwarf2_add_member_fn): Likewise.
15096         (read_structure_type): Likewise.
15097         (process_structure_scope): Likewise.
15098         (read_enumeration_type): Likewise.
15099         (read_array_type): Likewise.
15100         (read_common_block): Likewise.
15101         (read_namespace_type): Likewise.
15102         (read_namespace): Likewise.
15103         (read_module_type): Likewise.
15104         (read_tag_pointer_type): Likewise.
15105         (read_tag_ptr_to_member_type): Likewise.
15106         (read_tag_string_type): Likewise.
15107         (read_subroutine_type): Likewise.
15108         (read_typedef): Likewise.
15109         (read_base_type): Likewise.
15110         (attr_to_dynamic_prop): Likewise.
15111         (read_subrange_type): Likewise.
15112         (read_unspecified_type): Likewise.
15113         (load_partial_dies): Likewise.
15114         (read_partial_die): Likewise.
15115         (find_partial_die): Likewise.
15116         (guess_partial_die_structure_name): Likewise.
15117         (fixup_partial_die): Likewise.
15118         (read_attribute_value): Likewise.
15119         (read_addr_index_from_leb128): Likewise.
15120         (dwarf2_read_addr_index): Likewise.
15121         (dwarf2_string_attr): Likewise.
15122         (lnp_state_machine::check_line_address): Likewise.
15123         (dwarf_decode_lines_1): Likewise.
15124         (dwarf_decode_lines): Likewise.
15125         (dwarf2_start_symtab): Likewise.
15126         (var_decode_location): Likewise.
15127         (new_symbol_full): Likewise.
15128         (dwarf2_const_value_data): Likewise.
15129         (dwarf2_const_value_attr): Likewise.
15130         (dwarf2_const_value): Likewise.
15131         (die_type): Likewise.
15132         (die_containing_type): Likewise.
15133         (lookup_die_type): Likewise.
15134         (guess_full_die_structure_name): Likewise.
15135         (anonymous_struct_prefix): Likewise.
15136         (dwarf2_name): Likewise.
15137         (follow_die_ref_or_sig): Likewise.
15138         (follow_die_offset): Likewise.
15139         (follow_die_ref): Likewise.
15140         (dwarf2_fetch_die_loc_sect_off): Likewise.
15141         (dwarf2_fetch_constant_bytes): Likewise.
15142         (dwarf2_fetch_die_type_sect_off): Likewise.
15143         (dwarf2_get_die_type): Likewise.
15144         (follow_die_sig): Likewise.
15145         (decode_locdesc): Likewise.
15146         (dwarf2_per_cu_objfile): Likewise.
15147         (dwarf2_per_cu_text_offset): Likewise.
15148         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15149         objfile.
15150         (set_die_type): Access objfile through
15151         dwarf2_per_objfile.
15152
15153 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15154
15155         * valprint.c (converted_character_d): Remove typedef.
15156         (DEF_VEC_O (converted_character_d)): Remove.
15157         (count_next_character): Use std::vector.
15158         (print_converted_chars_to_obstack): Likewise.
15159         (generic_printstr): Likewise.
15160
15161 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15162
15163         * xml-support.h (struct gdb_xml_value): Add constructor.
15164         <value>: Change type to unique_xmalloc_ptr.
15165         (gdb_xml_value_s): Remove typedef.
15166         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15167         (gdb_xml_element_start_handler): Change parameter type to
15168         std::vector.
15169         (xml_find_attribute): Likewise.
15170         * xml-support.c (xml_find_attribute): Change parameter type to
15171         std::vector and adjust.
15172         (gdb_xml_values_cleanup): Remove.
15173         (gdb_xml_parser::start_element): Adjust to std::vector.
15174         (xinclude_start_include): Change paraeter type to std::vector
15175         and adjust.
15176         * btrace.c (check_xml_btrace_version): Likewise.
15177         (parse_xml_btrace_block): Likewise.
15178         (parse_xml_btrace_pt_config_cpu): Likewise.
15179         (parse_xml_btrace_pt): Likewise.
15180         (parse_xml_btrace_conf_bts): Likewise.
15181         (parse_xml_btrace_conf_pt): Likewise.
15182         * memory-map.c (memory_map_start_memory): Likewise.
15183         (memory_map_start_property): Likewise.
15184         * osdata.c (osdata_start_osdata): Likewise.
15185         (osdata_start_item): Likewise.
15186         (osdata_start_column): Likewise.
15187         * remote.c (start_thread): Likewise.
15188         * solib-aix.c (library_list_start_library): Likewise.
15189         (library_list_start_list): Likewise.
15190         * solib-svr4.c (library_list_start_library): Likewise.
15191         (svr4_library_list_start_list): Likewise.
15192         * solib-target.c (library_list_start_segment): Likewise.
15193         (library_list_start_section): Likewise.
15194         (library_list_start_library): Likewise.
15195         (library_list_start_list): Likewise.
15196         * tracepoint.c (traceframe_info_start_memory): Likewise.
15197         (traceframe_info_start_tvar): Likewise.
15198         * xml-syscall.c (syscall_start_syscall): Likewise.
15199         * xml-tdesc.c (tdesc_start_target): Likewise.
15200         (tdesc_start_feature): Likewise.
15201         (tdesc_start_reg): Likewise.
15202         (tdesc_start_union): Likewise.
15203         (tdesc_start_struct): Likewise.
15204         (tdesc_start_flags): Likewise.
15205         (tdesc_start_enum): Likewise.
15206         (tdesc_start_field): Likewise.
15207         (tdesc_start_enum_value): Likewise.
15208         (tdesc_start_vector): Likewise.
15209
15210 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15211
15212         * extension.h (struct xmethod_worker) <clone>: Remove.
15213         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15214         Remove.
15215         (python_xmethod_worker::clone): Remove.
15216         * valops.c (find_overload_match): Use std::move instead of
15217         clone.
15218
15219 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15220
15221         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15222         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15223         <free_xmethod_worker_data>: Remove.
15224         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15225         <get_xmethod_arg_types>: Remove.
15226         <get_xmethod_result_type>: Remove.
15227         <invoke_xmethod>: Remove.
15228         * extension.c (new_xmethod_worker): Remove.
15229         (clone_xmethod_worker): Remove.
15230         (get_matching_xmethod_workers): Return void, pass std::vector by
15231         pointer.
15232         (get_xmethod_arg_types): Rename to...
15233         (xmethod_worker::get_arg_types): ... this, and adjust.
15234         (get_xmethod_result_type): Rename to...
15235         (xmethod_worker::get_result_type): ... this, and adjust.
15236         (invoke_xmethod): Remove.
15237         (free_xmethod_worker): Remove.
15238         (free_xmethod_worker_vec): Remove.
15239         * extension.h (enum ext_lang_rc): Move here from
15240         extension-priv.h.
15241         (struct xmethod_worker): Add constructor and destructor.
15242         <data>: Remove.
15243         <value>: Remove.
15244         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15245         virtual pure methods.
15246         <get_arg_types, get_result_type>: New methods.
15247         (xmethod_worker_ptr): Remove typedef.
15248         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15249         (xmethod_worker_vec): Remove typedef.
15250         (xmethod_worker_up): New typedef.
15251         (invoke_xmethod): Remove.
15252         (clone_xmethod_worker): Remove.
15253         (free_xmethod_worker): Remove.
15254         (free_xmethod_worker_vec): Remove.
15255         (get_xmethod_arg_types): Remove.
15256         (get_xmethod_result_type): Remove.
15257         * valops.c (find_method_list): Use std::vector, don't use
15258         intermediate vector.
15259         (value_find_oload_method_list): Use std::vector.
15260         (find_overload_match): Use std::vector.
15261         (find_oload_champ): Use std::vector.
15262         * value.c (value_free): Use operator delete.
15263         (value_of_xmethod): Rename to...
15264         (value_from_xmethod): ... this.  Don't assign
15265         xmethod_worker::value, take rvalue-reference.
15266         (result_type_of_xmethod): Adjust.
15267         (call_xmethod): Adjust.
15268         * value.h: Include extension.h.
15269         (struct xmethod_worker): Don't forward-declare.
15270         (value_of_xmethod): Rename to...
15271         (value_from_xmethod): ... this, take rvalue-reference.
15272         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15273         (struct python_xmethod_worker): ... this, add constructor and
15274         destructor.
15275         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15276         (gdbpy_free_xmethod_worker_data): Rename to...
15277         (python_xmethod_worker::~python_xmethod_worker): ... this and
15278         adjust.
15279         (gdbpy_clone_xmethod_worker_data): Rename to...
15280         (python_xmethod_worker::clone): ... this and adjust.
15281         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15282         temporary vector.
15283         (gdbpy_get_xmethod_arg_types): Rename to...
15284         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15285         (gdbpy_get_xmethod_result_type): Rename to...
15286         (python_xmethod_worker::do_get_result_type): ... this and
15287         adjust.
15288         (gdbpy_invoke_xmethod): Rename to...
15289         (python_xmethod_worker::invoke): ... this and adjust.
15290         (new_python_xmethod_worker): Rename to...
15291         (python_xmethod_worker::python_xmethod_worker): ... this and
15292         adjust.
15293         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15294         Remove.
15295         (gdbpy_free_xmethod_worker_data): Remove.
15296         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15297         (gdbpy_get_xmethod_arg_types): Remove.
15298         (gdbpy_get_xmethod_result_type): Remove.
15299         (gdbpy_invoke_xmethod): Remove.
15300         * python/python.c (python_extension_ops): Remove obsolete
15301         callbacks.
15302
15303 2018-01-05  Pedro Alves  <palves@redhat.com>
15304
15305         PR gdb/18653
15306         * common/signals-state-save-restore.c
15307         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15308         find a custom handler preinstalled, instead of internal erroring.
15309         But only warn if !quiet.
15310         * common/signals-state-save-restore.h
15311         (save_original_signals_state): New parameter 'quiet'.
15312         * main.c (captured_main_1): Move save_original_signals_state call
15313         after option handling, and pass QUIET.
15314
15315 2018-01-05  Pedro Alves  <palves@redhat.com>
15316
15317         * spu-tdep.c (spu_catch_start): Pass
15318         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15319
15320 2018-01-05  Pedro Alves  <palves@redhat.com>
15321
15322         PR gdb/22670
15323         * ada-lang.c (literal_symbol_name_matcher): New function.
15324         (ada_get_symbol_name_matcher): Use it for
15325         symbol_name_match_type::SEARCH_NAME.
15326         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15327         it down instead of assuming symbol_name_match_type::FULL.
15328         * block.h (block_lookup_symbol): New parameter 'match_type'.
15329         * c-valprint.c (print_unpacked_pointer): Use
15330         lookup_symbol_search_name instead of lookup_symbol.
15331         * compile/compile-object-load.c (get_out_value_type): Pass down
15332         symbol_name_match_type::SEARCH_NAME.
15333         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15334         symbol_name_match_type::FULL.
15335         * cp-support.c (cp_get_symbol_name_matcher): Handle
15336         symbol_name_match_type::SEARCH_NAME.
15337         * infrun.c (insert_exception_resume_breakpoint): Use
15338         lookup_symbol_search_name.
15339         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15340         * psymtab.c (maintenance_check_psymtabs): Use
15341         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15342         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15343         SYMBOL_SEARCH_NAME.
15344         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15345         if symbol_name_match_type::SEARCH_NAME.
15346         (lookup_symbol_in_language): Pass down
15347         symbol_name_match_type::FULL.
15348         (lookup_symbol_search_name): New.
15349         (lookup_language_this): Pass down
15350         symbol_name_match_type::SEARCH_NAME.
15351         (lookup_symbol_aux, lookup_local_symbol): New parameter
15352         'match_type'.  Pass it down.
15353         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15354         (lookup_symbol_search_name): New declaration.
15355         (lookup_symbol_in_block): New 'match_type' parameter.
15356
15357 2018-01-05  Pedro Alves  <palves@redhat.com>
15358
15359         PR gdb/22670
15360         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15361         ada_lookup_symbol.
15362         (ada_lookup_symbol): Reimplement in terms of
15363         ada_lookup_symbol_list, bits factored out from
15364         ada_lookup_encoded_symbol.
15365
15366 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15367
15368         * ada-exp.y (write_object_renaming): When subscripting an array
15369         using a symbol as the index, pass the block in call to
15370         ada_lookup_encoded_symbol when looking that symbol up.
15371
15372 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15373
15374         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15375         TYPE_INDEX_TYPE.
15376
15377 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15378
15379         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15380         the case where VALUE_LVAL (val0) is not lval_memory.
15381
15382 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15383
15384         * ada-valprint.c (print_optional_low_bound): Handle
15385         character-indexed array printing like boolean-indexed array
15386         printing.
15387
15388 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15389
15390         * NEWS: Create a new section for the next release branch.
15391         Rename the section of the current branch, now that it has
15392         been cut.
15393
15394 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15395
15396         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15397         * version.in: Bump version to 8.1.50.DATE-git.
15398
15399 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15400
15401         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15402         Add field.
15403         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15404         Add field.
15405         (default_exception_support_info) <catch_handlers_sym>: Add field.
15406         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15407         (ada_exception_name_addr_1): Add "catch handlers" handling.
15408         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15409         Update all callers.
15410         (create_excep_cond_exprs) <ex>: Add parameter.
15411         (re_set_exception): Update create_excep_cond_exprs call.
15412         (print_it_exception, print_one_exception, print_mention_exception)
15413         (print_recreate_exception): Add "catch handler" handling.
15414         (allocate_location_catch_handlers, re_set_catch_handlers)
15415         (check_status_catch_handlers, print_it_catch_handlers)
15416         (print_one_catch_handlers, print_mention_catch_handlers)
15417         (print_recreate_catch_handlers): New function.
15418         (catch_handlers_breakpoint_ops): New variable.
15419         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15420         Add parameter.  Add "catch handler" handling.
15421         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15422         Add "catch handler" handling.
15423         (ada_exception_catchpoint_cond_string): Add "catch handler"
15424         handling.
15425         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15426         call.
15427         (catch_ada_handlers_command): New function.
15428         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15429         operations structure.
15430         (_initialize_ada_language): Add "catch handlers" command entry.
15431         * NEWS: Document "catch handlers" feature.
15432
15433 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15434
15435         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15436         account when creating the array type of the slice.
15437         (ada_value_slice): Likewise.
15438
15439 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15440
15441         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15442         New enum value.
15443         (create_array_type_with_stride): Add byte_stride_prop parameter.
15444         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15445         New parameter.  Update all callers in this file.
15446         (array_type_has_dynamic_stride): New function.
15447         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15448         of arrays with dynamic byte strides.
15449         * dwarf2read.c (read_array_type): Add support for dynamic
15450         DW_AT_byte_stride attributes.
15451
15452 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15453
15454         * dwarf2read.c (read_unspecified_type): Treat
15455         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15456
15457 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15458
15459         Update copyright year range in all GDB files.
15460
15461 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15462
15463         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15464         and gdb/testsuite/gdb.base/step-line.c.
15465
15466 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15467
15468         * copyright.py (main): Dump the contents of
15469         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15470         even if BY_HAND is empty.
15471
15472 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15473
15474         * top.c (print_gdb_version): Update Copyright year in version
15475         message.
15476
15477 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15478
15479         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15480
15481 For older changes see ChangeLog-2017.
15482 \f
15483 Local Variables:
15484 mode: change-log
15485 left-margin: 8
15486 fill-column: 74
15487 version-control: never
15488 coding: utf-8
15489 End: