Provide get_shell declaration in procfs.c
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2
3 * procfs.c: Include common/pathstuff.h.
4
5 2018-10-29 John Darrington <john@darrington.wattle.id.au>
6
7 * configure.ac: New test HAVE_AF_LOCAL
8 * common/netstuff.c (parse_connection_spec) [prefixes]: Only
9 compile "unix:" if HAVE_AF_LOCAL is true.
10 * configure: Regenerate.
11 * config.in: Regenerate.
12
13 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
14
15 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
16 Add missing braces. No functional change.
17
18 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
19
20 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
21 to report a bad option and fix indentation.
22 * demangle.c (demangle_command): Use report_unrecognized_option_error
23 to report a bad option and correctly report the bad option.
24
25 2018-10-27 Tom Tromey <tom@tromey.com>
26
27 PR cli/23364:
28 * darwin-nat.c (copied_shell): New global.
29 (may_have_sip): Rename from should_disable_startup_with_shell.
30 (copy_shell_to_cache, maybe_cache_shell): New functions.
31 (darwin_nat_target::create_inferior): Update. Use
32 copied_shell.
33
34 2018-10-27 Tom Tromey <tom@tromey.com>
35
36 * unittests/scoped_fd-selftests.c (test_to_file): New function.
37 (run_tests): Call test_to_file.
38 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
39 temporary files.
40 * common/scoped_fd.h (scoped_fd::to_file): New method.
41
42 2018-10-27 Tom Tromey <tom@tromey.com>
43
44 * unittests/scoped_mmap-selftests.c (test_normal): Use
45 gdb_mkostemp_cloexec.
46 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
47 Use gdb_mkostemp_cloexec.
48 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
49 gnulib/config.in, gnulib/configure,
50 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
51 gnulib/import/m4/gnulib-cache.m4,
52 gnulib/import/m4/gnulib-comp.m4: Update.
53 * gnulib/import/m4/mkostemp.m4: New file.
54 * gnulib/import/m4/mkstemp.m4: Remove.
55 * gnulib/import/mkostemp.c: New file.
56 * gnulib/import/mkstemp.m4: Remove.
57 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
58 mkstemp, add mkostemp. Apply new patch.
59 * gnulib/import/stdlib.in.h: Apply patch.
60 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
61 New file.
62 * dwarf-index-write.c (write_psymtabs_to_index): Use
63 gdb_mkostemp_cloexec.
64 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
65
66 2018-10-27 Tom Tromey <tom@tromey.com>
67
68 * unittests/mkdir-recursive-selftests.c: New file.
69 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
70 unittests/mkdir-recursive-selftests.c.
71 * dwarf-index-cache.c (mkdir_recursive): Move to
72 common/filestuff.c.
73 (index_cache::store): Check return value of mkdir_recursive.
74 (create_dir_and_check, test_mkdir_recursive): Move to new file.
75 (_initialize_index_cache): Don't register test.
76 * common/filestuff.h (mkdir_recursive): Declare.
77 * common/filestuff.c (mkdir_recursive): Move from
78 dwarf-index-cache.c. Return bool.
79
80 2018-10-27 Tom Tromey <tom@tromey.com>
81
82 * dwarf-index-write.c (write_psymtabs_to_index): Move
83 make_temp_filename to common/pathstuff.c.
84 * common/pathstuff.h (make_temp_filename): Declare.
85 * common/pathstuff.c (make_temp_filename): New function, moved
86 from dwarf-index-write.c.
87
88 2018-10-27 Tom Tromey <tom@tromey.com>
89
90 * procfs.c (procfs_target::create_inferior): Use get_shell.
91 * cli/cli-cmds.c (shell_escape): Use get_shell.
92 * windows-nat.c (windows_nat_target::create_inferior): Use
93 get_shell.
94 * common/pathstuff.c (get_shell): New function.
95 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
96 (fork_inferior): Use get_shell.
97 * common/pathstuff.h (get_shell): Declare.
98
99 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
100
101 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
102
103 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
104
105 * stack.c (print_variable_and_value_data): Add preg and treg.
106 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
107 and update callers.
108 (print_frame_arg_vars): Likewise.
109 (prepare_reg): New function.
110 (info_locals_command): Extract info print args and use them.
111 (info_args_command): Likewise.
112 (_initialize_stack): Modify on-line help.
113 * symtab.c (treg_matches_sym_type_name): New function.
114 (search_symbols): New arg t_regexp.
115 (symtab_symbol_info): New args quiet, regexp, t_regexp.
116 (info_variables_command): Extract info print args and use them.
117 (info_functions_command): Likewise.
118 (info_types_command): Update call to symtab_symbol_info.
119 (_initialize_symtab): Modify on-line help.
120 * symtab.h (treg_matches_sym_type_name): New function.
121 (search_symbols): New t_regexp arg.
122
123 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
124
125 * cli-utils.c (extract_arg_maybe_quoted): New function.
126 (extract_info_print_args): New function.
127 (info_print_args_help): New function.
128 (report_unrecognized_option_error): New function.
129 * cli-utils.h (extract_arg_maybe_quoted): New function.
130 (extract_info_print_args): New function.
131 (info_print_args_help): New function.
132 (report_unrecognized_option_error): New function.
133
134 2018-10-26 Tom Tromey <tom@tromey.com>
135
136 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
137 (compute_compunit_symtab_includes): Update.
138 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
139 (compunit_symtab_ptr): Likewise.
140
141 2018-10-26 John Baldwin <jhb@FreeBSD.org>
142
143 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
144 default_print_auxv_entry for specific tag values.
145
146 2018-10-26 John Baldwin <jhb@FreeBSD.org>
147
148 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
149
150 2018-10-26 Jim Wilson <jimw@sifive.com>
151
152 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
153 (riscv_linux_sigframe_init): Declare.
154 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
155 (riscv_linux_sigframe): New.
156 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
157 (riscv_linux_sigframe_init): Define.
158 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
159
160 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
161 (riscv_isa_flen): Likewise. Drop static.
162 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
163 (riscv_isa_flen): Likewise. Declare.
164
165 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
166 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
167
168 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
169 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
170 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
171 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
172 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
173 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
174 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
175 Define.
176 (struct ppc_linux_features) <htm>: New field.
177 (ppc_linux_no_features): Add initializer for htm field.
178 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
179 new tdescs.
180 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
181 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
182 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
183 Define if not already defined.
184 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
185 and rs6000/powerpc-isa207-htm-vsx64l.
186 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
187 rs6000/powerpc-isa207-htm-vsx64l.xml.
188 * features/rs6000/power-htm-spr.xml: New file.
189 * features/rs6000/power-htm-core.xml: New file.
190 * features/rs6000/power64-htm-core.xml: New file.
191 * features/rs6000/power-htm-fpu.xml: New file.
192 * features/rs6000/power-htm-altivec.xml: New file.
193 * features/rs6000/power-htm-vsx.xml: New file.
194 * features/rs6000/power-htm-ppr.xml: New file.
195 * features/rs6000/power-htm-dscr.xml: New file.
196 * features/rs6000/power-htm-tar.xml: New file.
197 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
198 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
199 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
200 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
201 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
202 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
203 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
204 fetch_regset with HTM regsets.
205 (store_register, store_ppc_registers): Call store_regset with HTM
206 regsets.
207 (ppc_linux_nat_target::read_description): Set htm field in the
208 features struct if needed.
209 * ppc-linux-tdep.c: Include
210 features/rs6000/powerpc-isa207-htm-vsx32l.c and
211 features/rs6000/powerpc-isa207-htm-vsx64l.c.
212 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
213 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
214 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
215 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
216 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
217 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
218 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
219 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
220 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
221 (ppc32_linux_ctarregset): New globals.
222 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
223 (ppc_linux_collect_core_cpgrregset): New function.
224 (ppc_linux_iterate_over_regset_sections): Call back with the htm
225 regsets.
226 (ppc_linux_core_read_description): Check if the tm spr section is
227 present and set htm in the features struct.
228 (_initialize_ppc_linux_tdep): Call
229 initialize_tdesc_powerpc_isa207_htm_vsx32l and
230 initialize_tdesc_powerpc_isa207_htm_vsx64l.
231 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
232 Declare.
233 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
234 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
235 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
236 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
237 New fields.
238 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
239 Likewise.
240 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
241 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
242 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
243 New enum fields.
244 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
245 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
246 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
247 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
248 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
249 <PPC_CTAR_REGNUM>: Likewise.
250 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
251 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
252 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
253 (IS_CEFP_PSEUDOREG): Define.
254 (rs6000_register_name): Hide the upper halves of checkpointed VSX
255 registers. Return names for the checkpointed DFP, VSX, and EFP
256 pseudo registers.
257 (rs6000_pseudo_register_type): Remove initial assert and raise an
258 internal error in the else clause instead. Return types for the
259 checkpointed DFP, VSX, and EFP pseudo registers.
260 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
261 checkpointed DFP pseudo registers.
262 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
263 checkpointed VSX pseudo registers.
264 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
265 from efpr_pseudo_register_read and
266 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
267 registers.
268 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
269 Handle checkpointed DFP, VSX, and EFP registers.
270 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
271 (efp_ax_pseudo_register_collect): New functions.
272 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
273 register logic to new functions. Handle checkpointed DFP, VSX,
274 and EFP pseudo registers.
275 (rs6000_gdbarch_init): Look for and validate the htm features.
276 Include checkpointed DFP, VSX and EFP pseudo-registers.
277 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
278 HTM registers.
279
280 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
281
282 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
283 without altivec or fpu.
284
285 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
286 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
287
288 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
289 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
290 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
291 Define if not already defined.
292 * features/rs6000/power-ebb.xml: New file.
293 * features/rs6000/power-linux-pmu.xml: New file.
294 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
295 features.
296 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
297 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
298 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
299 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
300 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
301 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
302 fetch_regset with ebb and pmu regsets.
303 (store_register, store_ppc_registers): Call store_regset with ebb
304 and pmu regsets.
305 (ppc_linux_nat_target::read_description): Set isa207 field in the
306 features struct if ebb and pmu are avaiable.
307 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
308 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
309 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
310 and pmu regsets.
311 (ppc_linux_core_read_description): Check if the pmu section is
312 present and set isa207 in the features struct.
313 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
314 (ppc32_linux_pmuregset): Declare.
315 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
316 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
317 <ppc_sier_regnum>: New field.
318 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
319 New enum values.
320 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
321 values.
322 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
323 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
324 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
325 ebb and pmu features.
326
327 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
328 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
329
330 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
331 (tdesc_powerpc_isa207_vsx64l): Declare.
332 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
333 (struct ppc_linux_features) <isa207>: New field.
334 (ppc_linux_no_features): Add initializer for isa207 field.
335 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
336 new tdescs.
337 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
338 (NT_PPC_TAR): Define if not already defined.
339 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
340 rs6000/powerpc-isa207-vsx64l.
341 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
342 rs6000/powerpc-isa207-vsx64l.xml.
343 * features/rs6000/power-tar.xml: New file.
344 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
345 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
346 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
347 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
348 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
349 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
350 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
351 fetch_regset with the TAR regset.
352 (store_register, store_ppc_registers): Call store_regset with the
353 TAR regset.
354 (ppc_linux_nat_target::read_description): Set isa207 field in the
355 features struct if needed.
356 * ppc-linux-tdep.c: Include
357 features/rs6000/powerpc-isa207-vsx32l.c and
358 features/rs6000/powerpc-isa207-vsx64l.c.
359 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
360 (ppc_linux_iterate_over_regset_sections): Call back with the tar
361 regset.
362 (ppc_linux_core_read_description): Check if the tar section is
363 present and set isa207 in the features struct.
364 (_initialize_ppc_linux_tdep): Call
365 initialize_tdesc_powerpc_isa207_vsx32l and
366 initialize_tdesc_powerpc_isa207_vsx64l.
367 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
368 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
369 (enum) <PPC_TAR_REGNUM>: New enum value.
370 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
371 feature.
372 (ppc_process_record_op31): Record changes to TAR.
373
374 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
375 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
376
377 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
378 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
379 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
380 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
381 (struct ppc_linux_features) <ppr_dscr>: New field.
382 (ppc_linux_no_features): Add initializer for ppr_dscr field.
383 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
384 new tdescs.
385 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
386 Define if not already defined.
387 * features/Makefile (WHICH): Add
388 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
389 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
390 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
391 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
392 * features/rs6000/power-dscr.xml: New file.
393 * features/rs6000/power-ppr.xml: New file.
394 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
395 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
396 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
397 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
398 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
399 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
400 * ppc-linux-nat.c: Include <sys/uio.h>.
401 (fetch_regset, store_regset, check_regset): New functions.
402 (fetch_register, fetch_ppc_registers): Call fetch_regset with
403 DSCR and PPR regsets.
404 (store_register, store_ppc_registers): Call store_regset with
405 DSCR and PPR regsets.
406 (ppc_linux_get_hwcap2): New function.
407 (ppc_linux_nat_target::read_description): Call
408 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
409 features struct if needed.
410 * ppc-linux-tdep.c: Include
411 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
412 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
413 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
414 (ppc32_linux_dscrregset): New globals.
415 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
416 and dscr regsets.
417 (ppc_linux_core_read_description): Check if the ppr and dscr
418 sections are present and set ppr_dscr in the features struct.
419 (_initialize_ppc_linux_tdep): Call
420 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
421 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
422 * ppc-linux-tdep.h (ppc32_linux_pprregset)
423 (ppc32_linux_dscrregset): Declare.
424 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
425 <ppc_dscr_regnum>: New field.
426 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
427 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
428 and dscr features.
429 (ppc_process_record_op31): Record changes to PPR and DSCR.
430
431 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
432
433 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
434 second initializer line for the have_* variables. Initialize
435 have_fpu to 0 instead of 1.
436
437 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
438
439 * arch/ppc-linux-common.c (ppc_linux_match_description):
440 Parenthesize tdesc assignements and indent them properly.
441
442 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
443
444 * ppc-linux-nat.c (fetch_register): Change if statement to else
445 if.
446 (store_register): Likewise.
447
448 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
449
450 * rs6000-tdep.c: Remove reggroups.h include.
451 (rs6000_pseudo_register_reggroup_p): Remove.
452 (rs6000_gdbarch_init): Remove call to
453 set_tdesc_pseudo_register_reggroup_p.
454
455 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
456
457 * reggroups.c (default_register_reggroup_p): Return true for
458 decfloat registers and float_reggroup.
459
460 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
461
462 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
463 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
464 ppc_linux_collect_vrregset by regcache_collect_regset.
465
466 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
467
468 * linux-tdep.c (linux_collect_regset_section_cb): Use
469 std::vector<gdb_byte> instead of char * and malloc for buf.
470 Remove xfree.
471
472 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
473
474 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
475 symtab_start instead of always using language_unknown.
476
477 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
478
479 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
480 READ_P parameter, catch and ignore register access errors from
481 either the old or new MISA location.
482 (riscv_has_feature): Update call to riscv_read_misa_reg.
483
484 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
485
486 * python/py-function.c (convert_values_to_python): Return
487 gdbpy_ref<>. Add header comment.
488 (fnpy_call): Adjust.
489
490 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
491
492 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
493 (cmdpy_completer_handle_brkchars): Adjust.
494 (cmdpy_completer): Adjust.
495
496 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
497
498 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
499 Pass correct regnum to raw_supply_zeroed.
500
501 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
502
503 * regcache.c (cooked_read_test): Add CSKY to the list of
504 architectures with a save_reggroup
505
506 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
507
508 PR gdb/23368
509 * infrun.c (follow_exec): In the follow_exec_mode_new case,
510 transfer terminal state from old new new inferior.
511 * terminal.h (swap_terminal_info): New function.
512 * inflow.c (swap_terminal_info): New function.
513
514 2018-10-23 Tom Tromey <tom@tromey.com>
515
516 * record-btrace.c (get_thread_current_frame_id): Rename from
517 get_thread_current_frame. Return a frame_id.
518 (record_btrace_start_replaying): Update.
519
520 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
521
522 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
523 for CSRs.
524
525 2018-10-23 Joel Brobecker <brobecker@adacore.com>
526
527 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
528 have_nonsteppable_watchpoint attribute to 1.
529
530 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
531
532 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
533 register names.
534 (struct register_alias): Rename to...
535 (struct riscv_register_alias): ...this, and update comment.
536 (riscv_register_aliases): Update type, and alias names. Remove
537 CSR names from this list.
538 (riscv_register_name): Use riscv_gdb_reg_names for int and float
539 register names. Add an extra assertion.
540 (riscv_is_regnum_a_named_csr): New function.
541 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
542
543 2018-10-22 Jim Wilson <jimw@sifive.com>
544
545 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
546 FP reg smaller than FP reg size, and fill with -1 instead of 0.
547
548 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
549 (riscv_register_type): Use them.
550 (riscv_print_one_register_info): Handle union of floats same as float.
551 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
552 riscv_fpreg_q_type fields.
553
554 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
555
556 * gdbarch.sh (gdbarch_num_cooked_regs): New.
557 * gdbarch.h: Re-generate.
558 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
559 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
560 * eval.c (evaluate_subexp_standard): Likewise.
561 * findvar.c (value_of_register): Likewise.
562 (value_of_register_lazy): Likewise.
563 (address_from_register): Likewise.
564 * frame.c (get_frame_register_bytes): Likewise.
565 * gdbarch-selftests.c (register_to_value_test): Likewise.
566 * h8300-tdep.c (h8300_register_type): Likewise.
567 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
568 (i386_svr4_reg_to_regnum): Likewise.
569 * infcmd.c (default_print_registers_info): Likewise.
570 (registers_info): Likewise.
571 (print_vector_info): Likewise.
572 (default_print_float_info): Likewise.
573 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
574 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
575 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
576 (mi_cmd_data_list_changed_registers): Likewise.
577 (mi_cmd_data_list_register_values): Likewise.
578 (mi_cmd_data_write_register_values): Likewise.
579 (mi_cmd_trace_frame_collected): Likewise.
580 * mips-tdep.c (print_gp_register_row): Likewise.
581 (mips_print_registers_info): Likewise.
582 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
583 * regcache.c (init_regcache_descr): Likewise.
584 (register_size): Likewise.
585 (register_dump::dump): Likewise.
586 (cooked_read_test): Likewise.
587 (cooked_write_test): Likewise.
588 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
589 (rs6000_gdbarch_init): Likewise.
590 * stabsread.c (stab_reg_to_regnum): Likewise.
591 * stack.c (info_frame_command): Likewise.
592 * target-descriptions.c (tdesc_register_name): Likewise.
593 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
594 * tui/tui-regs.c (tui_show_register_group): Likewise.
595 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
596 (user_reg_map_regnum_to_name): Likewise.
597 (value_of_user_reg): Likewise.
598 (maintenance_print_user_registers): Likewise.
599 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
600 (xtensa_register_name): Likewise.
601 (xtensa_register_type): Likewise.
602 (xtensa_reg_to_regnum): Likewise.
603 (xtensa_pseudo_register_read): Likewise.
604 (xtensa_pseudo_register_write): Likewise.
605
606 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
607
608 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
609 correctly-sized buffer with raw_read.
610 (amd64_pseudo_register_write): Use correctly-sized buffer for
611 raw_read/raw_write.
612
613 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
614
615 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
616 in add_prefix_cmd of set print type.
617
618 2018-10-19 Tom Tromey <tom@tromey.com>
619
620 PR tui/18388:
621 * NEWS: Mention tabset deprecation.
622 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
623 (update_tab_width): New function.
624 (tui_set_tab_width, tui_show_tab_width): New functions.
625 (tui_set_tab_width_command): Use update_tab_width.
626 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
627 Add new "set tui tab-width" command.
628 * tui/tui-source.c (tui_set_source_content): Update.
629 * tui/tui-disasm.c (tui_set_disassem_content): Update.
630 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
631 Don't declare.
632 (tui_tab_width): Declare.
633 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
634 (tui_set_default_tab_len): Remove.
635
636 2018-10-19 Tom Tromey <tom@tromey.com>
637
638 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
639 (key_is_backspace, tui_getc): Don't declare.
640 * tui/tui-io.c (key_is_start_sequence): Now static.
641 (key_is_end_sequence, key_is_backspace): Remove.
642 (tui_getc): Now static.
643
644 2018-10-19 Tom Tromey <tom@tromey.com>
645
646 * symfile.c (reread_symbols): Clear "static_links".
647
648 2018-10-19 Alan Hayward <alan.hayward@arm.com>
649
650 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
651 define.
652 (aarch64_linux_sigframe_init): Extra boundary checks.
653
654 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
655
656 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
657 the possibly non-existent tdesc type 'vec128', but the type of raw
658 register v16 instead.
659
660 2018-10-19 Gary Benson <gbenson@redhat.com>
661
662 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
663
664 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
665
666 PR cli/23785
667 * cli/cli-dump.c (restore_binary_file): Check if "file" is
668 NULL.
669
670 2018-10-17 Paul Koning <paul_koning@dell.com>
671
672 * charset.c (convert_between_encodings): Fix unsigned overflow.
673
674 2018-10-17 John Baldwin <jhb@FreeBSD.org>
675
676 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
677 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
678 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
679 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
680 New functions.
681 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
682 and fbsd_info_proc_mappings_header.
683 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
684 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
685 New.
686
687 2018-10-17 Joel Brobecker <brobecker@adacore.com>
688
689 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
690 Solaris Maintainer.
691
692 2018-10-15 Tom Tromey <tom@tromey.com>
693
694 * tui/tui.c (strcat_to_buf): Remove casts.
695 * tui/tui-winsource.c (tui_show_source_line)
696 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
697 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
698 * tui/tui-windata.c (tui_first_data_item_displayed)
699 (tui_delete_data_content_windows, tui_erase_data_content)
700 (tui_display_all_data, tui_display_data_from)
701 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
702 * tui/tui-win.c (tui_set_win_height)
703 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
704 casts.
705 * tui/tui-win.c (tui_resize_all): Remove casts.
706 (tui_scroll_backward_command, tui_set_focus)
707 (tui_set_tab_width_command): Likewise.
708 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
709 * tui/tui-regs.c (tui_show_register_group): Remove cast.
710 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
711 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
712 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
713 Remove casts.
714
715 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
716
717 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
718 AArch64/ARM maintainer.
719
720 2018-10-11 Gary Benson <gbenson@redhat.com>
721
722 * interps.h (interp::m_name): Make private and mutable.
723 * interps.c (interp::~interp): Free m_name.
724
725 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
726 Simon Marchi <simark@simark.ca>
727
728 * README (`configure' options): Add documentation for new
729 "--enable-unit-tests" option.
730 * acinclude.m4: Include "selftest.m4".
731 * configure: Regenerate.
732 * configure.ac: Use "GDB_AC_SELFTEST".
733 * maint.c (maintenance_selftest): Update message informing
734 that selftests have been disabled.
735 (maintenance_info_selftests): Likewise.
736 * selftest.m4: New file.
737
738 2018-10-10 Gary Benson <gbenson@redhat.com>
739
740 * remote.c (remote_target::remote_send_printf): Add
741 missing va_end found by Coverity.
742
743 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
744
745 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
746
747 2018-10-09 Tom Tromey <tom@tromey.com>
748
749 * configure: Rebuild.
750 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
751 * NEWS: Update --enable-ubsan documentation.
752
753 2018-10-09 Gary Benson <gbenson@redhat.com>
754
755 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
756 found by Coverity.
757
758 2018-10-08 Tom Tromey <tom@tromey.com>
759
760 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
761 variable.
762 (riscv_fbsd_init_abi): Likewise.
763
764 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
765 * valops.c (value_struct_elt_for_reference): Rename local variable
766 to work around the shadowing a previous local warning.
767
768 2018-10-08 John Baldwin <jhb@FreeBSD.org>
769
770 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
771 * NEWS: Mention new FreeBSD/riscv native configuration.
772 * configure.host: Add riscv*-*-freebsd*.
773 * configure.nat: Likewise.
774 * riscv-fbsd-nat.c: New file.
775
776 2018-10-08 John Baldwin <jhb@FreeBSD.org>
777
778 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
779 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
780 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
781 * NEWS: Mention new FreeBSD/riscv target.
782 * configure.tgt: Add riscv*-*-freebsd*.
783 * riscv-fbsd-tdep.c: New file.
784 * riscv-fbsd-tdep.h: New file.
785
786 2018-10-08 John Baldwin <jhb@FreeBSD.org>
787
788 * regcache.h (struct regcache_map_entry): Note that this type can
789 be used with traditional frame caches.
790 * trad-frame.c (trad_frame_set_reg_regmap): New.
791 * trad-frame.h (trad_frame_set_reg_regmap): New.
792
793 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
794
795 PR c++/16841
796 * valops.c (get_virtual_base_offset): New function.
797 (value_struct_elt_for_reference): Use it to get virtual base offset
798 and add it in calculating class member address.
799
800 2018-10-08 John Darrington <john@darrington.wattle.id.au>
801
802 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
803 (check_producer): Check if the producer is codewarrior.
804 (producer_is_codewarrior): New function.
805 (lnp_state_machine::record_line): Ignore is_stmt flag for records
806 produced by codewarrior.
807 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
808
809 2018-10-06 Tom Tromey <tom@tromey.com>
810
811 PR python/19399:
812 * python/py-inferior.c: Add "architecture" entry.
813 (infpy_architecture): New function.
814
815 2018-10-06 Tom Tromey <tom@tromey.com>
816
817 PR python/21765:
818 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
819 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
820 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
821 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
822
823 2018-10-06 Tom Tromey <tom@tromey.com>
824
825 PR build/17077:
826 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
827 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
828 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
829 #include.
830
831 2018-10-06 Tom Tromey <tom@tromey.com>
832
833 * python/py-breakpoint.c (bppy_get_location): Handle a
834 bp_breakpoint without a location.
835
836 2018-10-06 Tom Tromey <tom@tromey.com>
837
838 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
839 (_RegEx): Reformat help text.
840 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
841 (AnyCallerIs, AnyCallerMatches): Reformat help text.
842 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
843 text.
844 * python/lib/gdb/command/xmethods.py (InfoXMethod)
845 (EnableXMethod, DisableXMethod): Remove help indentation.
846 Capitalize meta-syntactic variables.
847 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
848 (EnableUnwinder, DisableUnwinder): Remove help indentation.
849 Capitalize meta-syntactic variables.
850 * python/lib/gdb/command/explore.py (ExploreCommand)
851 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
852 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
853 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
854 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
855 Remove help indentation.
856 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
857 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
858 (DisableFrameFilter, SetFrameFilterPriority)
859 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
860
861 2018-10-06 Tom Tromey <tom@tromey.com>
862
863 PR tui/28819:
864 * tui/tui-io.c (gdb_wgetch): New function.
865 (tui_mld_getc, tui_getc): Use it.
866
867 2018-10-05 Tom Tromey <tom@tromey.com>
868
869 * sol-thread.c (sol_thread_target::wait): Rename inner
870 "save_ptid".
871
872 2018-10-04 Tom Tromey <tom@tromey.com>
873
874 * configure: Rebuild.
875 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
876
877 2018-10-04 Tom Tromey <tom@tromey.com>
878
879 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
880 declaration of "block".
881
882 2018-10-04 Tom Tromey <tom@tromey.com>
883
884 * common/filestuff.c (fdwalk): Remove inner declaration of
885 "result".
886
887 2018-10-04 Tom Tromey <tom@tromey.com>
888
889 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
890 "structs_addr" and hoist declaration.
891
892 2018-10-04 Tom Tromey <tom@tromey.com>
893
894 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
895 variable "size".
896
897 2018-10-04 Tom Tromey <tom@tromey.com>
898
899 * mdebugread.c (parse_partial_symbols): Use std::string.
900
901 2018-10-04 Tom Tromey <tom@tromey.com>
902
903 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
904 * p-valprint.c (pascal_val_print): Split inner "i" variable.
905 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
906 header.
907 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
908 more inner scope.
909 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
910 * varobj.c (varobj_update): Rename inner "newobj",
911 "type_changed".
912 * valprint.c (generic_emit_char): Rename inner "buf".
913 * valops.c (find_overload_match): Rename inner "temp".
914 (value_struct_elt_for_reference): Declare "v" in more inner
915 scope.
916 * v850-tdep.c (v850_push_dummy_call): Rename "len".
917 * unittests/array-view-selftests.c (run_tests): Rename inner
918 "vec".
919 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
920 header.
921 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
922 "tsv" in more inner scope.
923 (print_one_static_tracepoint_marker): Rename inner
924 "tuple_emitter".
925 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
926 (tic6x_push_dummy_call): Don't redeclare "addr".
927 * target-float.c: Declare "dto" lower.
928 * symtab.c (lookup_local_symbol): Rename inner "sym".
929 (find_pc_sect_line): Rename inner "pc".
930 * stack.c (print_frame): Don't redeclare "gdbarch".
931 (return_command): Rename inner "gdbarch".
932 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
933 "sp".
934 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
935 header.
936 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
937 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
938 scope.
939 * remote.c (remote_target::update_thread_list): Don't redeclare
940 "tp".
941 (remote_target::process_initial_stop_replies): Rename inner
942 "thread".
943 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
944 (remote_target::wait_as): Don't redeclare "stop_reply".
945 (remote_target::get_thread_local_address): Rename inner
946 "result".
947 (remote_target::get_tib_address): Likewise.
948
949 * regcache.c (cooked_read_test): Rename "regnum".
950 * record-btrace.c (cmd_record_btrace_start): Rename inner
951 "exception".
952 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
953 loop header.
954 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
955 header.
956 (ppu2spu_sniffer): Rename inner "buf".
957 * parse.c (operator_check_standard): Rename inner "type",
958 "objfile".
959 * p-valprint.c (pascal_val_print): Introduce new scope for
960 "low_bound", "high_bound".
961 * p-exp.y (yylex): Declare "i" in loop header.
962 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
963 Lower declaration of "s".
964 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
965 header.
966 (nios2_push_dummy_call): Rename "len".
967 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
968 "buf".
969 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
970 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
971 (linux_xfer_osdata_modules): Likewise.
972 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
973 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
974 (mips_o64_push_dummy_call): Likewise.
975 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
976 "op".
977 * mi/mi-main.c (list_available_thread_groups): Rename inner
978 "tuple_emitter".
979 (mi_cmd_data_read_memory): Rename inner "opts".
980 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
981 "tuple_emitter".
982 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
983 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
984 more inner scope.
985 (parse_partial_symbols): Rename inner "pst", "p", "name"
986 * main.c (captured_main_1): Rename inner "i"s.
987 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
988 "oso2".
989 * linux-tdep.c (linux_info_proc): Rename inner "filename".
990 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
991 * infrun.c (handle_no_resumed): Don't redeclare "thread".
992 (handle_signal_stop): Rename inner "gdbarch".
993 (handle_command): Declare "signum" in loop header.
994 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
995 "status".
996 (examine_prologue): Rename inner "sol" and "sof".
997 (ia64_extract_return_value): Rename inner "val". Declare another
998 "val" in a more inner scope.
999 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1000 inner scope.
1001 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1002 "except".
1003 * findvar.c (default_read_var_value): Don't redeclare "addr".
1004 * f-exp.y (yylex): Declare "i" in loop header.
1005 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1006 Rename inner "type", "expect_type".
1007 (evaluate_subexp_for_sizeof): Rename inner "pc".
1008 * elfread.c (elf_symfile_read): Rename inner "abfd".
1009 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1010 "bytes_read".
1011 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1012 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1013 (dwarf_decode_line_header): Rename inner "lh".
1014 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1015 "offset". Declare "i" in loop header.
1016 (disassemble_dwarf_expression): Rename inner "addr_size".
1017 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1018 inner "result".
1019 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1020 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1021 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1022 "inner_list_emitter".
1023 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1024 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1025 declaration in a block.
1026 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1027 * cp-valprint.c (cp_print_value_fields): Don't redeclare
1028 "obstack_final_size".
1029 * cp-support.c (inspect_type): Declare "i" in loop header.
1030 * compile/compile.c (compile_instance::insert_symbol_error):
1031 Rename inner "e".
1032 * common/agent.c (agent_run_command): Remove inner "ret"
1033 declaration.
1034 * coffread.c (coff_symfile_read): Rename inner "name".
1035 (coff_symfile_read): Rename inner "abfd".
1036 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1037 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1038 "high".
1039 * c-exp.y (lex_one_token): Move "len" declaration lower.
1040 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1041 "gdbarch".
1042 (create_exception_master_breakpoint): Likewise. Don't redeclare
1043 "b".
1044 (watch_command_1): Declare "mark" later.
1045 (clear_command): Don't shadow "a" or "b".
1046 (delete_command): Rename inner "b".
1047 (delete_trace_command): Likewise.
1048 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1049 "op".
1050 (arm_gdbarch_init): Remove inner "e_flags".
1051 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1052 "offset" in inner blocks.
1053
1054 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
1055
1056 * dwarf-index-write.c (file_write): Don't write if the vector is
1057 empty.
1058
1059 2018-10-05 Tom de Vries <tdevries@suse.de>
1060
1061 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1062 PyArg_ParseTuple call.
1063
1064 2018-10-05 Tom de Vries <tdevries@suse.de>
1065
1066 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1067 PyArg_ParseTuple call.
1068
1069 2018-10-04 Joel Brobecker <brobecker@adacore.com>
1070
1071 * psymtab.c (recursively_search_psymtabs): Reformat parameters
1072 to avoid exceeding 80 characters per line limit.
1073
1074 2018-10-04 Tom Tromey <tom@tromey.com>
1075
1076 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1077 (reread_symbols): Update.
1078 * complaints.h (clear_complaints): Remove argument.
1079 * complaints.c (enum complaint_series): Remove.
1080 (series): Remove global.
1081 (complaint_internal): Update.
1082 (clear_complaints): Remove argument.
1083
1084 2018-10-04 Tom Tromey <tom@tromey.com>
1085
1086 * symfile.c (symbol_file_add_with_addrs): Do not print "no
1087 debugging symbols" message if there is a separate debug objfile.
1088
1089 2018-10-04 Tom Tromey <tom@tromey.com>
1090
1091 PR cli/19551:
1092 * symfile.c (symbol_file_add_with_addrs): Update output.
1093 * psymtab.c (require_partial_symbols): Update output.
1094
1095 2018-10-04 Tom Tromey <tom@tromey.com>
1096
1097 PR cli/22234:
1098 * complaints.c: Emit \n.
1099
1100 2018-10-04 Tom Tromey <tom@tromey.com>
1101
1102 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1103 (separate_debug_file_exists, find_separate_debug_file)
1104 (add_symbol_file_command, reread_symbols, allocate_symtab)
1105 (allocate_compunit_symtab): Use filtered printing, not
1106 unfiltered.
1107 * psymtab.c (require_partial_symbols, dump_psymtab)
1108 (allocate_psymtab): Use filtered printing, not unfiltered.
1109
1110 2018-10-04 Tom Tromey <tom@tromey.com>
1111
1112 * complaints.c (complaint_internal): Correctly check complaint
1113 count.
1114
1115 2018-10-04 Tom Tromey <tom@tromey.com>
1116
1117 * complaints.h (struct complaints): Remove declaration.
1118 * complaints.c (clear_complaints): Remove an unused variable.
1119
1120 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1121
1122 * MAINTAINERS (Write After Approval): Add self.
1123
1124 2018-10-03 Tom Tromey <tom@tromey.com>
1125
1126 * guile/scm-value.c (gdbscm_value_to_string): Initialize
1127 "buffer_contents".
1128 * coffread.c (coff_symtab_read): Initialize "newobj".
1129
1130 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
1131
1132 * dwarf2read.c (read_func_scope): Remove struct keyword in
1133 range-based for.
1134
1135 2018-10-03 Tom Tromey <tom@tromey.com>
1136
1137 * README: Mention --enable-ubsan.
1138 * NEWS: Mention --enable-ubsan.
1139 * acinclude.m4: Include sanitize.m4.
1140 * configure: Rebuild.
1141 * configure.ac: Call AM_GDB_UBSAN.
1142 * sanitize.m4: New file.
1143
1144 2018-10-03 Tom Tromey <tom@tromey.com>
1145
1146 * expression.h (enum exp_opcode): Use uint8_t as base type.
1147 * expprint.c (op_name): Handle invalid opcodes.
1148
1149 2018-10-03 Tom Tromey <tom@tromey.com>
1150
1151 * parse.c (prefixify_expression): Add assert.
1152 (parse_exp_in_context_1): Throw exception if the expression is
1153 empty.
1154
1155 2018-10-03 Tom Tromey <tom@tromey.com>
1156
1157 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1158
1159 2018-10-03 Tom Tromey <tom@tromey.com>
1160
1161 * c-exp.y (parse_number): Work in unsigned. Remove casts.
1162
1163 2018-10-03 Tom Tromey <tom@tromey.com>
1164
1165 * dwarf2read.c (read_subrange_type): Make "negative_mask"
1166 unsigned.
1167
1168 2018-10-03 Tom Tromey <tom@tromey.com>
1169
1170 * findvar.c (extract_integer): Do work in an unsigned type.
1171
1172 2018-10-03 Tom Tromey <tom@tromey.com>
1173
1174 * common/enum-flags.h (enum_flags::operator~): Add static assert.
1175 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1176 base type.
1177 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1178 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1179 type.
1180 * c-lang.h (enum c_string_type_values): Use unsigned as base
1181 type.
1182 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1183
1184 2018-10-03 Tom Tromey <tom@tromey.com>
1185
1186 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1187 <~dwarf2_frame_state_reg_info>: Update.
1188 <dwarf2_frame_state_reg_info>: Update.
1189 <alloc_regs>: Add assertion. Update.
1190 <reg>: Now a std::vector.
1191 <num_regs>: Remove.
1192 <swap>: Update.
1193 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1194 (execute_cfa_program_test, dwarf2_frame_cache): Update.
1195
1196 2018-10-03 Tom Tromey <tom@tromey.com>
1197
1198 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1199
1200 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1201
1202 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1203
1204 2018-10-02 Tom Tromey <tom@tromey.com>
1205
1206 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1207
1208 2018-10-02 John Darrington <john@darrington.wattle.id.au>
1209
1210 * NEWS: Mention changed commands.
1211 * ser-uds.c: New file.
1212 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1213 * configure: Regenerate.
1214 * Makefile.in: Add new file.
1215 * serial.c (serial_open): Check if filename is a socket
1216 and lookup the appropriate interface accordingly.
1217
1218 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1219
1220 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1221 define.
1222 (AARCH64_EXTRA_MAGIC): Likewise.
1223 (AARCH64_FPSIMD_MAGIC): Likewise.
1224 (AARCH64_SVE_MAGIC): Likewise.
1225 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1226 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1227 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1228 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1229 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1230 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1231 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1232 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1233 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1234 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1235 (read_aarch64_ctx): Add function.
1236 (aarch64_linux_sigframe_init): Detect FP registers.
1237
1238 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1239
1240 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1241 (AARCH64_D0_REGNUM): Likewise.
1242 (AARCH64_S0_REGNUM): Likewise.
1243 (AARCH64_H0_REGNUM): Likewise.
1244 (AARCH64_B0_REGNUM): Likewise.
1245 (AARCH64_SVE_V0_REGNUM): Likewise.
1246 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1247 (AARCH64_D0_REGNUM): Likewise.
1248 (AARCH64_S0_REGNUM): Likewise.
1249 (AARCH64_H0_REGNUM): Likewise.
1250 (AARCH64_B0_REGNUM): Likewise.
1251 (AARCH64_SVE_V0_REGNUM): Likewise.
1252
1253 2018-10-01 Gary Benson <gbenson@redhat.com>
1254
1255 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1256 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1257 prfpregset_t instead of gdb_prfpregset_t.
1258 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1259 * configure, config.in: Rebuild.
1260
1261 2018-10-01 Gary Benson <gbenson@redhat.com>
1262
1263 * common/gdb_proc_service.h: New file, factored out from...
1264 * gdb_proc_service.h: Moved common code to the above file.
1265 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1266
1267 2018-10-01 Gary Benson <gbenson@redhat.com>
1268
1269 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1270 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
1271
1272 2018-10-01 Gary Benson <gbenson@redhat.com>
1273
1274 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1275 (AC_CHECK_HEADERS): Check for linux/elf.h.
1276 * configure, config.in: Rebuild.
1277 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1278 doesn't define elf_fpregset_t.
1279
1280 2018-10-01 Gary Benson <gbenson@redhat.com>
1281
1282 * gdb_proc_service.h: Whitespace change.
1283
1284 2018-10-01 Tom Tromey <tom@tromey.com>
1285
1286 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1287 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1288 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1289
1290 2018-10-01 Tom Tromey <tom@tromey.com>
1291
1292 * README: Minor change.
1293
1294 2018-09-30 Pedro Alves <palves@redhat.com>
1295
1296 * darwin-nat-info.c (darwin_debug_regions_recurse)
1297 (info_mach_exceptions_command): Remove unused local variables.
1298 * darwin-nat.c (darwin_decode_notify_message)
1299 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1300 (darwin_stop_inferior, darwin_setup_exceptions)
1301 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1302 (darwin_nat_target::attach, darwin_nat_target::detach)
1303 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1304 local variables.
1305 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1306 variables.
1307
1308 2018-09-29 Tom Tromey <tom@tromey.com>
1309
1310 * README: Remove some leftover text.
1311
1312 2018-09-29 Tom Tromey <tom@tromey.com>
1313
1314 * PROBLEMS: Rewrite.
1315 * README: Update.
1316
1317 2018-09-28 John Baldwin <jhb@FreeBSD.org>
1318
1319 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1320 case with explicit breakpoint kind.
1321 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1322 'additional_info' and related logic.
1323 (riscv_debug_breakpoints): New variable.
1324 (riscv_breakpoint_kind_from_pc): Use the length of the existing
1325 instruction to determine the breakpoint kind.
1326 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1327 flag. Update description of 'set/show riscv
1328 use-compressed-breakpoints' flag.
1329
1330 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
1331
1332 (NEWS): Mention changes to frame related commands.
1333 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1334 (add_prefix_cmd_suppress_notification): New function.
1335 (add_com_suppress_notification): Call
1336 add_cmd_suppress_notification.
1337 * command.h (add_cmd_suppress_notification): Declare.
1338 (add_prefix_cmd_suppress_notification): Declare.
1339 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1340 (parse_frame_specification): Moved from stack.c, with
1341 simplification to handle a single argument.
1342 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1343 switch to the selected frame. Add a header comment.
1344 * stack.c: Remove 'safe-ctype.h' include.
1345 (find_frame_for_function): Add declaration.
1346 (find_frame_for_address): New function.
1347 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1348 (frame_selection_by_function_completer): New function.
1349 (info_frame_command): Rename to...
1350 (info_frame_command_core): ...this, and update parameter types.
1351 (select_frame_command): Rename to...
1352 (select_frame_command_core): ...this, and update parameter types.
1353 (frame_command): Rename to...
1354 (frame_command_core): ...this, and update parameter types.
1355 (class frame_command_helper): New class to wrap implementations of
1356 frame related sub-commands.
1357 (frame_apply_cmd_list): New static global.
1358 (frame_cmd_list): Make static.
1359 (select_frame_cmd_list): New global for sub-commands.
1360 (info_frame_cmd_list): New global for sub-commands.
1361 (_initialize_stack): Register sub-commands for 'frame',
1362 'select-frame', and 'info frame'. Update 'frame apply' commands
1363 to use frame_apply_cmd_list. Move function local static
1364 frame_apply_list to file static frame_apply_cmd_list for
1365 consistency.
1366 * stack.h (select_frame_command): Delete declarationn.
1367 (select_frame_for_mi): Declare new function.
1368
1369 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
1370
1371 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1372 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1373 and NOP.
1374
1375 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
1376
1377 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1378
1379 2018-09-26 Tom Tromey <tom@tromey.com>
1380
1381 * valops.c (auto_abandon): Remove dead code.
1382
1383 2018-09-26 Tom Tromey <tom@tromey.com>
1384
1385 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1386
1387 2018-09-24 Tom Tromey <tom@tromey.com>
1388
1389 * common/pathstuff.c (get_standard_cache_dir): Make
1390 "xdg_cache_home" and "home" const.
1391 * top.c (init_history): Make "tmpenv" const.
1392 * main.c (get_init_files): Make "homedir" const.
1393
1394 2018-09-23 Tom Tromey <tom@tromey.com>
1395
1396 PR python/18852:
1397 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1398
1399 2018-09-23 Tom Tromey <tom@tromey.com>
1400
1401 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1402 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1403 * python/python-internal.h (gdbpy_handle_exception): Declare.
1404 * python/py-utils.c (gdbpy_handle_exception): New function.
1405
1406 2018-09-23 Tom Tromey <tom@tromey.com>
1407
1408 PR python/17284:
1409 * python/py-type.c (typy_template_argument): Check for negative
1410 argument number.
1411
1412 2018-09-23 Tom Tromey <tom@tromey.com>
1413
1414 PR python/14062:
1415 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1416
1417 2018-09-23 Tom Tromey <tom@tromey.com>
1418
1419 PR python/18170:
1420 * python/py-value.c (valpy_int): Allow conversion from pointer
1421 type.
1422
1423 2018-09-23 Tom Tromey <tom@tromey.com>
1424
1425 PR python/20126:
1426 * python/py-value.c (valpy_int): Respect type sign.
1427
1428 2018-09-23 Tom Tromey <tom@tromey.com>
1429
1430 PR python/18352;
1431 * python/py-value.c (valpy_float): Allow conversions from int or
1432 char.
1433 (valpy_int, valpy_long): Allow conversions from float.
1434
1435 2018-09-23 Tom Tromey <tom@tromey.com>
1436
1437 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1438 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1439
1440 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1441
1442 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1443 __sighndlr.
1444 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1445
1446 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
1447
1448 * windows-nat.c (windows_nat_target::wait): Remove a spurious
1449 target_terminal::ours().
1450
1451 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
1452
1453 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1454 of vl to ULONGEST.
1455
1456 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
1457
1458 * breakpoint.c (update_inserted_breakpoint_locations): Remove
1459 redundant condition.
1460
1461 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1462
1463 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1464
1465 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1466 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
1467 * sol-thread.c (ps_pdmodel): Don't guard definition.
1468
1469 * procfs.c: Fix formatting.
1470
1471 * procfs.c (sysset_t_alloc): Remove.
1472 (create_procinfo): Use XNEW instead of sysset_t_alloc.
1473 (procfs_debug_inferior): Likewise.
1474 (procfs_set_exec_trap): Likewise.
1475 (proc_set_traced_sysentry): Don't allocate argp dynamically.
1476 (proc_set_traced_sysexit): Likewise.
1477
1478 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1479 (dead_procinfo): Likewise.
1480 (proc_warn): Likewise.
1481 (proc_error): Likewise.
1482 (proc_get_LDT_entry): Likewise.
1483 (do_attach): Likewise.
1484 (procfs_target::pid_to_str): Likewise.
1485 (iterate_over_mappings): Likewise.
1486
1487 * procfs.c (create_procinfo): Fix ARI warning.
1488 (proc_get_status): Likewise.
1489 (proc_stop_process): Likewise.
1490 (proc_run_process): Likewise.
1491 (proc_kill): Likewise.
1492 (proc_get_LDT_entry): Likewise.
1493 (procfs_find_LDT_entry): Likewise.
1494 (proc_update_threads): Likewise.
1495 (proc_iterate_over_threads): Likewise.
1496 (do_attach): Likewise.
1497 (procfs_xfer_memory): Likewise.
1498 (invalidate_cache): Likewise.
1499 (procfs_target::resume): Likewise.
1500 (procfs_init_inferior): Likewise.
1501 (procfs_set_exec_trap): Likewise.
1502 (procfs_target::thread_alive): Likewise.
1503 (procfs_target::pid_to_exec_file): Likewise.
1504 (iterate_over_mappings): Likewise.
1505 (procfs_target::make_corefile_notes): Likewise.
1506 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1507
1508 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1509 (procfs_find_LDT_entry): Likewise.
1510 * sol-thread.c (ps_lgetLDT): Likewise.
1511
1512 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1513
1514 PR tdep/17903
1515 * procfs.c (procfs_target): Declare pid_to_exec_file.
1516 (procfs_target::pid_to_exec_file): New.
1517
1518 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1519
1520 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1521 renaming.
1522 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1523 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1524
1525 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1526
1527 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1528 (supply_fpregset, fill_fpregset): Move ...
1529 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1530 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1531 Remove references to ioctl-based procfs.
1532 Include <sys/reg.h>.
1533 Remove PR_MODEL_NATIVE guards.
1534 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1535 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1536
1537 2018-09-19 Xavier Roirand <roirand@adacore.com>
1538
1539 PR gdb/20981:
1540 * solib-darwin.c (darwin_get_dyld_bfd): New function.
1541 (darwin_solib_get_all_image_info_addr_at_init): Update call.
1542 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1543
1544 2018-09-19 John Baldwin <jhb@FreeBSD.org>
1545
1546 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1547 (fbsd_print_sockaddr_in6): Likewise.
1548
1549 2018-09-19 Richard Bunt <richard.bunt@arm.com>
1550 Chris January <chris.january@arm.com>
1551
1552 * eval.c (skip_undetermined_arglist): Skip argument list helper.
1553 (evaluate_subexp_standard): Return a dummy type when
1554 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1555 OP_F77_UNDETERMINED_ARGLIST case.
1556 * expression.h (enum noside): Update comment.
1557
1558 2018-09-19 George Vasick <george.vasick@oracle.com>
1559
1560 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1561
1562 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
1563 April Chin <april.chin@oracle.com>
1564 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1565
1566 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1567 uint_t lwpid_t.
1568 (create_procinfo): Print pids in /proc without leading zeros.
1569
1570 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
1571
1572 * nios2-tdep.c (nios2_gcc_target_options): New.
1573 (nios2_gdb_arch_init): Install new hook.
1574
1575 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
1576
1577 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1578 New file.
1579 * update-gnulib.sh: Apply patch.
1580 * configure: Re-generate.
1581
1582 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1583
1584 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1585 description. Make "info proc" command descriptions more
1586 consistent.
1587
1588 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1589
1590 * NEWS: Mention 'info proc files' command.
1591
1592 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1593
1594 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1595 descriptors for IP_FILES and IP_ALL.
1596
1597 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1598
1599 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1600 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1601 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1602 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1603 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1604 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1605 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1606 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1607 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1608 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1609 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1610 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1611 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1612 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1613 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1614 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1615 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1616 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1617 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1618 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1619 (struct fbsd_sockaddr_un): New types.
1620 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1621 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1622 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1623 (fbsd_core_info_proc_files): New functions.
1624 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1625 IP_ALL.
1626 * fbsd-tdep.h (fbsd_info_proc_files_header)
1627 (fbsd_info_proc_files_entry): New.
1628
1629 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1630
1631 * defs.h (enum info_proc_what) [IP_FILES]: New value.
1632 * infcmd.c (info_proc_cmd_files): New function.
1633 (_initialize_infcmd): Register 'info proc files' command.
1634
1635 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1636
1637 * gnulib/aclocal-m4-deps.mk: Re-generate.
1638 * gnulib/aclocal.m4: Re-generate.
1639 * gnulib/config.in: Re-generate.
1640 * gnulib/configure: Re-generate.
1641 * gnulib/import/Makefile.am: Re-generate.
1642 * gnulib/import/Makefile.in: Re-generate.
1643 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1644 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1645 * gnulib/import/arpa_inet.in.h: New file.
1646 * gnulib/import/inet_ntop.c: New file.
1647 * gnulib/import/m4/arpa_inet_h.m4: New file.
1648 * gnulib/import/m4/inet_ntop.m4: New file.
1649 * gnulib/import/m4/netinet_in_h.m4: New file.
1650 * gnulib/import/m4/socklen.m4: New file.
1651 * gnulib/import/m4/sockpfaf.m4: New file.
1652 * gnulib/import/m4/stdalign.m4: New file.
1653 * gnulib/import/m4/sys_uio_h.m4: New file.
1654 * gnulib/import/netinet_in.in.h: New file.
1655 * gnulib/import/stdalign.in.h: New file.
1656 * gnulib/import/sys_socket.c: New file.
1657 * gnulib/import/sys_socket.in.h: New file.
1658 * gnulib/import/sys_uio.in.h: New file.
1659 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1660 module.
1661
1662 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1663
1664 * gnulib/aclocal-m4-deps.mk: New file.
1665 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1666 deterministically.
1667
1668 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1669
1670 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1671 KVE_PATH.
1672
1673 2018-09-18 Tom Tromey <tom@tromey.com>
1674
1675 * compile/compile-object-load.c (struct
1676 link_hash_table_cleanup_data): Add constructor and destructor.
1677 Use DISABLE_COPY_AND_ASSIGN.
1678 (~link_hash_table_cleanup_data): Rename from
1679 link_hash_table_free. Now a destructor.
1680 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
1681
1682 2018-09-18 Tom Tromey <tom@tromey.com>
1683
1684 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1685 * compile/compile-object-load.c (struct munmap_list): Move to
1686 header file.
1687 (munmap_list::add): Rename from munmap_list_add; rewrite.
1688 (munmap_list::~munmap_list): Rename from munmap_list_free.
1689 (munmap_listp_free_cleanup): Remove.
1690 (compile_object_load): Update.
1691 * compile/compile-object-load.h (struct munmap_list): Move from
1692 compile-object-load.c. Rewrite.
1693
1694 2018-09-18 Alan Hayward <alan.hayward@arm.com>
1695
1696 * aarch64-tdep.c (pass_in_v): Use register size.
1697 (aarch64_extract_return_value): Likewise.
1698 (aarch64_store_return_value): Likewise.
1699
1700 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1701
1702 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1703 rlim_t.
1704
1705 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1706
1707 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1708 Fix short help line.
1709
1710 2018-09-17 Tom Tromey <tom@tromey.com>
1711
1712 PR python/20445:
1713 * configure: Rebuild.
1714 * configure.ac: Conditionally use -DNDEBUG for Python.
1715
1716 2018-09-17 Tom Tromey <tom@tromey.com>
1717
1718 * configure: Rebuild.
1719 * configure.ac: Use gmp as a library dependency when checking for
1720 mpfr.
1721
1722 2018-09-17 Pedro Alves <palves@redhat.com>
1723
1724 * python/py-inferior.c (find_inferior_object): Delete.
1725
1726 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
1727
1728 * compile/compile-cplus-types.c
1729 (compile_cplus_instance::enter_scope): Don't use new_scope after
1730 std::move.
1731
1732 2018-09-17 Tom Tromey <tom@tromey.com>
1733
1734 * common/pathstuff.c (get_standard_cache_dir): Use
1735 ~/Library/Caches on macOS.
1736 * common/pathstuff.h (get_standard_cache_dir): Update comment.
1737
1738 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
1739
1740 PR python/23669
1741 * breakpoint.c (commands_cmd_element): New.
1742 (_initialize_breakpoint): Assign commands_cmd_element.
1743 * breakpoint.h (commands_cmd_element): New.
1744 * cli/cli-script.c (while_cmd_element, if_command,
1745 define_cmd_element): New.
1746 (command_name_equals): Remove.
1747 (process_next_line): Compare commands by pointer, not by name.
1748 (_initialize_cli_script): Assign the various cmd_list_element
1749 variables.
1750 * compile/compile.c (compile_cmd_element): New.
1751 (_initialize_compile): Assign compile_cmd_element.
1752 * compile/compile.h (compile_cmd_element): New.
1753 * guile/guile.c (guile_cmd_element): New.
1754 (install_gdb_commands): Assign guile_cmd_element.
1755 * guile/guile.h (guile_cmd_element): New.
1756 * python/python.c (python_cmd_element): New.
1757 (_initialize_python): Assign python_cmd_element.
1758 * python/python.h (python_cmd_element): New.
1759 * tracepoint.c (while_stepping_cmd_element): New.
1760 (_initialize_tracepoint): Assign while_stepping_cmd_element.
1761 * tracepoint.h (while_stepping_cmd_element): New.
1762
1763 2018-09-17 Tom Tromey <tom@tromey.com>
1764
1765 * infrun.c (save_infcall_suspend_state): Return
1766 infcall_suspend_state_up.
1767 (save_infcall_control_state): Return infcall_control_state_up.
1768 * inferior.h (save_infcall_suspend_state)
1769 (save_infcall_control_state): Declare later. Return unique
1770 pointers.
1771
1772 2018-09-17 Tom Tromey <tom@tromey.com>
1773
1774 * infrun.c (struct stop_context): Declare constructor,
1775 destructor, "changed" method.
1776 (stop_context::stop_context): Rename from save_stop_context.
1777 (stop_context::~stop_context): Rename from
1778 release_stop_context_cleanup.
1779 (normal_stop): Update.
1780 (stop_context::changed): Rename from stop_context_changed. Return
1781 bool.
1782
1783 2018-09-17 Tom Tromey <tom@tromey.com>
1784
1785 * inferior.h (struct infcall_suspend_state_deleter): New.
1786 (infcall_suspend_state_up): New typedef.
1787 (struct infcall_control_state_deleter): New.
1788 (infcall_control_state_up): New typedef.
1789 (make_cleanup_restore_infcall_suspend_state)
1790 (make_cleanup_restore_infcall_control_state): Don't declare.
1791 * infcall.c (call_function_by_hand_dummy): Update.
1792 * infrun.c (do_restore_infcall_suspend_state_cleanup)
1793 (make_cleanup_restore_infcall_suspend_state): Remove.
1794 (do_restore_infcall_control_state_cleanup)
1795 (make_cleanup_restore_infcall_control_state): Remove.
1796
1797 2018-09-17 Tom Tromey <tom@tromey.com>
1798
1799 * gdbthread.h (struct thread_control_state): Add initializer.
1800 (class thread_info) <control>: Remove initializer.
1801 * inferior.h (struct inferior_control_state): Add initializer.
1802 (class inferior) <control>: Remove initializer.
1803 (exit_inferior_1): Update.
1804 * infrun.c (struct infcall_control_state): Add constructors.
1805 (save_infcall_control_state): Use new.
1806 (restore_infcall_control_state, discard_infcall_control_state):
1807 Use delete.
1808
1809 2018-09-17 Tom Tromey <tom@tromey.com>
1810
1811 * infrun.c (struct infcall_suspend_state) <registers>: Now a
1812 unique_ptr.
1813 <siginfo_data>: Now a unique_xmalloc_ptr.
1814 (save_infcall_suspend_state, restore_infcall_suspend_state)
1815 (discard_infcall_suspend_state)
1816 (get_infcall_suspend_state_regcache): Update.
1817
1818 2018-09-17 Tom Tromey <tom@tromey.com>
1819
1820 * gdbthread.h (struct thread_suspend_state): Add initializers.
1821 (class thread_info) <suspend>: Remove initializer.
1822 * infrun.c (struct infcall_suspend_state): Add initializers.
1823 (save_infcall_suspend_state): Use new.
1824 (discard_infcall_suspend_state): Use delete.
1825
1826 2018-09-16 Tom Tromey <tom@tromey.com>
1827
1828 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1829 Remove.
1830 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1831 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1832 (py_varobj_iter_new): Likewise.
1833 (py_varobj_get_iterator): Use gdbpy_ref.
1834
1835 2018-09-16 Tom Tromey <tom@tromey.com>
1836
1837 * python/py-threadevent.c (py_get_event_thread): Simplify.
1838 * python/py-inferior.c (infpy_thread_from_thread_handle):
1839 Return immediately after calling thread_to_thread_object. Use
1840 Py_RETURN_NONE.
1841 (thread_to_thread_object): Set the exception on a NULL return.
1842
1843 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1844
1845 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1846
1847 2018-09-16 Tom Tromey <tom@tromey.com>
1848
1849 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1850 Remove.
1851
1852 2018-09-16 Tom Tromey <tom@tromey.com>
1853
1854 * python/python-internal.h (thread_to_thread_object): Change
1855 return type.
1856 * python/py-inferior.c (thread_to_thread_object): Return a new
1857 reference.
1858 (infpy_thread_from_thread_handle): Update.
1859 * python/py-infthread.c (gdbpy_selected_thread): Update.
1860 * python/py-stopevent.c (create_stop_event_object): Update.
1861 * python/py-threadevent.c (py_get_event_thread): Return a new
1862 reference.
1863 (py_get_event_thread): Update.
1864 * python/py-event.h (py_get_event_thread): Change return type.
1865 * python/py-continueevent.c (create_continue_event_object):
1866 Update.
1867
1868 2018-09-16 Tom Tromey <tom@tromey.com>
1869
1870 * python/py-progspace.c (pspy_get_objfiles): Update.
1871 * python/python-internal.h (objfile_to_objfile_object): Change
1872 return type.
1873 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1874 Update.
1875 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1876 Update.
1877 * python/python.c (gdbpy_get_current_objfile): Update.
1878 (gdbpy_objfiles): Update.
1879 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1880 Update.
1881 (objfile_to_objfile_object): Return a new reference.
1882 * python/py-symtab.c (stpy_get_objfile): Update.
1883 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1884 Update.
1885
1886 2018-09-16 Tom Tromey <tom@tromey.com>
1887
1888 * python/py-inferior.c (infpy_get_progspace): Update.
1889 * python/python-internal.h (pspace_to_pspace_object): Change
1890 return type.
1891 * python/py-newobjfileevent.c
1892 (create_clear_objfiles_event_object): Update.
1893 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1894 Update.
1895 * python/python.c (gdbpy_get_current_progspace): Update.
1896 (gdbpy_progspaces): Update.
1897 * python/py-progspace.c (pspace_to_pspace_object): Return a new
1898 reference.
1899 * python/py-objfile.c (objfpy_get_progspace): Update.
1900 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1901 Update.
1902
1903 2018-09-16 Tom Tromey <tom@tromey.com>
1904
1905 * python/lib/gdb/__init__.py (current_progspace, objfiles)
1906 (solib_name, block_for_pc, find_pc_line): New functions.
1907 (execute_unwinders): Update.
1908 * python/py-block.c (gdbpy_block_for_pc): Remove.
1909 * python/py-inferior.c (infpy_get_progspace): New function.
1910 (inferior_object_getset) <progspace>: Add.
1911 * python/py-progspace.c (pspy_objfiles): Rewrite.
1912 (pspy_solib_name, pspy_block_for_pc)
1913 (pspy_find_pc_line, pspy_is_valid): New functions.
1914 (progspace_object_methods): Add entries for solib_name,
1915 block_for_pc, find_pc_line, is_valid.
1916 * python/python-internal.h (gdbpy_block_for_pc)
1917 (build_objfiles_list): Don't declare.
1918 * python/python.c: Don't include solib.h.
1919 (gdbpy_solib_name, gdbpy_find_pc_line)
1920 (gdbpy_get_current_progspace, build_objfiles_list)
1921 (gdbpy_objfiles): Remove.
1922 (GdbMethods) <current_progspace, objfiles, block_for_pc,
1923 solib_name, find_pc_line>: Remove entries.
1924
1925 2018-09-16 Tom Tromey <tom@tromey.com>
1926
1927 * top.c (new_ui_command): Use GNU style for metasyntactic
1928 variables.
1929 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1930 variables.
1931 * maint.c (maintenance_translate_address): Remove "<>" around
1932 text.
1933 * interps.c (interpreter_exec_cmd): Use GNU style for
1934 metasyntactic variables.
1935 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1936 metasyntactic variables.
1937 * tracepoint.c (tfind_range_command): Use GNU style for
1938 metasyntactic variables.
1939 (tfind_outside_command): Likewise.
1940 (_initialize_tracepoint): Likewise.
1941 * remote.c (extended_remote_target::create_inferior): Use GNU
1942 style for metasyntactic variables.
1943 * sparc64-tdep.c (adi_examine_command): Use GNU style for
1944 metasyntactic variables.
1945 (adi_assign_command): Likewise.
1946
1947 2018-09-16 Tom Tromey <tom@tromey.com>
1948
1949 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1950 metasyntactic variables. Print message if no disassembler options
1951 are available.
1952
1953 2018-09-15 Tom Tromey <tom@tromey.com>
1954
1955 * infcmd.c (get_inferior_args): Return const char *.
1956 * inferior.h (get_inferior_args): Return type now const.
1957 * linux-tdep.c (linux_fill_prpsinfo): Update.
1958 * procfs.c (procfs_target::make_corefile_notes): Update.
1959
1960 2018-09-07 Tom Tromey <tom@tromey.com>
1961
1962 * python/python.c (execute_gdb_command): Call bpstat_do_actions
1963 inside the TRY.
1964
1965 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
1966
1967 * nios2-tdep.c (nios2_type_align): New.
1968 (nios2_gdb_arch_init): Install type_align hook.
1969
1970 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1971
1972 * eval.c (fake_method::fake_method): Call xzalloc directly for a
1973 type that is neither object file owned, nor gdbarch owned.
1974 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1975 gdbarch is non-NULL.
1976 (alloc_type_instance): Allocate non-objfile owned types on the
1977 gdbarch obstack.
1978 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1979 using TYPE_ALLOC to ensure memory is allocated on the correct
1980 obstack.
1981 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1982 obstack, or the gdbarch obstack.
1983 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1984
1985 2018-09-14 Tom Tromey <tom@tromey.com>
1986
1987 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1988 block.
1989
1990 2018-09-14 Tom Tromey <tom@tromey.com>
1991
1992 * nat/fork-inferior.c (get_startup_shell): Remove "static".
1993
1994 2018-09-13 Tom Tromey <tom@tromey.com>
1995
1996 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1997 static.
1998
1999 2018-09-13 Tom Tromey <tom@tromey.com>
2000
2001 * exec.c (try_open_exec_file): Use std::string.
2002
2003 2018-09-13 Tom Tromey <tom@tromey.com>
2004
2005 * utils.h (gdb_bfd_errmsg): Return std::string.
2006 * exec.c (exec_file_attach): Update.
2007 * compile/compile-object-load.c (compile_object_load): Update.
2008 * utils.c (gdb_bfd_errmsg): Return std::string.
2009
2010 2018-09-13 Tom Tromey <tom@tromey.com>
2011
2012 * procfs.c (struct procinfo_deleter): New.
2013 (procinfo_up): New typedef.
2014 (do_destroy_procinfo_cleanup): Remove.
2015 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
2016
2017 2018-09-13 Tom Tromey <tom@tromey.com>
2018
2019 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2020
2021 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2022 2018-09-13 Tom Tromey <tom@tromey.com>
2023
2024 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2025 (pspy_get_objfiles): New function.
2026 (progspace_object_methods): New.
2027 (pspace_object_type): Add tp_methods callback.
2028 * python/python-internal.h (build_objfiles_list): New
2029 declaration.
2030 * python/python.c (build_objfiles_list): New function.
2031 (gdbpy_objfiles): Implement using build_objfiles_list.
2032 * NEWS: Mention the Progspace.objfiles method.
2033
2034 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2035
2036 * python/py-inferior.c (infpy_get_progspace): New function.
2037 (inferior_object_getset): Add progspace property.
2038 * NEWS: Mention the new property.
2039
2040 2018-09-13 Tom Tromey <tom@tromey.com>
2041
2042 PR rust/23650:
2043 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2044
2045 2018-09-13 Tom Tromey <tom@tromey.com>
2046
2047 PR rust/23626:
2048 * rust-lang.c (rust_enum_variant): Now static.
2049 (rust_empty_enum_p): New function.
2050 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2051 Handle empty enum.
2052
2053 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2054
2055 * python/py-inferior.c (infpy_repr): New.
2056 (inferior_object_type): Register infpy_repr.
2057 * python/py-objfile.c (objfpy_repr): New.
2058 (objfile_object_type): Register objfpy_repr.
2059
2060 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2061
2062 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2063
2064 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2065
2066 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2067 typo.
2068
2069 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
2070
2071 * common/common-utils.c: Don't include '<sys/stat.h>'.
2072 (is_regular_file): Move to...
2073 * common/filestuff.c (is_regular_file): ... here.
2074 * common/common-utils.h (is_regular_file): Move to...
2075 * common/filestuff.h (is_regular_file): ... here.
2076
2077 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
2078
2079 * skip.c (debug_skip): New variable.
2080 (skiplist_entry::do_skip_file_p): Add debug output.
2081 (skiplist_entry::do_skip_gfile_p): Likewise.
2082 (skiplist_entry::skip_function_p): Likewise.
2083 (_initialize_step_skip): Create debug command.
2084 * NEWS: Mention set/show debug skip.
2085
2086 2018-09-11 Xavier Roirand <roirand@adacore.com>
2087
2088 * darwin-nat.c (should_disable_startup_with_shell):
2089 New function.
2090 (darwin_nat_target::create_inferior): Add call.
2091
2092 2018-09-11 Xavier Roirand <roirand@adacore.com>
2093
2094 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2095 inf_port, msg_state>: Initialize.
2096 (struct darwin_thread_info) <signaled, single_step>: Change
2097 type and initialize.
2098 (struct darwin_thread_info) <event>: Initialize.
2099
2100 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2101
2102 PR gdb/23555
2103 PR gdb/23558
2104 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2105 guesses.
2106
2107 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2108
2109 Revert:
2110 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2111
2112 PR gdb/23555
2113 PR gdb/23558
2114 * gnulib/aclocal.m4: Regenerate.
2115 * gnulib/config.in: Regenerate.
2116 * gnulib/configure: Regenerate.
2117 * gnulib/import/Makefile.am: Update.
2118 * gnulib/import/Makefile.in: Update.
2119 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2120 * gnulib/import/_Noreturn.h: ... this.
2121 * gnulib/import/alloca.in.h: Update.
2122 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2123 * gnulib/import/arg-nonnull.h: ... this.
2124 * gnulib/import/assure.h: Update.
2125 * gnulib/import/at-func.c: Update.
2126 * gnulib/import/basename-lgpl.c: Update.
2127 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2128 * gnulib/import/c++defs.h: ... this.
2129 * gnulib/import/canonicalize-lgpl.c: Update.
2130 * gnulib/import/cdefs.h: Update.
2131 * gnulib/import/chdir-long.c: Update.
2132 * gnulib/import/chdir-long.h: Update.
2133 * gnulib/import/cloexec.c: Update.
2134 * gnulib/import/cloexec.h: Update.
2135 * gnulib/import/close.c: Update.
2136 * gnulib/import/closedir.c: Update.
2137 * gnulib/import/config.charset: Update.
2138 * gnulib/import/dirent-private.h: Update.
2139 * gnulib/import/dirent.in.h: Update.
2140 * gnulib/import/dirfd.c: Update.
2141 * gnulib/import/dirname-lgpl.c: Update.
2142 * gnulib/import/dirname.h: Update.
2143 * gnulib/import/dosname.h: Update.
2144 * gnulib/import/dup-safer-flag.c: Update.
2145 * gnulib/import/dup-safer.c: Update.
2146 * gnulib/import/dup.c: Update.
2147 * gnulib/import/dup2.c: Update.
2148 * gnulib/import/errno.in.h: Update.
2149 * gnulib/import/error.c: Update.
2150 * gnulib/import/error.h: Update.
2151 * gnulib/import/exitfail.c: Update.
2152 * gnulib/import/exitfail.h: Update.
2153 * gnulib/import/extra/update-copyright: Update.
2154 * gnulib/import/fchdir.c: Update.
2155 * gnulib/import/fcntl.c: Update.
2156 * gnulib/import/fcntl.in.h: Update.
2157 * gnulib/import/fd-hook.c: Update.
2158 * gnulib/import/fd-hook.h: Update.
2159 * gnulib/import/fd-safer-flag.c: Update.
2160 * gnulib/import/fd-safer.c: Update.
2161 * gnulib/import/fdopendir.c: Update.
2162 * gnulib/import/filename.h: Update.
2163 * gnulib/import/filenamecat-lgpl.c: Update.
2164 * gnulib/import/filenamecat.h: Update.
2165 * gnulib/import/flexmember.h: Update.
2166 * gnulib/import/float+.h: Update.
2167 * gnulib/import/float.c: Update.
2168 * gnulib/import/float.in.h: Update.
2169 * gnulib/import/fnmatch.c: Update.
2170 * gnulib/import/fnmatch.in.h: Update.
2171 * gnulib/import/fnmatch_loop.c: Update.
2172 * gnulib/import/fpucw.h: Update.
2173 * gnulib/import/frexp.c: Update.
2174 * gnulib/import/frexpl.c: Update.
2175 * gnulib/import/fstat.c: Update.
2176 * gnulib/import/fstatat.c: Update.
2177 * gnulib/import/getcwd-lgpl.c: Update.
2178 * gnulib/import/getcwd.c: Update.
2179 * gnulib/import/getdtablesize.c: Update.
2180 * gnulib/import/getlogin_r.c: Update.
2181 * gnulib/import/getprogname.c: Update.
2182 * gnulib/import/getprogname.h: Update.
2183 * gnulib/import/gettext.h: Update.
2184 * gnulib/import/gettimeofday.c: Update.
2185 * gnulib/import/glob-libc.h: Update.
2186 * gnulib/import/glob.c: Update.
2187 * gnulib/import/glob.in.h: Update.
2188 * gnulib/import/glob_internal.h: Update.
2189 * gnulib/import/glob_pattern_p.c: Update.
2190 * gnulib/import/globfree.c: Update.
2191 * gnulib/import/hard-locale.c: Update.
2192 * gnulib/import/hard-locale.h: Update.
2193 * gnulib/import/intprops.h: Update.
2194 * gnulib/import/inttypes.in.h: Update.
2195 * gnulib/import/isnan.c: Update.
2196 * gnulib/import/isnand-nolibm.h: Update.
2197 * gnulib/import/isnand.c: Update.
2198 * gnulib/import/isnanl-nolibm.h: Update.
2199 * gnulib/import/isnanl.c: Update.
2200 * gnulib/import/itold.c: Update.
2201 * gnulib/import/libc-config.h: Update.
2202 * gnulib/import/limits.in.h: Update.
2203 * gnulib/import/localcharset.c: Update.
2204 * gnulib/import/localcharset.h: Update.
2205 * gnulib/import/localtime-buffer.c: Update.
2206 * gnulib/import/localtime-buffer.h: Update.
2207 * gnulib/import/lstat.c: Update.
2208 * gnulib/import/m4/00gnulib.m4: Update.
2209 * gnulib/import/m4/__inline.m4: Update.
2210 * gnulib/import/m4/absolute-header.m4: Update.
2211 * gnulib/import/m4/alloca.m4: Update.
2212 * gnulib/import/m4/builtin-expect.m4: Update.
2213 * gnulib/import/m4/canonicalize.m4: Update.
2214 * gnulib/import/m4/chdir-long.m4: Update.
2215 * gnulib/import/m4/close.m4: Update.
2216 * gnulib/import/m4/closedir.m4: Update.
2217 * gnulib/import/m4/configmake.m4: Update.
2218 * gnulib/import/m4/d-ino.m4: Update.
2219 * gnulib/import/m4/d-type.m4: Update.
2220 * gnulib/import/m4/dirent_h.m4: Update.
2221 * gnulib/import/m4/dirfd.m4: Update.
2222 * gnulib/import/m4/dirname.m4: Update.
2223 * gnulib/import/m4/double-slash-root.m4: Update.
2224 * gnulib/import/m4/dup.m4: Update.
2225 * gnulib/import/m4/dup2.m4: Update.
2226 * gnulib/import/m4/eealloc.m4: Update.
2227 * gnulib/import/m4/environ.m4: Update.
2228 * gnulib/import/m4/errno_h.m4: Update.
2229 * gnulib/import/m4/error.m4: Update.
2230 * gnulib/import/m4/exponentd.m4: Update.
2231 * gnulib/import/m4/exponentl.m4: Update.
2232 * gnulib/import/m4/extensions.m4: Update.
2233 * gnulib/import/m4/extern-inline.m4: Update.
2234 * gnulib/import/m4/fchdir.m4: Update.
2235 * gnulib/import/m4/fcntl-o.m4: Update.
2236 * gnulib/import/m4/fcntl.m4: Update.
2237 * gnulib/import/m4/fcntl_h.m4: Update.
2238 * gnulib/import/m4/fdopendir.m4: Update.
2239 * gnulib/import/m4/filenamecat.m4: Update.
2240 * gnulib/import/m4/flexmember.m4: Update.
2241 * gnulib/import/m4/float_h.m4: Update.
2242 * gnulib/import/m4/fnmatch.m4: Update.
2243 * gnulib/import/m4/fnmatch_h.m4: Update.
2244 * gnulib/import/m4/fpieee.m4: Update.
2245 * gnulib/import/m4/frexp.m4: Update.
2246 * gnulib/import/m4/frexpl.m4: Update.
2247 * gnulib/import/m4/fstat.m4: Update.
2248 * gnulib/import/m4/fstatat.m4: Update.
2249 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2250 * gnulib/import/m4/getcwd-path-max.m4: Update.
2251 * gnulib/import/m4/getcwd.m4: Update.
2252 * gnulib/import/m4/getdtablesize.m4: Update.
2253 * gnulib/import/m4/getlogin.m4: Update.
2254 * gnulib/import/m4/getlogin_r.m4: Update.
2255 * gnulib/import/m4/getpagesize.m4: Update.
2256 * gnulib/import/m4/getprogname.m4: Update.
2257 * gnulib/import/m4/gettimeofday.m4: Update.
2258 * gnulib/import/m4/glibc21.m4: Update.
2259 * gnulib/import/m4/glob.m4: Update.
2260 * gnulib/import/m4/glob_h.m4: Update.
2261 * gnulib/import/m4/gnulib-cache.m4: Update.
2262 * gnulib/import/m4/gnulib-common.m4: Update.
2263 * gnulib/import/m4/gnulib-comp.m4: Update.
2264 * gnulib/import/m4/gnulib-tool.m4: Update.
2265 * gnulib/import/m4/hard-locale.m4: Update.
2266 * gnulib/import/m4/include_next.m4: Update.
2267 * gnulib/import/m4/inttypes-pri.m4: Update.
2268 * gnulib/import/m4/inttypes.m4: Update.
2269 * gnulib/import/m4/isnand.m4: Update.
2270 * gnulib/import/m4/isnanl.m4: Update.
2271 * gnulib/import/m4/largefile.m4: Update.
2272 * gnulib/import/m4/limits-h.m4: Update.
2273 * gnulib/import/m4/localcharset.m4: Update.
2274 * gnulib/import/m4/locale-fr.m4: Update.
2275 * gnulib/import/m4/locale-ja.m4: Update.
2276 * gnulib/import/m4/locale-zh.m4: Update.
2277 * gnulib/import/m4/localtime-buffer.m4: Update.
2278 * gnulib/import/m4/longlong.m4: Update.
2279 * gnulib/import/m4/lstat.m4: Update.
2280 * gnulib/import/m4/malloc.m4: Update.
2281 * gnulib/import/m4/malloca.m4: Update.
2282 * gnulib/import/m4/math_h.m4: Update.
2283 * gnulib/import/m4/mbrtowc.m4: Update.
2284 * gnulib/import/m4/mbsinit.m4: Update.
2285 * gnulib/import/m4/mbsrtowcs.m4: Update.
2286 * gnulib/import/m4/mbstate_t.m4: Update.
2287 * gnulib/import/m4/memchr.m4: Update.
2288 * gnulib/import/m4/memmem.m4: Update.
2289 * gnulib/import/m4/mempcpy.m4: Update.
2290 * gnulib/import/m4/memrchr.m4: Update.
2291 * gnulib/import/m4/mkdir.m4: Update.
2292 * gnulib/import/m4/mkstemp.m4: Update.
2293 * gnulib/import/m4/mmap-anon.m4: Update.
2294 * gnulib/import/m4/mode_t.m4: Update.
2295 * gnulib/import/m4/msvc-inval.m4: Update.
2296 * gnulib/import/m4/msvc-nothrow.m4: Update.
2297 * gnulib/import/m4/multiarch.m4: Update.
2298 * gnulib/import/m4/nocrash.m4: Update.
2299 * gnulib/import/m4/off_t.m4: Update.
2300 * gnulib/import/m4/onceonly.m4: Update.
2301 * gnulib/import/m4/open-cloexec.m4: Update.
2302 * gnulib/import/m4/open.m4: Update.
2303 * gnulib/import/m4/openat.m4: Update.
2304 * gnulib/import/m4/opendir.m4: Update.
2305 * gnulib/import/m4/pathmax.m4: Update.
2306 * gnulib/import/m4/rawmemchr.m4: Update.
2307 * gnulib/import/m4/readdir.m4: Update.
2308 * gnulib/import/m4/readlink.m4: Update.
2309 * gnulib/import/m4/realloc.m4: Update.
2310 * gnulib/import/m4/rename.m4: Update.
2311 * gnulib/import/m4/rewinddir.m4: Update.
2312 * gnulib/import/m4/rmdir.m4: Update.
2313 * gnulib/import/m4/save-cwd.m4: Update.
2314 * gnulib/import/m4/secure_getenv.m4: Update.
2315 * gnulib/import/m4/setenv.m4: Update.
2316 * gnulib/import/m4/signal_h.m4: Update.
2317 * gnulib/import/m4/ssize_t.m4: Update.
2318 * gnulib/import/m4/stat-time.m4: Update.
2319 * gnulib/import/m4/stat.m4: Update.
2320 * gnulib/import/m4/std-gnu11.m4: Update.
2321 * gnulib/import/m4/stdbool.m4: Update.
2322 * gnulib/import/m4/stddef_h.m4: Update.
2323 * gnulib/import/m4/stdint.m4: Update.
2324 * gnulib/import/m4/stdio_h.m4: Update.
2325 * gnulib/import/m4/stdlib_h.m4: Update.
2326 * gnulib/import/m4/strchrnul.m4: Update.
2327 * gnulib/import/m4/strdup.m4: Update.
2328 * gnulib/import/m4/strerror.m4: Update.
2329 * gnulib/import/m4/string_h.m4: Update.
2330 * gnulib/import/m4/strstr.m4: Update.
2331 * gnulib/import/m4/strtok_r.m4: Update.
2332 * gnulib/import/m4/sys_socket_h.m4: Update.
2333 * gnulib/import/m4/sys_stat_h.m4: Update.
2334 * gnulib/import/m4/sys_time_h.m4: Update.
2335 * gnulib/import/m4/sys_types_h.m4: Update.
2336 * gnulib/import/m4/tempname.m4: Update.
2337 * gnulib/import/m4/time_h.m4: Update.
2338 * gnulib/import/m4/unistd-safer.m4: Update.
2339 * gnulib/import/m4/unistd_h.m4: Update.
2340 * gnulib/import/m4/warn-on-use.m4: Update.
2341 * gnulib/import/m4/wchar_h.m4: Update.
2342 * gnulib/import/m4/wchar_t.m4: Update.
2343 * gnulib/import/m4/wctype_h.m4: Update.
2344 * gnulib/import/m4/wint_t.m4: Update.
2345 * gnulib/import/malloc.c: Update.
2346 * gnulib/import/malloc/scratch_buffer.h: Update.
2347 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2348 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2349 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2350 * gnulib/import/malloca.c: Update.
2351 * gnulib/import/malloca.h: Update.
2352 * gnulib/import/malloca.valgrind: Update.
2353 * gnulib/import/math.in.h: Update.
2354 * gnulib/import/mbrtowc.c: Update.
2355 * gnulib/import/mbsinit.c: Update.
2356 * gnulib/import/mbsrtowcs-impl.h: Update.
2357 * gnulib/import/mbsrtowcs-state.c: Update.
2358 * gnulib/import/mbsrtowcs.c: Update.
2359 * gnulib/import/memchr.c: Update.
2360 * gnulib/import/memmem.c: Update.
2361 * gnulib/import/mempcpy.c: Update.
2362 * gnulib/import/memrchr.c: Update.
2363 * gnulib/import/mkdir.c: Update.
2364 * gnulib/import/mkstemp.c: Update.
2365 * gnulib/import/msvc-inval.c: Update.
2366 * gnulib/import/msvc-inval.h: Update.
2367 * gnulib/import/msvc-nothrow.c: Update.
2368 * gnulib/import/msvc-nothrow.h: Update.
2369 * gnulib/import/open.c: Update.
2370 * gnulib/import/openat-die.c: Update.
2371 * gnulib/import/openat-priv.h: Update.
2372 * gnulib/import/openat-proc.c: Update.
2373 * gnulib/import/openat.c: Update.
2374 * gnulib/import/openat.h: Update.
2375 * gnulib/import/opendir.c: Update.
2376 * gnulib/import/pathmax.h: Update.
2377 * gnulib/import/pipe-safer.c: Update.
2378 * gnulib/import/rawmemchr.c: Update.
2379 * gnulib/import/readdir.c: Update.
2380 * gnulib/import/readlink.c: Update.
2381 * gnulib/import/realloc.c: Update.
2382 * gnulib/import/ref-add.sin: Update.
2383 * gnulib/import/ref-del.sin: Update.
2384 * gnulib/import/rename.c: Update.
2385 * gnulib/import/rewinddir.c: Update.
2386 * gnulib/import/rmdir.c: Update.
2387 * gnulib/import/same-inode.h: Update.
2388 * gnulib/import/save-cwd.c: Update.
2389 * gnulib/import/save-cwd.h: Update.
2390 * gnulib/import/scratch_buffer.h: Update.
2391 * gnulib/import/secure_getenv.c: Update.
2392 * gnulib/import/setenv.c: Update.
2393 * gnulib/import/signal.in.h: Update.
2394 * gnulib/import/stat-time.c: Update.
2395 * gnulib/import/stat-time.h: Update.
2396 * gnulib/import/stat-w32.c: Update.
2397 * gnulib/import/stat-w32.h: Update.
2398 * gnulib/import/stat.c: Update.
2399 * gnulib/import/stdbool.in.h: Update.
2400 * gnulib/import/stddef.in.h: Update.
2401 * gnulib/import/stdint.in.h: Update.
2402 * gnulib/import/stdio.in.h: Update.
2403 * gnulib/import/stdlib.in.h: Update.
2404 * gnulib/import/str-two-way.h: Update.
2405 * gnulib/import/strchrnul.c: Update.
2406 * gnulib/import/strdup.c: Update.
2407 * gnulib/import/streq.h: Update.
2408 * gnulib/import/strerror-override.c: Update.
2409 * gnulib/import/strerror-override.h: Update.
2410 * gnulib/import/strerror.c: Update.
2411 * gnulib/import/string.in.h: Update.
2412 * gnulib/import/stripslash.c: Update.
2413 * gnulib/import/strnlen1.c: Update.
2414 * gnulib/import/strnlen1.h: Update.
2415 * gnulib/import/strstr.c: Update.
2416 * gnulib/import/strtok_r.c: Update.
2417 * gnulib/import/sys_stat.in.h: Update.
2418 * gnulib/import/sys_time.in.h: Update.
2419 * gnulib/import/sys_types.in.h: Update.
2420 * gnulib/import/tempname.c: Update.
2421 * gnulib/import/tempname.h: Update.
2422 * gnulib/import/time.in.h: Update.
2423 * gnulib/import/unistd--.h: Update.
2424 * gnulib/import/unistd-safer.h: Update.
2425 * gnulib/import/unistd.in.h: Update.
2426 * gnulib/import/unsetenv.c: Update.
2427 * gnulib/import/verify.h: Update.
2428 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2429 * gnulib/import/wchar.in.h: Update.
2430 * gnulib/import/wctype.in.h: Update.
2431 * gnulib/import/xalloc-oversized.h: Update.
2432 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2433 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2434
2435 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
2436
2437 * record-btrace.c (get_thread_current_frame): Remove
2438 old_inferior_ptid.
2439
2440 2018-09-10 Jerome Guitton <guitton@adacore.com>
2441
2442 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2443 with check_tag to 1 if and only if the type is tagged and the
2444 component being searched cannot been found in the current
2445 view. Otherwise, always call ada_to_fixed_type with
2446 check_tag to 0.
2447
2448 2018-09-10 Xavier Roirand <roirand@adacore.com>
2449
2450 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2451 declaration.
2452 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2453 * ada-varobj.c (ada_varobj_get_number_of_children,
2454 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2455
2456 2018-09-10 Xavier Roirand <roirand@adacore.com>
2457
2458 * ada-valprint.c (ada_value_print): Use type instead of
2459 enclosing type.
2460
2461 2018-09-10 Xavier Roirand <roirand@adacore.com>
2462
2463 * ada-lang.c (ada_value_subscript): Handle case when parameter is
2464 an array of access to unconstrained array.
2465
2466 2018-09-10 Xavier Roirand <roirand@adacore.com>
2467
2468 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2469 (ada_check_typedef): Use it.
2470
2471 2018-09-10 Xavier Roirand <roirand@adacore.com>
2472
2473 * ada-varobj.c (ada_varobj_describe_struct_child)
2474 (ada_varobj_describe_child): Handle union case like struct one.
2475
2476 2018-09-10 Tom Tromey <tom@tromey.com>
2477
2478 PR python/18380:
2479 * python/python.c (_initialize_python): Make example in "python"
2480 help work in Python 3.
2481
2482 2018-09-10 Eli Zaretskii <eliz@gnu.org>
2483
2484 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2485 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
2486 $(EXEEXT) to the script, as it is not a program.
2487
2488 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
2489
2490 * python/py-prettyprint.c (pretty_print_one_value): Return
2491 gdbpy_ref<>.
2492 (print_string_repr): Adjust.
2493 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2494 * python/python-internal.h (apply_varobj_pretty_printer): Return
2495 gdbpy_ref<>.
2496 * varobj.c (varobj_value_get_print_value): Adjust.
2497
2498 2018-09-08 Tom Tromey <tom@tromey.com>
2499
2500 PR python/16047:
2501 * python/py-prettyprint.c (pretty_print_one_value): Check for
2502 to_string method.
2503
2504 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2505
2506 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2507 replace_operator_with_call.
2508
2509 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2510
2511 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2512
2513 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2514
2515 * ada-typeprint.c (print_range): Print the bounds using TYPE
2516 rather than its TYPE_TARGET_TYPE.
2517
2518 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2519
2520 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2521 call to ada_to_fixed_value_create.
2522
2523 2018-09-08 Jerome Guitton <guitton@adacore.com>
2524
2525 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2526
2527 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2528
2529 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2530 by calls to error.
2531
2532 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2533
2534 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2535 Move update of loop variable "fi".
2536
2537 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2538
2539 * ada-lang.c (value_assign_to_component): In the case of
2540 big-endian targets, extract the bits of the given VAL
2541 using an src_offset of zero if container is not a scalar.
2542
2543 2018-09-06 Simon Ser <contact@emersion.fr>
2544
2545 PR gdb/23105
2546 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2547 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2548 * fbsd-tdep.c (fbsd_make_note_desc): New.
2549 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2550 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2551 * target.h (enum target_object) Add FreeBSD-specific
2552 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2553
2554 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2555
2556 * compile/compile-c.h (generate_c_for_variable_locations):
2557 Change reference to pointer.
2558 * compile/compile-c-support.c (compile_program) <compute>:
2559 Likewise.
2560 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2561 (generate_c_for_for_one_variable): Likewise
2562 (generate_c_for_variable_locations): Likewise
2563 * compile/compile-c-types.c (compile_c_instance::convert_type):
2564 Likewise
2565 * compile/compile-cplus-symbols.c (convert_one_symbol):
2566 std::move the scope passed to enter_scope.
2567 * compile/compile-cplus-types.c
2568 (compile_cplus_instance::enter_scope): Make parameter
2569 rvalue-reference.
2570 (compile_cplus_instance::new_scope): Change reference to
2571 pointer.
2572 (compile_cplus_instance::convert_type): Likewise
2573 (compile_cplus_convert_typedef): std::move the scope passed to
2574 enter_scope.
2575 (compile_cplus_convert_struct_or_union): Likewise.
2576 (compile_cplus_convert_enum): Likewise.
2577 (compile_cplus_convert_namespace): Likewise.
2578 * compile/compile-cplus.h (compile_cplus_instance)
2579 <enter_scope>: Make parameter rvalue-reference.
2580 * compile/compile-internal.h (compile_instance)
2581 <get_cached_type>: Likewise
2582 * compile/compile-loc2c.c (push): Likewise
2583 (pushf): Likewise
2584 (unary): Likewise
2585 (binary): Likewise
2586 (print_label): Likewise
2587 (pushf_register_address): Likewise
2588 (pushf_register): Likewise
2589 (do_compile_dwarf_expr_to_c): Likewise
2590 (compile_dwarf_expr_to_c): Likewise
2591 (compile_dwarf_bounds_to_c): Likewise
2592 * compile/compile.c (compile_instance::get_cached_type):
2593 Likewise
2594 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2595 (compile_dwarf_bounds_to_c): Likewise
2596 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2597 (dwarf2_compile_property_to_c): Likewise
2598 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2599 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2600 Likewise
2601
2602 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2603
2604 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2605 * tui/tui-data.c (init_content_element): Don't initialize it.
2606
2607 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2608
2609 * tui/tui-data.h (struct tui_win_info)
2610 <detail::opaque>: Remove.
2611 * tui/tui-data.c (init_win_info): Remove assignment.
2612
2613 2018-09-05 Tom Tromey <tom@tromey.com>
2614
2615 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2616 -Wformat-nonliteral.
2617 * target-float.c (host_float_ops<T>::to_string)
2618 (host_float_ops<T>::from_string): Use
2619 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2620 * configure: Rebuild.
2621
2622 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
2623
2624 * printcmd.c (printf_c_string): Use
2625 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2626 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2627
2628 2018-09-05 Tom Tromey <tom@tromey.com>
2629
2630 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2631
2632 2018-09-05 Tom de Vries <tdevries@suse.de>
2633
2634 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2635 with resolve_abstract_p == true.
2636 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2637 defaulting to false. Propagate resolve_abstract_p to
2638 dwarf2_fetch_die_loc_sect_off.
2639 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2640 parameter, defaulting to false.
2641 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2642 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2643 parameter.
2644 * dwarf2read.h (struct die_info): Forward-declare.
2645 (die_info_ptr): New typedef.
2646 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2647
2648 2018-09-05 Joel Brobecker <brobecker@adacore.com>
2649
2650 GDB 8.2 released.
2651
2652 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
2653 Pedro Alves <palves@redhat.com>
2654
2655 * gnulib/Makefile.in (aclocal_m4_deps): Move to
2656 "aclocal-m4-deps.mk". Include file here.
2657 $(srcdir)/aclocal.m4: Add "configure.ac".
2658 * gnulib/aclocal-m4-deps.mk: New file.
2659 * gnulib/update-gnulib.sh: Automatically update
2660 "aclocal-m4-deps.mk".
2661
2662 2018-09-04 Tom Tromey <tom@tromey.com>
2663
2664 * configure: Rebuild.
2665 * configure.ac: Remove multi-ice code.
2666
2667 2018-09-04 Tom Tromey <tom@tromey.com>
2668
2669 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2670 (ada-exp.o): Update.
2671
2672 2018-09-04 Tom Tromey <tom@tromey.com>
2673
2674 * Makefile.in (printcmd.o, target-float.o): Remove.
2675 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2676
2677 2018-09-04 Tom Tromey <tom@tromey.com>
2678
2679 * gnulib/Makefile.in: Remove obsolete comment.
2680 * Makefile.in: Remove obsolete comment.
2681
2682 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
2683
2684 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2685 line with '+'.
2686
2687 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2688
2689 * riscv-tdep.c: Add 'prologue-value.h' include.
2690 (struct riscv_unwind_cache): New struct.
2691 (riscv_debug_unwinder): New global.
2692 (riscv_scan_prologue): Update arguments, capture register details
2693 from prologue scan.
2694 (riscv_skip_prologue): Reformat arguments line, move end of
2695 prologue calculation into riscv_scan_prologue.
2696 (riscv_frame_cache): Update return type, create
2697 riscv_unwind_cache, scan the prologue, and fill in remaining cache
2698 details.
2699 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2700 (riscv_frame_prev_register): Use the trad_frame within the
2701 riscv_unwind_cache.
2702 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2703 flag.
2704
2705 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2706
2707 * trad-frame.h (trad_frame_set_realreg): Declare.
2708 (trad_frame_set_addr): Declare.
2709 * trad-frame.c (trad_frame_set_realreg): Define new function.
2710 (trad_frame_set_addr): Define new function.
2711 (trad_frame_set_reg_realreg): Use new function.
2712 (trad_frame_set_reg_addr): Use new function.
2713
2714 2018-09-01 Keith Seitz <keiths@redhat.com>
2715
2716 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2717 pulongest instead of "%lld".
2718 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2719 ATTRIBUTE_UNUSED.
2720
2721 2018-08-31 Tom Tromey <tom@tromey.com>
2722
2723 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2724 variant part type.
2725
2726 2018-08-31 Pedro Alves <palves@redhat.com>
2727
2728 * gdbarch.h: Regenerate.
2729
2730 2018-08-31 Pedro Alves <palves@redhat.com>
2731
2732 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2733 * target.h (Hardware watchpoint interfaces): Describe
2734 continuable/steppable/non-steppable watchpoints.
2735 * gdbarch.h, gdbarch.c: Regenerate.
2736
2737 2018-08-31 Pedro Alves <palves@redhat.com>
2738
2739 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2740 Delete.
2741 * s390-linux-nat.c
2742 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2743 * target.h (target_ops::have_continuable_watchpoint): Delete.
2744 (target_have_continuable_watchpoint): Delete.
2745 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2746 * target-delegates.c: Regenerate.
2747
2748 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2749
2750 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2751 the files present in "gnulib/import/m4/".
2752
2753 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2754
2755 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2756 c.sw, c.swsp, and c.sdsp.
2757
2758 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2759
2760 * riscv-tdep.c (struct riscv_inferior_data): Delete.
2761 (riscv_read_misa_reg): Don't cache value read into inferior data.
2762 (riscv_new_inferior_data): Delete.
2763 (riscv_inferior_data_cleanup): Delete.
2764 (riscv_inferior_data): Delete.
2765 (riscv_invalidate_inferior_data): Delete.
2766 (_initialize_riscv_tdep): Remove initialisation of inferior data.
2767
2768 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
2769
2770 * compile/compile-cplus-types.c
2771 (compile_cplus_instance::leave_scope): Take the address of scope
2772 object.
2773 (compile_cplus_instance::convert_qualified_base): Compare quals
2774 to 0.
2775
2776 2018-08-30 Keith Seitz <keiths@redhat.com>
2777
2778 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2779 Use "%s" and host_address_to_string instead of "%p" in printf.
2780
2781 2018-08-29 Keith Seitz <keiths@redhat.com>
2782
2783 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2784 and compile-cplus-types.c.
2785 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2786 * c-lang.c (cplus_language_defn): Set C++ compile functions.
2787 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2788 Declare.
2789 * compile/compile-c-support.c: Include compile-cplus.h.
2790 (load_libcompile): Templatize.
2791 (get_compile_context): "New" function.
2792 (c_get_compile_context): Use get_compile_context.
2793 (cplus_get_compile_context): New function.
2794 (cplus_push_user_expression, cplus_pop_user_expression)
2795 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2796 (cplus_compute_program): Define new structs/functions.
2797 * compile/compile-cplus-symmbols.c: New file.
2798 * compile/compile-cplus-types.c: New file.
2799 * compile/compile-cplus.h: New file.
2800 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2801 Declare.
2802 * compile/compile-object-load.c (get_out_value_type): Use
2803 strncmp_iw when comparing symbol names.
2804 (compile_object_load): Add mst_bss and mst_data.
2805 * compile/compile.c (_initialize_compile): Remove
2806 -Wno-implicit-function-declaration from `compile_args'.
2807 * compile/gcc-cp-plugin.h: New file.
2808 * NEWS: Mention C++ compile support and new debug options.
2809
2810 2018-08-29 Keith Seitz <keiths@redhat.com>
2811
2812 * linespec.c (collect_info::add_symbol): Make virtual.
2813 (struct symbol_searcher_collect_info): New struct.
2814 (symbol_searcher::find_all_symbols): New method.
2815 * symtab.h (class symbol_searcher): New class.
2816
2817 2018-08-29 Keith Seitz <keiths@redhat.com>
2818
2819 * linespec.c (struct linespec) <function_symbols, label_symbols>:
2820 Change to vector of block_symbol. Update all users.
2821 (struct collect_info) <symbols>: Likewise.
2822 (collect_info::add_symbol): Take block_symbol as argument.
2823 Update all callers.
2824 (decode_compound_collector) <m_symbols>: Change type to vector
2825 of block_symbol. Update all users.
2826 (decode_compound_collector::operator ()): Change parameter type
2827 to block_symbol.
2828 (find_method, find_function_symbols, find_linespec_symbols)
2829 (find_label_symbols_in_block, find_label_symbols): Change symbol
2830 vectors to block_symbol vectors.
2831 * symtab.h (symbol_found_callback_ftype): Change parameter type to
2832 block_symbol.
2833
2834 2018-08-29 Keith Seitz <keiths@redhat.com>
2835
2836 * linespec.c (symbolp): Remove typedef and VEC definitions.
2837 (bound_minimal_symbol_d): Likewise.
2838
2839 2018-08-29 Keith Seitz <keiths@redhat.com>
2840
2841 * linespec.c (decode_compound_collector::decode_compound_collector):
2842 Remove initialization for `m_symtabs'.
2843 (decode_compound_collector::release_symbols): Change return type
2844 to std::vector. Update all callers.
2845 (class decode_compound_collector) <m_symbols>: Change type to
2846 std::vector.
2847 (lookup_prefix_sym): Change return type to std::vector. Update all
2848 callers.
2849 (compare_symbols): Remove.
2850 (std_compare_symbols): Rename to `compare_symbols'.
2851 (find_method): Change `sym_classes' parameter to std::vector.
2852 Update all callers. Use std::sort to sort sym_classes.
2853 (find_linespec_symbols): Remove cleanup.
2854
2855 2018-08-29 Keith Seitz <keiths@redhat.com>
2856
2857 * linespec.c (struct linespec) <minimal_symbols>: Change type to
2858 std::vector. Update all users.
2859 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2860 (struct collect_info) <minimal_symbols>: Likewise.
2861 (compare_msymbols): Return bool. Change parameters to const
2862 bound_minimal_symbol references.
2863 (find_method, find_function_symbols, find_linespec_symbols): Change
2864 `minsyms' parameter to std::vector. Update all callers.
2865
2866 2018-08-29 Keith Seitz <keiths@redhat.com>
2867
2868 * linespec.c (struct linespec) <label_symbols>: Change type to
2869 std::vector. Update all users.
2870 (find_label_symbols_in_block): Change `result' parameter to
2871 std::vector. Update all callers.
2872 (find_label_symbols): Return std::vector. Update all callers.
2873
2874 2018-08-29 Keith Seitz <keiths@redhat.com>
2875
2876 * linespec.c (struct linespec) <function_symbols>: Change type to
2877 std::vector. Update all users.
2878 (struct collect_info) <function_symbols>: Likewise.
2879 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2880 (std_compare_symbols): New function.
2881 (find_method, find_function_symbols, find_linespec_symbols)
2882 (find_label_symbols_in_block): Change `symbols' parameter to
2883 std::vector. Update all callers.
2884 (find_label_symbols): Likewise for `function_symbols' and
2885 `label_funcs_ret'.
2886
2887 2018-08-29 Keith Seitz <keiths@redhat.com>
2888
2889 * linespec.c (symtab_vector_up): Define.
2890 (struct linespec) <file_symtabs>: Change type to std::vector *.
2891 Update all uses.
2892 (struct collect_info) <file_symtabs>: Likewise.
2893 (collect_symtabs_from_filename): Return symtab_vector_up.
2894 Update all callers.
2895 (decode_objc): Remove cleanup.
2896 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2897 (symtab_collector::release_symtabs): Return symtab_vector_up.
2898 Update all callers.
2899 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2900 Update all users.
2901 (collect_symtabs_from_filename, symtabs_from_filename): Return
2902 symtab_vector_up. Update all callers.
2903
2904 2018-08-29 Tom Tromey <tom@tromey.com>
2905
2906 * csky-tdep.c (csky_analyze_prologue): Use
2907 core_addr_to_string_nz.
2908
2909 2018-08-29 Tom Tromey <tom@tromey.com>
2910
2911 * windows-nat.c (struct xlate_exception) <them>: Change type to
2912 DWORD.
2913 (xlate): Fix formatting. Remove last entry.
2914 (struct xlate_exception, xlate): Comment out.
2915 (windows_nat_target::resume): Use ranged for.
2916
2917 2018-08-29 Jim Wilson <jimw@sifive.com>
2918
2919 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2920 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2921 of NT_PRFPREG.
2922 (riscv_linux_nat_target::store_registers): Likewise.
2923
2924 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2925
2926 PR gdb/23555
2927 PR gdb/23558
2928 * gnulib/aclocal.m4: Regenerate.
2929 * gnulib/config.in: Regenerate.
2930 * gnulib/configure: Regenerate.
2931 * gnulib/import/Makefile.am: Update.
2932 * gnulib/import/Makefile.in: Update.
2933 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2934 * gnulib/import/_Noreturn.h: ... this.
2935 * gnulib/import/alloca.in.h: Update.
2936 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2937 * gnulib/import/arg-nonnull.h: ... this.
2938 * gnulib/import/assure.h: Update.
2939 * gnulib/import/at-func.c: Update.
2940 * gnulib/import/basename-lgpl.c: Update.
2941 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2942 * gnulib/import/c++defs.h: ... this.
2943 * gnulib/import/canonicalize-lgpl.c: Update.
2944 * gnulib/import/cdefs.h: Update.
2945 * gnulib/import/chdir-long.c: Update.
2946 * gnulib/import/chdir-long.h: Update.
2947 * gnulib/import/cloexec.c: Update.
2948 * gnulib/import/cloexec.h: Update.
2949 * gnulib/import/close.c: Update.
2950 * gnulib/import/closedir.c: Update.
2951 * gnulib/import/config.charset: Update.
2952 * gnulib/import/dirent-private.h: Update.
2953 * gnulib/import/dirent.in.h: Update.
2954 * gnulib/import/dirfd.c: Update.
2955 * gnulib/import/dirname-lgpl.c: Update.
2956 * gnulib/import/dirname.h: Update.
2957 * gnulib/import/dosname.h: Update.
2958 * gnulib/import/dup-safer-flag.c: Update.
2959 * gnulib/import/dup-safer.c: Update.
2960 * gnulib/import/dup.c: Update.
2961 * gnulib/import/dup2.c: Update.
2962 * gnulib/import/errno.in.h: Update.
2963 * gnulib/import/error.c: Update.
2964 * gnulib/import/error.h: Update.
2965 * gnulib/import/exitfail.c: Update.
2966 * gnulib/import/exitfail.h: Update.
2967 * gnulib/import/extra/update-copyright: Update.
2968 * gnulib/import/fchdir.c: Update.
2969 * gnulib/import/fcntl.c: Update.
2970 * gnulib/import/fcntl.in.h: Update.
2971 * gnulib/import/fd-hook.c: Update.
2972 * gnulib/import/fd-hook.h: Update.
2973 * gnulib/import/fd-safer-flag.c: Update.
2974 * gnulib/import/fd-safer.c: Update.
2975 * gnulib/import/fdopendir.c: Update.
2976 * gnulib/import/filename.h: Update.
2977 * gnulib/import/filenamecat-lgpl.c: Update.
2978 * gnulib/import/filenamecat.h: Update.
2979 * gnulib/import/flexmember.h: Update.
2980 * gnulib/import/float+.h: Update.
2981 * gnulib/import/float.c: Update.
2982 * gnulib/import/float.in.h: Update.
2983 * gnulib/import/fnmatch.c: Update.
2984 * gnulib/import/fnmatch.in.h: Update.
2985 * gnulib/import/fnmatch_loop.c: Update.
2986 * gnulib/import/fpucw.h: Update.
2987 * gnulib/import/frexp.c: Update.
2988 * gnulib/import/frexpl.c: Update.
2989 * gnulib/import/fstat.c: Update.
2990 * gnulib/import/fstatat.c: Update.
2991 * gnulib/import/getcwd-lgpl.c: Update.
2992 * gnulib/import/getcwd.c: Update.
2993 * gnulib/import/getdtablesize.c: Update.
2994 * gnulib/import/getlogin_r.c: Update.
2995 * gnulib/import/getprogname.c: Update.
2996 * gnulib/import/getprogname.h: Update.
2997 * gnulib/import/gettext.h: Update.
2998 * gnulib/import/gettimeofday.c: Update.
2999 * gnulib/import/glob-libc.h: Update.
3000 * gnulib/import/glob.c: Update.
3001 * gnulib/import/glob.in.h: Update.
3002 * gnulib/import/glob_internal.h: Update.
3003 * gnulib/import/glob_pattern_p.c: Update.
3004 * gnulib/import/globfree.c: Update.
3005 * gnulib/import/hard-locale.c: Update.
3006 * gnulib/import/hard-locale.h: Update.
3007 * gnulib/import/intprops.h: Update.
3008 * gnulib/import/inttypes.in.h: Update.
3009 * gnulib/import/isnan.c: Update.
3010 * gnulib/import/isnand-nolibm.h: Update.
3011 * gnulib/import/isnand.c: Update.
3012 * gnulib/import/isnanl-nolibm.h: Update.
3013 * gnulib/import/isnanl.c: Update.
3014 * gnulib/import/itold.c: Update.
3015 * gnulib/import/libc-config.h: Update.
3016 * gnulib/import/limits.in.h: Update.
3017 * gnulib/import/localcharset.c: Update.
3018 * gnulib/import/localcharset.h: Update.
3019 * gnulib/import/localtime-buffer.c: Update.
3020 * gnulib/import/localtime-buffer.h: Update.
3021 * gnulib/import/lstat.c: Update.
3022 * gnulib/import/m4/00gnulib.m4: Update.
3023 * gnulib/import/m4/__inline.m4: Update.
3024 * gnulib/import/m4/absolute-header.m4: Update.
3025 * gnulib/import/m4/alloca.m4: Update.
3026 * gnulib/import/m4/builtin-expect.m4: Update.
3027 * gnulib/import/m4/canonicalize.m4: Update.
3028 * gnulib/import/m4/chdir-long.m4: Update.
3029 * gnulib/import/m4/close.m4: Update.
3030 * gnulib/import/m4/closedir.m4: Update.
3031 * gnulib/import/m4/configmake.m4: Update.
3032 * gnulib/import/m4/d-ino.m4: Update.
3033 * gnulib/import/m4/d-type.m4: Update.
3034 * gnulib/import/m4/dirent_h.m4: Update.
3035 * gnulib/import/m4/dirfd.m4: Update.
3036 * gnulib/import/m4/dirname.m4: Update.
3037 * gnulib/import/m4/double-slash-root.m4: Update.
3038 * gnulib/import/m4/dup.m4: Update.
3039 * gnulib/import/m4/dup2.m4: Update.
3040 * gnulib/import/m4/eealloc.m4: Update.
3041 * gnulib/import/m4/environ.m4: Update.
3042 * gnulib/import/m4/errno_h.m4: Update.
3043 * gnulib/import/m4/error.m4: Update.
3044 * gnulib/import/m4/exponentd.m4: Update.
3045 * gnulib/import/m4/exponentl.m4: Update.
3046 * gnulib/import/m4/extensions.m4: Update.
3047 * gnulib/import/m4/extern-inline.m4: Update.
3048 * gnulib/import/m4/fchdir.m4: Update.
3049 * gnulib/import/m4/fcntl-o.m4: Update.
3050 * gnulib/import/m4/fcntl.m4: Update.
3051 * gnulib/import/m4/fcntl_h.m4: Update.
3052 * gnulib/import/m4/fdopendir.m4: Update.
3053 * gnulib/import/m4/filenamecat.m4: Update.
3054 * gnulib/import/m4/flexmember.m4: Update.
3055 * gnulib/import/m4/float_h.m4: Update.
3056 * gnulib/import/m4/fnmatch.m4: Update.
3057 * gnulib/import/m4/fnmatch_h.m4: Update.
3058 * gnulib/import/m4/fpieee.m4: Update.
3059 * gnulib/import/m4/frexp.m4: Update.
3060 * gnulib/import/m4/frexpl.m4: Update.
3061 * gnulib/import/m4/fstat.m4: Update.
3062 * gnulib/import/m4/fstatat.m4: Update.
3063 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3064 * gnulib/import/m4/getcwd-path-max.m4: Update.
3065 * gnulib/import/m4/getcwd.m4: Update.
3066 * gnulib/import/m4/getdtablesize.m4: Update.
3067 * gnulib/import/m4/getlogin.m4: Update.
3068 * gnulib/import/m4/getlogin_r.m4: Update.
3069 * gnulib/import/m4/getpagesize.m4: Update.
3070 * gnulib/import/m4/getprogname.m4: Update.
3071 * gnulib/import/m4/gettimeofday.m4: Update.
3072 * gnulib/import/m4/glibc21.m4: Update.
3073 * gnulib/import/m4/glob.m4: Update.
3074 * gnulib/import/m4/glob_h.m4: Update.
3075 * gnulib/import/m4/gnulib-cache.m4: Update.
3076 * gnulib/import/m4/gnulib-common.m4: Update.
3077 * gnulib/import/m4/gnulib-comp.m4: Update.
3078 * gnulib/import/m4/gnulib-tool.m4: Update.
3079 * gnulib/import/m4/hard-locale.m4: Update.
3080 * gnulib/import/m4/include_next.m4: Update.
3081 * gnulib/import/m4/inttypes-pri.m4: Update.
3082 * gnulib/import/m4/inttypes.m4: Update.
3083 * gnulib/import/m4/isnand.m4: Update.
3084 * gnulib/import/m4/isnanl.m4: Update.
3085 * gnulib/import/m4/largefile.m4: Update.
3086 * gnulib/import/m4/limits-h.m4: Update.
3087 * gnulib/import/m4/localcharset.m4: Update.
3088 * gnulib/import/m4/locale-fr.m4: Update.
3089 * gnulib/import/m4/locale-ja.m4: Update.
3090 * gnulib/import/m4/locale-zh.m4: Update.
3091 * gnulib/import/m4/localtime-buffer.m4: Update.
3092 * gnulib/import/m4/longlong.m4: Update.
3093 * gnulib/import/m4/lstat.m4: Update.
3094 * gnulib/import/m4/malloc.m4: Update.
3095 * gnulib/import/m4/malloca.m4: Update.
3096 * gnulib/import/m4/math_h.m4: Update.
3097 * gnulib/import/m4/mbrtowc.m4: Update.
3098 * gnulib/import/m4/mbsinit.m4: Update.
3099 * gnulib/import/m4/mbsrtowcs.m4: Update.
3100 * gnulib/import/m4/mbstate_t.m4: Update.
3101 * gnulib/import/m4/memchr.m4: Update.
3102 * gnulib/import/m4/memmem.m4: Update.
3103 * gnulib/import/m4/mempcpy.m4: Update.
3104 * gnulib/import/m4/memrchr.m4: Update.
3105 * gnulib/import/m4/mkdir.m4: Update.
3106 * gnulib/import/m4/mkstemp.m4: Update.
3107 * gnulib/import/m4/mmap-anon.m4: Update.
3108 * gnulib/import/m4/mode_t.m4: Update.
3109 * gnulib/import/m4/msvc-inval.m4: Update.
3110 * gnulib/import/m4/msvc-nothrow.m4: Update.
3111 * gnulib/import/m4/multiarch.m4: Update.
3112 * gnulib/import/m4/nocrash.m4: Update.
3113 * gnulib/import/m4/off_t.m4: Update.
3114 * gnulib/import/m4/onceonly.m4: Update.
3115 * gnulib/import/m4/open-cloexec.m4: Update.
3116 * gnulib/import/m4/open.m4: Update.
3117 * gnulib/import/m4/openat.m4: Update.
3118 * gnulib/import/m4/opendir.m4: Update.
3119 * gnulib/import/m4/pathmax.m4: Update.
3120 * gnulib/import/m4/rawmemchr.m4: Update.
3121 * gnulib/import/m4/readdir.m4: Update.
3122 * gnulib/import/m4/readlink.m4: Update.
3123 * gnulib/import/m4/realloc.m4: Update.
3124 * gnulib/import/m4/rename.m4: Update.
3125 * gnulib/import/m4/rewinddir.m4: Update.
3126 * gnulib/import/m4/rmdir.m4: Update.
3127 * gnulib/import/m4/save-cwd.m4: Update.
3128 * gnulib/import/m4/secure_getenv.m4: Update.
3129 * gnulib/import/m4/setenv.m4: Update.
3130 * gnulib/import/m4/signal_h.m4: Update.
3131 * gnulib/import/m4/ssize_t.m4: Update.
3132 * gnulib/import/m4/stat-time.m4: Update.
3133 * gnulib/import/m4/stat.m4: Update.
3134 * gnulib/import/m4/std-gnu11.m4: Update.
3135 * gnulib/import/m4/stdbool.m4: Update.
3136 * gnulib/import/m4/stddef_h.m4: Update.
3137 * gnulib/import/m4/stdint.m4: Update.
3138 * gnulib/import/m4/stdio_h.m4: Update.
3139 * gnulib/import/m4/stdlib_h.m4: Update.
3140 * gnulib/import/m4/strchrnul.m4: Update.
3141 * gnulib/import/m4/strdup.m4: Update.
3142 * gnulib/import/m4/strerror.m4: Update.
3143 * gnulib/import/m4/string_h.m4: Update.
3144 * gnulib/import/m4/strstr.m4: Update.
3145 * gnulib/import/m4/strtok_r.m4: Update.
3146 * gnulib/import/m4/sys_socket_h.m4: Update.
3147 * gnulib/import/m4/sys_stat_h.m4: Update.
3148 * gnulib/import/m4/sys_time_h.m4: Update.
3149 * gnulib/import/m4/sys_types_h.m4: Update.
3150 * gnulib/import/m4/tempname.m4: Update.
3151 * gnulib/import/m4/time_h.m4: Update.
3152 * gnulib/import/m4/unistd-safer.m4: Update.
3153 * gnulib/import/m4/unistd_h.m4: Update.
3154 * gnulib/import/m4/warn-on-use.m4: Update.
3155 * gnulib/import/m4/wchar_h.m4: Update.
3156 * gnulib/import/m4/wchar_t.m4: Update.
3157 * gnulib/import/m4/wctype_h.m4: Update.
3158 * gnulib/import/m4/wint_t.m4: Update.
3159 * gnulib/import/malloc.c: Update.
3160 * gnulib/import/malloc/scratch_buffer.h: Update.
3161 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3162 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3163 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3164 * gnulib/import/malloca.c: Update.
3165 * gnulib/import/malloca.h: Update.
3166 * gnulib/import/malloca.valgrind: Update.
3167 * gnulib/import/math.in.h: Update.
3168 * gnulib/import/mbrtowc.c: Update.
3169 * gnulib/import/mbsinit.c: Update.
3170 * gnulib/import/mbsrtowcs-impl.h: Update.
3171 * gnulib/import/mbsrtowcs-state.c: Update.
3172 * gnulib/import/mbsrtowcs.c: Update.
3173 * gnulib/import/memchr.c: Update.
3174 * gnulib/import/memmem.c: Update.
3175 * gnulib/import/mempcpy.c: Update.
3176 * gnulib/import/memrchr.c: Update.
3177 * gnulib/import/mkdir.c: Update.
3178 * gnulib/import/mkstemp.c: Update.
3179 * gnulib/import/msvc-inval.c: Update.
3180 * gnulib/import/msvc-inval.h: Update.
3181 * gnulib/import/msvc-nothrow.c: Update.
3182 * gnulib/import/msvc-nothrow.h: Update.
3183 * gnulib/import/open.c: Update.
3184 * gnulib/import/openat-die.c: Update.
3185 * gnulib/import/openat-priv.h: Update.
3186 * gnulib/import/openat-proc.c: Update.
3187 * gnulib/import/openat.c: Update.
3188 * gnulib/import/openat.h: Update.
3189 * gnulib/import/opendir.c: Update.
3190 * gnulib/import/pathmax.h: Update.
3191 * gnulib/import/pipe-safer.c: Update.
3192 * gnulib/import/rawmemchr.c: Update.
3193 * gnulib/import/readdir.c: Update.
3194 * gnulib/import/readlink.c: Update.
3195 * gnulib/import/realloc.c: Update.
3196 * gnulib/import/ref-add.sin: Update.
3197 * gnulib/import/ref-del.sin: Update.
3198 * gnulib/import/rename.c: Update.
3199 * gnulib/import/rewinddir.c: Update.
3200 * gnulib/import/rmdir.c: Update.
3201 * gnulib/import/same-inode.h: Update.
3202 * gnulib/import/save-cwd.c: Update.
3203 * gnulib/import/save-cwd.h: Update.
3204 * gnulib/import/scratch_buffer.h: Update.
3205 * gnulib/import/secure_getenv.c: Update.
3206 * gnulib/import/setenv.c: Update.
3207 * gnulib/import/signal.in.h: Update.
3208 * gnulib/import/stat-time.c: Update.
3209 * gnulib/import/stat-time.h: Update.
3210 * gnulib/import/stat-w32.c: Update.
3211 * gnulib/import/stat-w32.h: Update.
3212 * gnulib/import/stat.c: Update.
3213 * gnulib/import/stdbool.in.h: Update.
3214 * gnulib/import/stddef.in.h: Update.
3215 * gnulib/import/stdint.in.h: Update.
3216 * gnulib/import/stdio.in.h: Update.
3217 * gnulib/import/stdlib.in.h: Update.
3218 * gnulib/import/str-two-way.h: Update.
3219 * gnulib/import/strchrnul.c: Update.
3220 * gnulib/import/strdup.c: Update.
3221 * gnulib/import/streq.h: Update.
3222 * gnulib/import/strerror-override.c: Update.
3223 * gnulib/import/strerror-override.h: Update.
3224 * gnulib/import/strerror.c: Update.
3225 * gnulib/import/string.in.h: Update.
3226 * gnulib/import/stripslash.c: Update.
3227 * gnulib/import/strnlen1.c: Update.
3228 * gnulib/import/strnlen1.h: Update.
3229 * gnulib/import/strstr.c: Update.
3230 * gnulib/import/strtok_r.c: Update.
3231 * gnulib/import/sys_stat.in.h: Update.
3232 * gnulib/import/sys_time.in.h: Update.
3233 * gnulib/import/sys_types.in.h: Update.
3234 * gnulib/import/tempname.c: Update.
3235 * gnulib/import/tempname.h: Update.
3236 * gnulib/import/time.in.h: Update.
3237 * gnulib/import/unistd--.h: Update.
3238 * gnulib/import/unistd-safer.h: Update.
3239 * gnulib/import/unistd.in.h: Update.
3240 * gnulib/import/unsetenv.c: Update.
3241 * gnulib/import/verify.h: Update.
3242 * gnulib/import/extra/snippet/warn-on-use.h: Update.
3243 * gnulib/import/wchar.in.h: Update.
3244 * gnulib/import/wctype.in.h: Update.
3245 * gnulib/import/xalloc-oversized.h: Update.
3246 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3247 "53e2c179f26a890fa6685af4b6c1397ee370433b".
3248
3249 2018-08-16 Gary Benson <gbenson@redhat.com>
3250
3251 PR gdb/13000:
3252 * gdb/main.c (captured_main_1): Exit with nonzero status
3253 in batch mode if the last command to be executed failed.
3254 * NEWS: Mention the above.
3255
3256 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
3257
3258 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3259 end of warning message.
3260
3261 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3262
3263 PR gdb/22943:
3264 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3265 (aarch64_extract_return_value): Use
3266 aapcs_is_vfp_call_or_return_candidate.
3267 (aarch64_return_in_memory): Likewise.
3268 (aarch64_store_return_value): Likewise.
3269
3270 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3271
3272 * aarch64-tdep.c
3273 (aapcs_is_vfp_call_or_return_candidate): Make static
3274 (pass_in_v_or_stack): Remove function.
3275 (pass_in_v_vfp_candidate): New function.
3276 (aarch64_push_dummy_call): Check for float register candidates.
3277
3278 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3279
3280 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3281 (aapcs_is_vfp_call_or_return_candidate_1): New function.
3282 (aapcs_is_vfp_call_or_return_candidate): Likewise.
3283
3284 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
3285
3286 PR build/23399
3287 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3288 (struct ipa_sym_addresses): Rename to...
3289 (struct ipa_sym_addresses_common): ... this.
3290 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3291
3292 2018-08-28 Tom Tromey <tom@tromey.com>
3293
3294 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3295 (token_fifo): Now a std::vector.
3296 (yylex, c_parse): Update.
3297 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3298 (token_fifo): Now a std::vector.
3299 (yylex, d_parse): Update.
3300 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3301 (token_fifo): Now a std::vector.
3302 (yylex, go_parse): Update.
3303
3304 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
3305
3306 * parser-defs.h (struct type_stack) <elements>: Change type to
3307 std::vector<union type_stack_elt>.
3308 <depth, size>: Remove.
3309 * parse.c (parse_exp_in_context_1): Adjust.
3310 (type_stack_reserve): Remove.
3311 (check_type_stack_depth): Remove.
3312 (insert_into_type_stack): Adjust to std::vector.
3313 (insert_type): Likewise.
3314 (push_type): Likewise.
3315 (push_type_int): Likewise.
3316 (insert_type_address_space): Likewise.
3317 (pop_type): Likewise.
3318 (pop_type_int): Likewise.
3319 (pop_typelist): Likewise.
3320 (pop_type_stack): Likewise.
3321 (append_type_stack): Likewise.
3322 (push_type_stack): Likewise.
3323 (get_type_stack): Likewise.
3324 (type_stack_cleanup): Likewise.
3325 (push_typelist): Likewise.
3326 (follow_types): Likewise.
3327 (_initialize_parse): Likewise.
3328
3329 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
3330
3331 * NEWS: Mention csky target.
3332
3333 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
3334 Hafiz Abid Qadeer <abidh@codesourcery.com>
3335 Don Breazeal <donb@codesourcery.com>
3336
3337 * csky-linux-tdep.c: New file.
3338 * csky-tdep.c: Likewise.
3339 * csky-tdep.h: Likewise.
3340 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3341 csky-tdep.o.
3342 (HFILES_NO_SRCDIR): Add csky-tdep.h.
3343 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3344 * configure.tgt: Add csky support.
3345
3346 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
3347
3348 * python/py-framefilter.c (py_print_frame): Print frame architecture
3349 when printing on an MI output.
3350
3351 2018-08-27 Tom Tromey <tom@tromey.com>
3352
3353 PR build/23087:
3354 * configure: Rebuild.
3355 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3356
3357 2018-08-27 Tom Tromey <tom@tromey.com>
3358
3359 * aarch64-linux-tdep.c
3360 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3361 casts to int.
3362
3363 2018-08-27 Tom Tromey <tom@tromey.com>
3364
3365 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3366 unsigned.
3367 (ppc64_standard_linkage1, ppc64_standard_linkage2)
3368 (ppc64_standard_linkage3, ppc64_standard_linkage4)
3369 (ppc64_standard_linkage5, ppc64_standard_linkage6)
3370 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3371 unsigned.
3372
3373 2018-08-27 Tom Tromey <tom@tromey.com>
3374
3375 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3376 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3377
3378 2018-08-27 Tom Tromey <tom@tromey.com>
3379
3380 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3381 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3382 ULONGEST_MAX.
3383 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3384 ULONGEST_MAX.
3385 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3386 ULONGEST_MAX.
3387 * sparc-linux-tdep.c (sparc32_linux_sigframe)
3388 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3389 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3390 ULONGEST_MAX.
3391 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3392 (ppc64_linux_sigaction_tramp_frame)
3393 (ppc32_linux_sighandler_tramp_frame)
3394 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3395 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3396 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3397 * mn10300-linux-tdep.c (am33_linux_sigframe)
3398 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3399 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3400 * mips-linux-tdep.c (mips_linux_o32_sigframe)
3401 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3402 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3403 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3404 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3405 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3406 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3407 * microblaze-linux-tdep.c
3408 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3409 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3410 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3411 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3412 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3413 * common/common-types.h (ULONGEST_MAX): New define.
3414 (CORE_ADDR_MAX): Fix formatting.
3415 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3416 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3417 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3418 (arm_linux_rt_sigreturn_tramp_frame)
3419 (arm_eabi_linux_sigreturn_tramp_frame)
3420 (arm_eabi_linux_rt_sigreturn_tramp_frame)
3421 (thumb2_eabi_linux_sigreturn_tramp_frame)
3422 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3423 (arm_linux_restart_syscall_tramp_frame)
3424 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3425 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3426 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3427 ULONGEST_MAX.
3428 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3429
3430 2018-08-27 Tom Tromey <tom@tromey.com>
3431
3432 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3433 CORE_ADDR_MAX.
3434 * mips-tdep.c (mips_deal_with_atomic_sequence)
3435 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3436 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3437 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3438 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3439 CORE_ADDR_MAX.
3440 * aarch64-tdep.c (aarch64_software_single_step): Use
3441 CORE_ADDR_MAX.
3442
3443 2018-08-27 Tom Tromey <tom@tromey.com>
3444
3445 * linespec.c (complete_linespec_component): Add cast to "char".
3446 * completer.c (completion_tracker::build_completion_result): Add
3447 cast to "char".
3448
3449 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3450
3451 * solist.h (struct solist, struct target_so_ops): Fix
3452 indentation.
3453
3454 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3455
3456 * ada-tasks.c (ada_task_info_s): Remove typedef.
3457 (DEF_VEC_O(ada_task_info_s)): Remove.
3458 (struct ada_tasks_inferior_data): Initialize fields.
3459 <task_list>: Make an std::vector.
3460 (get_ada_tasks_inferior_data): Allocate with new.
3461 (ada_get_task_number): Adjust.
3462 (get_task_number_from_id): Likewise.
3463 (valid_task_id): Likewise.
3464 (ada_get_task_info_from_ptid): Likewise.
3465 (iterate_over_live_ada_tasks): Likewise.
3466 (add_ada_task): Likewise.
3467 (read_known_tasks): Likewise.
3468 (ada_build_task_list): Likewise.
3469 (print_ada_task_info): Likewise.
3470 (info_task): Likewise.
3471 (task_command_1): Likewise.
3472
3473 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3474
3475 * ada-lang.c (add_angle_brackets): Return std::string.
3476
3477 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
3478
3479 * python/py-threadevent.c (py_get_event_thread): Initialize
3480 pythread.
3481
3482 2018-08-24 Pedro Alves <palves@redhat.com>
3483
3484 * python/py-bpevent.c (create_breakpoint_event_object): Use
3485 copy-initialization.
3486 * python/py-continueevent.c (emit_continue_event): Use
3487 copy-initialization.
3488 * python/py-exitedevent.c (create_exited_event_object): Return a
3489 gdbpy_ref<>.
3490 (emit_exited_event): Use copy-initialization.
3491 * python/py-inferior.c (python_new_inferior)
3492 (python_inferior_deleted, add_thread_object): Use
3493 copy-initialization.
3494 * python/py-infevents.c (create_inferior_call_event_object)
3495 (create_register_changed_event_object)
3496 (create_memory_changed_event_object): Return a gdbpy_ref<>.
3497 (emit_inferior_call_event, emit_memory_changed_event)
3498 (emit_register_changed_event): Use copy-initialization.
3499 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3500 Return a gdbpy_ref<>.
3501 (emit_new_objfile_event): Use copy-initialization.
3502 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3503 (emit_clear_objfiles_event): Use copy-initialization.
3504 * python/py-signalevent.c (create_signal_event_object): Use
3505 copy-initialization.
3506 * python/py-threadevent.c (create_thread_event_object): Use
3507 copy-initialization.
3508
3509 2018-08-24 Pedro Alves <palves@redhat.com>
3510 Simon Marchi <simon.marchi@ericsson.com>
3511
3512 PR gdb/23379
3513 * python/py-continueevent.c: Include "gdbthread.h".
3514 (create_continue_event_object): Add intro comment. Add 'ptid'
3515 parameter. Use it to find thread to pass to
3516 create_thread_event_object.
3517 (emit_continue_event): Pass PTID down to
3518 create_continue_event_object.
3519 * python/py-event.h (py_get_event_thread): Declare.
3520 (create_thread_event_object): Remove default from 'thread'
3521 parameter.
3522 * python/py-stopevent.c (create_stop_event_object): Use
3523 py_get_event_thread.
3524 * python/py-threadevent.c (get_event_thread): Rename to ...
3525 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3526 and use it to find the thread.
3527 (create_thread_event_object): Assert that THREAD isn't null.
3528 Don't find the event thread here.
3529
3530 2018-08-23 Kevin Buettner <kevinb@redhat.com>
3531
3532 * block.h (blockrange, blockranges): New struct declarations.
3533 (struct block): Add new field named `ranges'.
3534 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3535 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3536 macros for accessing ranges in struct block.
3537 (make_blockranges): New declaration.
3538 block.c (make_blockranges): New function.
3539 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3540 for block.
3541 * symtab.h (find_pc_partial_function): Add new parameter `block'.
3542 * blockframe.c (cache_pc_function_block): New static global.
3543 (clear_pc_function_cache): Clear cache_pc_function_block.
3544 (find_pc_partial_function): Move comment to symtab.h. Add
3545 support for non-contiguous blocks.
3546 * cli/cli-cmds.c (block.h): Include.
3547 (print_disassembly): Handle printing of non-contiguous blocks.
3548 (disassemble_current_function): Likewise.
3549 (disassemble_command): Likewise.
3550
3551 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3552 BLOCK_START.
3553 * blockframe.c (get_pc_function_start): Likewise.
3554 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3555 (gcc_symbol_address): Likewise.
3556 * compile/compile-object-run.c (compile_object_run): Likewise.
3557 * compile/compile.c (get_expr_block_and_pc): Likewise.
3558 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3559 (func_addr_to_tail_call_list): Likewise.
3560 * findvar.c (default_read_var_value): Likewise.
3561 * inline-frame.c (inline_frame_this_id): Likewise.
3562 (skip-inline_frames): Likewise.
3563 * infcmd.c (until_next_command): Likewise.
3564 * linespec.c (convert_linespec_to_sals): Likewise.
3565 * parse.c (parse_exp_in_context_1): Likewise.
3566 * printcmd.c (build_address_symbolic): likewise.
3567 (info_address_command): Likewise.
3568 symtab.c (find_function_start_sal): Likewise.
3569 (skip_prologue_sal): Likewise.
3570 (find_function_alias_target): Likewise.
3571 (find_gnu_ifunc): Likewise.
3572 * stack.c (find_frame_funname): Likewise.
3573 * symtab.c (fixup_symbol_section): Likewise.
3574 (find_function_start_sal): Likewise.
3575 (skip_prologue_sal): Likewsie.
3576 (find_function_alias_target): Likewise.
3577 (find_gnu_ifunc): Likewise.
3578 * tracepoint.c (info_scope_command): Likewise.
3579 * value.c (value_fn_field): Likewise.
3580
3581 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3582 in place of find_pc_partial_function.
3583 * blockframe.c (find_function_entry_range_from_pc): New function.
3584 * symtab.h (find_function_entry_range_from_pc): Declare and document.
3585 * objfiles.c (objfile_relocate1): Relocate start and end addresses
3586 for each range in a block.
3587
3588
3589 2018-08-23 Xavier Roirand <roirand@adacore.com>
3590
3591 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3592 incrementation.
3593
3594 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3595
3596 * solib-svr4.c (read_program_headers_from_bfd): Return
3597 gdb::optional<gdb::byte_vector>.
3598 (svr4_exec_displacement): Adjust.
3599
3600 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3601
3602 * solib-svr4.c (read_program_header): Return
3603 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3604 (find_program_interpreter): Return
3605 gdb::optional<gdb::byte_vector>.
3606 (scan_dyntag_auxv): Adjust.
3607 (enable_break): Adjust.
3608 (svr4_exec_displacement): Adjust.
3609
3610 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3611
3612 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3613 * inf-child.c (inf_child_target::terminal_save_inferior): New.
3614
3615 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3616
3617 * guile/scm-string.c (gdbscm_scm_from_printf): Use
3618 string_vprintf.
3619 * guile/scm-utils.c (gdbscm_printf): Likewise.
3620 * serial.c (serial_printf): Likewise.
3621 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3622
3623 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
3624
3625 * stack.c (print_frame): Print frame architecture when printing on
3626 an MI output.
3627 * NEWS: Mention new "arch" attribute in frame output.
3628
3629 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3630
3631 * arch/aarch64.h (aarch64_regnum): Update comment.
3632
3633 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3634
3635 * NEWS: Add SVE to 8.2 section.
3636
3637 2018-08-21 Pedro Alves <palves@redhat.com>
3638
3639 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3640 out from gdbscm_parse_function_args.
3641 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3642 gdbscm_parse_function_args_1.
3643
3644 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
3645
3646 PR gdb/17816
3647 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3648 operator.
3649
3650 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
3651
3652 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3653
3654 2018-08-19 Michael Spang <spang@google.com>
3655
3656 PR gdb/11786
3657 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3658 for PT_TLS segments.
3659
3660 2018-08-18 Kevin Buettner <kevinb@redhat.com>
3661
3662 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3663 dwarf_variable_value.
3664 * dwarf2-frame.c (class dwarf_expr_executor):
3665 Add override for dwarf_variable_value.
3666 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3667 (class symbol_needs_eval_context): Likewise.
3668 (indirect_synthetic_pointer): Add forward declaration.
3669 (sect_variable_value): New function.
3670 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3671 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3672 for DW_OP_GNU_variable_value.
3673
3674 2018-08-16 Tom Tromey <tom@tromey.com>
3675
3676 * top.c (read_command_file): Update.
3677 (command_line_input): Remove "repeat" argument.
3678 * ada-lang.c (get_selections): Update.
3679 * linespec.c (decode_line_2): Update.
3680 * defs.h (command_line_input): Remove argument.
3681 * cli/cli-script.c (read_next_line): Update.
3682 * python/py-gdb-readline.c: Update.
3683
3684 2018-08-17 Tom Tromey <tom@tromey.com>
3685
3686 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3687 command_line_input.
3688
3689 2018-08-15 Tom Tromey <tom@tromey.com>
3690
3691 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3692
3693 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
3694
3695 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3696 If used, use find_pc_partial_function to find address range
3697 to disassemble.
3698 * mi/mi-main.c (mi_cmd_list_features): Report
3699 "data-disassemble-a-option" feature.
3700 * NEWS: Mention new -data-disassemble option -a.
3701
3702 2018-08-13 Tom Tromey <tom@tromey.com>
3703
3704 * common/common-defs.h (_FORTIFY_SOURCE): Define.
3705
3706 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3707
3708 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3709 (aarch64_linux_collect_sve_regset): Likewise.
3710 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3711 * regcache.h (regcache_map_entry_size): New function.
3712
3713 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3714
3715 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3716 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3717 (SVE_HEADER_VL_LENGTH): Likewise.
3718 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3719 (SVE_HEADER_FLAGS_LENGTH): Likewise.
3720 (SVE_HEADER_RESERVED_LENGTH): Likewise.
3721 (SVE_HEADER_SIZE_OFFSET): Likewise.
3722 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3723 (SVE_HEADER_VL_OFFSET): Likewise.
3724 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3725 (SVE_HEADER_FLAGS_OFFSET): Likewise.
3726 (SVE_HEADER_RESERVED_OFFSET): Likewise.
3727 (SVE_HEADER_SIZE): Likewise.
3728 (aarch64_linux_core_read_vq): Add function.
3729 (aarch64_linux_core_read_description): Check for SVE section.
3730
3731 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3732
3733 * aarch64-fbsd-tdep.c
3734 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3735 collect_size.
3736 * aarch64-linux-tdep.c
3737 (aarch64_linux_iterate_over_regset_sections): Likewise.
3738 * alpha-linux-tdep.c
3739 (alpha_linux_iterate_over_regset_sections):
3740 * alpha-nbsd-tdep.c
3741 (alphanbsd_iterate_over_regset_sections): Likewise.
3742 * amd64-fbsd-tdep.c
3743 (amd64fbsd_iterate_over_regset_sections): Likewise.
3744 * amd64-linux-tdep.c
3745 (amd64_linux_iterate_over_regset_sections): Likewise.
3746 * arm-bsd-tdep.c
3747 (armbsd_iterate_over_regset_sections): Likewise.
3748 * arm-fbsd-tdep.c
3749 (arm_fbsd_iterate_over_regset_sections): Likewise.
3750 * arm-linux-tdep.c
3751 (arm_linux_iterate_over_regset_sections): Likewise.
3752 * corelow.c (get_core_registers_cb): Likewise.
3753 (core_target::fetch_registers): Likewise.
3754 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3755 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3756 * gdbarch.h (void): Regenerate.
3757 * gdbarch.sh: Add supply_size and collect_size.
3758 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3759 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3760 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3761 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3762 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3763 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3764 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3765 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3766 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3767 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3768 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3769 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3770 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3771 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3772 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3773 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3774 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3775 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3776 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3777 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3778 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3779 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3780 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3781 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3782 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3783 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3784 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3785 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3786 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3787 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3788
3789 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
3790
3791 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3792 with string_printf.
3793
3794 2018-08-10 Keith Seitz <keiths@redhat.com>
3795
3796 * compile/compile-c-support.c (add_code_header, add_code_footer):
3797 Move into policy class.
3798 (c_push_user_expression, pop_user_expression_nop)
3799 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3800 (compile_program): New host class.
3801 (c_compile_program): New typedef.
3802 (c_compute_porgram): Use c_compile_program.
3803
3804 2018-08-10 Keith Seitz <keiths@redhat.com>
3805
3806 * compile/compile-internal.h (compile_instance::~compile_instance):
3807 Remove calls to htab_delete.
3808 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3809 * compile.c (compile_instance::compile_instance): Initialize
3810 htab unique pointers.
3811 (compile_instance::get_cached_type, compile_instance::insert_type)
3812 (compile_instance::error_symbol_once): Update for unique_ptr.
3813
3814 2018-08-10 Keith Seitz <keiths@redhat.com>
3815
3816 * compile/compile-c-symbols.c (struct symbol_error)
3817 (hash_symbol_error, eq_symbol_error, del_symbol_error)
3818 (compile_instance::insert_symbol_error)
3819 (compile_instance::error_symbol_once): Move to ...
3820 * compile/compile.c: ... here.
3821
3822 2018-08-10 Keith Seitz <keiths@redhat.com>
3823
3824 * compile/compile-c-support.c (c_get_compile_context): Use `new'
3825 instead of `new_compile_instance'.
3826 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3827 Update description.
3828 If the symbol error map is not initialized, create it.
3829 (generate_c_for_for_one_symbol): Do not check/initialize
3830 the symbol error map.
3831 * compile/compile-c-types.c (compile_c_instance): Make a class.
3832 Update all callers.
3833 (compile_instance::compile_instance): Initialize the type cache.
3834 (get_cached_type): New function.
3835 (insert_type): Update description.
3836 (compile_c_instance::m_default_cflags): Define.
3837 (convert_type): Update description. Use get_cached_type.
3838 (delete_instance): Moved to destructor.
3839 (new_compile_instance): Moved to constructor.
3840 * compile/compile-c.h (compile_c_instance): Make class inheriting
3841 from compile_instance.
3842 <base>: Remove field.
3843 <type_map, symbol_err_map>: Move to base class.
3844 <c_plugin>: Rename to `m_plugin' and remove pointer type.
3845 * compile/compile-internal.h (compile_instance): Make class.
3846 <type_map_t, symbol_err_map_t>: Define.
3847 <fe>: Rename to `m_gcc_fe'.
3848 <scope, block, gcc_target_options>: Add `m_' prefix.
3849 <m_type_map, m_symbol_err_map>: New fields, moved from
3850 compile_c_instance.
3851 <destroy>: Remove.
3852 (convert_type, new_compile_instance): Remove.
3853 * compile/compile.c (cleanup_compile_instance): Remove.
3854 (compile_to_object): Use unique_ptr to eliminate cleanups.
3855 (compile_instance::set_print_callback, compile_instance::version)
3856 (compile_instance::set_verbose)
3857 (compile_instance::set_driver_filename)
3858 (compile_instance::set_triplet_regexp)
3859 (compile_instance::set_arguments)
3860 (compile_instance::set_source_file)
3861 (compile_instance::compile): Define.
3862
3863 2018-08-10 Keith Seitz <keiths@redhat.com>
3864
3865 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3866 * compile/compile-c-types.c: Define GCC_METHODN macros and include
3867 gcc-c-fe.def to define C plugin.
3868 (delete_instance): Delete `c_plugin'.
3869 (new_compile_instance): Initialize `c_plugin'.
3870 * compile/compile-c.h: Include gcc_c_plugin.h.
3871 (struct compile_c_instance) <c_plugin>: New member.
3872 * gcc-c-plugin.h: New file.
3873 Update all callers with API change.
3874
3875 2018-08-10 Keith Seitz <keiths@redhat.com>
3876
3877 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3878 (HFILES_NO_SRCDIR): ... to here.
3879 Add compile-internal.h and compile-c.h.
3880 * compile/compile-c-support.c: Include compile-c.h.
3881 * compile/compile-c-symbols.c: Include compile-c.h.
3882 (generate_c_for_variable_locations): Update comment.
3883 * compile/compile-c-types.c: Include compile-c.h.
3884 * compile/compile-c.h: New file -- moved C language declarations
3885 from other files here.
3886 * compile/compile-internal.h: Do not include hashtab.h or
3887 common/enum-flags.h.
3888 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3889 (gcc_convert_symbol, gcc_symbol_address)
3890 (generate_c_for_variable_locations, c_get_mode_for_size)
3891 (c_get_range_decl_name): Definitions moved to compile-c.h.
3892 * compile/compile-loc2c.c: Include compile-c.h.
3893
3894 2018-08-10 Keith Seitz <keiths@redhat.com>
3895
3896 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3897 (c_symbol_substitution_name): ... this.
3898 Update all callers.
3899
3900 2018-08-10 Keith Seitz <keiths@redhat.com>
3901
3902 * compile/compile-c-support.c (c_compute_program): Use
3903 unique_xmalloc_ptr to eliminate cleanup.
3904 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3905 Return a unique_xmalloc_ptr and eliminate cleanup.
3906 * compile/compile-internal.h (generate_c_for_variable_locations):
3907 Return unique_xmalloc_ptr and update description.
3908
3909 2018-08-10 Alan Hayward <alan.hayward@arm.com>
3910
3911 * corelow.c (core_target::get_core_register_section): Rename
3912 min_size to section_min_size.
3913
3914 2018-08-09 Jim Wilson <jimw@sifive.com>
3915
3916 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3917 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3918 * NEWS: Mention new GNU/Linux RISC-V target.
3919 * configure.host: Add riscv*-*-linux*.
3920 * configure.nat: Add riscv*.
3921 * configure.tgt: Add riscv*-*-linux*.
3922 * riscv-linux-nat.c: New file.
3923 * riscv-linux-tdep.c: New file.
3924
3925 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3926
3927 * infrun.c (resume): Make static, add forward declaration.
3928 (proceed): Update header comment.
3929 * infrun.h (resume): Delete declaration.
3930
3931 2018-08-09 Tom Tromey <tom@tromey.com>
3932
3933 * riscv-tdep.h: Minor formatting fixes.
3934
3935 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
3936
3937 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3938 * dwarf-index-cache.c (create_dir_and_check): Likewise.
3939 (test_mkdir_recursive): Likewise.
3940 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3941
3942 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3943
3944 * valarith.c (value_subscripted_rvalue): If an array is not in
3945 memory, and we don't know the upper bound, then we can't know that
3946 the requested element exists or not.
3947
3948 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
3949
3950 * target.c (str_comma_list_concat_elem): Fix typo in comment.
3951 (target_options_to_string): Add comment.
3952
3953 2018-08-08 Tom Tromey <tom@tromey.com>
3954
3955 * unittests/scoped_mmap-selftests.c: Check result of "write".
3956
3957 2018-08-08 Jim Wilson <jimw@sifive.com>
3958
3959 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3960 (decode_register_index_short): New.
3961 (decode_j_type_insn, decode_cj_type_insn): New.
3962 (decode_b_type_insn, decode_cb_type_insn): New.
3963 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
3964 local xlen. Check xlen when decoding ambiguous compressed insns. In
3965 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3966 is_c_sw_insn instead of is_sw_insn.
3967 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3968 (riscv_software_single_step): New.
3969 * riscv-tdep.h (riscv_software_single_step): Declare.
3970
3971 * riscv-tdep.c (riscv_isa_xlen): Drop static.
3972 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3973
3974 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
3975
3976 PR gdb/18050:
3977 * target.c (dispose_inferior): Don't dispose of inferiors that are
3978 already killed.
3979
3980 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
3981
3982 * remote.c (remote_target::download_tracepoint): Change char* to
3983 const char*.
3984
3985 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
3986
3987 * target.h (target_options_to_string): Return an std::string.
3988 * target.c (str_comma_list_concat_elem): Return void, use
3989 std::string.
3990 (do_option): Likewise.
3991 (target_options_to_string): Return an std::string.
3992 * linux-nat.c (linux_nat_target::wait): Adjust.
3993 * target-debug.h (target_debug_print_options): Adjust.
3994
3995 2018-08-07 Tom Tromey <tom@tromey.com>
3996
3997 * Makefile.in (CPPFLAGS): New variable.
3998 (INTERNAL_CPPFLAGS): Use it.
3999
4000 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4001
4002 * NEWS: Mention the index cache.
4003
4004 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4005
4006 * common/pathstuff.h (get_standard_cache_dir): New.
4007 * common/pathstuff.c (get_standard_cache_dir): New.
4008 * build-id.h (build_id_to_string): New.
4009 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4010 DEBUG_STR_SUFFIX): Move to here.
4011 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4012 DEBUG_STR_SUFFIX): Move from there.
4013 (write_psymtabs_to_index): Make non-static, add basename
4014 parameter. Write to temporary files, rename when done.
4015 (save_gdb_index_command): Adjust call to
4016 write_psymtabs_to_index.
4017 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4018 field.
4019 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4020 (get_gdb_index_contents_from_cache): New.
4021 (get_gdb_index_contents_from_cache_dwz): New.
4022 (dwarf2_initialize_objfile): Read index from cache.
4023 (dwarf2_build_psymtabs): Save to index.
4024 * dwarf-index-cache.h: New file.
4025 * dwarf-index-cache.c: New file.
4026 * dwarf-index-write.h: New file.
4027
4028 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4029
4030 * gnulib/aclocal.m4: Re-generate.
4031 * gnulib/config.in: Re-generate.
4032 * gnulib/configure: Re-generate.
4033 * gnulib/import/Makefile.am: Re-generate.
4034 * gnulib/import/Makefile.in: Re-generate.
4035 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4036 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4037 * gnulib/import/m4/mkdir.m4: New file.
4038 * gnulib/import/mkdir.c: New file.
4039 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4040 module.
4041
4042 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4043
4044 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4045 * common/scoped_mmap.c: New file.
4046 * common/scoped_mmap.h (destroy): New method.
4047 (~scoped_mmap, reset): Use destroy.
4048 (scoped_mmap): New move constructor.
4049 (mmap_file): New declaration.
4050 * unittests/scoped_mmap-selftests.c (test_normal,
4051 test_invalid_filename, run_tests): New functions.
4052 (_initialize_scoped_mmap_selftests): Register selftest.
4053
4054 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4055
4056 * dwarf2read.c (read_gdb_index_from_section): Rename to...
4057 (read_gdb_index_from_buffer): ... this. Remove section
4058 parameter, add buffer parameter.
4059 (get_gdb_index_contents_ftype,
4060 get_gdb_index_contents_dwz_ftype): New typedefs.
4061 (dwarf2_read_gdb_index): Add callback parameters to get the
4062 index contents.
4063 (get_gdb_index_contents_from_section): New.
4064 (dwarf2_initialize_objfile): Update call to
4065 dwarf2_read_gdb_index.
4066
4067 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4068
4069 * common/filestuff.h (gdb_fopen_cloexec): New overload.
4070 (gdb_open_cloexec): Likewise.
4071 * nat/linux-osdata.c (command_from_pid): Use string_printf.
4072 (commandline_from_pid): Likewise.
4073 (linux_xfer_osdata_threads): Likewise.
4074 (linux_xfer_osdata_fds): Likewise.
4075 * ada-lang.c (is_package_name): Likewise.
4076 * auxv.c (procfs_xfer_auxv): Likewise.
4077 * breakpoint.c (print_one_breakpoint_location): Use
4078 uiout::field_fmt.
4079 (print_one_catch_solib): Use string_printf.
4080 * coff-pe-read.c (add_pe_exported_sym): Likewise.
4081 (add_pe_forwarded_sym): Likewise.
4082 * dwarf2read.c (create_type_unit_group): Likewise.
4083 (build_error_marker_type): Likewise.
4084 * infcall.c (get_function_name): Likewise.
4085 * valprint.c (print_converted_chars_to_obstack): Likewise.
4086 * xtensa-tdep.c (xtensa_register_type): Likewise.
4087
4088 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
4089
4090 * remote.c (remote_target::download_tracepoint): Fix format
4091 string errors.
4092
4093 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4094
4095 * tracefile.c: Include common/byte-vector.h.
4096 (trace_save): Change type of buf to gdb::byte_vector. Initialize
4097 with trace_regblock_size if needed. Update uses of buf.
4098
4099 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4100
4101 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4102 std::vector<unsigned char>.
4103 * tracepoint.c (collection_list::collection_list): Remove
4104 m_regs_mask initializer from initializer list. Resize
4105 m_regs_mask using the largest remote register number.
4106 (collection_list::add_remote_register): Remove size check on
4107 m_regs_mask. Use at to access element.
4108 (collection_list::stringify): Change type of temp_buf to
4109 gdb::char_vector. Update uses of temp_buf. Resize if needed to
4110 stringify the register mask. Use pack_hex_byte for the register
4111 mask.
4112
4113 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4114
4115 * tracepoint.h (class collection_list) <add_register>: Remove.
4116 <add_remote_register, add_ax_registers, add_local_register>:
4117 Declare.
4118 <add_memrange>: Add scope parameter.
4119 * tracepoint.c (encode_actions_1): Likewise.
4120 (collection_list::add_register): Rename to ...
4121 (collection_list::add_remote_register): ... this. Update
4122 comment.
4123 (collection_list::add_ax_registers, add_local_register): New
4124 methods.
4125 (collection_list::add_memrange): Add scope parameter. Call
4126 add_local_register instead of add_register.
4127 (finalize_tracepoint_aexpr): New function.
4128 (collection_list::collect_symbol): Update calls to add_memrange.
4129 Call add_local_register instead of add_register. Call
4130 add_ax_registers. Call finalize_tracepoint_aexpr.
4131 (encode_actions_1): Get remote regnos for $reg action. Call
4132 add_remote_register, add_ax_registers, and add_local_register.
4133 Update call to add_memrange. Call finalize_tracepoint_aexpr.
4134 (validate_actionline): Call finalize_tracepoint_aexpr.
4135
4136 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4137
4138 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4139 Replace array buf with gdb::char_vector buf, of size
4140 get_remote_packet_size (). Replace references to buf and
4141 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
4142 and xsnprintf with snprintf. Raise errors if the buffer is too
4143 small.
4144
4145 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4146
4147 * remote.c (remote_target::download_tracepoint): Fix the has_more
4148 predicate in the QTDP action list iteration.
4149
4150 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4151
4152 * remote.c (remote_target::download_tracepoint): Fix indentation
4153 in for block.
4154
4155 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4156
4157 * proc-api.c (_initialize_proc_api): Remove c, unused.
4158 * procfs.c (procfs_init_inferior): Remove signals, unused.
4159 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4160 unused.
4161
4162 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
4163 Andrew Burgess <andrew.burgess@embecosm.com>
4164
4165 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4166 'W_STOPCODE (0)' as this could be ambiguous.
4167
4168 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
4169
4170 * ser-tcp.c (net_open): Fix thinko when deciding whether to
4171 disable TCP's Nagle algorithm (use "ai_protocol" instead of
4172 "ai_socktype").
4173
4174 2018-08-02 Tom Tromey <tom@tromey.com>
4175
4176 PR symtab/16842.
4177 * dwarf2read.c (read_func_scope): Set symtab on template parameter
4178 symbols.
4179 (process_structure_scope): Likewise.
4180
4181 2018-08-02 Xavier Roirand <roirand@adacore.com>
4182
4183 PR gdb/22629:
4184 * darwin-nat.c (darwin_kill_inferior): Fix handling of
4185 kill inferior.
4186
4187 2018-08-02 Tom Tromey <tom@tromey.com>
4188
4189 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4190 (darwin_suspend_inferior, darwin_resume_inferior)
4191 (darwin_decode_notify_message, darwin_resume_inferior_threads)
4192 (darwin_check_new_threads): Check result of get_darwin_inferior.
4193
4194 2018-07-31 Joel Brobecker <brobecker@adacore.com>
4195
4196 GDB 8.1.1 released.
4197
4198 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
4199
4200 * varobj.c (varobj_get_path_expr_parent): Report an error if
4201 parent is a dynamic varobj.
4202
4203 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4204
4205 * gnulib/aclocal.m4: Re-generate.
4206 * gnulib/config.in: Re-generate.
4207 * gnulib/configure: Re-generate.
4208 * gnulib/import/Makefile.in: Re-generate.
4209 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4210 * gnulib/import/m4/onceonly.m4: Re-generate.
4211
4212 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4213
4214 * target-descriptions.c (struct xml_test_tdesc): New.
4215 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4216 (record_xml_tdesc): Update.
4217 (maintenance_check_xml_descriptions): Update.
4218 * target-descriptions.h (record_xml_tdesc): Update comment.
4219
4220 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
4221
4222 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4223 checking array bounds are defined.
4224
4225 2018-07-30 Tom Tromey <tom@tromey.com>
4226
4227 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4228 irreflexivity violation.
4229
4230 2018-07-30 Tom Tromey <tom@tromey.com>
4231
4232 * cli/cli-decode.c (lookup_cmd): Remove lint code.
4233 * value.c (unpack_long): Remove lint code.
4234 * valops.c (value_ind): Remove lint code.
4235 * valarith.c (value_x_binop, value_x_unop, value_equal)
4236 (value_pos): Remove lint code.
4237
4238 2018-07-28 Tom de Vries <tdevries@suse.de>
4239
4240 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4241 with undefined upper bound as <optimized out>.
4242
4243 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
4244
4245 * gcore.in: Rename variable "name" to "prefix". Expand
4246 "usage" text.
4247
4248 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
4249
4250 * windows-nat.c (windows_nat_target::create_inferior): Update to
4251 call close() in global namespace.
4252
4253 2018-07-26 Tom Tromey <tom@tromey.com>
4254
4255 * dwarf-index-write.c (add_address_entry): Don't add objfile
4256 offsets.
4257 * dbxread.c (find_stab_function): Rename from
4258 find_stab_function_addr. Return a bound_minimal_symbol.
4259 (read_dbx_symtab): Use raw_text_low, raw_text_high.
4260 Don't add objfile offsets.
4261 (end_psymtab): Use raw_text_low, raw_text_high,
4262 MSYMBOL_VALUE_RAW_ADDRESS.
4263 (read_ofile_symtab): Update.
4264 (process_one_symbol): Update.
4265 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4266 offsets.
4267 (dw2_relocate): Remove.
4268 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4269 searching addrmap.
4270 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4271 Update.
4272 (process_psymtab_comp_unit_reader, add_partial_symbol)
4273 (add_partial_subprogram, dwarf2_ranges_read): Update.
4274 (load_partial_dies): Update.
4275 (add_address_entry): Don't add objfile offsets.
4276 (dwarf2_build_include_psymtabs): Update.
4277 (create_addrmap_from_aranges): Don't add objfile offsets.
4278 (dw2_find_pc_sect_compunit_symtab): Update.
4279 * mdebugread.c (parse_symbol): Don't add objfile offsets.
4280 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4281 Update.
4282 (parse_partial_symbols): Don't add objfile offsets. Use
4283 raw_text_low, raw_text_high. Update.
4284 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4285 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4286 or call 'relocate' quick function. Clear psymbol_map.
4287 * psympriv.h (struct partial_symbol) <address>: Add section
4288 offset.
4289 <set_unrelocated_address>: Rename from set_address.
4290 <raw_text_low, raw_text_high>: New methods.
4291 <text_low, text_high>: Add objfile parameter.
4292 (add_psymbol_to_bcache): Add 'section' parameter. Call
4293 set_unrelocated_address.
4294 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4295 (find_pc_psymbol): Update.
4296 (fixup_psymbol_section, relocate_psymtabs): Remove.
4297 (dump_psymtab, psym_functions): Update.
4298 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4299 parameter.
4300 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4301 (start_psymtab_common): Update.
4302 * symfile-debug.c (debug_qf_relocate): Remove.
4303 (debug_sym_quick_functions): Update.
4304 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4305 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4306 Update.
4307
4308 2018-07-26 Tom Tromey <tromey@redhat.com>
4309
4310 * dbxread.c (end_psymtab): Use text_high_valid and
4311 text_low_valid.
4312 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4313 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4314 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4315 Update comment.
4316 <text_low_valid, text_high_valid>: New fields.
4317 <set_text_low, set_text_high>: Update.
4318 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4319
4320 2018-07-26 Tom Tromey <tom@tromey.com>
4321
4322 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4323 Update.
4324 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4325 textlow and texthigh fields.
4326 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4327 Update.
4328 * mdebugread.c (parse_lines, parse_partial_symbols)
4329 (psymtab_to_symtab_1): Update.
4330 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4331 Rename fields. Update comment. Now private.
4332 <text_low, text_high, set_text_low, set_text_high>: New methods.
4333 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4334 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4335 (start_psymtab_common, maintenance_info_psymtabs)
4336 (maintenance_check_psymtabs): Update.
4337 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4338 texthigh fields.
4339 (scan_xcoff_symtab): Update.
4340
4341 2018-07-26 Tom Tromey <tromey@redhat.com>
4342
4343 * psympriv.h (struct partial_symbol) <unrelocated_address,
4344 address, set_address>: New methods.
4345 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4346 (fixup_psymbol_section, relocate_psymtabs): Update.
4347 (print_partial_symbols): Add 'objfile' parameter. Update.
4348 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4349 Update.
4350
4351 2018-07-26 Tom Tromey <tom@tromey.com>
4352
4353 * dwarf-index-write.c (write_psymbols, debug_names::insert)
4354 (debug_names::write_psymbols): Update.
4355 * psympriv.h (struct partial_symbol): Derive from
4356 general_symbol_info.
4357 <obj_section>: New method.
4358 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4359 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4360 (find_pc_sect_psymbol, fixup_psymbol_section)
4361 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4362 (print_partial_symbols, recursively_search_psymtabs)
4363 (compare_psymbols, psymbol_hash, psymbol_compare)
4364 (add_psymbol_to_bcache, maintenance_check_psymtabs)
4365 (psymbol_name_matches, psym_fill_psymbol_map): Update.
4366
4367 2018-07-26 Tom Tromey <tromey@redhat.com>
4368
4369 * dbxread.c (end_psymtab): Remove dead code.
4370
4371 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
4372
4373 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4374 DWARF unwinders are disabled.
4375 * dwarf2-frame.c: Add dwarf2read.h include.
4376 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4377 disabled.
4378 (dwarf2_frame_unwinders_enabled_p): Define.
4379 (show_dwarf_unwinders_enabled_p): New function.
4380 (_initialize_dwarf2_frame): Register switch to control DWARF
4381 unwinder use.
4382 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4383 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4384 (show_dwarf_cmdlist): Remove static keyword.
4385 * dwarf2read.h (set_dwarf_cmdlist): Declare.
4386 (show_dwarf_cmdlist): Declare.
4387 * NEWS: Document new feature.
4388
4389 2018-07-26 Tom de Vries <tdevries@suse.de>
4390
4391 PR breakpoints/23366
4392 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4393
4394 2018-07-26 Tom de Vries <tdevries@suse.de>
4395
4396 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4397 DW_AT_count can't be translated to a dynamic prop.
4398
4399 2018-07-25 Tom de Vries <tdevries@suse.de>
4400
4401 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4402 try/catch.
4403
4404 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
4405
4406 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4407
4408 2018-07-25 Joel Brobecker <brobecker@adacore.com>
4409
4410 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4411
4412 2018-07-24 Keith Seitz <keiths@redhat.comt
4413
4414 PR symtab/23010
4415 * dwarf2read.c (dw2_add_symbol_to_list): New function.
4416 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4417 instead of add_symbol_to_list.
4418 (read_file_scope): Call prepare_one_comp_unit before reading
4419 any other DIEs.
4420
4421 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
4422
4423 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4424
4425 2018-07-24 Tom Tromey <tom@tromey.com>
4426
4427 * utils.c (malloc, realloc, free): Don't declare.
4428 * configure, config.in: Rebuild.
4429 * configure.ac: Don't check for declarations of free, malloc, or
4430 realloc.
4431
4432 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4433
4434 * aarch64-linux-nat.c
4435 (aarch64_linux_nat_target::stopped_data_address): Remove unused
4436 variable.
4437 * arm-linux-nat.c (fetch_regs): Likewise.
4438 (store_regs): Likewise.
4439 (fetch_vfp_regs): Likewise.
4440 (store_vfp_regs): Likewise.
4441 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4442 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4443 (arm_linux_nat_target::insert_watchpoint): Likewise.
4444 (arm_linux_nat_target::remove_watchpoint): Likewise.
4445 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4446 Likewise.
4447 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4448 Likewise.
4449 * ppc-linux-nat.c (fetch_register): Likewise.
4450 (fetch_all_gp_regs): Likewise.
4451 (fetch_ppc_registers): Likewise.
4452 (store_all_gp_regs): Likewise.
4453 (store_ppc_registers): Likewise.
4454 (hwdebug_insert_point): Likewise.
4455 (can_use_watchpoint_cond_accel): Likewise.
4456 * remote-sim.c (gdb_os_write_stdout): Likewise.
4457
4458 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4459 Tom Tromey <tom@tromey.com>
4460
4461 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4462 test for it.
4463 * configure: Rebuild.
4464
4465 2018-07-22 Tom Tromey <tom@tromey.com>
4466
4467 * regformats/regdat.sh: Define xmltarget_${name} inside
4468 #ifndef IN_PROCESS_AGENT.
4469
4470 2018-07-22 Tom Tromey <tom@tromey.com>
4471
4472 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4473
4474 2018-07-22 Tom Tromey <tom@tromey.com>
4475
4476 * symfile.c (reread_symbols): Notify iter, not objfile.
4477
4478 2018-07-22 Tom Tromey <tom@tromey.com>
4479
4480 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4481 Use arch_ops.
4482 (ravenscar_thread_target::prepare_to_store): Likewise.
4483
4484 2018-07-22 Tom Tromey <tom@tromey.com>
4485
4486 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4487 unused variable. Call value_fetch_lazy when needed.
4488 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4489 Remove unused variable. Call value_fetch_lazy when needed.
4490
4491 2018-07-22 Tom Tromey <tom@tromey.com>
4492
4493 * m32c-tdep.c (mark_dma): Return void.
4494 (make_regs): Remove unused declarations.
4495
4496 2018-07-22 Tom Tromey <tom@tromey.com>
4497
4498 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4499 cmdscm_get_valid_command_smob_arg_unsafe for effect.
4500 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4501 bkscm_get_valid_block_smob_arg_unsafe for effect.
4502
4503 2018-07-22 Tom Tromey <tom@tromey.com>
4504
4505 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4506 value_type.
4507
4508 2018-07-22 Tom Tromey <tom@tromey.com>
4509
4510 * windows-nat.c (saved_context): Conditionally define.
4511 * remote.c (remote_target::remote_btrace_maybe_reopen):
4512 Conditionally declare "warned".
4513 * inflow.c (sigquit_ours): Conditionally define.
4514 (new_tty): Move "tty" declaration inside #if.
4515 * guile/guile.c (guile_datadir): Conditionally define.
4516 * charset.c (set_be_le_names): Move some declarations inside #if.
4517 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4518 #if.
4519 (parse_xml_btrace_conf): Likewise.
4520
4521 2018-07-22 Tom Tromey <tom@tromey.com>
4522
4523 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4524
4525 2018-07-22 Tom Tromey <tom@tromey.com>
4526
4527 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4528 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4529 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4530 * buildsym-legacy.c (get_macro_table): Remove unused variable.
4531 * stack.c (frame_apply_level_command): Remove unused variable.
4532 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4533 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4534 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4535 unused variable.
4536 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4537 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4538 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4539 variable.
4540 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4541 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4542 variable.
4543 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4544 Remove unused variable.
4545 * cli/cli-script.c (recurse_read_control_structure): Remove unused
4546 variable.
4547 * common/tdesc.c (print_xml_feature::visit): Remove unused
4548 variable.
4549 * compile/compile-object-load.c (store_regs): Remove unused
4550 variables.
4551 * complaints.c (clear_complaints): Remove unused variable.
4552 * corelow.c (core_target_open): Remove unused variable.
4553 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4554 variable.
4555 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4556 variable.
4557 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4558 variable.
4559 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4560 variable.
4561 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4562 variable.
4563 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4564 variable.
4565 * ia64-tdep.c (examine_prologue): Remove unused variable.
4566 * infcall.c (run_inferior_call): Remove unused variable.
4567 * inferior.c (exit_inferior): Remove unused variable.
4568 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4569 * linespec.c (decode_line_2): Remove unused variable.
4570 * linux-nat.c (super_close): Remove.
4571 * linux-tdep.c (linux_info_proc): Remove unused variable.
4572 * mi/mi-main.c (mi_execute_command): Remove unused variable.
4573 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4574 Remove unused variable.
4575 * parse.c (find_minsym_type_and_address): Remove unused variable.
4576 * printcmd.c (info_symbol_command, printf_floating): Remove unused
4577 variable.
4578 * python/py-breakpoint.c (bppy_set_commands): Remove unused
4579 variable.
4580 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4581 variables.
4582 * record-btrace.c (record_btrace_target::store_registers): Remove
4583 unused variable.
4584 (cmd_show_record_btrace_cpu): Remove unused variable.
4585 * riscv-tdep.c (riscv_register_reggroup_p)
4586 (riscv_push_dummy_call, riscv_return_value): Remove unused
4587 variable.
4588 * rust-exp.y (literal): Remove unused variable.
4589 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4590 unused variable.
4591 <STRUCTOP_ANONYMOUS>: Likewise.
4592 * s390-linux-tdep.c (s390_linux_init_abi_31)
4593 (s390_linux_init_abi_64): Remove unused variable.
4594 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4595 (file_select_thread, net_windows_open, _initialize_ser_windows):
4596 Remove unused variables.
4597 * symtab.c (find_pc_sect_line): Remove unused variable.
4598 * target-memory.c (compute_garbled_blocks): Remove unused
4599 variable.
4600 (target_write_memory_blocks): Remove unused variable.
4601 * target.c (target_stack::unpush): Remove unused variables.
4602 * tracepoint.c (start_tracing, all_tracepoint_actions)
4603 (merge_uploaded_trace_state_variables)
4604 (print_one_static_tracepoint_marker): Remove unused variable.
4605 * unittests/basic_string_view/element_access/char/1.cc (test01):
4606 Remove unused variable.
4607 * windows-nat.c (windows_continue, windows_add_all_dlls)
4608 (do_initial_windows_stuff, windows_nat_target::create_inferior):
4609 Remove unused variables.
4610
4611 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
4612
4613 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4614 attr_profile in HAVE_ELF.
4615 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4616 HAVE_ELF.
4617
4618 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
4619
4620 * frame.c (frame_register_unwind): Change parameter name.
4621 (frame_unwind_register): Likewise.
4622 (frame_unwind_register_value): Likewise.
4623 (frame_unwind_register_signed): Likewise.
4624 (frame_unwind_register_unsigned): Likewise.
4625 * frame.h (frame_register_unwind): Likewise.
4626 (frame_unwind_register): Likewise.
4627 (frame_unwind_register_value): Likewise.
4628 (frame_unwind_register_signed): Likewise.
4629 (frame_unwind_register_unsigned): Likewise.
4630 (frame_unwind_arch): Likewise.
4631
4632 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4633
4634 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4635 ISA maintenance.
4636
4637 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4638
4639 * mips-linux-nat.c (mips_linux_nat_target::read_description):
4640 Call `get_ptrace_pid' rather than extracting the ptrace PID by
4641 hand.
4642
4643 2018-07-20 Keith Seitz <keiths@redhat.com>
4644
4645 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4646 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4647 m_compunit_symtab, m_language>: Add "m_" prefix.
4648 Update all uses.
4649 * buildsym.c: Update all uses.
4650
4651 2018-07-20 Tom Tromey <tom@tromey.com>
4652
4653 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4654 * buildsym.h (record_line_ftype): Remove typedef.
4655
4656 2018-07-20 Tom Tromey <tom@tromey.com>
4657
4658 * buildsym-legacy.h (augment_type_symtab): Don't declare.
4659 (end_expandable_symtab): Likewise.
4660 (end_symtab_get_static_block): Likewise.
4661 (end_symtab_from_static_block): Likewise.
4662 * buildsym-legacy.c (augment_type_symtab): Remove.
4663 (end_expandable_symtab): Remove.
4664 (end_symtab_get_static_block): Remove.
4665 (end_symtab_from_static_block): Remove.
4666
4667 2018-07-20 Tom Tromey <tom@tromey.com>
4668
4669 * dwarf2read.c: Include buildsym.h.
4670 (struct dwarf2_cu) <builder>: New method.
4671 (fixup_go_packaging): Update.
4672 (process_full_comp_unit, process_full_type_unit): Update. Don't
4673 use scoped_free_pendings.
4674 (using_directives): Add "cu" parameter, remove "language".
4675 (read_import_statement, setup_type_unit_groups, )
4676 (read_func_scope, read_lexical_block_scope)
4677 (dwarf2_record_block_ranges, read_namespace): Update.
4678 (lnp_state_machine::lnp_state_machine): Add cu parameter.
4679 (lnp_state_machine::handle_end_sequence): Update.
4680 (class lnp_state_machine) <m_cu>: New member.
4681 <m_record_line_callback>: Remove.
4682 <m_currently_recording_lines>: New member.
4683 (lnp_state_machine::handle_set_file): Update.
4684 (noop_record_line): Remove.
4685 (dwarf_record_line_p): Add cu parameter.
4686 (dwarf_record_line_1, dwarf_finish_line): Likewise.
4687 (lnp_state_machine::record_line)
4688 (lnp_state_machine::lnp_state_machine)
4689 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4690 (dwarf_decode_lines): Update.
4691 (dwarf2_start_subfile): Add cu parameter.
4692 (dwarf2_start_symtab, new_symbol): Update.
4693 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4694 Remove dwarf2_per_objfile parameter.
4695 (dwarf_decode_macros): Update.
4696
4697 2018-07-20 Tom Tromey <tom@tromey.com>
4698
4699 * stabsread.c (define_symbol): Update.
4700 * buildsym-legacy.h (get_buildsym_compunit): Declare.
4701 * dwarf2read.c (new_symbol): Update.
4702 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4703 * cp-namespace.c: Include buildsym.h.
4704 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4705 * buildsym-legacy.c (get_buildsym_compunit): New function.
4706
4707 2018-07-20 Tom Tromey <tom@tromey.com>
4708
4709 * xcoffread.c: Include buildsym-legacy.h.
4710 * windows-nat.c: Include buildsym-legacy.h.
4711 * stabsread.c: Include buildsym-legacy.h.
4712 * mdebugread.c: Include buildsym-legacy.h.
4713 * buildsym-legacy.h: New file.
4714 * buildsym-legacy.c: New file, from buildsym.c.
4715 * go32-nat.c: Include buildsym-legacy.h.
4716 * dwarf2read.c: Include buildsym-legacy.h.
4717 * dbxread.c: Include buildsym-legacy.h.
4718 * cp-namespace.c: Include buildsym-legacy.h.
4719 * coffread.c: Include buildsym-legacy.h.
4720 * buildsym.h: Move some contents to buildsym-legacy.h.
4721 * buildsym.c: Include buildsym-legacy.h. Move many functions to
4722 buildsym-legacy.c.
4723 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4724
4725 2018-07-20 Tom Tromey <tom@tromey.com>
4726
4727 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4728 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4729 (buildsym_compunit::buildsym_compunit)
4730 (buildsym_compunit::~buildsym_compunit)
4731 (buildsym_compunit::get_macro_table): Define.
4732
4733 2018-07-20 Tom Tromey <tom@tromey.com>
4734
4735 * buildsym.c (reset_symtab_globals): Remove.
4736 (buildsym_compunit::end_symtab_from_static_block): Update.
4737 (buildsym_compunit::augment_type_symtab): Update.
4738 (end_symtab_from_static_block): Call free_buildsym_compunit.
4739 (augment_type_symtab, end_symtab, end_expandable_symtab):
4740 Likewise.
4741
4742 2018-07-20 Tom Tromey <tom@tromey.com>
4743
4744 * arch-utils.c: Do not include buildsym.h.
4745 * mipsread.c: Do not include buildsym.h.
4746 * machoread.c: Do not include buildsym.h.
4747 * elfread.c: Do not include buildsym.h.
4748
4749 2018-07-20 Tom Tromey <tom@tromey.com>
4750
4751 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4752 initialization.
4753 (buildsym_compunit): Add new constructor.
4754 (struct buildsym_compunit) <get_last_source_file, finish_block,
4755 record_block_range, start_subfile, patch_subfile_names,
4756 push_subfile, pop_subfile, record_line, get_compunit_symtab,
4757 set_last_source_start_addr, get_last_source_start_addr,
4758 get_local_using_directives, set_local_using_directives,
4759 get_global_using_directives, outermost_context_p,
4760 get_current_context_stack, get_context_stack_depth,
4761 get_current_subfile, get_local_symbols, get_file_symbols,
4762 get_global_symbols, record_debugformat, record_producer,
4763 push_context, pop_context, end_symtab_get_static_block,
4764 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4765 New public methods.
4766 <record_pending_block, finish_block_internal, make_blockvector,
4767 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4768 private methods.
4769 Update all users.
4770
4771 2018-05-22 Tom Tromey <tom@tromey.com>
4772
4773 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4774 parameter.
4775 (finish_block_internal): Update.
4776
4777 2018-07-20 Tom Tromey <tom@tromey.com>
4778
4779 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4780 parameter.
4781 (finish_block_internal): Update.
4782
4783 2018-07-20 Tom Tromey <tom@tromey.com>
4784
4785 * buildsym.h (EXTERN): Don't define or undef.
4786 * buildsym.c (EXTERN): Don't define.
4787
4788 2018-07-20 Tom Tromey <tom@tromey.com>
4789
4790 * buildsym.c: Remove TODO comment.
4791
4792 2018-07-20 Tom Tromey <tom@tromey.com>
4793
4794 * coffread.c (coff_symtab_read): Update.
4795 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4796 (xcoff_new_init): Update.
4797 * mipsread.c (mipscoff_new_init): Update.
4798 * mdebugread.c (mdebug_build_psymtabs): Update.
4799 * elfread.c (elf_new_init): Update.
4800 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4801 Update.
4802 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4803 (coffstab_build_psymtabs, elfstab_build_psymtabs)
4804 (stabsect_build_psymtabs): Update.
4805 * buildsym.h (buildsym_init): Don't declare.
4806 * buildsym.c: Update comment.
4807 (prepare_for_building): Remove.
4808 (start_symtab, restart_symtab): Update.
4809 (reset_symtab_globals): Update comment.
4810 (buildsym_init): Remove.
4811
4812 2018-07-20 Tom Tromey <tom@tromey.com>
4813
4814 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4815 * stabsread.c (patch_block_stabs, define_symbol, read_type)
4816 (read_enum_type, common_block_start, common_block_end)
4817 (cleanup_undefined_types_1, finish_global_stabs): Update.
4818 * mdebugread.c (psymtab_to_symtab_1): Update.
4819 * dwarf2read.c (fixup_go_packaging, read_func_scope)
4820 (read_lexical_block_scope, new_symbol): Update.
4821 * dbxread.c (process_one_symbol): Update.
4822 * coffread.c (coff_symtab_read, process_coff_symbol)
4823 (coff_read_enum_type): Update.
4824 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4825 declare.
4826 (get_local_symbols, get_file_symbols, get_global_symbols): New
4827 functions.
4828 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4829 m_global_symbols.
4830 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4831 (~scoped_free_pendings): Update.
4832 (finish_block, prepare_for_building, reset_symtab_globals)
4833 (end_symtab_get_static_block, end_symtab_with_blockvector)
4834 (augment_type_symtab, push_context): Update.
4835 (get_local_symbols, get_file_symbols, get_global_symbols): New
4836 functions.
4837 (buildsym_init): Update.
4838
4839 2018-07-20 Tom Tromey <tom@tromey.com>
4840
4841 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4842 (process_full_type_unit): Likewise.
4843 (dwarf2_start_symtab): Set list_in_scope.
4844
4845 2018-07-20 Tom Tromey <tom@tromey.com>
4846
4847 * dwarf2read.c (process_psymtab_comp_unit_reader)
4848 (build_type_psymtabs_reader): Do not set list_in_scope.
4849
4850 2018-07-20 Tom Tromey <tom@tromey.com>
4851
4852 * buildsym.c (free_pendings): Remove.
4853 (add_symbol_to_list, scoped_free_pendings)
4854 (finish_block_internal, buildsym_init): Update.
4855
4856 2018-07-20 Tom Tromey <tom@tromey.com>
4857
4858 * xcoffread.c (read_xcoff_symtab): Update.
4859 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4860 Update.
4861 * dbxread.c (process_one_symbol): Update.
4862 * coffread.c (coff_symtab_read): Update.
4863 * buildsym.h (finish_block): Update.
4864 * buildsym.c (finish_block): Remove "listhead" argument.
4865 (end_symtab_get_static_block): Update.
4866
4867 2018-07-20 Tom Tromey <tom@tromey.com>
4868
4869 * buildsym.h (class scoped_free_pendings): Remove constructor.
4870 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4871 method.
4872 <m_pending_block_obstack, m_pending_blocks>: New members.
4873 (pending_block_obstack, pending_blocks): Remove.
4874 (scoped_free_pendings::scoped_free_pendings): Default.
4875 (~scoped_free_pendings): Update.
4876 (free_pending_blocks): Remove.
4877 (finish_block_internal, record_pending_block, make_blockvector)
4878 (end_symtab_get_static_block, augment_type_symtab, push_context)
4879 (buildsym_init): Update.
4880
4881 2018-07-20 Tom Tromey <tom@tromey.com>
4882
4883 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4884 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4885 members.
4886 (pending_addrmap, pending_addrmap_obstack)
4887 (pending_addrmap_interesting): Remove.
4888 (scoped_free_pendings, record_block_range, make_blockvector)
4889 (prepare_for_building, reset_symtab_globals, buildsym_init):
4890 Update.
4891
4892 2018-07-20 Tom Tromey <tom@tromey.com>
4893
4894 * xcoffread.c (process_linenos): Update.
4895 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4896 * mdebugread.c (psymtab_to_symtab_1): Update.
4897 * dwarf2read.c (setup_type_unit_groups)
4898 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4899 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4900 * dbxread.c (process_one_symbol): Update.
4901 * coffread.c (coff_symtab_read, enter_linenos)
4902 (process_coff_symbol): Update.
4903 * buildsym.h (current_subfile): Don't declare.
4904 (get_current_subfile): Declare.
4905 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4906 member.
4907 (start_subfile, free_buildsym_compunit, push_subfile)
4908 (prepare_for_building, start_symtab): Update.
4909 (get_current_subfile): New function.
4910
4911 2018-07-20 Tom Tromey <tom@tromey.com>
4912
4913 * coffread.c (coff_symtab_read): Update.
4914 * xcoffread.c (read_xcoff_symtab): Update.
4915 * dwarf2read.c (new_symbol): Update.
4916 (read_func_scope, read_lexical_block_scope): Update.
4917 * dbxread.c (process_one_symbol): Update.
4918 * buildsym.h (context_stack, context_stack_depth): Don't declare.
4919 (outermost_context_p): Remove macro.
4920 (outermost_context_p, get_current_context_stack)
4921 (get_context_stack_depth): Declare.
4922 (pop_context): Return struct context_stack.
4923 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4924 member.
4925 (context_stack_size): Remove.
4926 (INITIAL_CONTEXT_STACK_SIZE): Remove.
4927 (prepare_for_building, end_symtab_get_static_block)
4928 (augment_type_symtab, push_context): Update.
4929 (pop_context): Return struct context_stack.
4930 (outermost_context_p, get_current_context_stack)
4931 (get_context_stack_depth): New functions.
4932 (buildsym_init): Update.
4933
4934 2018-07-20 Tom Tromey <tom@tromey.com>
4935
4936 * rust-exp.y: Now a pure parser. Update all rules.
4937 (%union): Move earlier.
4938 (current_parser, work_obstack): Remove globals.
4939 (rust_parser, ~rust_parser): Update.
4940 (class rust_parser) <copy_name, concat3, crate_name, super_name,
4941 lex_character, lex_number, lex_string, lex_identifier,
4942 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4943 convert_name, convert_params_to_expression,
4944 convert_ast_to_expression, ast_basic_type, ast_operation,
4945 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4946 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4947 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4948 ast_array_type, ast_slice_type, ast_reference_type,
4949 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4950 (rust_parse): Update.
4951 (rustyyerror, rustyylex): Add parser parameter.
4952 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4953 (rust_lex_stringish_test, rust_lex_test_sequence)
4954 (rust_lex_test_trailing_dot, rust_lex_test_completion)
4955 (rust_lex_test_push_back, rust_lex_tests): Update.
4956
4957 2018-07-19 Pedro Alves <palves@redhat.com>
4958
4959 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4960 gdb::unique_xmalloc_ptr.
4961 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4962 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4963 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4964 copy-initialization.
4965 * guile/scm-pretty-print.c (ppscm_print_children): Use
4966 gdb::unique_xmalloc_ptr instead of cleanups.
4967 (gdbscm_apply_val_pretty_printer): Remove cleanups.
4968 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4969 gdb::unique_xmalloc_ptr.
4970 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4971 Adjust to use gdb::unique_xmalloc_ptr.
4972 * guile/scm-utils.c (extract_arg): Adjust.
4973 * guile/scm-value.c (gdbscm_value_field): Adjust to use
4974 gdb::unique_xmalloc_ptr instead of a cleanup.
4975
4976 2018-07-19 Tom Tromey <tom@tromey.com>
4977
4978 * utils.c (do_value_free_to_mark)
4979 (make_cleanup_value_free_to_mark): Remove.
4980 * utils.h (make_cleanup_value_free_to_mark): Remove.
4981
4982 2018-07-19 Pedro Alves <palves@redhat.com>
4983
4984 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4985 forwarding reference.
4986
4987 2018-07-18 Pedro Alves <palves@redhat.com>
4988
4989 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4990 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
4991 cleanup.
4992
4993 2018-07-18 Pedro Alves <palves@redhat.com>
4994
4995 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4996 exceptions.
4997 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4998 (gdbscm_wrap): New.
4999 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5000 directly instead of a cleanup.
5001 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5002 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
5003 (vlscm_binop_gdbthrow): New, factored out from ...
5004 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
5005 (vlscm_rich_compare): Use gdbscm_wrap.
5006 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5007 instead of a cleanup.
5008 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5009 cleanup.
5010 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5011 Use xfree directly instead of a cleanup.
5012 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5013 Adjust to use gdbscm_wrap and scoped_value_mark.
5014 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5015 (gdbscm_value_address, gdbscm_value_dereference)
5016 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5017 scoped_value_mark.
5018 (gdbscm_value_dynamic_type): Use scoped_value_mark.
5019 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5020 scoped_value_mark.
5021 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5022 gdbscm_wrap and scoped_value_mark.
5023 (gdbscm_value_to_string): Use xfree directly instead of a
5024 cleanup. Move 'buffer' unique_ptr to TRY scope.
5025 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5026 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
5027 scoped_value_mark.
5028 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5029 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5030 scoped_value_mark.
5031 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5032 gdbscm_wrap.
5033
5034 2018-07-18 Tom de Vries <tdevries@suse.de>
5035
5036 * findvar.c (default_read_var_value): Also resolve dynamic type for
5037 LOC_OPTIMIZED_OUT vars.
5038
5039 2018-07-18 Maciej W. Rozycki <macro@mips.com>
5040
5041 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5042 decoding.
5043
5044 2018-07-17 Tom Tromey <tom@tromey.com>
5045
5046 * guile/scm-param.c (pascm_set_func, pascm_show_func)
5047 (compute_enum_list, pascm_set_param_value_x)
5048 (gdbscm_parameter_value): Update.
5049 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5050 (gdbscm_scm_to_host_string): Update.
5051 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5052 Update.
5053 * guile/scm-cmd.c (cmdscm_add_completion): Update.
5054 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5055 * guile/scm-string.c (gdbscm_scm_to_string): Return
5056 unique_xmalloc_ptr.
5057 (gdbscm_scm_to_host_string): Likewise.
5058
5059 2018-07-17 Tom Tromey <tom@tromey.com>
5060
5061 * guile/guile.c (gdbscm_eval_from_control_command): Update.
5062 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5063 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5064 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5065 unique_xmalloc_ptr.
5066
5067 2018-07-17 Tom Tromey <tom@tromey.com>
5068
5069 * guile/scm-param.c (pascm_signal_setshow_error): Update.
5070 * guile/guile-internal.h (gdbscm_exception_message_to_string):
5071 Update.
5072 * guile/scm-cmd.c (cmdscm_function): Update.
5073 * guile/scm-pretty-print.c
5074 (ppscm_print_exception_unless_memory_error): Update.
5075 * guile/scm-exception.c (gdbscm_exception_message_to_string):
5076 Return unique_xmalloc_ptr.
5077
5078 2018-07-17 Tom Tromey <tom@tromey.com>
5079
5080 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5081 Use string_printf.
5082
5083 2018-07-17 Jim Wilson <jimw@sifive.com>
5084
5085 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5086 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
5087 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
5088 unecessary braces after EF_RISCV_RVC test. Delete call to
5089 set_gdbarch_decr_pc_after_break.
5090
5091 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5092 RISCV_LAST_FP_REGNUM + 1.
5093 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5094
5095 2018-07-17 Tom Tromey <tom@tromey.com>
5096
5097 * configure.ac: Remove --disable-gdbcli.
5098 * configure: Rebuild.
5099 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5100 (SUBDIR_CLI_CFLAGS): Remove.
5101 (SFILES): Use SUBDIR_CLI_SRCS.
5102 (COMMON_OBS): Use SUBDIR_CLI_OBS.
5103
5104 2018-07-17 Tom Tromey <tom@tromey.com>
5105
5106 PR gdb/18624:
5107 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5108
5109 2018-07-16 Jim Wilson <jimw@sifive.com>
5110
5111 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5112
5113 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5114
5115 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5116 variable.
5117 (libunwind_frame_sniffer): Likewise.
5118 (libunwind_frame_prev_register): Likewise.
5119 (libunwind_sigtramp_frame_sniffer): Likewise.
5120 * ia64-tdep.c (ia64_access_reg): Likewise.
5121 (ia64_access_rse_reg): Likewise.
5122 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5123 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5124
5125 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5126
5127 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5128
5129 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5130
5131 * remote-sim.c (gdbsim_target::close,
5132 gdbsim_target::mourn_inferior): Remove unused variables.
5133
5134 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
5135
5136 * ia64-tdep.c (ktab_buf): New global.
5137 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5138 (get_kernel_table): Adjust.
5139
5140 2018-07-16 Tom Tromey <tom@tromey.com>
5141
5142 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5143 * dwarf2read.c (using_directives, new_symbol): Use
5144 outermost_context_p.
5145 * dbxread.c (process_one_symbol): Use outermost_context_p.
5146 * coffread.c (coff_symtab_read): Use outermost_context_p.
5147
5148 2018-07-16 Tom Tromey <tom@tromey.com>
5149
5150 * dwarf2read.c (using_directives, read_func_scope)
5151 (read_lexical_block_scope): Update.
5152 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5153 * buildsym.h (local_using_directives, global_using_directives):
5154 Don't declare.
5155 (get_local_using_directives, set_local_using_directives)
5156 (get_global_using_directives): Declare.
5157 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5158 m_global_using_directives>: New members.
5159 (finish_block_internal, prepare_for_building)
5160 (reset_symtab_globals, end_symtab_get_static_block)
5161 (push_context): Update.
5162 (get_local_using_directives, set_local_using_directives)
5163 (get_global_using_directives): New functions.
5164 (buildsym_init): Update.
5165
5166 2018-07-16 Tom Tromey <tom@tromey.com>
5167
5168 * xcoffread.c (xcoff_initial_scan): Don't call
5169 free_pending_blocks.
5170 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5171 * buildsym.h (class scoped_free_pendings): Add constructor.
5172 (free_pending_blocks): Don't declare.
5173 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5174 (free_pending_blocks): Now static.
5175
5176 2018-07-16 Tom Tromey <tom@tromey.com>
5177
5178 * buildsym.h (push_subfile, pop_subfile): Update declarations.
5179 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5180 member.
5181 (struct subfile_stack): Remove.
5182 (subfile_stack): Remove.
5183 (push_subfile, pop_subfile, buildsym_init): Update.
5184
5185 2018-07-16 Tom Tromey <tom@tromey.com>
5186
5187 * buildsym.c (push_subfile): Use gdb_assert.
5188 (pop_subfile): Use gdb_assert.
5189
5190 2018-07-16 Tom Tromey <tom@tromey.com>
5191
5192 * buildsym.h (merge_symbol_lists): Remove.
5193 * buildsym.c (merge_symbol_lists): Remove.
5194
5195 2018-07-16 Tom Tromey <tom@tromey.com>
5196
5197 * stabsread.c (scan_file_globals): Update comment.
5198 * stabsread.h (scan_file_globals): Move from buildsym.h.
5199 * buildsym.h (scan_file_globals): Move to stabsread.h.
5200
5201 2018-07-16 Tom Tromey <tom@tromey.com>
5202
5203 * xcoffread.c (xcoff_new_init): Update.
5204 * mipsread.c (mipscoff_new_init): Update.
5205 * mdebugread.c (mdebug_build_psymtabs): Update.
5206 * elfread.c (elf_new_init): Update.
5207 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5208 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5209 * buildsym.h (buildsym_new_init): Don't declare.
5210 * buildsym.c (buildsym_new_init): Remove.
5211
5212 2018-07-16 Tom Tromey <tom@tromey.com>
5213
5214 * stabsread.h (within_function): Move from buildsym.h.
5215 * stabsread.c (start_stabs): Clear within_function.
5216 * coffread.c (coff_start_symtab): Clear within_function.
5217 * buildsym.h (within_function): Move to stabsread.h.
5218 * buildsym.c (prepare_for_building): Update.
5219
5220 2018-07-16 Tom Tromey <tom@tromey.com>
5221
5222 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5223 * dwarf2read.c (dwarf2_start_symtab): Don't set
5224 processing_gcc_compilation.
5225 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5226
5227 2018-07-16 Tom Tromey <tom@tromey.com>
5228
5229 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5230 (next_symbol_text_func): Move from buildsym.h.
5231 * stabsread.c (hashname): Move from buildsym.c.
5232 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5233 (next_symbol_text_func, hashname): Move to stabsread.h.
5234 * buildsym.c: Don't include bcache.h
5235 (hashname): Move to stasbread.c.
5236
5237 2018-07-16 Tom Tromey <tom@tromey.com>
5238
5239 * buildsym.h (context_stack_size): Don't declare.
5240 * buildsym.c (context_stack_size): New global.
5241
5242 2018-07-16 Tom Tromey <tom@tromey.com>
5243
5244 * dbxread.c (processing_acc_compilation): New global.
5245 * buildsym.h (processing_acc_compilation): Don't declare.
5246
5247 2018-07-16 Tom Tromey <tom@tromey.com>
5248
5249 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5250 * dbxread.c (read_ofile_symtab): Update.
5251 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5252 * buildsym.h (last_source_start_addr): Remove.
5253 (set_last_source_start_addr, get_last_source_start_addr):
5254 Declare.
5255 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5256 parameter.
5257 (struct buildsym_compunit) <m_last_source_start_addr>: New
5258 member.
5259 (prepare_for_building): Remove start_addr parameter.
5260 (start_symtab, restart_symtab, end_symtab_get_static_block)
5261 (end_symtab_with_blockvector): Update.
5262 (set_last_source_start_addr, get_last_source_start_addr): New
5263 functions.
5264
5265 2018-07-16 Tom Tromey <tom@tromey.com>
5266
5267 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5268 member.
5269 (have_line_numbers): Remove.
5270 (record_line, prepare_for_building, end_symtab_get_static_block)
5271 (augment_type_symtab): Update.
5272
5273 2018-07-16 Tom Tromey <tom@tromey.com>
5274
5275 * buildsym.c (~buildsym_compunit): Free the macro table.
5276 (struct buildsym_compunit) <get_macro_table, release_macros>: New
5277 methods.
5278 <m_pending_macros>: New member.
5279 (pending_macros): Remove.
5280 (~scoped_free_pendings, get_macro_table, prepare_for_building)
5281 (reset_symtab_globals, end_symtab_get_static_block)
5282 (end_symtab_with_blockvector, augment_type_symtab)
5283 (buildsym_init): Update.
5284
5285 2018-07-16 Tom Tromey <tom@tromey.com>
5286
5287 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5288 parameter.
5289 (buildsym_compunit::set_last_source_file): New method.
5290 <m_last_source_file>: New member.
5291 (prepare_for_building): Remove "name" parameter.
5292 (start_symtab, restart_symtab, reset_symtab_globals): Update.
5293 (last_source_file): Remove.
5294 (set_last_source_file, get_last_source_file): Update.
5295
5296 2018-07-16 Tom Tromey <tom@tromey.com>
5297
5298 * buildsym.c (prepare_for_building): Add assert.
5299
5300 2018-07-16 Tom Tromey <tom@tromey.com>
5301
5302 * buildsym.c (~buildsym_compunit): Update.
5303 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5304 (start_subfile, patch_subfile_names)
5305 (end_symtab_with_blockvector): Update.
5306
5307 2018-07-16 Tom Tromey <tom@tromey.com>
5308
5309 * buildsym.c (struct buildsym_compunit): Add constructor,
5310 destructor, initializers.
5311 (start_buildsym_compunit): Remove.
5312 (free_buildsym_compunit): Use "delete".
5313 (start_symtab, restart_symtab): Use "new".
5314
5315 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
5316
5317 * symfile.c (set_objfile_default_section_offset): Remove struct
5318 keyword.
5319
5320 2018-07-14 Stafford Horne <shorne@gmail.com>
5321
5322 * (Responsible Maintainers): Add myself as or1k maintainer.
5323
5324 2018-07-13 Tom Tromey <tom@tromey.com>
5325
5326 * symfile.c (set_objfile_default_section_offset): Use extra braces
5327 around initializer.
5328
5329 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5330
5331 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5332 non-branching basr.
5333
5334 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5335
5336 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5337 unittests/cli-utils-selftests.c
5338 * unittests/cli-utils-selftests.c: New file.
5339
5340 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5341
5342 * NEWS: Mention new commands. Mention change to 'thread apply'.
5343
5344 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5345
5346 * thread.c (thr_try_catch_cmd): New function.
5347 (thread_apply_all_command): Handle qcs flags.
5348 (thread_apply_command): Handle qcs flags.
5349 (taas_command): New function.
5350 (tfaas_command): New function.
5351 (_initialize_thread): Update to setup the new commands 'taas
5352 and 'tfaas'. Change doc string for 'thread apply'.
5353
5354 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5355
5356 * stack.c: (trailing_outermost_frame): New function, mostly
5357 extracted from backtrace_command_1.
5358 (leading_innermost_frame): New function.
5359 (backtrace_command_1): Update to call trailing_outermost_frame.
5360 (frame_apply_command_count): New function.
5361 (frame_apply_level_command): New function.
5362 (frame_apply_all_command): New function.
5363 (frame_apply_command): New function.
5364 (faas_command): New function.
5365 (frame_cmd_list): New variable.
5366 (_initialize_stack): Update to setup the new commands 'frame apply'
5367 and 'faas'.
5368
5369 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5370
5371 * cli-utils.c (number_or_range_parser::get_number): Only handle
5372 numbers or convenience var as numbers.
5373 (parse_flags): New function.
5374 (parse_flags_qcs): New function.
5375 (number_or_range_parser::finished): Ensure parsing end is detected
5376 before end of string.
5377 * cli-utils.h (parse_flags): New function.
5378 (parse_flags_qcs): New function.
5379 (number_or_range_parser): Remove m_finished bool.
5380 (number_or_range_parser::skip_range): Set m_in_range to false.
5381
5382 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
5383
5384 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5385 on Windows.
5386
5387 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5388 Jan Kratochvil <jan.kratochvil@redhat.com>
5389 Paul Fertser <fercerpav@gmail.com>
5390 Tsutomu Seki <sekiriki@gmail.com>
5391 Pedro Alves <palves@redhat.com>
5392
5393 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5394 'unittests/parse-connection-spec-selftests.c'.
5395 (COMMON_SFILES): Add 'common/netstuff.c'.
5396 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5397 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5398 * common/netstuff.c: New file.
5399 * common/netstuff.h: New file.
5400 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5401 (wait_for_connect): Update comment. New parameter
5402 'gdb::optional<int> sock' instead of 'struct serial *scb'.
5403 Use 'sock' directly instead of 'scb->fd'.
5404 (try_connect): New function, with code from 'net_open'.
5405 (net_open): Rewrite main loop to deal with multiple
5406 sockets/addresses. Handle IPv6-style hostnames; implement
5407 support for IPv6 connections.
5408 * unittests/parse-connection-spec-selftests.c: New file.
5409
5410 2018-07-11 Pedro Alves <palves@redhat.com>
5411
5412 PR gdb/23377
5413 * remote.c (remote_target::remote_detach_pid): Call
5414 set_current_process.
5415
5416 2018-07-11 Pedro Alves <palves@redhat.com>
5417
5418 * h8300-tdep.c (h8300_gdbarch_init): Remove
5419 set_gdbarch_ecoff_reg_to_regnum calls.
5420
5421 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5422
5423 PR c++/23373
5424 * c-typeprint.c (c_type_print_base_struct_union): Don't print
5425 offsets/sizes for static members of a class/struct.
5426
5427 2018-07-11 Alan Hayward <alan.hayward@arm.com>
5428
5429 * target-descriptions.c (tdesc_register_bitsize): Rename.
5430 * target-descriptions.h (tdesc_register_bitsize): Likewise.
5431 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5432 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5433
5434 2018-07-10 Tom Tromey <tom@tromey.com>
5435
5436 * breakpoint.c (moribund_locations): Now static and a
5437 std::vector.
5438 (breakpoint_init_inferior, moribund_breakpoint_here_p)
5439 (build_bpstat_chain, update_global_location_list)
5440 (breakpoint_retire_moribund): Update.
5441 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
5442 VEC.
5443
5444 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5445
5446 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5447 (riscv_register_reggroup_p): Use new function, remove unneeded
5448 parenthesis.
5449 (riscv_push_dummy_call): Extend assert to compare against xlen or
5450 flen based on register type.
5451
5452 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5453
5454 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5455
5456 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
5457
5458 * remote.c (show_hardware_watchpoint_limit): New function.
5459 (show_hardware_watchpoint_length_limit): New function.
5460 (show_hardware_breakpoint_limit): New function.
5461 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5462 where appropriate, update help text.
5463
5464 2018-07-09 Tom Tromey <tom@tromey.com>
5465
5466 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5467 (CLIBS): Don't mention NAT_CLIBS.
5468
5469 2018-07-09 Tom Tromey <tom@tromey.com>
5470
5471 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5472 (LIBGDB_OBS, clean mostlyclean): Update.
5473 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5474
5475 2018-07-09 Tom Tromey <tom@tromey.com>
5476
5477 * Makefile.in (%.c: %.y): Use ECHO_YACC.
5478 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
5479 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5480
5481 2018-07-09 Tom Tromey <tom@tromey.com>
5482
5483 * Makefile.in (ALLDEPFILES): Remove exec.c.
5484 (COMMON_OBS): Remove exec.o.
5485 (COMMON_SFILES): Add exec.c.
5486
5487 2018-07-09 Tom Tromey <tom@tromey.com>
5488
5489 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5490
5491 2018-07-09 Tom Tromey <tom@tromey.com>
5492
5493 * Makefile.in (clean mostlyclean): Remove stamp-version.
5494 (version.c): Depend on stamp-version.
5495 (stamp-version): New rule, from version.c rule.
5496
5497 2018-07-09 Tom Tromey <tom@tromey.com>
5498
5499 * Makefile.in (init.c): Depend on stamp-init.
5500 (stamp-init): New rule, from init.c rule.
5501 (clean mostlyclean): Remove stamp-init.
5502
5503 2018-07-09 Tom Tromey <tom@tromey.com>
5504
5505 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5506 SUBDIR_GCC_COMPILE_SRCS.
5507
5508 2018-07-09 Tom Tromey <tom@tromey.com>
5509
5510 * Makefile.in (init.c): Remove some unused sed rules.
5511
5512 2018-07-09 Tom Tromey <tom@tromey.com>
5513
5514 * Makefile.in (TSOBS): Remove.
5515 (INIT_FILES): Update.
5516 (LIBGDB_OBS): Update.
5517 (COMMON_SFILES): Add inflow.c.
5518 (SFILES): Remove inflow.c.
5519
5520 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5521
5522 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5523
5524 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
5525
5526 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5527 get_saveloc_name, is_signal_frame_name, step_name,
5528 init_remote_name, create_addr_space_name,
5529 destroy_addr_space_name, search_unwind_table_name,
5530 find_dyn_list_name): Constify.
5531
5532 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
5533
5534 * darwin-nat.c (darwin_pthread_kill): New function.
5535 (darwin_resume_thread): Use darwin_pthread_kill.
5536
5537 2018-07-05 Tom de Vries <tdevries@suse.de>
5538
5539 * macroexp.c (macro_buffer) <operator=>: New member function.
5540
5541 2018-07-04 Tom Tromey <tom@tromey.com>
5542
5543 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5544
5545 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
5546
5547 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5548 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5549 * maint.c: Likewise.
5550 * top.c: Likewise.
5551
5552 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5553
5554 * NEWS: Create a new section for the next release branch.
5555 Rename the section of the current branch, now that it has
5556 been cut.
5557
5558 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5559
5560 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5561 * version.in: Bump version to 8.2.50.DATE-git.
5562
5563 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5564 Pedro Alves <palves@redhat.com>
5565
5566 * linux-nat.c (linux_init_ptrace): Rename to ...
5567 (linux_init_ptrace_procfs): ... this. Call
5568 linux_proc_init_warnings.
5569 (linux_nat_target::post_attach)
5570 (linux_nat_target::post_startup_inferior): Adjust.
5571 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5572 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5573
5574 2018-07-04 Tom de Vries <tdevries@suse.de>
5575
5576 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5577 check ...
5578 (read_comp_unit_head): ... here.
5579
5580 2018-07-03 Tom Tromey <tom@tromey.com>
5581
5582 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5583 (stop_tracing, tstatus_command)
5584 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5585 (print_one_static_tracepoint_marker): Update.
5586 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5587 std::vector.
5588 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
5589 VEC.
5590 (all_tracepoints, static_tracepoints_here): Return std::vector.
5591
5592 2018-07-03 Tom Tromey <tom@tromey.com>
5593
5594 * common/ptid.c (ptid_equal): Remove.
5595 * common/ptid.h (ptid_equal): Don't declare.
5596 * ada-tasks.c: Update.
5597 * breakpoint.c: Update.
5598 * common/agent.c: Update.
5599 * corelow.c: Update.
5600 * darwin-nat-info.c: Update.
5601 * darwin-nat.c: Update.
5602 * dcache.c: Update.
5603 * dtrace-probe.c: Update.
5604 * dummy-frame.c: Update.
5605 * fbsd-nat.c: Update.
5606 * frame.c: Update.
5607 * gdbthread.h: Update.
5608 * gnu-nat.c: Update.
5609 * go32-nat.c: Update.
5610 * inf-loop.c: Update.
5611 * inf-ptrace.c: Update.
5612 * infcall.c: Update.
5613 * infcmd.c: Update.
5614 * inflow.c: Update.
5615 * infrun.c: Update.
5616 * linux-fork.c: Update.
5617 * linux-nat.c: Update.
5618 * linux-thread-db.c: Update.
5619 * mi/mi-cmd-var.c: Update.
5620 * mi/mi-interp.c: Update.
5621 * mi/mi-main.c: Update.
5622 * nto-procfs.c: Update.
5623 * ppc-linux-tdep.c: Update.
5624 * procfs.c: Update.
5625 * python/py-inferior.c: Update.
5626 * python/py-record-btrace.c: Update.
5627 * python/py-record.c: Update.
5628 * ravenscar-thread.c: Update.
5629 * regcache.c: Update.
5630 * remote-sim.c: Update.
5631 * remote.c: Update.
5632 * sol-thread.c: Update.
5633 * solib.c: Update.
5634 * target.c: Update.
5635 * tui/tui-stack.c: Update.
5636 * varobj.c: Update.
5637 * windows-nat.c: Update.
5638 * windows-tdep.c: Update.
5639
5640 2018-07-03 Tom Tromey <tom@tromey.com>
5641
5642 * common/ptid.c (ptid_match): Remove.
5643 * common/ptid.h (ptid_match): Don't declare.
5644 * fbsd-nat.c: Update.
5645 * infcmd.c: Update.
5646 * infrun.c: Update.
5647 * linux-nat.c: Update.
5648 * record-btrace.c: Update.
5649 * regcache.c: Update.
5650 * remote.c: Update.
5651
5652 2018-07-03 Tom Tromey <tom@tromey.com>
5653
5654 * common/ptid.c (ptid_tid_p): Remove.
5655 * common/ptid.h (ptid_tid_p): Don't declare.
5656 * sol-thread.c: Update.
5657
5658 2018-07-03 Tom Tromey <tom@tromey.com>
5659
5660 * common/ptid.c (ptid_lwp_p): Remove.
5661 * common/ptid.h (ptid_lwp_p): Don't declare.
5662 * fbsd-nat.c: Update.
5663 * linux-nat.c: Update.
5664 * nat/linux-procfs.c: Update.
5665 * nat/x86-linux-dregs.c: Update.
5666 * sol-thread.c: Update.
5667
5668 2018-07-03 Tom Tromey <tom@tromey.com>
5669
5670 * common/ptid.c (ptid_is_pid): Remove.
5671 * common/ptid.h (ptid_is_pid): Don't declare.
5672 * infrun.c: Update.
5673 * linux-nat.c: Update.
5674 * mi/mi-interp.c: Update.
5675 * remote.c: Update.
5676 * thread.c: Update.
5677
5678 2018-07-03 Tom Tromey <tom@tromey.com>
5679
5680 * common/ptid.c (ptid_get_tid): Remove.
5681 * common/ptid.h (ptid_get_tid): Don't declare.
5682 * ada-tasks.c: Update.
5683 * aix-thread.c: Update.
5684 * bsd-uthread.c: Update.
5685 * darwin-nat.c: Update.
5686 * fbsd-nat.c: Update.
5687 * i386-darwin-nat.c: Update.
5688 * infrun.c: Update.
5689 * linux-tdep.c: Update.
5690 * nto-procfs.c: Update.
5691 * ppc-ravenscar-thread.c: Update.
5692 * python/py-infthread.c: Update.
5693 * ravenscar-thread.c: Update.
5694 * sol-thread.c: Update.
5695 * sparc-ravenscar-thread.c: Update.
5696 * windows-nat.c: Update.
5697
5698 2018-07-03 Tom Tromey <tom@tromey.com>
5699
5700 * common/ptid.c (ptid_get_lwp): Remove.
5701 * common/ptid.h (ptid_get_lwp): Don't declare.
5702 * aarch64-linux-nat.c: Update.
5703 * ada-tasks.c: Update.
5704 * aix-thread.c: Update.
5705 * amd64-linux-nat.c: Update.
5706 * arm-linux-nat.c: Update.
5707 * corelow.c: Update.
5708 * fbsd-nat.c: Update.
5709 * fbsd-tdep.c: Update.
5710 * gnu-nat.c: Update.
5711 * i386-cygwin-tdep.c: Update.
5712 * i386-gnu-nat.c: Update.
5713 * i386-linux-nat.c: Update.
5714 * ia64-linux-nat.c: Update.
5715 * inf-ptrace.c: Update.
5716 * infrun.c: Update.
5717 * linux-fork.c: Update.
5718 * linux-nat.c: Update.
5719 * linux-tdep.c: Update.
5720 * linux-thread-db.c: Update.
5721 * mips-linux-nat.c: Update.
5722 * nat/aarch64-linux-hw-point.c: Update.
5723 * nat/aarch64-linux.c: Update.
5724 * nat/linux-btrace.c: Update.
5725 * nat/linux-osdata.c: Update.
5726 * nat/linux-procfs.c: Update.
5727 * nat/x86-linux-dregs.c: Update.
5728 * obsd-nat.c: Update.
5729 * ppc-fbsd-nat.c: Update.
5730 * ppc-linux-nat.c: Update.
5731 * procfs.c: Update.
5732 * python/py-infthread.c: Update.
5733 * ravenscar-thread.c: Update.
5734 * remote.c: Update.
5735 * s390-linux-nat.c: Update.
5736 * sol-thread.c: Update.
5737 * sol2-tdep.c: Update.
5738 * spu-linux-nat.c: Update.
5739 * x86-linux-nat.c: Update.
5740 * xtensa-linux-nat.c: Update.
5741
5742 2018-07-03 Tom Tromey <tom@tromey.com>
5743
5744 * common/ptid.c (ptid_get_pid): Remove.
5745 * common/ptid.h (ptid_get_pid): Don't declare.
5746 * aarch64-linux-nat.c: Update.
5747 * ada-lang.c: Update.
5748 * aix-thread.c: Update.
5749 * alpha-bsd-nat.c: Update.
5750 * amd64-fbsd-nat.c: Update.
5751 * amd64-linux-nat.c: Update.
5752 * arm-linux-nat.c: Update.
5753 * arm-nbsd-nat.c: Update.
5754 * auxv.c: Update.
5755 * break-catch-syscall.c: Update.
5756 * breakpoint.c: Update.
5757 * bsd-uthread.c: Update.
5758 * corelow.c: Update.
5759 * ctf.c: Update.
5760 * darwin-nat.c: Update.
5761 * fbsd-nat.c: Update.
5762 * fbsd-tdep.c: Update.
5763 * gcore.c: Update.
5764 * gnu-nat.c: Update.
5765 * hppa-nbsd-nat.c: Update.
5766 * hppa-obsd-nat.c: Update.
5767 * i386-fbsd-nat.c: Update.
5768 * ia64-linux-nat.c: Update.
5769 * inf-ptrace.c: Update.
5770 * infcmd.c: Update.
5771 * inferior.c: Update.
5772 * inferior.h: Update.
5773 * inflow.c: Update.
5774 * infrun.c: Update.
5775 * linux-fork.c: Update.
5776 * linux-nat.c: Update.
5777 * linux-tdep.c: Update.
5778 * linux-thread-db.c: Update.
5779 * m68k-bsd-nat.c: Update.
5780 * mi/mi-interp.c: Update.
5781 * mi/mi-main.c: Update.
5782 * mips-linux-nat.c: Update.
5783 * mips-nbsd-nat.c: Update.
5784 * mips64-obsd-nat.c: Update.
5785 * nat/aarch64-linux-hw-point.c: Update.
5786 * nat/aarch64-linux.c: Update.
5787 * nat/linux-btrace.c: Update.
5788 * nat/linux-osdata.c: Update.
5789 * nat/linux-procfs.c: Update.
5790 * nat/x86-linux-dregs.c: Update.
5791 * nto-procfs.c: Update.
5792 * obsd-nat.c: Update.
5793 * ppc-linux-nat.c: Update.
5794 * ppc-nbsd-nat.c: Update.
5795 * ppc-obsd-nat.c: Update.
5796 * proc-service.c: Update.
5797 * procfs.c: Update.
5798 * python/py-inferior.c: Update.
5799 * python/py-infthread.c: Update.
5800 * ravenscar-thread.c: Update.
5801 * record.c: Update.
5802 * remote-sim.c: Update.
5803 * remote.c: Update.
5804 * rs6000-nat.c: Update.
5805 * s390-linux-nat.c: Update.
5806 * sh-nbsd-nat.c: Update.
5807 * sol-thread.c: Update.
5808 * sparc-nat.c: Update.
5809 * sparc64-tdep.c: Update.
5810 * spu-linux-nat.c: Update.
5811 * spu-tdep.c: Update.
5812 * target-debug.h: Update.
5813 * target.c: Update.
5814 * thread.c: Update.
5815 * tid-parse.c: Update.
5816 * tracefile-tfile.c: Update.
5817 * vax-bsd-nat.c: Update.
5818 * windows-nat.c: Update.
5819 * x86-linux-nat.c: Update.
5820 * x86-nat.c: Update.
5821
5822 2018-07-03 Tom Tromey <tom@tromey.com>
5823
5824 * common/ptid.c (pid_to_ptid): Remove.
5825 * common/ptid.h (pid_to_ptid): Don't declare.
5826 * aix-thread.c: Update.
5827 * arm-linux-nat.c: Update.
5828 * common/ptid.c: Update.
5829 * common/ptid.h: Update.
5830 * corelow.c: Update.
5831 * ctf.c: Update.
5832 * darwin-nat.c: Update.
5833 * fbsd-nat.c: Update.
5834 * fork-child.c: Update.
5835 * gnu-nat.c: Update.
5836 * go32-nat.c: Update.
5837 * inf-ptrace.c: Update.
5838 * infcmd.c: Update.
5839 * inferior.c: Update.
5840 * infrun.c: Update.
5841 * linux-fork.c: Update.
5842 * linux-nat.c: Update.
5843 * nat/aarch64-linux-hw-point.c: Update.
5844 * nat/fork-inferior.c: Update.
5845 * nat/x86-linux-dregs.c: Update.
5846 * nto-procfs.c: Update.
5847 * obsd-nat.c: Update.
5848 * procfs.c: Update.
5849 * progspace.c: Update.
5850 * remote.c: Update.
5851 * rs6000-nat.c: Update.
5852 * s390-linux-nat.c: Update.
5853 * sol-thread.c: Update.
5854 * spu-linux-nat.c: Update.
5855 * target.c: Update.
5856 * top.c: Update.
5857 * tracefile-tfile.c: Update.
5858 * windows-nat.c: Update.
5859
5860 2018-07-03 Tom Tromey <tom@tromey.com>
5861
5862 * common/ptid.h (ptid_build): Don't declare.
5863 * common/ptid.c (ptid_build): Remove.
5864 * aix-thread.c: Update.
5865 * bsd-kvm.c: Update.
5866 * bsd-uthread.c: Update.
5867 * common/agent.c: Update.
5868 * common/ptid.c: Update.
5869 * common/ptid.h: Update.
5870 * corelow.c: Update.
5871 * darwin-nat.c: Update.
5872 * fbsd-nat.c: Update.
5873 * gnu-nat.c: Update.
5874 * linux-fork.c: Update.
5875 * linux-nat.c: Update.
5876 * linux-thread-db.c: Update.
5877 * nat/linux-osdata.c: Update.
5878 * nat/linux-procfs.c: Update.
5879 * nto-procfs.c: Update.
5880 * obsd-nat.c: Update.
5881 * proc-service.c: Update.
5882 * procfs.c: Update.
5883 * ravenscar-thread.c: Update.
5884 * remote-sim.c: Update.
5885 * remote.c: Update.
5886 * sol-thread.c: Update.
5887 * target.c: Update.
5888 * windows-nat.c: Update.
5889
5890 2018-07-03 Tom Tromey <tom@tromey.com>
5891
5892 * infrun.c (follow_exec): Use exit_inferior_silent.
5893 * inferior.c (exit_inferior_num_silent): Remove.
5894 * inferior.h (exit_inferior_num_silent): Don't declare.
5895
5896 2018-07-03 Tom Tromey <tom@tromey.com>
5897
5898 PR cli/23340:
5899 * darwin-nat.c (darwin_attach_pid): Reset inferior and
5900 inferior_ptid on error.
5901
5902 2018-07-02 Maciej W. Rozycki <macro@mips.com>
5903 Simon Marchi <simon.marchi@polymtl.ca>
5904
5905 PR tdep/8282
5906 * disasm.h (gdb_disassembler): Add
5907 `m_disassembler_options_holder'. member
5908 * disasm.c (get_all_disassembler_options): New function.
5909 (gdb_disassembler::gdb_disassembler): Use it.
5910 (gdb_buffered_insn_length_init_dis): Likewise.
5911 (gdb_buffered_insn_length): Adjust accordingly.
5912 (set_disassembler_options): Handle options with arguments.
5913 (show_disassembler_options_sfunc): Likewise. Add a leading new
5914 line if showing options with descriptions.
5915 (disassembler_options_completer): Adapt to using the
5916 `disasm_options_and_args_t' structure.
5917 * mips-tdep.c (mips_disassembler_options): New variable.
5918 (mips_disassembler_options_o32): Likewise.
5919 (mips_disassembler_options_n32): Likewise.
5920 (mips_disassembler_options_n64): Likewise.
5921 (gdb_print_insn_mips): Don't set `disassembler_options'.
5922 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5923 functions.
5924 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5925 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
5926 `gdbarch_disassembler_options_implicit' and
5927 `gdbarch_valid_disassembler_options'.
5928 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5929 `disasm_options_and_args_t' structure.
5930 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5931 method.
5932 (valid_disassembler_options): Switch from `disasm_options_t' to
5933 the `disasm_options_and_args_t' structure.
5934 * NEWS: Document `set disassembler-options' support for the MIPS
5935 target.
5936 * gdbarch.h: Regenerate.
5937 * gdbarch.c: Regenerate.
5938
5939 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
5940
5941 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5942
5943 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5944
5945 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5946 parameter in call to amd64_target_description.
5947 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5948 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5949 (amd64fbsd_init_abi): Likewise.
5950 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5951 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5952 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5953 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5954
5955 2018-06-29 Pedro Alves <palves@redhat.com>
5956
5957 * gdb/amd64-tdep.h (amd64_create_target_description): Add
5958 "segments" parameter.
5959 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5960 (_initialize_amd64_tdep): Update call to
5961 amd64_create_target_description.
5962 (amd64_target_description): Add "segments" parameter. Adjust
5963 the implementation to use it.
5964 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5965 call to amd64_create_target_description.
5966 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5967 * gdb/arch/amd64.h (amd64_create_target_description): Add
5968 "segments" register.
5969 * gdb/arch/amd64.c (amd64_create_target_description): Add
5970 "segments" parameter. Call create_feature_i386_64bit_segments
5971 only if SEGMENTS is true.
5972 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5973 call to amd64_create_target_description.
5974
5975 2018-06-29 Pedro Alves <palves@redhat.com>
5976
5977 * thread.c (thread_target_id_str): New, factored out from ...
5978 (print_thread_info_1): ... here. Use it to compute the max
5979 "Target Id" column width.
5980
5981 2018-06-29 Pedro Alves <palves@redhat.com>
5982
5983 * remote.c (remote_target::extra_thread_info): Delete
5984 'display_buf' and 'n' locals. from the cache, regardless of
5985 packet mechanims is in use. Use cache for qThreadExtra and qP
5986 methods too.
5987
5988 2018-06-29 Pedro Alves <palves@redhat.com>
5989
5990 * blockframe.c (find_pc_sect_containing_function): New function.
5991 * breakpoint.c (print_breakpoint_location): Don't call
5992 find_pc_sect_function.
5993 * linespec.c (create_sals_line_offset): Record the location's
5994 symbol in the sal.
5995 * linespec.c (convert_address_location_to_sals): Fill in sal's
5996 symbol with find_pc_sect_containing_function.
5997 * symtab.c (find_function_start_sal): Rename to ...
5998 (find_function_start_sal_1): ... this.
5999 (find_function_start_sal): Reimplement as wrapper around
6000 find_function_start_sal_1, and use
6001 find_pc_sect_containing_function to fill in the sal's symbol.
6002 (find_function_start_sal(symbol*, bool)): Adjust.
6003 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6004 comments.
6005 (find_pc_sect_containing_function): Declare.
6006
6007 2018-06-29 Pedro Alves <palves@redhat.com>
6008
6009 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6010 true if the the location has no symbol.
6011
6012 2018-06-28 Tom Tromey <tom@tromey.com>
6013
6014 * NEWS: Mention --enable-codesign.
6015 * silent-rules.mk (ECHO_SIGN): New variable.
6016 * configure.ac: Add --enable-codesign.
6017 * configure: Rebuild.
6018 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6019 (gdb$(EXEEXT)): Optionally invoke codesign.
6020
6021 2018-06-28 Pedro Alves <palves@redhat.com>
6022
6023 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6024 comments.
6025 (switch_to_thread_no_regs): Adjust comment.
6026 * infcmd.c (stop_pc): Delete.
6027 (post_create_inferior, info_program_command): Replace references
6028 to stop_pc with references to thread_info->suspend.stop_pc.
6029 * inferior.h (stop_pc): Delete declaration.
6030 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6031 (handle_inferior_event_1, handle_signal_stop)
6032 (process_event_stop_test, keep_going_stepped_thread)
6033 (handle_step_into_function, handle_step_into_function_backward)
6034 (print_stop_location): Replace references to stop_pc with
6035 references to thread_info->suspend.stop_pc.
6036 (struct infcall_suspend_state) <stop_pc>: Delete field.
6037 (save_infcall_suspend_state, restore_infcall_suspend_state):
6038 Remove references to inf_stat->stop_pc.
6039 * linux-fork.c (fork_load_infrun_state): Likewise.
6040 * record-btrace.c (record_btrace_set_replay): Likewise.
6041 * record-full.c (record_full_goto_entry): Likewise.
6042 * remote.c (print_one_stopped_thread): Likewise.
6043 * target.c (target_resume): Extend comment.
6044 * thread.c (set_executing_thread): New.
6045 (set_executing): Use it.
6046 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6047 Remove references to stop_pc.
6048
6049 2018-06-28 Pedro Alves <palves@redhat.com>
6050
6051 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6052 Moving fetching stop_pc until after ecs->event_thread is refreshed.
6053
6054 2018-06-28 Tom Tromey <tom@tromey.com>
6055
6056 * coffread.c (coff_symfile_finish): Update.
6057 * xcoffread.c (xcoff_symfile_finish): Update.
6058 * elfread.c (elf_symfile_finish): Update.
6059 * symfile.h (dwarf2_free_objfile): Don't declare.
6060 * dwarf2read.c (_initialize_dwarf2_read): Use
6061 register_objfile_data_with_cleanup.
6062 (dwarf2_free_objfile): Now static. Change signature.
6063
6064 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6065
6066 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6067 option "-o" to add-symbol-file-load to add an offset to each
6068 section's load address.
6069 * symfile.c (set_objfile_default_section_offset): New function.
6070
6071 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6072
6073 * symfile.c (add_symbol_file_command): Make sure that sections
6074 with the same name are sorted in the same order.
6075
6076 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6077
6078 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6079 require the second argument. If omitted, load sections at the
6080 addresses specified in the file.
6081
6082 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6083
6084 * symfile.c (symbol_file_command, symbol_file_add_main_1)
6085 (_initialize_symfile): Add option "-o" to symbol-file to add an
6086 offset to each section of the symbol file.
6087
6088 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6089
6090 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6091
6092 2018-06-27 Tom Tromey <tom@tromey.com>
6093
6094 * stack.c (_initialize_stack): Update "func" help text.
6095
6096 2018-06-27 Tom Tromey <tom@tromey.com>
6097
6098 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6099 std::vector.
6100 (unwind_infopy_str, pyuw_create_unwind_info)
6101 (unwind_infopy_add_saved_register, pyuw_sniffer)
6102 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6103 Update.
6104 (struct saved_reg): Add constructor.
6105 <value>: Now a gdbpy_ref<>.
6106
6107 2018-06-27 Tom Tromey <tom@tromey.com>
6108
6109 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6110
6111 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6112
6113 * gdb-gdb.py.in: Format using autopep8.
6114
6115 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6116
6117 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6118 (type_lookup_function): Recognize CORE_ADDR values.
6119
6120 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6121
6122 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6123 print tag_name.
6124
6125 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6126
6127 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6128 <__lt__>: Add.
6129
6130 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6131
6132 * gdb-gdb.py: Move to...
6133 * gdb-gdb.py.in: ... here.
6134 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6135 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6136 dependencies.
6137 (distclean): Remove gdb-gdb.py when cleaning.
6138 (gdb-gdb.py, gdb-gdb.gdb): New rules.
6139 * configure: Re-generate.
6140
6141 2018-06-27 Pedro Alves <palves@redhat.com>
6142
6143 * proc-service.c (get_ps_regcache): New.
6144 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6145 (ps_lsetfpregs): Use it.
6146
6147 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
6148
6149 PR gdb/21695
6150 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6151 (dwarf_decode_lines_1): Adjust.
6152
6153 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6154
6155 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6156 override.
6157 <info_proc>: Likewise.
6158
6159 2018-06-26 Joel Brobecker <brobecker@adacore.com>
6160
6161 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6162 to windows_fetch_one_register, and only handle the case of
6163 fetching one register. Move the code that reloads the context
6164 and iterates over all registers if R is negative to...
6165 (windows_nat_target::fetch_registers): ... here.
6166 (do_windows_store_inferior_registers): Rename to
6167 windows_store_one_register, and only handle the case of storing
6168 one register. Move the code that handles the case where r is
6169 negative to...
6170 (windows_nat_target::store_registers) ... here.
6171
6172 2018-06-26 Tom Tromey <tom@tromey.com>
6173
6174 PR rust/22574:
6175 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6176 * rust-lang.c (rust_print_struct_def): Add podata parameter.
6177 Update.
6178 (rust_internal_print_type): Add podata parameter.
6179 (rust_print_type): Update.
6180
6181 2018-06-26 Tom Tromey <tom@tromey.com>
6182
6183 * typeprint.h (struct print_offset_data) <update, finish,
6184 maybe_print_hole>: New methods.
6185 <indentation>: New constant.
6186 * typeprint.c (print_offset_data::indentation): Define.
6187 (print_offset_data::maybe_print_hole, print_offset_data::update)
6188 (print_offset_data::finish): Move from c-typeprint.c and rename.
6189 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6190 (print_spaces_filtered_with_print_options): Update.
6191 (c_print_type_union_field_offset, maybe_print_hole)
6192 (c_print_type_struct_field_offset): Move to typeprint.c and
6193 rename.
6194 (c_type_print_base_struct_union): Update.
6195
6196 2018-06-25 Pedro Alves <palves@redhat.com>
6197
6198 * gdbthread.h (thread_info_ref, delete_thread)
6199 (delete_thread_silent, first_thread_of_inferior)
6200 (any_thread_of_inferior, switch_to_thread)
6201 (enable_thread_stack_temporaries)
6202 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6203 (get_last_thread_stack_temporary)
6204 (value_in_thread_stack_temporaries, can_access_registers_thread):
6205 Spell out "struct thread_info" instead of just "thread_info".
6206 * inferior.h (notice_new_inferior): Likewise.
6207
6208 2018-06-25 Pedro Alves <palves@redhat.com>
6209
6210 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6211 pass thread_info pointer to delete_thread.
6212 (windows_nat_target::detach): Pass inferior pointer to
6213 detach_inferior.
6214 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6215 delete_thread.
6216 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6217 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6218 and pass a thread_info pointer to delete_thread.
6219 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6220 pass thread_info pointer to delete_thread.
6221 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6222 delete_thread_silent call.
6223 * procfs.c (procfs_target::detach): Pass inferior pointer to
6224 detach_inferior.
6225 (procfs_target::wait): Pass thread_info pointer to delete_thread.
6226 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6227 delete_thread_silent call.
6228 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6229 pass thread_info pointer to delete_thread.
6230 (windows_nat_target::detach): Pass inferior pointer to
6231 delete_inferior.
6232
6233 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6234
6235 * regcache.c (readable_regcache::read_part): Fix asserts.
6236 (reg_buffer::raw_collect_part): New function.
6237 (regcache::write_part): Fix asserts.
6238 (reg_buffer::raw_supply_part): New function.
6239 (regcache::transfer_regset_register): New helper function.
6240 (regcache::transfer_regset): Call new functions.
6241 (regcache_supply_regset): Use gdb_byte*.
6242 (regcache::supply_regset): Likewise.
6243 (regcache_collect_regset): Likewise.
6244 (regcache::collect_regset): Likewise.
6245 * regcache.h (reg_buffer::raw_collect_part): New declaration.
6246 (reg_buffer::raw_supply_part): Likewise.
6247 (regcache::transfer_regset_register): Likewise.
6248 (regcache::transfer_regset): Use gdb_byte*.
6249
6250 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6251
6252 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6253
6254 2018-06-21 Pedro Alves <palves@redhat.com>
6255
6256 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6257 instead of a ptid_t. All callers adjusted.
6258 * ada-tasks.c (ada_get_task_number): Likewise. All callers
6259 adjusted.
6260 (print_ada_task_info, display_current_task_id, task_command_1):
6261 Adjust.
6262 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6263 inferior_thread.
6264 (breakpoint_kind): Adjust.
6265 (remove_breakpoints_pid): Rename to ...
6266 (remove_breakpoints_inf): ... this. Adjust to take an inferior
6267 pointer. All callers adjusted.
6268 (bpstat_clear_actions): Use inferior_thread.
6269 (get_bpstat_thread): New.
6270 (bpstat_do_actions): Use it.
6271 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6272 to take a thread_info pointer. All callers adjusted.
6273 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6274 (breakpoint_re_set_thread): Use inferior_thread.
6275 * breakpoint.h (struct inferior): Forward declare.
6276 (bpstat_stop_status): Update.
6277 (remove_breakpoints_pid): Delete.
6278 (remove_breakpoints_inf): New.
6279 * bsd-uthread.c (bsd_uthread_target::wait)
6280 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6281 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6282 (maint_btrace_packet_history_cmd)
6283 (maint_btrace_clear_packet_history_cmd): Adjust.
6284 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6285 inferior_thread.
6286 * cli/cli-interp.c: Include "inferior.h".
6287 * common/refcounted-object.h (struct
6288 refcounted_object_ref_policy): New.
6289 * compile/compile-object-load.c: Include gdbthread.h.
6290 (store_regs): Use inferior_thread.
6291 * corelow.c (core_target::close): Use current_inferior.
6292 (core_target_open): Adjust to use first_thread_of_inferior and use
6293 the current inferior.
6294 * ctf.c (ctf_target::close): Adjust to use current_inferior.
6295 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6296 <thread>: ... this new field. All references adjusted.
6297 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6298 Take a thread_info pointer instead of a ptid_t.
6299 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6300 (dummy_frame_discard, register_dummy_frame_dtor): Take a
6301 thread_info pointer instead of a ptid_t.
6302 * elfread.c: Include "inferior.h".
6303 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6304 Use inferior_thread.
6305 * eval.c (evaluate_subexp): Likewise.
6306 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6307 inferior_thread.
6308 * gdb_proc_service.h (struct thread_info): Forward declare.
6309 (struct ps_prochandle) <ptid>: Delete, replaced by ...
6310 <thread>: ... this new field. All references adjusted.
6311 * gdbarch.h, gdbarch.c: Regenerate.
6312 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6313 'thread' parameter. All implementations and callers adjusted.
6314 * gdbthread.h (thread_info) <set_running>: New method.
6315 (delete_thread, delete_thread_silent): Take a thread_info pointer
6316 instead of a ptid.
6317 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6318 (first_thread_of_process): Delete, replaced by ...
6319 (first_thread_of_inferior): ... this new function. All callers
6320 adjusted.
6321 (any_live_thread_of_process): Delete, replaced by ...
6322 (any_live_thread_of_inferior): ... this new function. All callers
6323 adjusted.
6324 (switch_to_thread, switch_to_no_thread): Declare.
6325 (is_executing): Delete.
6326 (enable_thread_stack_temporaries): Update comment.
6327 <enable_thread_stack_temporaries>: Take a thread_info pointer
6328 instead of a ptid_t. Incref the thread.
6329 <~enable_thread_stack_temporaries>: Decref the thread.
6330 <m_ptid>: Delete
6331 <m_thr>: New.
6332 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6333 (get_last_thread_stack_temporary)
6334 (value_in_thread_stack_temporaries, can_access_registers_thread):
6335 Take a thread_info pointer instead of a ptid_t. All callers
6336 adjusted.
6337 * infcall.c (get_call_return_value): Use inferior_thread.
6338 (run_inferior_call): Work with thread pointers instead of ptid_t.
6339 (call_function_by_hand_dummy): Work with thread pointers instead
6340 of ptid_t. Use thread_info_ref.
6341 * infcmd.c (proceed_thread_callback): Access thread's state
6342 directly.
6343 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6344 access thread's state directly.
6345 (continue_command): Use inferior_thread.
6346 (info_program_command): Use find_thread_ptid and access thread
6347 state directly.
6348 (proceed_after_attach_callback): Use thread state directly.
6349 (notice_new_inferior): Take a thread_info pointer instead of a
6350 ptid_t. All callers adjusted.
6351 (exit_inferior): Take an inferior pointer instead of a pid. All
6352 callers adjusted.
6353 (exit_inferior_silent): New.
6354 (detach_inferior): Delete.
6355 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6356 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6357 (detach_inferior_command, kill_inferior_command): Use
6358 find_inferior_id instead of valid_gdb_inferior_id and
6359 gdb_inferior_id_to_pid.
6360 (inferior_command): Use inferior and thread pointers.
6361 * inferior.h (struct thread_info): Forward declare.
6362 (notice_new_inferior): Take a thread_info pointer instead of a
6363 ptid_t. All callers adjusted.
6364 (detach_inferior): Delete declaration.
6365 (exit_inferior, exit_inferior_silent): Take an inferior pointer
6366 instead of a pid. All callers adjusted.
6367 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6368 (valid_gdb_inferior_id): Delete.
6369 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6370 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6371 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6372 ...
6373 <inf>: ... this new field.
6374 <step_ptid>: Delete, replaced by ...
6375 <step_thread>: ... this new field.
6376 (get_displaced_stepping_state): Take an inferior pointer instead
6377 of a pid. All callers adjusted.
6378 (displaced_step_in_progress_any_inferior): Adjust.
6379 (displaced_step_in_progress_thread): Take a thread pointer instead
6380 of a ptid_t. All callers adjusted.
6381 (displaced_step_in_progress, add_displaced_stepping_state): Take
6382 an inferior pointer instead of a pid. All callers adjusted.
6383 (get_displaced_step_closure_by_addr): Adjust.
6384 (remove_displaced_stepping_state): Take an inferior pointer
6385 instead of a pid. All callers adjusted.
6386 (displaced_step_prepare_throw, displaced_step_prepare)
6387 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6388 All callers adjusted.
6389 (start_step_over): Adjust.
6390 (infrun_thread_ptid_changed): Remove bit updating ptids in the
6391 displaced step queue.
6392 (do_target_resume): Adjust.
6393 (fetch_inferior_event): Use inferior_thread.
6394 (context_switch, get_inferior_stop_soon): Take an
6395 execution_control_state pointer instead of a ptid_t. All callers
6396 adjusted.
6397 (switch_to_thread_cleanup): Delete.
6398 (stop_all_threads): Use scoped_restore_current_thread.
6399 * inline-frame.c: Include "gdbthread.h".
6400 (inline_state) <inline_state>: Take a thread pointer instead of a
6401 ptid_t. All callers adjusted.
6402 <ptid>: Delete, replaced by ...
6403 <thread>: ... this new field.
6404 (find_inline_frame_state): Take a thread pointer instead of a
6405 ptid_t. All callers adjusted.
6406 (skip_inline_frames, step_into_inline_frame)
6407 (inline_skipped_frames, inline_skipped_symbol): Take a thread
6408 pointer instead of a ptid_t. All callers adjusted.
6409 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6410 (inline_skipped_frames, inline_skipped_symbol): Likewise.
6411 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6412 pointers directly.
6413 * linux-nat.c (get_detach_signal): Likewise.
6414 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6415 (thread_db_notice_clone): Adjust.
6416 (thread_db_find_new_threads_silently)
6417 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6418 a thread pointer instead of a ptid_t. All callers adjusted.
6419 * mi/mi-cmd-var.c: Include "inferior.h".
6420 (mi_cmd_var_update_iter): Update to use thread pointers.
6421 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6422 inferior directly.
6423 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6424 out to ...
6425 (mi_output_running): ... this new function.
6426 (mi_on_resume_1): Adjust to use it.
6427 (mi_user_selected_context_changed): Adjust to use inferior_thread.
6428 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6429 directly.
6430 (interrupt_thread_callback): : Adjust to use thread and inferior
6431 pointers.
6432 * proc-service.c: Include "gdbthread.h".
6433 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6434 * progspace-and-thread.c: Include "inferior.h".
6435 * progspace.c: Include "inferior.h".
6436 * python/py-exitedevent.c (create_exited_event_object): Adjust to
6437 hold a reference to an inferior_object.
6438 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6439 inferior_thread.
6440 * python/py-inferior.c (struct inferior_object): Give the type a
6441 tag name instead of a typedef.
6442 (python_on_normal_stop): No need to check if the current thread is
6443 listed.
6444 (inferior_to_inferior_object): Change return type to
6445 inferior_object. All callers adjusted.
6446 (find_thread_object): Delete, bits factored out to ...
6447 (thread_to_thread_object): ... this new function.
6448 * python/py-infthread.c (create_thread_object): Use
6449 inferior_to_inferior_object.
6450 (thpy_is_stopped): Use thread pointer directly.
6451 (gdbpy_selected_thread): Use inferior_thread.
6452 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6453 field, replaced with ...
6454 <thread>: ... this new field. All users adjusted.
6455 (btpy_insn_or_gap_new): Drop const.
6456 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
6457 callers adjusted.
6458 * python/py-record.c: Include "gdbthread.h".
6459 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6460 a ptid_t. All callers adjusted.
6461 (gdbpy_current_recording): Use inferior_thread.
6462 * python/py-record.h (recpy_record_object) <ptid>: Delete
6463 field, replaced with ...
6464 <thread>: ... this new field. All users adjusted.
6465 (recpy_element_object) <ptid>: Delete
6466 field, replaced with ...
6467 <thread>: ... this new field. All users adjusted.
6468 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6469 a ptid_t. All callers adjusted.
6470 * python/py-threadevent.c: Include "gdbthread.h".
6471 (get_event_thread): Use thread_to_thread_object.
6472 * python/python-internal.h (struct inferior_object): Forward
6473 declare.
6474 (find_thread_object, find_inferior_object): Delete declarations.
6475 (thread_to_thread_object, inferior_to_inferior_object): New
6476 declarations.
6477 * record-btrace.c: Include "inferior.h".
6478 (require_btrace_thread): Use inferior_thread.
6479 (record_btrace_frame_sniffer)
6480 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6481 (get_thread_current_frame): Use scoped_restore_current_thread and
6482 switch_to_thread.
6483 (get_thread_current_frame): Use thread pointer directly.
6484 (record_btrace_replay_at_breakpoint): Use thread's inferior
6485 pointer directly.
6486 * record-full.c: Include "inferior.h".
6487 * regcache.c: Include "gdbthread.h".
6488 (get_thread_arch_regcache): Use the inferior's address space
6489 directly.
6490 (get_thread_regcache, registers_changed_thread): New.
6491 * regcache.h (get_thread_regcache(thread_info *thread)): New
6492 overload.
6493 (registers_changed_thread): New.
6494 (remote_target) <remote_detach_1>: Swap order of parameters.
6495 (remote_add_thread): <remote_add_thread>: Return the new thread.
6496 (get_remote_thread_info(ptid_t)): New overload.
6497 (remote_target::remote_notice_new_inferior): Use thread pointers
6498 directly.
6499 (remote_target::process_initial_stop_replies): Use
6500 thread_info::set_running.
6501 (remote_target::remote_detach_1, remote_target::detach)
6502 (extended_remote_target::detach): Adjust.
6503 * stack.c (frame_show_address): Use inferior_thread.
6504 * target-debug.h (target_debug_print_thread_info_pp): New.
6505 * target-delegates.c: Regenerate.
6506 * target.c (default_thread_address_space): Delete.
6507 (memory_xfer_partial_1): Use current_inferior.
6508 (target_detach): Use current_inferior.
6509 (target_thread_address_space): Delete.
6510 (generic_mourn_inferior): Use current_inferior.
6511 * target.h (struct target_ops) <thread_address_space>: Delete.
6512 (target_thread_address_space): Delete.
6513 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
6514 pointers directly.
6515 (delete_thread_1, delete_thread, delete_thread_silent): Take a
6516 thread pointer instead of a ptid_t. Adjust all callers.
6517 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6518 (first_thread_of_process): Delete, replaced by ...
6519 (first_thread_of_inferior): ... this new function. All callers
6520 adjusted.
6521 (any_thread_of_process): Rename to ...
6522 (any_thread_of_inferior): ... this, and take an inferior pointer.
6523 (any_live_thread_of_process): Rename to ...
6524 (any_live_thread_of_inferior): ... this, and take an inferior
6525 pointer.
6526 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6527 (value_in_thread_stack_temporaries)
6528 (get_last_thread_stack_temporary): Take a thread pointer instead
6529 of a ptid_t. Adjust all callers.
6530 (thread_info::set_running): New.
6531 (validate_registers_access): Use inferior_thread.
6532 (can_access_registers_ptid): Rename to ...
6533 (can_access_registers_thread): ... this, and take a thread
6534 pointer.
6535 (print_thread_info_1): Adjust to compare thread pointers instead
6536 of ptids.
6537 (switch_to_no_thread, switch_to_thread): Make extern.
6538 (scoped_restore_current_thread::~scoped_restore_current_thread):
6539 Use m_thread pointer directly.
6540 (scoped_restore_current_thread::scoped_restore_current_thread):
6541 Use inferior_thread.
6542 (thread_command): Use thread pointer directly.
6543 (thread_num_make_value_helper): Use inferior_thread.
6544 * top.c (execute_command): Use inferior_thread.
6545 * tui/tui-interp.c: Include "inferior.h".
6546 * varobj.c (varobj_create): Use inferior_thread.
6547 (value_of_root_1): Use find_thread_global_id instead of
6548 global_thread_id_to_ptid.
6549
6550 2018-06-21 Alan Hayward <alan.hayward@arm.com>
6551
6552 * regcache.c (readable_regcache::read_part): Avoid memcpy when
6553 possible.
6554 (regcache::write_part): Likewise.
6555 (readable_regcache::cooked_read_part): Update comment.
6556 (readable_regcache::cooked_write_part): Likewise.
6557 * regcache.h: (readable_regcache::read_part): Likewise.
6558 (regcache::write_part): Likewise.
6559
6560 2018-06-21 Richard Bunt <richard.bunt@arm.com>
6561 Dirk Schubert <dirk.schubert@arm.com>
6562
6563 * aarch64-linux-nat.c (post_attach): New.
6564 (aarch64_linux_nat_target::post_attach): Override post_attach to
6565 record the number of hardware debug registers.
6566
6567 2018-06-20 Tom Tromey <tom@tromey.com>
6568
6569 * python/py-param.c (add_setshow_generic): Make parameters const.
6570 (parmpy_init): Update.
6571
6572 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6573
6574 * regcache.h (regcache_cooked_read_ftype): Rename to...
6575 (register_read_ftype): ...this, change type to function_view.
6576 (class reg_buffer) <save>: Remove src parameter.
6577 (readonly_detached_regcache) <readonly_detached_regcache>: Make
6578 parameter non-const in first overload. Remove src parameter in
6579 second overload.
6580 * regcache.c (do_cooked_read): Remove.
6581 (readonly_detached_regcache::readonly_detached_regcache): Make
6582 parameter non-const, adjust call to other constructor.
6583 (reg_buffer::save): Remove src parameter.
6584 * frame.c (do_frame_register_read): Remove.
6585 (frame_save_as_regcache): Use lambda function.
6586 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6587 parameter to ppu2spu_data *.
6588 (ppu2spu_sniffer): Use lambda function.
6589
6590 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6591
6592 * record-full.c (record_full_target::insert_breakpoint): Remove
6593 "struct" keyword, add const.
6594
6595 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
6596
6597 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6598 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6599 * configure.ac: Remove AC_PREREQ, add missing quoting.
6600 * gnulib/configure.ac: Modernize usage of
6601 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
6602 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6603 (AUTOMAKE_VERSION): Bump to 1.15.1.
6604 * configure: Re-generate.
6605 * config.in: Re-generate.
6606 * aclocal.m4: Re-generate.
6607 * gnulib/aclocal.m4: Re-generate.
6608 * gnulib/config.in: Re-generate.
6609 * gnulib/configure: Re-generate.
6610 * gnulib/import/Makefile.in: Re-generate.
6611
6612 2018-06-19 Pedro Alves <palves@redhat.com>
6613
6614 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6615 (lookup_minimal_symbol_by_pc_section): ... here with
6616 gdb_assert_not_reached added.
6617
6618 2018-06-19 Pedro Alves <palves@redhat.com>
6619
6620 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6621 parameter with a block parameter. Compare location's block symbol
6622 with the frame's block instead of addresses.
6623 (skip_inline_frames): Pass the current block instead of the
6624 frame's address. Break out as soon as we determine the frame
6625 should not be skipped.
6626
6627 2018-06-18 Tom Tromey <tom@tromey.com>
6628
6629 * solib-aix.c (solib_aix_get_section_offsets): Return
6630 unique_xmalloc_ptr.
6631 (solib_aix_solib_create_inferior_hook): Update.
6632
6633 2018-06-18 Tom Tromey <tom@tromey.com>
6634
6635 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6636
6637 2018-06-18 Tom Tromey <tom@tromey.com>
6638
6639 * solib-frv.c (frv_relocate_main_executable): Use
6640 unique_xmalloc_ptr.
6641 * solib-dsbt.c (dsbt_relocate_main_executable): Use
6642 unique_xmalloc_ptr.
6643
6644 2018-06-18 Tom Tromey <tom@tromey.com>
6645
6646 * objfiles.h (inhibit_section_map_updates): Update.
6647 (resume_section_map_updates, resume_section_map_updates_cleanup):
6648 Remove.
6649 * solib-svr4.c (svr4_handle_solib_event): Update.
6650 * objfiles.c (inhibit_section_map_updates): Return
6651 scoped_restore_tmpl<int>.
6652 (resume_section_map_updates, resume_section_map_updates_cleanup):
6653 Remove.
6654
6655 2018-06-18 Tom Tromey <tom@tromey.com>
6656
6657 * valprint.h (read_string): Update.
6658 * valprint.c (read_string): Change type of "buffer".
6659 (val_print_string): Update.
6660 * python/py-value.c (valpy_string): Update.
6661 * language.h (struct language_defn) <la_get_string>: Change
6662 type of "buffer".
6663 (default_get_string, c_get_string): Update.
6664 * language.c (default_get_string): Change type of "buffer".
6665 * guile/scm-value.c (gdbscm_value_to_string): Update.
6666 * c-lang.c (c_get_string): Change type of "buffer".
6667
6668 2018-06-18 Tom Tromey <tom@tromey.com>
6669
6670 * ser-mingw.c (struct pipe_state_destroyer): New.
6671 (pipe_state_up): New typedef.
6672 (cleanup_pipe_state): Remove.
6673 (pipe_windows_open): Use pipe_state_up. Don't release argv.
6674
6675 2018-06-18 Tom Tromey <tom@tromey.com>
6676
6677 * rust-lang.h (rust_yyerror): Don't declare.
6678 * rust-lang.c (rust_language_defn): Update.
6679 * rust-exp.y (yyerror): Now static.
6680 * parse.c (parse_exp_in_context_1): Update.
6681 * p-lang.h (p_yyerror): Don't declare.
6682 * p-lang.c (p_language_defn): Update.
6683 * p-exp.y (yyerror): Now static.
6684 * opencl-lang.c (opencl_language_defn): Update.
6685 * objc-lang.c (objc_language_defn): Update.
6686 * m2-lang.h (m2_yyerror): Don't declare.
6687 * m2-lang.c (m2_language_defn): Update.
6688 * m2-exp.y (yyerror): Now static.
6689 * language.h (struct language_defn) <la_error>: Remove.
6690 * language.c (unk_lang_error): Remove.
6691 (unknown_language_defn, auto_language_defn): Remove.
6692 * go-lang.h (go_yyerror): Don't declare.
6693 * go-lang.c (go_language_defn): Update.
6694 * go-exp.y (yyerror): Now static.
6695 * f-lang.h (f_yyerror): Don't declare.
6696 * f-lang.c (f_language_defn): Update.
6697 * f-exp.y (yyerror): Now static.
6698 * d-lang.h (d_yyerror): Don't declare.
6699 * d-lang.c (d_language_defn): Update.
6700 * d-exp.y (yyerror): Now static.
6701 * c-lang.h (c_yyerror): Don't declare.
6702 * c-lang.c (c_language_defn, cplus_language_defn)
6703 (asm_language_defn, minimal_language_defn): Update.
6704 * c-exp.y (yyerror): Now static.
6705 * ada-lang.h (ada_yyerror): Don't declare.
6706 * ada-lang.c (ada_language_defn): Update.
6707 * ada-exp.y (yyerror): Now static.
6708
6709 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6710
6711 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6712 (store_sveregs_to_thread): Likewise.
6713 (aarch64_linux_fetch_inferior_registers): Check for SVE.
6714 (aarch64_linux_store_inferior_registers): Likewise.
6715 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6716 function.
6717 (aarch64_sve_regs_copy_to_regcache): Likewise.
6718 (aarch64_sve_regs_copy_from_regcache): Likewise.
6719 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6720 declaration.
6721 (aarch64_sve_regs_copy_to_regcache): Likewise.
6722 (aarch64_sve_regs_copy_from_regcache): Likewise.
6723 (sve_context): Structure from Linux headers.
6724 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6725 (SVE_SIG_ZREG_SIZE): Likewise.
6726 (SVE_SIG_PREG_SIZE): Likewise.
6727 (SVE_SIG_FFR_SIZE): Likewise.
6728 (SVE_SIG_REGS_OFFSET): Likewise.
6729 (SVE_SIG_ZREGS_OFFSET): Likewise.
6730 (SVE_SIG_ZREG_OFFSET): Likewise.
6731 (SVE_SIG_ZREGS_SIZE): Likewise.
6732 (SVE_SIG_PREGS_OFFSET): Likewise.
6733 (SVE_SIG_PREG_OFFSET): Likewise.
6734 (SVE_SIG_PREGS_SIZE): Likewise.
6735 (SVE_SIG_FFR_OFFSET): Likewise.
6736 (SVE_SIG_REGS_SIZE): Likewise.
6737 (SVE_SIG_CONTEXT_SIZE): Likewise.
6738 (SVE_PT_REGS_MASK): Likewise.
6739 (SVE_PT_REGS_FPSIMD): Likewise.
6740 (SVE_PT_REGS_SVE): Likewise.
6741 (SVE_PT_VL_INHERIT): Likewise.
6742 (SVE_PT_VL_ONEXEC): Likewise.
6743 (SVE_PT_REGS_OFFSET): Likewise.
6744 (SVE_PT_FPSIMD_OFFSET): Likewise.
6745 (SVE_PT_FPSIMD_SIZE): Likewise.
6746 (SVE_PT_SVE_ZREG_SIZE): Likewise.
6747 (SVE_PT_SVE_PREG_SIZE): Likewise.
6748 (SVE_PT_SVE_FFR_SIZE): Likewise.
6749 (SVE_PT_SVE_FPSR_SIZE): Likewise.
6750 (SVE_PT_SVE_FPCR_SIZE): Likewise.
6751 (__SVE_SIG_TO_PT): Likewise.
6752 (SVE_PT_SVE_OFFSET): Likewise.
6753 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6754 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6755 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6756 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6757 (SVE_PT_SVE_PREG_OFFSET): Likewise.
6758 (SVE_PT_SVE_PREGS_SIZE): Likewise.
6759 (SVE_PT_SVE_FFR_OFFSET): Likewise.
6760 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6761 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6762 (SVE_PT_SVE_SIZE): Likewise.
6763 (SVE_PT_SIZE): Likewise.
6764 (HAS_SVE_STATE): New define.
6765
6766 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6767
6768 * nat/aarch64-sve-linux-sigcontext.h: New file.
6769 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6770 new files.
6771 (SVE_VQ_MIN): Likewise.
6772 (SVE_VQ_MAX): Likewise.
6773 (SVE_VL_MIN): Likewise.
6774 (SVE_VL_MAX): Likewise.
6775 (SVE_NUM_ZREGS): Likewise.
6776 (SVE_NUM_PREGS): Likewise.
6777 (sve_vl_valid): Likewise.
6778 (struct user_sve_header): Likewise.
6779
6780 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
6781 Richard Bunt <Richard.Bunt@arm.com>
6782
6783 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6784 was requested by GDB.
6785
6786 2018-06-15 Tom de Vries <tdevries@suse.de>
6787
6788 * MAINTAINERS (Write After Approval): Add Tom de Vries.
6789
6790 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
6791
6792 * gnulib/update-gnulib.sh: Print expected versions of
6793 autoconf/aclocal.
6794
6795 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
6796
6797 * arch-utils.c (default_type_align): Use type_length_units.
6798 * gdbtypes.c (type_align): Use type_length_units.
6799
6800 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6801
6802 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6803 of 'define' command.
6804
6805 2018-06-14 Tom de Vries <tdevries@suse.de>
6806
6807 PR cli/22573
6808 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6809 get_no_prettyformat_print_options.
6810
6811 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
6812
6813 * sparc-nat.h: Include target.h.
6814 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6815 <fetch_registers>: Remove this argument in function call.
6816 <store_registers>: Remove this argument in function call, remove
6817 extra semicolon.
6818 <low_forget_process>: Call sparc64_forget_process instead of
6819 sparc_forget_process.
6820
6821 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6822
6823 * procfs.c (_initialize_procfs): Use add_inf_child_target.
6824 (procfs_target::make_corefile_notes): Adjust to new
6825 target_read_alloc return type.
6826
6827 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6828 Stephen Roberts <stephen.roberts@arm.com>
6829
6830 PR gdb/22882
6831 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6832 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6833 Move should_notify_stop local into more inner scope.
6834
6835 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6836 Stephen Roberts <stephen.roberts@arm.com>
6837
6838 PR gdb/22882
6839 * infrun.c (resume_1): Add call to mark_async_event_handler.
6840
6841 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6842
6843 * infrun.c (do_target_wait): Change old version of $pc printed.
6844
6845 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
6846
6847 * dwarf2read.c (read_index_from_section): Rename to...
6848 (read_gdb_index_from_section): ... this, update all callers.
6849 (dwarf2_read_index): Rename to...
6850 (dwarf2_read_gdb_index): ... this, update all callers.
6851
6852 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
6853
6854 * gdb/hppa-linux-nat.c
6855 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6856 hppa_linux_nat_target::fetch_registers.
6857
6858 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6859
6860 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6861 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6862 (AARCH64_DWARF_SVE_FFR): Likewise.
6863 (AARCH64_DWARF_SVE_P0): Likewise.
6864 (AARCH64_DWARF_SVE_Z0): Likewise.
6865
6866 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6867
6868 * common/common-regcache.h (raw_compare): New function.
6869 * regcache.c (regcache::raw_compare): Likewise.
6870 * regcache.h (regcache::raw_compare): New declaration.
6871
6872 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6873
6874 * common/common-regcache.h (reg_buffer_common): New structure.
6875 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6876 (reg_buffer::raw_supply): Likewise.
6877 (reg_buffer::raw_supply_integer): Likewise.
6878 (reg_buffer::raw_supply_zeroed): Likewise.
6879 (reg_buffer::raw_collect): Likewise.
6880 (reg_buffer::raw_collect_integer): Likewise.
6881 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6882 (reg_buffer::raw_supply): Likewise.
6883 (reg_buffer::raw_supply_integer): Likewise.
6884 (reg_buffer::raw_supply_zeroed): Likewise.
6885 (reg_buffer::raw_collect): Likewise.
6886 (reg_buffer::raw_collect_integer): Likewise.
6887
6888 2018-06-10 Tom Tromey <tom@tromey.com>
6889
6890 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
6891 (class remote_state) <stop_reply_queue>: Now std::vector.
6892 (remote_state::~remote_state)
6893 (remote_target::stop_reply_queue_length): Update.
6894 (struct queue_iter_param, remove_child_of_pending_fork)
6895 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6896 (check_pending_event_prevents_wildcard_vcont_callback)
6897 (remove_stop_reply_for_inferior)
6898 (remove_stop_reply_of_remote_state)
6899 (remote_notif_remove_once_on_match)
6900 (stop_reply_match_ptid_and_ws)
6901 (remote_kill_child_of_pending_fork): Remove.
6902 (remote_target::remove_new_fork_children)
6903 (remote_target::check_pending_events_prevent_wildcard_vcont)
6904 (remote_target::discard_pending_stop_replies)
6905 (remote_target::discard_pending_stop_replies_in_queue)
6906 (remote_target::remote_notif_remove_queued_reply)
6907 (remote_target::queued_stop_reply)
6908 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6909 (remote_target::wait, remote_target::kill_new_fork_children)
6910 (remote_target::async): Update.
6911
6912 2018-06-10 Tom Tromey <tom@tromey.com>
6913
6914 * record-full.c (record_full_arch_list_cleanups): Remove.
6915 (record_full_message): Use try/catch.
6916 (record_full_wait_cleanups): Remove.
6917 (record_full_wait_1): Use try/catch.
6918 (record_full_restore): Likewise.
6919
6920 2018-06-10 Tom Tromey <tom@tromey.com>
6921
6922 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
6923 declare VEC. Add constructor.
6924 <in_target_beneath>: Now bool.
6925 (record_full_breakpoints): Now a std::vector, static.
6926 (record_full_sync_record_breakpoints)
6927 (record_full_init_record_breakpoints)
6928 (record_full_target::insert_breakpoint)
6929 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
6930
6931 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6932
6933 * dwarf2read.c (process_cu_includes): Remove struct keyword.
6934 * serial.c (serial_interface_lookup): Remove struct keyword.
6935
6936 2018-06-10 Tom Tromey <tom@tromey.com>
6937
6938 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6939 method.
6940 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6941 a method.
6942 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6943 method.
6944 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6945 "beneath" as a method.
6946 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6947 Use "beneath" as a method.
6948
6949 2018-06-10 Tom Tromey <tom@tromey.com>
6950
6951 * tracefile.c (struct trace_file_writer_deleter): New.
6952 <operator()>: Rename from trace_file_writer_xfree.
6953 (trace_file_writer_up): New typedef.
6954 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6955
6956 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6957
6958 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6959 <m_registers, m_register_status>: Change type to
6960 std::unique_ptr.
6961 * regcache.c (reg_buffer::reg_buffer): Use new instead of
6962 XCNEWVEC.
6963
6964 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6965
6966 * common/common-regcache.h (enum register_status): Add
6967 underlying type "signed char".
6968 * regcache.h (reg_buffer) <m_register_status>: Change type to
6969 register_status *.
6970 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6971 register_status instead of signed char.
6972 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6973 (reg_buffer::get_register_status): Remove cast.
6974 (readable_regcache::raw_read): Remove cast.
6975 (readable_regcache::cooked_read): Remove cast.
6976
6977 2018-06-09 Tom Tromey <tom@tromey.com>
6978
6979 * source.c (reverse_search_command, forward_search_command): Use
6980 scoped_fd.
6981
6982 2018-06-09 Tom Tromey <tom@tromey.com>
6983
6984 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
6985 (serial_ops_list): Now static, std::vector.
6986 (serial_interface_lookup, serial_add_interface): Update.
6987
6988 2018-06-09 Tom Tromey <tom@tromey.com>
6989
6990 * dwarf2read.c (process_cu_includes): Update.
6991 (process_full_comp_unit): Update.
6992 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6993 std::vector.
6994
6995 2018-06-08 Paul Koning <paul_koning@dell.com>
6996
6997 PR gdb/23252
6998
6999 * python/python.c (do_start_initialization):
7000 Avoid call to internal Python API.
7001 (init__gdb_module): New function.
7002
7003 2018-06-08 Gary Benson <gbenson@redhat.com>
7004
7005 * linux-thread-db.c (valprint.h): New include.
7006 (struct check_thread_db_info): New structure.
7007 (check_thread_db_on_load, tdb_testinfo): New static globals.
7008 (check_thread_db, check_thread_db_callback): New functions.
7009 (try_thread_db_load_1): Run integrity checks if requested.
7010 (maintenance_check_libthread_db): New function.
7011 (_initialize_thread_db): Register "maint check libthread-db"
7012 and "maint set/show check-libthread-db".
7013 * NEWS: Mention the above new commands.
7014
7015 2018-06-08 Tom Tromey <tom@tromey.com>
7016
7017 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7018 now a method.
7019
7020 2018-06-08 Tom Tromey <tom@tromey.com>
7021
7022 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7023
7024 2018-06-08 Tom Tromey <tom@tromey.com>
7025
7026 * common/btrace-common.h (struct btrace_data): Add constructor,
7027 destructor, move assignment operator.
7028 <empty, clear, fini>: New methods.
7029 <format>: Initialize.
7030 (btrace_data_init, btrace_data_fini, btrace_data_clear)
7031 (btrace_data_empty): Don't declare.
7032 * common/btrace-common.c (btrace_data_init): Remove.
7033 (btrace_data::fini): Rename from btrace_data_fini.
7034 (btrace_data::empty): Rename from btrace_data_empty.
7035 (btrace_data::clear): Rename from btrace_data_clear. Return
7036 bool.
7037 * btrace.h (make_cleanup_btrace_data): Don't declare.
7038 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7039 (parse_xml_btrace): Update.
7040 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7041 (maint_btrace_clear_packet_history_cmd): Update.
7042
7043 2018-06-07 Pedro Alves <palves@redhat.com>
7044
7045 * target.h (target_ops) <beneath>: Now a method. All references
7046 updated.
7047 (class target_stack): New.
7048 * target.c (g_target_stack): New.
7049 (g_current_top_target): Delete.
7050 (current_top_target): Get the top target out of g_target_stack.
7051 (target_stack::push, target_stack::unpush): New.
7052 (push_target, unpush_target): Reimplement.
7053 (target_is_pushed): Reimplement in terms of g_target_stack.
7054 (target_ops::beneath, target_stack::find_beneath): New.
7055
7056 2018-06-07 Pedro Alves <palves@redhat.com>
7057
7058 * target.h (find_target_beneath): Delete declaration.
7059 * target.c (find_target_beneath): Delete definition.
7060 * aix-thread.c: All callers of find_target_beneath adjusted to
7061 call target_ops::beneath instead.
7062 * bsd-uthread.c: Likewise.
7063 * linux-thread-db.c: Likewise.
7064 * ravenscar-thread.c: Likewise.
7065 * sol-thread.c: Likewise.
7066 * spu-multiarch.c: Likewise.
7067
7068 2018-06-07 Pedro Alves <palves@redhat.com>
7069
7070 * target.h (target_ops) <beneath>: Now a method. All references
7071 updated.
7072 (target_ops) <m_beneath>: New.
7073 * target.c (target_ops::beneath): New.
7074 * corelow.c: Adjust all references to target_ops::beneath.
7075 * linux-thread-db.c: Likewise.
7076 * make-target-delegates: Likewise.
7077 * record-btrace.c: Likewise.
7078 * record-full.c: Likewise.
7079 * remote.c: Likewise.
7080 * target.c: Likewise.
7081 * target-delegates.c: Regenerate.
7082
7083 2018-06-07 Pedro Alves <palves@redhat.com>
7084
7085 * target.h (target_stack): Delete.
7086 (current_top_target): Declare function.
7087 * target.c (target_stack): Delete.
7088 (g_current_top_target): New.
7089 (current_top_target): New function.
7090 * auxv.c: Use current_top_target instead of target_stack
7091 throughout.
7092 * avr-tdep.c: Likewise.
7093 * breakpoint.c: Likewise.
7094 * corefile.c: Likewise.
7095 * elfread.c: Likewise.
7096 * eval.c: Likewise.
7097 * exceptions.c: Likewise.
7098 * frame.c: Likewise.
7099 * gdbarch-selftests.c: Likewise.
7100 * gnu-v3-abi.c: Likewise.
7101 * ia64-tdep.c: Likewise.
7102 * ia64-vms-tdep.c: Likewise.
7103 * infcall.c: Likewise.
7104 * infcmd.c: Likewise.
7105 * infrun.c: Likewise.
7106 * linespec.c: Likewise.
7107 * linux-tdep.c: Likewise.
7108 * minsyms.c: Likewise.
7109 * ppc-linux-nat.c: Likewise.
7110 * ppc-linux-tdep.c: Likewise.
7111 * procfs.c: Likewise.
7112 * regcache.c: Likewise.
7113 * remote.c: Likewise.
7114 * rs6000-tdep.c: Likewise.
7115 * s390-linux-nat.c: Likewise.
7116 * s390-tdep.c: Likewise.
7117 * solib-aix.c: Likewise.
7118 * solib-darwin.c: Likewise.
7119 * solib-dsbt.c: Likewise.
7120 * solib-spu.c: Likewise.
7121 * solib-svr4.c: Likewise.
7122 * solib-target.c: Likewise.
7123 * sparc-tdep.c: Likewise.
7124 * sparc64-tdep.c: Likewise.
7125 * spu-tdep.c: Likewise.
7126 * symfile.c: Likewise.
7127 * symtab.c: Likewise.
7128 * target-descriptions.c: Likewise.
7129 * target-memory.c: Likewise.
7130 * target.c: Likewise.
7131 * target.h: Likewise.
7132 * tracefile-tfile.c: Likewise.
7133 * tracepoint.c: Likewise.
7134 * valops.c: Likewise.
7135 * valprint.c: Likewise.
7136 * value.c: Likewise.
7137 * windows-tdep.c: Likewise.
7138 * mi/mi-main.c: Likewise.
7139
7140 2018-06-07 Tom Tromey <tom@tromey.com>
7141
7142 * valprint.h (build_address_symbolic): Declare.
7143 * printcmd.c (print_address_symbolic): Update.
7144 (build_address_symbolic): Change "name" and "filename" to
7145 std::string.
7146 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7147 Update.
7148 * defs.h (build_address_symbolic): Remove declaration.
7149
7150 2018-06-07 Alan Hayward <alan.hayward@arm.com>
7151
7152 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7153 (aarch64_vnv_type): Add function.
7154 (aarch64_pseudo_register_name): Add V regs for SVE.
7155 (aarch64_pseudo_register_type): Likewise.
7156 (aarch64_pseudo_register_reggroup_p): Likewise.
7157 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7158 (aarch64_pseudo_read_value): Add V regs for SVE.
7159 (aarch64_pseudo_write_2): Use V0 offset for SVE
7160 (aarch64_pseudo_write): Add V regs for SVE.
7161 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7162
7163 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
7164
7165 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7166 (sve_vl_from_vq): Likewise.
7167
7168 2018-06-05 Tom Tromey <tom@tromey.com>
7169
7170 * cli/cli-cmds.c (show_version): Update.
7171 * top.c (print_gdb_version): Add "interactive" parameter.
7172 Update.
7173 * main.c (captured_main_1): Update.
7174 * top.h (print_gdb_version): Add "interactive" parameter and a
7175 comment.
7176
7177 2018-06-05 David Malcolm <dmalcolm@redhat.com>
7178
7179 * common/enum-flags.h: Add trailing semicolon to example in
7180 comment.
7181
7182 2018-06-05 Tom Tromey <tom@tromey.com>
7183
7184 PR cli/12326:
7185 * NEWS: Add entry about pager.
7186 * utils.c (pagination_disabled_for_command): New global.
7187 (prompt_for_continue): Allow "c" response to prompt.
7188 (reinitialize_more_filter): Clear
7189 pagination_disabled_for_command.
7190 (fputs_maybe_filtered): Check pagination_disabled_for_command.
7191
7192 2018-06-04 Tom Tromey <tom@tromey.com>
7193
7194 * ada-lang.h (ada_lookup_symbol_list): Update.
7195 * ada-lang.c (resolve_subexp): Update.
7196 (symbols_are_identical_enums): Change type of syms. Remove nsyms
7197 parameter.
7198 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7199 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7200 results parameter to std::vector.
7201 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7202 Update.
7203 * ada-exp.y (block_lookup): Update.
7204 (select_possible_type_sym): Change type of syms. Remove nsyms
7205 parameter.
7206 (write_var_or_type, write_name_assoc): Update.
7207
7208 2018-06-04 Joel Brobecker <brobecker@adacore.com>
7209
7210 * windows-nat.c (windows_nat_target::xfer_partial): Return
7211 TARGET_XFER_E_IO if we need to delegate to the target beneath
7212 but BENEATH is NULL.
7213
7214 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
7215
7216 * Makefile.in (config.status): Add configure.nat as a
7217 dependency.
7218
7219 2018-06-04 Tom Tromey <tom@tromey.com>
7220
7221 * cp-name-parser.y (cpname_state): Add method declarations.
7222 (HANDLE_QUAL): Update.
7223 (cpname_state::d_grab, cpname_state::fill_comp)
7224 (cpname_state::make_operator, cpname_state::make_dtor)
7225 (cpname_state::make_builtin_type, cpname_state::make_name)
7226 (cpname_state::d_qualify, cpname_state::d_int_type)
7227 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7228 (%union): Move earlier.
7229
7230 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7231
7232 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7233
7234 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7235
7236 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7237 (aarch64_pseudo_write_1): Likewise.
7238 (aarch64_pseudo_read_value): Use helper.
7239 (aarch64_pseudo_write): Likewise.
7240
7241 2018-06-04 Pedro Alves <palves@redhat.com>
7242
7243 * darwin-nat.c (darwin_ops): Delete.
7244 (darwin_attach_pid): Use get_native_target.
7245
7246 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7247
7248 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7249 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7250
7251 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7252
7253 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7254 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7255 (aarch64_gdbarch_init): Check for SVE.
7256 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7257
7258 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7259
7260 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7261 * aarch64-tdep.h (aarch64_read_description): Likewise.
7262 * arch/aarch64.c (aarch64_create_target_description): Likewise.
7263 * arch/aarch64.h (aarch64_create_target_description): Likewise.
7264 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7265 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7266 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7267
7268 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
7269
7270 * value.c (value_fetch_lazy_bitfield): New.
7271 (value_fetch_lazy_memory): New.
7272 (value_fetch_lazy_register): New.
7273 (value_fetch_lazy): Factor out to smaller functions.
7274
7275 2018-06-01 Tom Tromey <tom@tromey.com>
7276
7277 * cp-name-parser.y (backslashable, represented): Now const.
7278
7279 2018-06-01 Tom Tromey <tom@tromey.com>
7280
7281 * cp-name-parser.y: Include parser-defs.h.
7282 (parser_fprintf): Remove declaration.
7283
7284 2018-06-01 Tom Tromey <tom@tromey.com>
7285
7286 * cp-name-parser.y: Use %pure-parser, %lex-param, and
7287 %parse-param.
7288 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7289 (global_result): Remove globals.
7290 (struct cpname_state): New.
7291 (yyparse): Don't declare.
7292 (yylex, yyerror): Move declarations after %union.
7293 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7294 (make_name): Add state parameter.
7295 Update all callers.
7296 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7297 parameter.
7298 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7299 Update.
7300 (yylex): Add lvalp, state parameters.
7301 (yyerror): Add state parameter.
7302 (cp_demangled_name_to_comp): Update.
7303
7304 2018-06-01 Tom Tromey <tom@tromey.com>
7305
7306 * cp-name-parser.y (parser_fprintf): Declare.
7307 (GDB_YY_REMAP_PREFIX): Define.
7308 Include yy-remap.h. Don't redefine yy* identifiers.
7309
7310 2018-06-01 Tom Tromey <tom@tromey.com>
7311
7312 * python/py-type.c (typy_legacy_template_argument): Update.
7313 * cp-support.h (cp_demangled_name_to_comp): Update.
7314 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7315 parameter to be a "std::string *".
7316 (main): Update.
7317
7318 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
7319
7320 * ada-lex.l: Include "diagnostics.h" instead of
7321 "common/diagnostics.h".
7322 * unittests/environ-selftests.c: Likewise.
7323 * common/diagnostics.h: Moved to ../include.
7324
7325 2018-06-01 Joel Brobecker <brobecker@adacore.com>
7326
7327 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7328 to language_mode_manual while calling breakpoint_re_set_one.
7329
7330 2018-06-01 Tom Tromey <tom@tromey.com>
7331
7332 * valops.c (value_cast_structs, destructor_name_p): Update.
7333 * symtab.c (gdb_mangle_name): Update.
7334 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7335 Update.
7336 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7337 (pascal_object_print_value_fields, pascal_object_print_value):
7338 Update.
7339 * p-typeprint.c (pascal_type_print_derivation_info): Update.
7340 * linespec.c (find_methods): Update.
7341 * gdbtypes.h (type_name_no_tag): Remove.
7342 (type_name_or_error): Rename from type_name_no_tag_or_error.
7343 * gdbtypes.c (type_name_no_tag): Remove.
7344 (type_name_or_error): Rename from type_name_no_tag_or_error.
7345 (lookup_struct_elt_type, check_typedef): Update.
7346 * expprint.c (print_subexp_standard): Update.
7347 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7348 * d-namespace.c (d_lookup_nested_symbol): Update.
7349 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7350 (cp_print_class_member): Update.
7351 * cp-namespace.c (cp_lookup_nested_symbol): Update.
7352 * completer.c (add_struct_fields): Update.
7353 * c-typeprint.c (cp_type_print_derivation_info)
7354 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7355 Update.
7356 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7357 (ada_prefer_type, ada_is_exception_sym): Update.
7358
7359 2018-06-01 Tom Tromey <tom@tromey.com>
7360
7361 * valops.c (enum_constant_from_type, value_namespace_elt)
7362 (value_maybe_namespace_elt): Update.
7363 * valarith.c (find_size_for_pointer_math): Update.
7364 * target-descriptions.c (make_gdb_type): Update.
7365 * symmisc.c (print_symbol): Update.
7366 * stabsread.c (define_symbol, read_type)
7367 (complain_about_struct_wipeout, add_undefined_type)
7368 (cleanup_undefined_types_1): Update.
7369 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7370 (rust_range_type_p, val_print_struct, rust_print_struct_def)
7371 (rust_internal_print_type, rust_composite_type)
7372 (rust_evaluate_funcall, rust_evaluate_subexp)
7373 (rust_inclusive_range_type_p): Update.
7374 * python/py-type.c (typy_get_tag): Update.
7375 * p-typeprint.c (pascal_type_print_base): Update.
7376 * mdebugread.c (parse_symbol, parse_type): Update.
7377 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7378 Update.
7379 * guile/scm-type.c (gdbscm_type_tag): Update.
7380 * go-lang.c (sixg_string_p): Update.
7381 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7382 Update.
7383 * gdbtypes.h (struct main_type) <tag_name>: Remove.
7384 (TYPE_TAG_NAME): Remove.
7385 * gdbtypes.c (type_name_no_tag): Simplify.
7386 (check_typedef, check_types_equal, recursive_dump_type)
7387 (copy_type_recursive, arch_composite_type): Update.
7388 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
7389 in summary mode when needed.
7390 * eval.c (evaluate_funcall): Update.
7391 * dwarf2read.c (fixup_go_packaging, read_structure_type)
7392 (process_structure_scope, read_enumeration_type)
7393 (read_namespace_type, read_module_type, determine_prefix): Update.
7394 * cp-support.c (inspect_type): Update.
7395 * coffread.c (process_coff_symbol, decode_base_type): Update.
7396 * c-varobj.c (c_is_path_expr_parent): Update.
7397 * c-typeprint.c (c_type_print_base_struct_union): Update.
7398 (c_type_print_base_1): Update. Print struct/class/union/enum in
7399 summary when using C language.
7400 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7401 (gen_maybe_namespace_elt): Update.
7402 * ada-lang.c (ada_type_name): Simplify.
7403 (empty_record, ada_template_to_fixed_record_type_1)
7404 (template_to_static_fixed_type)
7405 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7406
7407 2018-06-01 Tom Tromey <tom@tromey.com>
7408
7409 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7410 c_print_type.
7411 * c-typeprint.c (c_print_type_1): Add "language" parameter.
7412 (c_print_type): Update.
7413 (c_print_type): New overload.
7414 (c_type_print_varspec_prefix, c_type_print_args)
7415 (c_type_print_varspec_suffix, c_print_type_no_offsets)
7416 (c_type_print_base_struct_union, c_type_print_base_1)
7417 (cp_type_print_method_args): Add "language" parameter.
7418 (c_type_print_base): Update.
7419 * c-lang.h (c_print_type): Add new overload.
7420
7421 2018-06-01 Tom Tromey <tom@tromey.com>
7422
7423 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7424 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7425
7426 2018-06-01 Alan Hayward <alan.hayward@arm.com>
7427
7428 * aarch64-tdep.c (aarch64_sve_register_names): New const
7429 var.
7430 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7431 (AARCH64_SVE_Z_REGS_NUM): New define.
7432 (AARCH64_SVE_P_REGS_NUM): Likewise.
7433 (AARCH64_SVE_NUM_REGS): Likewise.
7434
7435 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7436
7437 * nat/linux-ptrace.h [__alpha__]
7438 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7439 definitions.
7440
7441 2018-05-31 Maciej W. Rozycki <macro@mips.com>
7442
7443 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7444 the endianness selected.
7445 * NEWS: Document `set endian auto' mode operation update.
7446
7447 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7448
7449 * Makefile.in: Add new header.
7450 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7451 (sve_vl_from_vg): Likewise.
7452 (sve_vq_from_vl): Likewise.
7453 (sve_vl_from_vq): Likewise.
7454 (sve_vq_from_vg): Likewise.
7455 (sve_vg_from_vq): Likewise.
7456 * configure.nat: Add new c file.
7457 * nat/aarch64-sve-linux-ptrace.c: New file.
7458 * nat/aarch64-sve-linux-ptrace.h: New file.
7459
7460 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7461
7462 * aarch64-linux-nat.c (aarch64_linux_read_description):
7463 Add parmeter zero.
7464 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7465 Likewise.
7466 * aarch64-tdep.c (tdesc_aarch64_list): Add.
7467 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7468 (aarch64_gdbarch_init): Add parmeter zero.
7469 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7470 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7471 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7472 parmeter.
7473 * doc/gdb.texinfo: Describe SVE feature
7474 * features/aarch64-sve.c: New file.
7475
7476 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
7477
7478 PR gdb/23210
7479 * gdbarch.sh (significant_addr_bit): Default to zero when
7480 not set by target architecture.
7481 * gdbarch.c: Re-generated.
7482 * utils.c (address_significant): Update.
7483
7484 2018-05-30 Joel Brobecker <brobecker@adacore.com>
7485
7486 * stack.c (func_command): Remove trailing newline in call to error.
7487
7488 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7489
7490 * regcache.h (regcache_raw_collect): Remove, update callers to
7491 use regcache::raw_collect.
7492 * regcache.c (regcache_raw_collect): Remove.
7493
7494 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7495
7496 * regcache.h (regcache_raw_supply): Remove, update callers to
7497 use detached_regcache::raw_supply.
7498 * regcache.c (regcache_raw_supply): Remove.
7499
7500 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7501
7502 * regcache.h (regcache_cooked_write_part): Remove, update
7503 callers to use regcache::cooked_write_part.
7504 * regcache.c (regcache_cooked_write_part): Remove.
7505
7506 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7507
7508 * regcache.h (regcache_cooked_read_part): Remove, update callers
7509 to use readable_regcache::cooked_read_part.
7510 * regcache.c (regcache_cooked_read_part): Remove.
7511
7512 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7513
7514 * regcache.h (regcache_cooked_read_value): Remove, update
7515 callers to use readable_regcache::cooked_read_value.
7516 * regcache.c (regcache_cooked_read_value): Remove.
7517
7518 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7519
7520 * regcache.h (regcache_cooked_write): Remove, update callers to
7521 use regcache::cooked_write.
7522 * regcache.c (regcache_cooked_write): Remove.
7523
7524 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7525
7526 * regcache.h (regcache_invalidate): Remove, update callers to
7527 use detached_regcache::invalidate instead.
7528 * regcache.c (regcache_invalidate): Remove.
7529
7530 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7531
7532 * regcache.h (regcache_raw_write_part): Remove, update callers
7533 to use regcache::raw_write_part instead.
7534 * regcache.c (regcache_raw_write_part): Remove.
7535
7536 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7537
7538 * regcache.h (regcache_raw_read_part): Remove, update callers to
7539 use readable_regcache::raw_read_part instead.
7540 * regcache.c (regcache_raw_read_part): Remove.
7541
7542 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7543
7544 * regcache.h (regcache_cooked_read): Remove, update callers to
7545 use readable_regcache::cooked_read instead.
7546 * regcache.c (regcache_cooked_read): Remove.
7547
7548 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7549
7550 * regcache.h (regcache_raw_write): Remove, update callers to use
7551 regcache::raw_write instead.
7552 * regcache.c (regcache_raw_write): Remove.
7553
7554 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7555
7556 * regcache.h (regcache_raw_read): Remove, update callers to use
7557 readable_regcache::raw_read instead.
7558 * regcache.c (regcache_raw_read): Remove.
7559
7560 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7561
7562 * regcache.h (regcache_raw_update): Remove, update callers to
7563 use readable_regcache::raw_update instead.
7564 * regcache.c (regcache_raw_update): Remove.
7565
7566 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7567
7568 * regcache.h (regcache_register_status): Remove, update callers
7569 to use reg_buffer::get_register_status directly instead.
7570 * regcache.c (regcache_register_status): Remove.
7571
7572 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7573
7574 * regcache.h (regcache_get_ptid): Remove, update all callers to
7575 call regcache::ptid instead.
7576 * regcache.c (regcache_get_ptid): Remove.
7577
7578 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7579
7580 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7581
7582 2018-05-30 Pedro Alves <palves@redhat.com>
7583
7584 * common/common-exceptions.h (exception_rethrow): Use
7585 ATTRIBUTE_NORETURN.
7586
7587 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
7588
7589 * breakpoint.c (print_solib_event, check_status_catch_solib):
7590 Remove struct keyword in range-based for loops.
7591 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7592 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7593 Likewise.
7594 * linespec.c (find_superclass_methods, search_minsyms_for_name):
7595 Likewise.
7596 * symfile.c (addr_info_make_relative): Likewise.
7597 * thread.c (value_in_thread_stack_temporaries): Likewise.
7598
7599 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
7600
7601 PR gdb/16841
7602 * valops.c (value_struct_elt_for_reference): Call check_typedef on
7603 aggregate type to get its real type before accessing it.
7604
7605 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
7606
7607 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7608 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7609 * coff-pe-read.c (add_pe_forwarded_sym): Replace
7610 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7611 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7612 * jit.c (jit_breakpoint_re_set_internal): Likewise.
7613 * printcmd.c (info_address_command): Likewise.
7614
7615 2018-05-29 Tom Tromey <tom@tromey.com>
7616
7617 * windows-nat.c (handle_exception): Update fall-through comment.
7618
7619 2018-05-29 Tom Tromey <tom@tromey.com>
7620
7621 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
7622 (struct program_space) <added_solibs>: Now a std::vector.
7623 * breakpoint.c (print_solib_event): Update.
7624 (check_status_catch_solib): Update.
7625 * progspace.c (clear_program_space_solib_cache): Update.
7626 * solib.c (update_solib_list): Update.
7627
7628 2018-05-29 Tom Tromey <tom@tromey.com>
7629
7630 * python/py-type.c (typy_richcompare): Update.
7631 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7632 * gdbtypes.h (types_deeply_equal): Return bool.
7633 (types_equal): Likewise.
7634 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
7635 declare VEC.
7636 (check_types_equal): Change worklist to std::vector. Return
7637 bool.
7638 (struct type_equality_entry): Add constructor.
7639 (compare_maybe_null_strings): Return bool.
7640 (check_types_worklist): Return bool. Change worklist to
7641 std::vector.
7642 (types_deeply_equal): Use std::vector.
7643 (types_equal): Return bool.
7644 (compare_maybe_null_strings): Simplify.
7645
7646 2018-05-29 Tom Tromey <tom@tromey.com>
7647
7648 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
7649
7650 2018-05-29 Tom Tromey <tom@tromey.com>
7651
7652 * objc-lang.h: Don't include cp-support.h.
7653 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
7654 declare VEC.
7655
7656 2018-05-27 Tom Tromey <tom@tromey.com>
7657
7658 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7659
7660 2018-05-25 Tom Tromey <tom@tromey.com>
7661
7662 * value.c (value::location): Initialize.
7663
7664 2018-05-25 Tom Tromey <tom@tromey.com>
7665
7666 * dbxread.c (init_bincl_list): Remove.
7667 (bincl_list): Now a std::vector.
7668 (bincls_allocated, next_bincl): Remove.
7669 (free_bincl_list, do_free_bincl_list_cleanup)
7670 (make_cleanup_free_bincl_list): Remove.
7671 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7672 unique_xmalloc_ptr.
7673 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7674 (struct header_file_location): Add constructor.
7675 (add_bincl_to_list): Remove.
7676
7677 2018-05-25 Tom Tromey <tom@tromey.com>
7678
7679 * tui/tui.c (tui_enable): Update.
7680 * mi/mi-interp.c (mi_interp::init): Update.
7681 * interps.h (class interp) <name>: New method.
7682 <m_name>: Rename from name.
7683 (~scoped_restore_interp): Update.
7684 * interps.c (interp::interp): Update.
7685 (interp_add, interp_set, interp_lookup_existing)
7686 (current_interp_named_p): Update.
7687
7688 2018-05-25 Tom Tromey <tom@tromey.com>
7689
7690 * interps.c (interp_name): Remove.
7691 * mi/mi-interp.c (mi_interp::init): Update.
7692 * interps.h (interp_name): Remove.
7693 (~scoped_restore_interp): Update.
7694 * tui/tui.c (tui_enable): Update.
7695
7696 2018-05-25 Tom Tromey <tom@tromey.com>
7697
7698 * utils.c (fputs_maybe_filtered): Update.
7699 * linespec.c (decode_line_full): Update.
7700 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7701 (mi_print_breakpoint_for_event, mi_solib_loaded)
7702 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7703 (mi_user_selected_context_changed): Update.
7704 * mi/mi-main.c (mi_execute_command): Update.
7705 * cli/cli-script.c (execute_control_command): Update.
7706 * python/python.c (execute_gdb_command): Update.
7707 * solib.c (info_sharedlibrary_command): Update.
7708 * interps.c (interp_ui_out): Remove.
7709 * interps.h (interp_ui_out): Remove.
7710
7711 2018-05-25 Tom Tromey <tom@tromey.com>
7712
7713 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7714 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7715 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7716
7717 2018-05-25 Tom Tromey <tom@tromey.com>
7718
7719 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7720 * interps.c (interp_exec): Use scoped_restore.
7721
7722 2018-05-25 Tom Tromey <tom@tromey.com>
7723
7724 * remote.c (remote_target::remote_file_get): Use
7725 gdb::byte_vector.
7726 (remote_target::remote_file_put): Likewise.
7727
7728 2018-05-25 Tom Tromey <tom@tromey.com>
7729
7730 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7731 a std::string.
7732 (get_pe_section_index, add_pe_exported_sym): Update.
7733 (read_pe_exported_syms): Use gdb::def_vector.
7734
7735 2018-05-25 Tom Tromey <tom@tromey.com>
7736
7737 * frame.c (remove_prev_frame): Remove.
7738 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7739
7740 2018-05-25 Maciej W. Rozycki <macro@mips.com>
7741
7742 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7743 Remove prototypes.
7744 * mips-linux-nat.c (supply_fpregset): Always call
7745 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7746 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7747 `mips_fill_fpregset'.
7748 * mips-linux-tdep.c (mips_supply_fpregset)
7749 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7750 (mips_fill_fpregset_wrapper): Remove functions.
7751 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7752 (mips_linux_fpregset): Remove variable.
7753 (mips_linux_iterate_over_regset_sections): Use
7754 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7755 (mips_linux_o32_sigframe_init): Remove comment.
7756
7757 2018-05-25 Pedro Alves <palves@redhat.com>
7758
7759 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7760 (struct readahead_cache, struct packet_reg, struct
7761 remote_arch_state, class remote_state): Move higher up in the
7762 file.
7763 (remote_target::m_remote_state): Now an object instead of a pointer.
7764 (remote_target::get_remote_state): Adjust.
7765
7766 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7767
7768 * stack.c (select_and_print_frame): Delete.
7769 (struct function_bounds): Move struct within function.
7770 (func_command): Most content moved into new function
7771 find_frame_for_function, use new function, print result, add
7772 function comment.
7773 (find_frame_for_function): New function, now returns a result.
7774
7775 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7776
7777 * stack.c (iterate_over_block_arg_vars): Fix comment.
7778 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7779
7780 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7781
7782 PR gdb/23203
7783 * frame.c
7784 (scoped_restore_selected_frame::scoped_restore_selected_frame):
7785 Define.
7786 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7787 Define.
7788 * frame.h (class scoped_restore_selected_frame): New class.
7789 * stack.c (print_frame_local_vars): Remove catching and rethrowing
7790 of any exception, use scoped_restore_selected_frame to restore the
7791 frame instead.
7792
7793 2018-05-24 Pedro Alves <palves@redhat.com>
7794
7795 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7796 override.
7797
7798 2018-05-23 Tom Tromey <tom@tromey.com>
7799
7800 * complaints.c (struct complaints): Remove.
7801 (symfile_complaint_book): Remove.
7802 (series): New global.
7803 (complaint_internal): Update.
7804 (clear_complaints): Update.
7805
7806 2018-05-23 Tom Tromey <tom@tromey.com>
7807
7808 * complaints.c (counters): New global.
7809 (struct complain): Remove.
7810 (struct complaints) <root>: Remove.
7811 (complaint_sentinel): Remove.
7812 (symfile_complaint_book): Update.
7813 (find_complaint) Remove.
7814 (complaint_internal, clear_complaints): Update.
7815
7816 2018-05-23 Tom Tromey <tom@tromey.com>
7817
7818 * complaints.c (struct complain) <file, line>: Remove.
7819 (find_complaint): Remove file, line parameters.
7820 (complaint_internal): Update.
7821
7822 2018-05-23 Tom Tromey <tom@tromey.com>
7823
7824 * complaints.c (vcomplaint): Remove.
7825 (complaint_internal) Merge in contents of vcomplaint.
7826
7827 2018-05-23 Tom Tromey <tom@tromey.com>
7828
7829 * complaints.c (struct complaints) <explanation>: Remove.
7830 (symfile_explanations): Remove.
7831 (symfile_complaint_book): Update.
7832 (vcomplaint): Update.
7833 (struct explanation): Remove.
7834
7835 2018-05-23 Tom Tromey <tom@tromey.com>
7836
7837 * complaints.c (symfile_complaints): Remove.
7838 (complaint_internal): Remove "complaints" parameter.
7839 (clear_complaints, vcomplaint): Remove "c" parameter.
7840 (get_complaints): Remove.
7841 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7842 (dwarf2_debug_line_missing_file_complaint)
7843 (dwarf2_debug_line_missing_end_sequence_complaint)
7844 (dwarf2_complex_location_expr_complaint)
7845 (dwarf2_const_value_length_mismatch_complaint)
7846 (dwarf2_section_buffer_overflow_complaint)
7847 (dwarf2_macro_malformed_definition_complaint)
7848 (dwarf2_invalid_attrib_class_complaint)
7849 (create_addrmap_from_index, dw2_symtab_iter_next)
7850 (dw2_expand_marked_cus)
7851 (dw2_debug_names_iterator::find_vec_in_debug_names)
7852 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7853 (create_debug_type_hash_table, init_cutu_and_read_dies)
7854 (partial_die_parent_scope, add_partial_enumeration)
7855 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7856 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7857 (read_import_statement, read_file_scope, create_dwo_cu_reader)
7858 (create_cus_hash_table, create_dwp_hash_table)
7859 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7860 (dwarf2_rnglists_process, dwarf2_ranges_process)
7861 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7862 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7863 (handle_struct_member_die, process_structure_scope)
7864 (read_array_type, read_common_block, read_module_type)
7865 (read_tag_pointer_type, read_typedef, read_base_type)
7866 (read_subrange_type, load_partial_dies, partial_die_info::read)
7867 (partial_die_info::read, partial_die_info::read)
7868 (partial_die_info::read, read_checked_initial_length_and_offset)
7869 (dwarf2_string_attr, read_formatted_entries)
7870 (dwarf_decode_line_header)
7871 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7872 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7873 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7874 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7875 (get_signatured_type, get_DW_AT_signature_type)
7876 (decode_locdesc, file_file_name, consume_improper_spaces)
7877 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7878 (dwarf_decode_macro_bytes, dwarf_decode_macros)
7879 (dwarf2_symbol_mark_computed, set_die_type)
7880 (read_attribute_value): Update.
7881 * stap-probe.c (handle_stap_probe, get_stap_base_address):
7882 Update.
7883 * dbxread.c (unknown_symtype_complaint)
7884 (lbrac_mismatch_complaint, repeated_header_complaint)
7885 (set_namestring, function_outside_compilation_unit_complaint)
7886 (read_dbx_symtab, process_one_symbol): Update.
7887 * gdbtypes.c (stub_noname_complaint): Update.
7888 * windows-nat.c (handle_unload_dll): Update.
7889 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7890 (decode_base_type): Update.
7891 * xcoffread.c (bf_notfound_complaint, ef_complaint)
7892 (eb_complaint, record_include_begin, record_include_end)
7893 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7894 (process_xcoff_symbol, read_symbol)
7895 (function_outside_compilation_unit_complaint)
7896 (scan_xcoff_symtab): Update.
7897 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7898 * buildsym.c (finish_block_internal, make_blockvector)
7899 (end_symtab_get_static_block, augment_type_symtab): Update.
7900 * dtrace-probe.c (dtrace_process_dof)
7901 (dtrace_static_probe_ops::get_probes): Update.
7902 * complaints.h (struct complaint): Don't declare.
7903 (symfile_complaints): Remove.
7904 (complaint_internal): Remove "complaints" parameter.
7905 (complaint): Likewise.
7906 (clear_complaints): Likewise.
7907 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7908 (reread_symbols): Update.
7909 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7910 (dwarf2_frame_cache, decode_frame_entry): Update.
7911 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7912 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7913 (info_selectors_command): Update.
7914 * macrotab.c (macro_include, check_for_redefinition)
7915 (macro_undef): Update.
7916 * objfiles.c (filter_overlapping_sections): Update.
7917 * stabsread.c (invalid_cpp_abbrev_complaint)
7918 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7919 (define_symbol, error_type, read_type, rs6000_builtin_type)
7920 (stabs_method_name_from_physname, read_member_functions)
7921 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7922 (attach_fields_to_type, complain_about_struct_wipeout)
7923 (read_range_type, read_args, common_block_start)
7924 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7925 Update.
7926 * mdebugread.c (index_complaint, unknown_ext_complaint)
7927 (basic_type_complaint, bad_tag_guess_complaint)
7928 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7929 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7930 (parse_procedure, parse_lines)
7931 (function_outside_compilation_unit_complaint)
7932 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7933 (bad_tag_guess_complaint, reg_value_complaint): Update.
7934 * cp-support.c (demangled_name_complaint): Update.
7935 * macroscope.c (sal_macro_scope): Update.
7936 * dwarf-index-write.c (class debug_names): Update.
7937
7938 2018-05-23 Tom Tromey <tom@tromey.com>
7939
7940 * complaints.c (clear_complaints): Remove "noisy" parameter.
7941 * complaints.h (clear_complaints): Update.
7942 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7943 (reread_symbols): Update.
7944
7945 2018-05-23 Tom Tromey <tom@tromey.com>
7946
7947 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7948 SUBSEQUENT_MESSAGE.
7949 (vcomplaint, clear_complaints): Update.
7950 (symfile_explanations): Remove some messages.
7951
7952 2018-05-23 Tom Tromey <tom@tromey.com>
7953
7954 * complaints.c (internal_complaint): Remove.
7955 * complaints.h (internal_complaint): Remove.
7956
7957 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7958
7959 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7960
7961 2018-05-22 Pedro Alves <palves@redhat.com>
7962
7963 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7964 (remote_fileio_badfd, remote_fileio_return_errno)
7965 (remote_fileio_return_success, remote_fileio_func_open)
7966 (remote_fileio_func_open, remote_fileio_func_close)
7967 (remote_fileio_func_read, remote_fileio_func_write)
7968 (remote_fileio_func_lseek, remote_fileio_func_rename)
7969 (remote_fileio_func_unlink, remote_fileio_func_stat)
7970 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7971 (remote_fileio_func_isatty, remote_fileio_func_system): Add
7972 remote_target parameter.
7973 (remote_fio_func_map) <func>: Add remote_target parameter.
7974 (do_remote_fileio_request, remote_fileio_request):
7975 * remote-fileio.h (remote_fileio_request):
7976 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7977 remote_target parameter.
7978 (remote_notif_process, handle_notification): Adjust to pass down
7979 the remote.
7980 (remote_notif_state_allocate): Add remote_target parameter. Save
7981 it.
7982 * remote-notif.h (struct remote_target): Forward declare.
7983 (struct notif_client) <parse, ack, can_get_pending_events>: Add
7984 remote_target parameter.
7985 (struct remote_notif_state) <remote>: New field.
7986 (remote_notif_ack, remote_notif_parse): Add remote_target
7987 parameter.
7988 (remote_notif_state_allocate, remote_notif_state_allocate): Add
7989 remote_target parameter.
7990 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7991 (threads_listing_context, rmt_thread_action, protocol_feature)
7992 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7993 (packet_result, struct threads_listing_context, remote_state):
7994 Move definitions and declarations higher up.
7995 (remote_target) <~remote_target>: Declare.
7996 (remote_download_command_source, remote_file_put, remote_file_get)
7997 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7998 (remote_hostio_pread_vFile, remote_hostio_send_command)
7999 (remote_hostio_set_filesystem, remote_hostio_open)
8000 (remote_hostio_close, remote_hostio_unlink, remote_state)
8001 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8002 (get_memory_write_packet_size, get_memory_read_packet_size)
8003 (append_pending_thread_resumptions, remote_detach_1)
8004 (append_resumption, remote_resume_with_vcont)
8005 (add_current_inferior_and_thread, wait_ns, wait_as)
8006 (process_stop_reply, remote_notice_new_inferior)
8007 (process_initial_stop_replies, remote_add_thread)
8008 (btrace_sync_conf, remote_btrace_maybe_reopen)
8009 (remove_new_fork_children, kill_new_fork_children)
8010 (discard_pending_stop_replies, stop_reply_queue_length)
8011 (check_pending_events_prevent_wildcard_vcont)
8012 (discard_pending_stop_replies_in_queue, stop_reply)
8013 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8014 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8015 (remote_interrupt_as, remote_interrupt_ns)
8016 (remote_get_noisy_reply, remote_query_attached)
8017 (remote_add_inferior, remote_current_thread, get_current_thread)
8018 (set_thread, set_general_thread, set_continue_thread)
8019 (set_general_process, write_ptid)
8020 (remote_unpack_thread_info_response, remote_get_threadinfo)
8021 (parse_threadlist_response, remote_get_threadlist)
8022 (remote_threadlist_iterator, remote_get_threads_with_ql)
8023 (remote_get_threads_with_qxfer)
8024 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8025 (get_offsets, remote_check_symbols, remote_supported_packet)
8026 (remote_query_supported, remote_packet_size)
8027 (remote_serial_quit_handler, remote_detach_pid)
8028 (remote_vcont_probe, remote_resume_with_hc)
8029 (send_interrupt_sequence, interrupt_query)
8030 (remote_notif_get_pending_events, fetch_register_using_p)
8031 (send_g_packet, process_g_packet, fetch_registers_using_g)
8032 (store_register_using_P, store_registers_using_G)
8033 (set_remote_traceframe, check_binary_download)
8034 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8035 (remote_xfer_live_readonly_partial, remote_read_bytes)
8036 (remote_send_printf, remote_flash_write, readchar)
8037 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8038 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8039 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8040 (extended_remote_disable_randomization, extended_remote_run)
8041 (send_environment_packet, extended_remote_environment_support)
8042 (extended_remote_set_inferior_cwd, remote_write_qxfer)
8043 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8044 (packet_command): Now methods of ...
8045 (remote_target): ... this class.
8046 (m_remote_state) <remote_target>: New field.
8047 (struct remote_state) <stop_reply_queue,
8048 remote_async_inferior_event_token, wait_forever_enabled_p>: New
8049 fields.
8050 (remote_state::remote_state): Allocate stop_reply_queue.
8051 (remote_state): Delete global.
8052 (get_remote_state_raw): Delete.
8053 (remote_target::get_remote_state): Allocate m_remote_state on
8054 demand.
8055 (get_current_remote_target): New.
8056 (remote_ops, extended_remote_ops): Delete.
8057 (wait_forever_enabled_p, remote_async_inferior_event_token):
8058 Delete, moved to struct remote_state.
8059 (remote_target::close): Delete self. Destruction bits split to
8060 ...
8061 (remote_target::~remote_target): ... this.
8062 (show_memory_packet_size): Adjust to use
8063 get_current_remote_target.
8064 (struct protocol_feature) <func>: Add remote_target parameter.
8065 All callers adjusted.
8066 (curr_quit_handler_target): New.
8067 (remote_serial_quit_handler): Reimplement.
8068 (remote_target::open_1): Adjust to use get_current_remote_target.
8069 Heap-allocate remote_target/extended_remote_target instances.
8070 (vcont_builder::vcont_builder): Add remote_target parameter, and
8071 save it in m_remote. All callers adjusted.
8072 (vcont_builder::m_remote): New field.
8073 (vcont_builder::restart, vcont_builder::flush)
8074 (vcont_builder::push_action): Use it.
8075 (remote_target::commit_resume): Use it.
8076 (struct queue_iter_param) <remote>: New field.
8077 (remote_target::remove_new_fork_children): Fill in 'remote' field.
8078 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8079 (check_pending_event_prevents_wildcard_vcont_callback)
8080 (remote_target::check_pending_events_prevent_wildcard_vcont)
8081 (remote_target::discard_pending_stop_replies)
8082 (remote_target::discard_pending_stop_replies_in_queue)
8083 (remote_target::remote_notif_remove_queued_reply): Fill in
8084 'remote' field.
8085 (remote_notif_get_pending_events): New.
8086 (remote_target::readchar, remote_target::remote_serial_write):
8087 Save/restore curr_quit_handler_target.
8088 (putpkt): New.
8089 (kill_new_fork_children): Fill in 'remote' field.
8090 (packet_command): Use get_current_remote_target, defer to
8091 remote_target method of same name.
8092 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8093 parameter, and save it in m_remote. All callers adjusted.
8094 (scoped_remote_fd::release): Use m_remote.
8095 (scoped_remote_fd::m_remote): New field.
8096 (remote_file_put, remote_file_get, remote_file_delete): Use
8097 get_current_remote_target, defer to remote_target method of same
8098 name.
8099 (remote_btrace_reset): Add remote_state paremeter. Update all
8100 callers.
8101 (remote_async_inferior_event_handler). Pass down 'data'.
8102 (remote_new_objfile): Use get_current_remote_target.
8103 (remote_target::vcont_r_supported): New.
8104 (set_range_stepping): Use get_current_remote_target and
8105 remote_target::vcont_r_supported.
8106 (_initialize_remote): Don't allocate 'remote_state' and
8107 'stop_reply_queue' globals.
8108 * remote.h (struct remote_target): Forward declare.
8109 (getpkt, putpkt, remote_notif_get_pending_events): Add
8110 'remote_target' parameter.
8111
8112 2018-05-22 Pedro Alves <palves@redhat.com>
8113
8114 * remote.c (vcont_builder): Now a class. Make all data members
8115 private.
8116 (vcont_builder) <vcont_builder, restart, flush, push_action>:
8117 Declare methods.
8118 (vcont_builder_restart): Rename to ...
8119 (vcont_builder::restart): ... this.
8120 (vcont_builder_flush): Rename to ...
8121 (vcont_builder::flush): ... this.
8122 (vcont_builder_push_action): Rename to ...
8123 (vcont_builder::push_action): ... this.
8124 (remote_target::commit_resume): Adjust.
8125
8126 2018-05-22 Pedro Alves <palves@redhat.com>
8127
8128 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8129 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8130 (get_fixed_memory_packet_size): New.
8131 (get_memory_packet_size): Use it.
8132 (set_memory_packet_size): Don't override the config size with
8133 DEFAULT_MAX_MEMORY_PACKET_SIZE.
8134 (show_memory_packet_size): Use get_fixed_memory_packet_size.
8135 Don't refer to get_memory_packet_size if not connected to a remote
8136 target. Show "(default)" if configured size is 0.
8137
8138 2018-05-22 Pedro Alves <palves@redhat.com>
8139
8140 * remote.c (remote_target::mourn_inferior): Move
8141 discard_pending_stop_replies call here from ...
8142 (_initialize_remote): ... here.
8143
8144 2018-05-22 Pedro Alves <palves@redhat.com>
8145
8146 * remote.c (compare_section_command): Remove set_general_process
8147 call.
8148
8149 2018-05-22 Pedro Alves <palves@redhat.com>
8150
8151 * remote.c (struct packet_reg, struct remote_arch_state):
8152 Move higher up in the file.
8153 (remote_state) <m_arch_states>: Store remote_arch_state values
8154 instead of remote_arch_state pointers.
8155 (remote_state::get_remote_arch_state): Adjust.
8156
8157 2018-05-22 Pedro Alves <palves@redhat.com>
8158
8159 * remote.c: Include <unordered_map>.
8160 (remote_state): Now a class.
8161 (remote_state) <get_remote_arch_state>: Declare method.
8162 <get_remote_arch_state>: New field.
8163 (remote_arch_state) <remote_arch_state>: Declare ctor.
8164 <regs>: Now a unique_ptr.
8165 (remote_gdbarch_data_handle): Delete.
8166 (get_remote_arch_state): Delete.
8167 (remote_state::get_remote_arch_state): New.
8168 (get_remote_state): Adjust to call remote_state's
8169 get_remote_arch_state method.
8170 (init_remote_state): Delete, bits factored out to ...
8171 (remote_arch_state::remote_arch_state): ... this new method.
8172 (get_remote_packet_size, get_memory_packet_size)
8173 (process_g_packet, remote_target::fetch_registers)
8174 (remote_target::prepare_to_store, store_registers_using_G)
8175 (remote_target::store_registers, remote_target::get_trace_status):
8176 Adjust to call remote_state's method.
8177 (_initialize_remote): Remove reference to
8178 remote_gdbarch_data_handle.
8179
8180 2018-05-22 Pedro Alves <palves@redhat.com>
8181
8182 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8183 pread>: New method declarations.
8184 (remote_target::open_1): Adjust.
8185 (readahead_cache_invalidate): Rename to ...
8186 (readahead_cache::invalidate): ... this, and adjust to be a class
8187 method.
8188 (readahead_cache_invalidate_fd): Rename to ...
8189 (readahead_cache::invalidate_fd): ... this, and adjust to be a
8190 class method.
8191 (remote_hostio_pwrite): Adjust.
8192 (remote_hostio_pread_from_cache): Rename to ...
8193 (readahead_cache::pread): ... this, and adjust to be a class
8194 method.
8195 (remote_hostio_close): Adjust.
8196
8197 2018-05-22 Pedro Alves <palves@redhat.com>
8198
8199 * remote.c (remote_hostio_close_cleanup): Delete.
8200 (class scoped_remote_fd): New.
8201 (remote_file_put, remote_file_get): Use it.
8202
8203 2018-05-22 Pedro Alves <palves@redhat.com>
8204
8205 (struct vCont_action_support): Use bool and initialize all fields.
8206 (struct readahead_cache): Initialize all fields.
8207 (remote_state): Use bool and initialize all fields.
8208 (remote_state::remote_state, remote_state::~remote_state): New.
8209 (new_remote_state): Delete.
8210 (_initialize_remote): Use new to allocate remote_state.
8211
8212 2018-05-22 Pedro Alves <palves@redhat.com>
8213 張俊芝 <zjz@zjz.name>
8214
8215 PR gdb/22973
8216 * c-exp.y: Include "c-support.h".
8217 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8218 of tolower. Use c_ident_is_alpha to scan names.
8219 * c-lang.c: Include "c-support.h".
8220 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8221 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8222 * c-support.h: New file, with bits factored out from ...
8223 * cp-name-parser.y: ... this file.
8224 Include "c-support.h".
8225 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8226 c-support.h and renamed.
8227 (symbol_end, yylex): Adjust.
8228
8229 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8230
8231 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8232 parameter type to CORE_ADDR.
8233 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8234 parameter type in declaration to CORE_ADDR.
8235 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8236 target_auxv_search to get AT_HWCAP and use the result to get the
8237 target description.
8238 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8239 to CORE_ADDR. Remove the cast of the return value to unsigned
8240 long. Fix error predicate of target_auxv_search.
8241 (ppc_linux_nat_target::read_description): Change the type of the
8242 hwcap variable to CORE_ADDR.
8243
8244 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8245
8246 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8247 if the size of fpscr is larger than 32 bits.
8248
8249 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8250
8251 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8252 (ppc32_linux_vsxregmap): New global.
8253 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8254 regcache_supply_regset, and regcache_collect_regset.
8255 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8256 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8257 (fetch_vsx_register, store_vsx_register): Remove.
8258 (fetch_vsx_registers): Add regno parameter. Get regset using
8259 ppc_linux_vsxregset. Use regset to supply registers.
8260 (store_vsx_registers): Add regno parameter. Get regset using
8261 ppc_linux_vsxregset. Use regset to collect registers.
8262 (fetch_register): Call fetch_vsx_registers instead of
8263 fetch_vsx_register.
8264 (store_register): Call store_vsx_registers instead of
8265 store_vsx_register.
8266 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8267 new regno parameter.
8268 (store_ppc_registers): Call store_vsx_registers with -1 for the
8269 new regno parameter.
8270 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8271 (ppc_collect_vsxregset): Remove.
8272
8273 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8274
8275 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8276 offset fields.
8277 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8278 for vector register offset fields.
8279 (ppc64_fbsd_reg_offsets): Likewise.
8280 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8281 to vector register offset fields.
8282 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8283 to vector register offset fields.
8284 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8285 vector register offset fields.
8286 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8287 initializers for vector register offset fields.
8288 (rs6000_aix64_reg_offsets): Likewise.
8289 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8290 (ppc_supply_vrregset): Remove.
8291 (ppc_collect_vrregset): Remove.
8292 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8293 (ppc_linux_vrregset) : New function.
8294 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8295 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8296 (ppc32_linux_vrregset): Remove.
8297 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8298 and use result instead of ppc32_linux_vrregset.
8299 (ppc32_linux_reg_offsets): Remove initializers for vector register
8300 offset fields.
8301 (ppc64_linux_reg_offsets): Likewise.
8302 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8303 * ppc-linux-nat.c: Include regset.h.
8304 (gdb_vrregset_t): Adjust comment to account for little-endian
8305 mode.
8306 (supply_vrregset, fill_vrregset): Remove.
8307 (fetch_altivec_register, store_altivec_register): Remove.
8308 (fetch_altivec_registers): Add regno parameter. Get regset using
8309 ppc_linux_vrregset. Use regset to supply registers.
8310 (store_altivec_registers): Add regno parameter. Get regset using
8311 ppc_linux_vrregset. Use regset to collect registers.
8312 (fetch_register): Call fetch_altivec_registers instead of
8313 fetch_altivec_register.
8314 (store_register): Call store_altivec_registers instead of
8315 store_altivec_register.
8316 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8317 the new regno parameter.
8318 (store_ppc_registers): Call store_altivec_registers with -1 for
8319 the new regno parameter.
8320
8321 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8322
8323 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8324 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8325 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8326 (gdb_vrregset_t): Change array type size to
8327 PPC_LINUX_SIZEOF_VRREGSET.
8328 (gdb_vsxregset_t): Change array type size to
8329 PPC_LINUX_SIZEOF_VSXREGSET.
8330 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8331 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8332 PPC_LINUX_SIZEOF_VSXREGSET.
8333
8334 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8335
8336 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8337 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8338 nat/ppc-linux.c.
8339 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8340 ppc_linux_target_wordsize with tid.
8341 (ppc_linux_nat_target::read_description): Call ppc_linux_target
8342 wordsize with tid.
8343 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8344 (ppc64_64bit_inferior_p): Add static and inline specifiers.
8345 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8346 tid parameter. Remove static specifier.
8347 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8348 (ppc_linux_target_wordsize): New declaration.
8349
8350 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8351
8352 * arch/ppc-linux-common.c: New file.
8353 * arch/ppc-linux-common.h: New file.
8354 * arch/ppc-linux-tdesc.h: New file.
8355 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8356 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8357 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8358 arch/ppc-linux-tdesc.h.
8359 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8360 arch/ppc-linux-tdesc.h.
8361 (ppc_linux_nat_target::read_description): Remove target
8362 description matching code. Fill a ppc_linux_features struct and
8363 call ppc_linux_match_description with it. Move comment about ISA
8364 2.05 to ppc-linux-common.c.
8365 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8366 arch/ppc-linux-tdesc.h.
8367 (ppc_linux_core_read_description): Remove target description
8368 matching code. Fill a ppc_linux_features struct and call
8369 ppc_linux_match_description with it.
8370 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8371 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8372 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8373 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8374 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8375 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8376 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8377 (tdesc_powerpc_e500l): Remove.
8378
8379 2018-05-22 Joel Brobecker <brobecker@adacore.com>
8380
8381 * ada-lang.c (catch_assert_command): Pass empty string instead
8382 of NULL for excep_string argument.
8383
8384 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8385
8386 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8387 the width of the requested register exceeds the width of the
8388 `ptrace' data type.
8389
8390 2018-05-21 Tom Tromey <tom@tromey.com>
8391
8392 * printcmd.c (output_command): Remove.
8393 (output_command_const): Rename to output_command.
8394 * valprint.h (output_command): Rename from output_command_const.
8395 * tracepoint.c (trace_dump_actions): Call output_command.
8396
8397 2018-05-21 Tom Tromey <tom@tromey.com>
8398
8399 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8400 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8401 * ada-lang.h (create_ada_exception_catchpoint): Update.
8402 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8403 std::string.
8404 (create_excep_cond_exprs, ~ada_catchpoint)
8405 (should_stop_exception, print_one_exception)
8406 (print_mention_exception, print_recreate_exception): Update.
8407 (ada_get_next_arg): Remove.
8408 (catch_ada_exception_command_split): Use std::string. Change type
8409 of "excep_string", "cond_string".
8410 (catch_ada_exception_command): Update.
8411 (create_ada_exception_catchpoint): Change type of excep_string.
8412 (ada_exception_sal): Remove excep_string parameter.
8413 (~ada_catchpoint): Remove.
8414
8415 2018-05-21 Tom Tromey <tom@tromey.com>
8416
8417 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8418 cleanup.
8419
8420 2018-05-21 Tom Tromey <tom@tromey.com>
8421
8422 * ada-lang.c (ada_exception_message_1, ada_exception_message):
8423 Return unique_xmalloc_ptr.
8424 (print_it_exception): Update.
8425
8426 2018-05-21 Tom Tromey <tom@tromey.com>
8427
8428 * tracepoint.c (trace_dump_actions): Use std::string.
8429
8430 2018-05-21 Tom Tromey <tom@tromey.com>
8431
8432 * symfile.c (reread_symbols): Use std::string for original_name.
8433
8434 2018-05-21 Tom Tromey <tom@tromey.com>
8435
8436 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8437 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
8438 constructor.
8439
8440 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
8441
8442 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8443 instance to...
8444 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8445 * objfiles.c (get_objfile_bfd_data): Allocate
8446 objfile_per_bfd_storage with obstack_new when allocating on
8447 obstack.
8448
8449 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8450
8451 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8452 OBSTACK_ZALLOC.
8453 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8454 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8455 * mdebugread.c (mdebug_build_psymtabs): Likewise.
8456 (add_pending): Likewise.
8457 (parse_symbol): Likewise.
8458 (parse_partial_symbols): Likewise.
8459 (psymtab_to_symtab_1): Likewise.
8460 (new_psymtab): Likewise.
8461 (elfmdebug_build_psymtabs): Likewise.
8462 * minsyms.c (terminate_minimal_symbol_table): Likewise.
8463 * objfiles.c (get_objfile_bfd_data): Likewise.
8464 (objfile_register_static_link): Likewise.
8465 * psymtab.c (allocate_psymtab): Likewise.
8466 * stabsread.c (read_member_functions): Likewise.
8467 * xcoffread.c (xcoff_end_psymtab): Likewise.
8468
8469 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8470
8471 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8472 compiler supports std::is_trivially_constructible.
8473 * common/poison.h: Include obstack.h.
8474 (IsMallocable): Define to is_trivially_constructible if the
8475 compiler supports it, define to true_type otherwise.
8476 (xobnew): New.
8477 (XOBNEW): Redefine.
8478 (xobnewvec): New.
8479 (XOBNEWVEC): Redefine.
8480 * gdb_obstack.h (obstack_zalloc): New.
8481 (OBSTACK_ZALLOC): Redefine.
8482 (obstack_calloc): New.
8483 (OBSTACK_CALLOC): Redefine.
8484 (obstack_new): New.
8485 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8486 (gdbarch_obstack): New declaration in gdbarch.h, definition in
8487 gdbarch.c.
8488 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8489 obstack_calloc/obstack_zalloc.
8490 (gdbarch_obstack_zalloc): Remove.
8491 * target-descriptions.c (tdesc_data_init): Use obstack_new.
8492
8493 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8494
8495 * stack.c (backtrace_command_1): Remove useless variable int i.
8496
8497 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8498
8499 * stack.c (print_frame_info): Fix comment.
8500
8501 2018-05-18 Tom Tromey <tom@tromey.com>
8502
8503 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8504 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8505 (~dwarf2_per_objfile): Update
8506 (dwarf2_get_dwz_file): Use new.
8507 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8508 unique_ptr.
8509
8510 2018-05-18 Tom Tromey <tom@tromey.com>
8511
8512 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8513 unique_ptr.
8514 * dwarf2read.c (struct dwp_file): Add constructor and
8515 initializers.
8516 (open_and_init_dwp_file): Return a unique_ptr.
8517 (dwarf2_per_objfile, create_dwp_hash_table)
8518 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8519 (lookup_dwo_unit_in_dwp): Update.
8520 (open_and_init_dwp_file, get_dwp_file): Update.
8521
8522 2018-05-18 Tom Tromey <tom@tromey.com>
8523
8524 * dwarf2read.c (dwarf2_per_objfile): Update.
8525 (struct mapped_index): Add initializers.
8526 (dwarf2_read_index): Use new.
8527 (dw2_symtab_iter_init): Update.
8528 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8529 unique_ptr.
8530
8531 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8532
8533 * dwarf2read.c (mapped_index) <total_size>: Remove.
8534
8535 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8536
8537 * unittests/format_pieces-selftests.c (test_format_specifier):
8538 Add ARI comments.
8539
8540 2018-05-18 Tom Tromey <tom@tromey.com>
8541
8542 * c-typeprint.c (maybe_print_hole): New function.
8543 (c_print_type_struct_field_offset): Update.
8544 (c_type_print_base_struct_union): Call maybe_print_hole.
8545
8546 2018-05-17 Keith Seitz <keiths@redhat.com>
8547
8548 * breakpoint.c (build_bpstat_chain): New function, moved from
8549 bpstat_stop_status.
8550 (bpstat_stop_status): Add optional parameter, `stop_chain'.
8551 If no stop chain is passed, call build_bpstat_chain to build it.
8552 * breakpoint.h (build_bpstat_chain): Declare.
8553 (bpstat_stop_status): Move documentation here from breakpoint.c.
8554 * infrun.c (handle_signal_stop): Before eliding inlined frames,
8555 build the stop chain and pass it to skip_inline_frames.
8556 Pass this stop chain to bpstat_stop_status.
8557 * inline-frame.c: Include breakpoint.h.
8558 (stopped_by_user_bp_inline_frame): New function.
8559 (skip_inline_frames): Add parameter `stop_chain'.
8560 Move documention to inline-frame.h.
8561 If non-NULL, use stopped_by_user_bp_inline_frame to determine
8562 whether the frame should be elided.
8563 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8564 Add moved documentation and update for new parameter.
8565
8566 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8567
8568 PR cli/14975
8569 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8570 unittests/format_pieces-selftests.c.
8571 * common/format.h (format_piece) <operator==>: New.
8572 (format_pieces) <operator[]>: Remove.
8573 * common/format.c (format_pieces::format_pieces): Handle \e.
8574 * unittests/format_pieces-selftests.c: New.
8575
8576 2018-05-17 Tom Tromey <tom@tromey.com>
8577
8578 PR symtab/23010:
8579 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8580 (dw2_instantiate_symtab): Add skip_partial parameter.
8581 (dw2_find_last_source_symtab, dw2_map_expand_apply)
8582 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8583 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8584 (dw2_expand_symtabs_matching_one)
8585 (dw2_find_pc_sect_compunit_symtab)
8586 (dw2_debug_names_lookup_symbol)
8587 (dw2_debug_names_expand_symtabs_for_function): Update.
8588 (init_cutu_and_read_dies): Add skip_partial parameter.
8589 (process_psymtab_comp_unit, build_type_psymtabs_1)
8590 (process_skeletonless_type_unit, load_partial_comp_unit)
8591 (psymtab_to_symtab_1): Update.
8592 (load_full_comp_unit): Add skip_partial parameter.
8593 (process_imported_unit_die, dwarf2_read_addr_index)
8594 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8595 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8596 (read_signatured_type): Update.
8597
8598 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8599
8600 * value.c (release_value): Remove unused variable.
8601 (record_latest_value): Likewise.
8602 (access_value_history): Likewise.
8603 (preserve_values): Likewise.
8604
8605 2018-05-17 Tom Tromey <tom@tromey.com>
8606
8607 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8608 Initialize.
8609
8610 2018-05-16 Maciej W. Rozycki <macro@mips.com>
8611
8612 PR gdb/22286
8613 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8614 Also handle registers whose width is not a multiple of
8615 PTRACE_TYPE_RET.
8616 (linux_nat_trad_target::store_register): Likewise.
8617
8618 2018-05-16 Tom Tromey <tom@tromey.com>
8619
8620 * gdbcore.h (core_bfd): Redefine.
8621 * corelow.c (core_target::close): Update.
8622 (core_target_open): Update.
8623 * progspace.h (struct program_space) <cbfd>: Now a
8624 gdb_bfd_ref_ptr.
8625
8626 2018-05-16 Tom Tromey <tom@tromey.com>
8627
8628 PR cli/19551:
8629 * symfile-add-flags.h (enum symfile_add_flags)
8630 <SYMFILE_NOT_FILENAME>: New constant.
8631 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
8632 objfile name from BFD.
8633 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8634 * minidebug.c (find_separate_debug_file_in_section): Put
8635 ".gnu_debugdata" into BFD's file name.
8636
8637 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
8638
8639 * regcache.c (regcache_read_ftype, regcache_write_ftype):
8640 Remove.
8641
8642 2018-05-15 Tamar Christina <tamar.christina@arm.com>
8643
8644 PR binutils/21446
8645 * aarch64-tdep.c (aarch64_analyze_prologue,
8646 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8647 Indicate not interested in errors.
8648
8649 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8650
8651 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8652 Supply the MIPS_ZERO_REGNUM register.
8653
8654 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8655
8656 * mips-tdep.c (mask_address_var): Make variable static.
8657
8658 2018-05-14 Tom Tromey <tom@tromey.com>
8659
8660 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8661
8662 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
8663
8664 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8665 FXSAVE_ADDR for the mxcsr register.
8666
8667 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
8668
8669 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8670
8671 2018-05-11 Pedro Alves <palves@redhat.com>
8672
8673 * corelow.c (core_target) <core_target>: No longer inline.
8674 Initialize m_core_gdbarch, m_core_vec and build the section table
8675 here.
8676 <~core_target>: New.
8677 <core_gdbarch, get_core_register_section>: New methods.
8678 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8679 factored out from ...
8680 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8681 (core_ops): Delete.
8682 (sniff_core_bfd): Add gdbarch parameter.
8683 (core_close): Delete, merged into ...
8684 (core_target::close): ... here. Delete self.
8685 (core_close_cleanup): Delete.
8686 (core_target_open): Allocate a core_target on the heap. Use a
8687 unique_ptr instead of a cleanup. Bits moved into the core_target
8688 ctor. Adjust to use core_target methods instead of globals.
8689 (get_core_register_section): Rename to ...
8690 (core_target::get_core_register_section): ... this and adjust.
8691 (struct get_core_registers_cb_data): New.
8692 (get_core_registers_cb): Use it. Use bool.
8693 (core_target::fetch_registers, core_target::files_info)
8694 (core_target::xfer_partial, core_target::read_description)
8695 (core_target::pid_to, core_target::thread_name): Adjust to
8696 reference class fields instead of globals.
8697 * target.h (struct target_ops_deleter, target_ops_up): New.
8698
8699 2018-05-11 Pedro Alves <palves@redhat.com>
8700
8701 * corefile.c (core_file_command): Move to corelow.c.
8702 * corelow.c (the_core_target): Delete.
8703 (core_file_command): Moved from corefile.c. Check exec_bfd
8704 instead of the_core_target. Use target_detach instead of calling
8705 into the_core_target directly.
8706 (maybe_say_no_core_file_now): New.
8707 (core_target::detach): Use it.
8708 (_initialize_corelow): Remove references to the_core_target.
8709 * gdbcore.h (the_core_target): Delete.
8710
8711 2018-05-11 Tom Tromey <tromey@redhat.com>
8712 Pedro Alves <palves@redhat.com>
8713
8714 * corefile.c (core_bfd): Remove.
8715 * gdbcore.h (core_bfd): Now a macro.
8716 * progspace.h (struct program_space) <cbfd>: New field.
8717
8718 2018-05-11 Tom Tromey <tom@tromey.com>
8719
8720 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8721 gdb::def_vector.
8722
8723 2018-05-10 Tom Tromey <tom@tromey.com>
8724
8725 * configure: Rebuild.
8726 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8727
8728 2018-05-10 Joel Brobecker <brobecker@adacore.com>
8729
8730 PR server/23158:
8731 * regformats/regdat.sh: Adjust script, following the addition
8732 of the new expedite_regs parameter to init_target_desc.
8733
8734 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
8735
8736 PR gdb/23127
8737 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8738 set_gdbarch_significant_addr_bit.
8739 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8740 set_gdbarch_significant_addr_bit.
8741 * utils.c (address_significant): Update to sign extend addr.
8742
8743 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
8744
8745 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8746 (xtensa_linux_init_abi): Limit tdep->num_regs by
8747 tdep->num_nopriv_regs.
8748 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8749 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8750 not initialized.
8751
8752 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
8753
8754 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8755
8756 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
8757
8758 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8759 (I387_MXCSR_INIT_VAL): New constant.
8760 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8761 buffer if it was supplied by the inferior.
8762 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8763 (i387_xsave_get_clear_bv): New function.
8764 (i387_supply_xsave): Only read x87 control registers from the
8765 xsave buffer if the feature is enabled, and the state will have
8766 been written, otherwise, provide a suitable default.
8767 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8768 including x87 control registers. Update control registers if they
8769 have changed from the default value, and mark features as enabled
8770 as required.
8771 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8772
8773 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8774
8775 * spu-tdep.c (info_spu_event_command): Fix output formatting.
8776
8777 2018-05-07 Tom Tromey <tom@tromey.com>
8778
8779 * configure: Rebuild.
8780 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8781
8782 2018-05-07 Tom Tromey <tom@tromey.com>
8783
8784 PR tdep/20362:
8785 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8786 bit. Use correct value for VDIV.
8787
8788 2018-05-04 Tom Tromey <tom@tromey.com>
8789
8790 * configure: Rebuild.
8791 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8792
8793 2018-05-04 Tom Tromey <tom@tromey.com>
8794
8795 * linux-record.c (record_linux_system_call) <case
8796 RECORD_SYS_RECVFROM>: Add "break".
8797
8798 2018-05-04 Tom Tromey <tom@tromey.com>
8799
8800 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8801 Add missing "break".
8802 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8803 Add missing "break".
8804
8805 2018-05-04 Tom Tromey <tom@tromey.com>
8806
8807 * rs6000-tdep.c (ppc_process_record_op4)
8808 (ppc_process_record_op63): Add fall-through comment.
8809
8810 2018-05-04 Tom Tromey <tom@tromey.com>
8811
8812 * i386-tdep.c (i386_process_record): Add fall-through comment.
8813
8814 2018-05-04 Tom Tromey <tom@tromey.com>
8815
8816 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8817 comment.
8818
8819 2018-05-04 Tom Tromey <tom@tromey.com>
8820
8821 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8822 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8823 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8824 comment.
8825 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8826 comment.
8827 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8828 comment.
8829
8830 2018-05-04 Tom Tromey <tom@tromey.com>
8831
8832 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8833
8834 2018-05-04 Tom Tromey <tom@tromey.com>
8835
8836 * s390-tdep.c (s390_process_record): Fix fall-through comments.
8837 * xcoffread.c (scan_xcoff_symtab): Move comment later.
8838 * symfile.c (section_is_mapped): Fix fall-through comment.
8839 * stabsread.c (define_symbol, read_member_functions): Fix
8840 fall-through comment.
8841 * s390-linux-tdep.c (s390_process_record): Fix fall-through
8842 comment.
8843 * remote.c (remote_wait_as): Fix fall-through comment.
8844 * p-exp.y (yylex): Fix fall-through comment.
8845 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8846 comment.
8847 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8848 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8849 * jv-exp.y (yylex): Fix fall-through comment.
8850 * go-exp.y (lex_one_token): Fix fall-through comment.
8851 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8852 fall-through comment.
8853 * f-exp.y (yylex): Fix fall-through comment.
8854 * dwarf2read.c (process_die): Fix fall-through comments.
8855 * dbxread.c (process_one_symbol): Fix fall-through comment.
8856 * d-exp.y (lex_one_token): Fix fall-through comment.
8857 * cp-name-parser.y (yylex): Fix fall-through comment.
8858 * coffread.c (coff_symtab_read): Fix fall-through comment.
8859 * c-exp.y (lex_one_token): Fix fall-through comment.
8860 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8861 comment.
8862 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8863 comment.
8864
8865 2018-05-04 Tom Tromey <tom@tromey.com>
8866
8867 PR python/22730:
8868 * NEWS: Mention gdb.execute change.
8869 * gdbcmd.h (execute_control_command): Don't declare.
8870 * python/python.c (execute_gdb_command): Use read_command_lines_1,
8871 execute_control_commands, execute_control_commands_to_string.
8872 * cli/cli-script.h (execute_control_commands)
8873 (execute_control_commands_to_string): Declare.
8874 (execute_control_command): Add from_tty parameter.
8875 * cli/cli-script.c (execute_control_commands)
8876 (execute_control_commands_to_string): New functions.
8877 (execute_user_command): Use execute_control_commands.
8878 (execute_control_command_1): Add "from_tty" parameter. Update.
8879 (execute_control_command): Likewise.
8880
8881 2018-05-04 Tom Tromey <tom@tromey.com>
8882
8883 PR python/22731:
8884 * NEWS: Mention that breakpoint commands are writable.
8885 * python/py-breakpoint.c (bppy_set_commands): New function.
8886 (breakpoint_object_getset) <"commands">: Use it.
8887
8888 2018-05-04 Tom Tromey <tom@tromey.com>
8889
8890 * tracepoint.c (actions_command): Update.
8891 * mi/mi-cmd-break.c (mi_command_line_array)
8892 (mi_command_line_array_cnt, mi_command_line_array_ptr)
8893 (mi_read_next_line): Remove.
8894 (mi_cmd_break_commands): Update.
8895 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8896 function_view.
8897 * cli/cli-script.c (get_command_line): Update.
8898 (process_next_line): Use function_view. Constify.
8899 (recurse_read_control_structure, read_command_lines)
8900 (read_command_lines_1): Change argument types to function_view.
8901 (do_define_command, document_command): Update.
8902 * breakpoint.h (check_tracepoint_command): Don't declare.
8903 * breakpoint.c (check_tracepoint_command): Remove.
8904 (commands_command_1, create_tracepoint_from_upload): Update.
8905
8906 2018-05-04 Tom Tromey <tom@tromey.com>
8907
8908 PR gdb/11750:
8909 * cli/cli-script.h (enum command_control_type) <define_control>:
8910 New constant.
8911 * cli/cli-script.c (multi_line_command_p): Handle define_control.
8912 (build_command_line, execute_control_command_1)
8913 (process_next_line): Likewise.
8914 (do_define_command): New function, extracted from define_command.
8915 (define_command): Use it.
8916
8917 2018-05-04 Tom Tromey <tom@tromey.com>
8918
8919 * tracepoint.c (actions_command): Update.
8920 * cli/cli-script.h (read_command_lines): Update.
8921 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8922 (MAX_TMPBUF): Remove define.
8923 (define_command): Use string_printf.
8924 (document_command): Likewise.
8925 * breakpoint.c (commands_command_1): Update.
8926
8927 2018-05-04 Tom Tromey <tom@tromey.com>
8928
8929 * top.c (execute_command): Update.
8930 * cli/cli-script.h (print_command_lines): Now varargs.
8931 * cli/cli-script.c (print_command_lines): Now varargs.
8932 (execute_control_command_1) <case while_control, case if_control>:
8933 Update.
8934
8935 2018-05-04 Tom Tromey <tom@tromey.com>
8936
8937 * tracepoint.c (all_tracepoint_actions): Rename from
8938 all_tracepoint_actions_and_cleanup. Change return type.
8939 (actions_command, encode_actions_1, encode_actions)
8940 (trace_dump_actions, tdump_command): Update.
8941 * remote.c (remote_download_command_source): Update.
8942 * python/python.c (gdbpy_eval_from_control_command)
8943 (python_command, python_interactive_command): Update.
8944 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8945 * guile/guile.c (guile_command)
8946 (gdbscm_eval_from_control_command, guile_command): Update.
8947 * compile/compile.c (compile_code_command)
8948 (compile_print_command, compile_to_object): Update.
8949 * cli/cli-script.h (struct command_lines_deleter): New.
8950 (counted_command_line): New typedef.
8951 (struct command_line): Add constructor, destructor.
8952 <body_list>: Remove.
8953 <body_list_0, body_list_1>: New members.
8954 (command_line_up): Remove typedef.
8955 (read_command_lines, read_command_lines_1, get_command_line):
8956 Update.
8957 (copy_command_lines): Don't declare.
8958 * cli/cli-script.c (build_command_line): Use "new".
8959 (get_command_line): Return counted_command_line.
8960 (print_command_lines, execute_user_command)
8961 (execute_control_command_1, while_command, if_command): Update.
8962 (realloc_body_list): Remove.
8963 (process_next_line, recurse_read_control_structure): Update.
8964 (read_command_lines, read_command_lines_1): Return counted_command_line.
8965 (free_command_lines): Use "delete".
8966 (copy_command_lines): Remove.
8967 (define_command, document_command, show_user_1): Update.
8968 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8969 a counted_command_line.
8970 * breakpoint.h (counted_command_line): Remove typedef.
8971 (breakpoint_set_commands): Update.
8972 * breakpoint.c (check_no_tracepoint_commands)
8973 (validate_commands_for_breakpoint): Update.
8974 (breakpoint_set_commands): Change commands to be a
8975 counted_command_line.
8976 (commands_command_1, update_dprintf_command_list)
8977 (create_tracepoint_from_upload): Update.
8978
8979 2018-05-04 Tom Tromey <tom@tromey.com>
8980
8981 * cli/cli-decode.h (cmd_list_element): New constructor.
8982 (~cmd_list_element): New destructor.
8983 (struct cmd_list_element): Add initializers.
8984 * cli/cli-decode.c (do_add_cmd): Use "new".
8985 (delete_cmd): Use "delete".
8986
8987 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
8988 Pedro Alves <palves@redhat.com>
8989
8990 PR breakpoints/19806 and support for PR external/20207.
8991 * NEWS: Mention Aarch64 watchpoint improvements.
8992 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8993 watchpoints and PR external/20207 watchpoints.
8994 * nat/aarch64-linux-hw-point.c
8995 (kernel_supports_any_contiguous_range): New.
8996 (aarch64_watchpoint_offset): New.
8997 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8998 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8999 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9000 (aarch64_align_watchpoint): New parameters aligned_offset_p and
9001 next_addr_orig_p. Support PR external/20207 watchpoints.
9002 (aarch64_downgrade_regs): New.
9003 (aarch64_dr_state_insert_one_point): New parameters offset and
9004 addr_orig.
9005 (aarch64_dr_state_remove_one_point): Likewise.
9006 (aarch64_handle_breakpoint): Update caller.
9007 (aarch64_handle_aligned_watchpoint): Likewise.
9008 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9009 aligned_offset.
9010 (aarch64_linux_set_debug_regs): Remove const from state. Call
9011 aarch64_downgrade_regs.
9012 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9013 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9014 (DR_CONTROL_MASK): ... this.
9015 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9016 (unsigned int aarch64_watchpoint_offset): New prototype.
9017 (aarch64_linux_set_debug_regs): Remove const from state.
9018 * utils.c (align_up, align_down): Move to ...
9019 * common/common-utils.c (align_up, align_down): ... here.
9020 * utils.h (align_up, align_down): Move to ...
9021 * common/common-utils.h (align_up, align_down): ... here.
9022
9023 2018-05-04 Joel Brobecker <brobecker@adacore.com>
9024
9025 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9026 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9027 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9028 Re-implement to match the ABI as summarized in GCC's
9029 gcc/config/sparc/sparc.c. All callers updated.
9030 (sparc32_store_arguments): Remove assertion.
9031
9032 2018-05-04 Tom Tromey <tom@tromey.com>
9033
9034 * printcmd.c: Don't include tui.h.
9035 (decode_format): Use skip_spaces.
9036
9037 2018-05-04 Tom Tromey <tom@tromey.com>
9038
9039 PR gdb/22619:
9040 * printcmd.c (last_count): New global.
9041 (x_command): Use saved count when repeating.
9042
9043 2018-05-04 Tom Tromey <tom@tromey.com>
9044
9045 * nto-procfs.c (do_closedir_cleanup): Remove.
9046 (procfs_pidlist): Use gdb_dir_up.
9047 * procfs.c (do_closedir_cleanup): Remove.
9048 (proc_update_threads): Use gdb_dir_up.
9049 * common/filestuff.h (struct gdb_dir_deleter): New.
9050 (gdb_dir_up): New typedef.
9051
9052 2018-05-04 Tom Tromey <tom@tromey.com>
9053
9054 * ada-lang.c (print_mention_exception): Use std::string.
9055
9056 2018-05-04 Tom Tromey <tom@tromey.com>
9057
9058 * ada-lang.c (create_excep_cond_exprs): Update.
9059 (ada_exception_catchpoint_cond_string): Use std::string.
9060
9061 2018-05-04 Tom Tromey <tom@tromey.com>
9062
9063 * ada-lang.c (xget_renaming_scope): Return std::string.
9064 (old_renaming_is_invisible): Update.
9065
9066 2018-05-04 Tom Tromey <tom@tromey.com>
9067
9068 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9069 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9070
9071 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
9072
9073 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9074
9075 2018-05-04 Tom Tromey <tom@tromey.com>
9076
9077 * remote.c (remote_query_supported_append): Change type.
9078 (remote_check_symbols): Update.
9079
9080 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
9081
9082 PR gdb/11420
9083 * configure.ac: Prepend libpython.
9084 * python/python-config.py: Likewise.
9085 * configure: Regenerate.
9086
9087 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
9088
9089 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9090
9091 2018-05-03 Pedro Alves <palves@redhat.com>
9092
9093 * s390-linux-nat.c
9094 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9095 override. Write 'true' instead of '1'.
9096 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9097 declaration.
9098
9099 2018-05-02 Pedro Alves <palves@redhat.com>
9100
9101 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9102 add_inf_child_target.
9103 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9104 add_inf_child_target.
9105 * aix-thread.c (aix_thread_target_info): New.
9106 (aix_thread_target) <shortname, longname, doc>: Delete.
9107 <info>: New.
9108 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9109 add_inf_child_target.
9110 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9111 add_inf_child_target.
9112 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9113 add_inf_child_target.
9114 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9115 add_inf_child_target.
9116 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9117 add_inf_child_target.
9118 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9119 add_inf_child_target.
9120 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9121 add_inf_child_target.
9122 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9123 add_inf_child_target.
9124 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9125 add_inf_child_target.
9126 * bfd-target.c (target_bfd_target_info): New.
9127 (target_bfd) <shortname, longname, doc>: Delete.
9128 <info>: New.
9129 * bsd-kvm.c (bsd_kvm_target_info): New.
9130 (bsd_kvm_target) <shortname, longname, doc>: Delete.
9131 <info>: New.
9132 (bsd_kvm_target::open): Rename to ...
9133 (bsd_kvm_target_open): ... this. Adjust.
9134 * bsd-uthread.c (bsd_uthread_target_info): New.
9135 (bsd_uthread_target) <shortname, longname, doc>: Delete.
9136 <info>: New.
9137 * corefile.c (core_file_command): Adjust.
9138 * corelow.c (core_target_info): New.
9139 (core_target) <shortname, longname, doc>: Delete.
9140 <info>: New.
9141 (core_target::open): Rename to ...
9142 (core_target_open): ... this. Adjust.
9143 * ctf.c (ctf_target_info): New.
9144 (ctf_target) <shortname, longname, doc>: Delete.
9145 <info>: New.
9146 (ctf_target::open): Rename to ...
9147 (ctf_target_open): ... this.
9148 (_initialize_ctf): Adjust.
9149 * exec.c (exec_target_info): New.
9150 (exec_target) <shortname, longname, doc>: Delete.
9151 <info>: New.
9152 (exec_target::open): Rename to ...
9153 (exec_target_open): ... this.
9154 * gdbcore.h (core_target_open): Declare.
9155 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9156 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9157 add_inf_child_target.
9158 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9159 add_inf_child_target.
9160 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9161 add_inf_child_target.
9162 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9163 add_inf_child_target.
9164 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9165 add_inf_child_target.
9166 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9167 add_inf_child_target.
9168 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9169 add_inf_child_target.
9170 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9171 add_inf_child_target.
9172 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9173 add_inf_child_target.
9174 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9175 add_inf_child_target.
9176 * inf-child.c (inf_child_target_info): New.
9177 (inf_child_target::info): New.
9178 (inf_child_open_target): Remove 'target' parameter. Use
9179 get_native_target instead.
9180 (inf_child_target::open): Delete.
9181 (add_inf_child_target): New.
9182 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9183 Delete.
9184 <info>: New.
9185 (add_inf_child_target): Declare.
9186 (inf_child_open_target): Declare.
9187 * linux-thread-db.c (thread_db_target_info): New.
9188 (thread_db_target) <shortname, longname, doc>: Delete.
9189 <info>: New.
9190 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9191 add_inf_child_target.
9192 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9193 add_inf_child_target.
9194 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9195 add_inf_child_target.
9196 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9197 add_inf_child_target.
9198 * make-target-delegates (print_class): Adjust.
9199 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9200 add_inf_child_target.
9201 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9202 add_inf_child_target.
9203 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9204 add_inf_child_target.
9205 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9206 add_inf_child_target.
9207 * nto-procfs.c (nto_native_target_info): New.
9208 (nto_procfs_target_native) <shortname, longname, doc>:
9209 Delete.
9210 <info>: New.
9211 (nto_procfs_target_info): New.
9212 (nto_procfs_target_procfs) <shortname, longname, doc>:
9213 Delete.
9214 <info>: New.
9215 (init_procfs_targets): Adjust.
9216 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9217 add_inf_child_target.
9218 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9219 add_inf_child_target.
9220 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9221 add_inf_child_target.
9222 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9223 add_inf_child_target.
9224 * ravenscar-thread.c (ravenscar_target_info): New.
9225 (ravenscar_thread_target) <shortname, longname, doc>:
9226 Delete.
9227 <info>: New.
9228 * record-btrace.c (record_btrace_target_info):
9229 (record_btrace_target) <shortname, longname, doc>: Delete.
9230 <info>: New.
9231 (record_btrace_target::open): Rename to ...
9232 (record_btrace_target_open): ... this. Adjust.
9233 * record-full.c (record_longname, record_doc): New.
9234 (record_full_base_target) <shortname, longname, doc>: Delete.
9235 <info>: New.
9236 (record_full_target_info): New.
9237 (record_full_target): <shortname>: Delete.
9238 <info>: New.
9239 (record_full_core_open_1, record_full_open_1): Update comments.
9240 (record_full_base_target::open): Rename to ...
9241 (record_full_open): ... this.
9242 (cmd_record_full_restore): Update.
9243 (_initialize_record_full): Update.
9244 * remote-sim.c (remote_sim_target_info): New.
9245 (gdbsim_target) <shortname, longname, doc>: Delete.
9246 <info>: New.
9247 (gdbsim_target::open): Rename to ...
9248 (gdbsim_target_open): ... this.
9249 (_initialize_remote_sim): Adjust.
9250 * remote.c (remote_doc): New.
9251 (remote_target_info): New.
9252 (remote_target) <shortname, longname, doc>: Delete.
9253 <info>: New.
9254 (extended_remote_target_info): New.
9255 (extended_remote_target) <shortname, longname, doc>: Delete.
9256 <info>: New.
9257 (remote_target::open_1): Make static. Adjust.
9258 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9259 * s390-linux-nat.c (_initialize_s390_nat): Use
9260 add_inf_child_target.
9261 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9262 add_inf_child_target.
9263 * sol-thread.c (thread_db_target_info): New.
9264 (sol_thread_target) <shortname, longname, doc>: Delete.
9265 <info>: New.
9266 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9267 add_inf_child_target.
9268 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9269 add_inf_child_target.
9270 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9271 add_inf_child_target.
9272 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9273 add_inf_child_target.
9274 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9275 add_inf_child_target.
9276 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9277 add_inf_child_target.
9278 * spu-linux-nat.c (_initialize_spu_nat): Use
9279 add_inf_child_target.
9280 * spu-multiarch.c (spu_multiarch_target_info): New.
9281 (spu_multiarch_target) <shortname, longname, doc>: Delete.
9282 <info>: New.
9283 * target-delegates.c: Regenerate.
9284 * target.c: Include <unordered_map>.
9285 (target_ops_p): Delete.
9286 (DEF_VEC_P(target_ops_p)): Delete.
9287 (target_factories): New.
9288 (test_target_info): New.
9289 (test_target_ops::info): New.
9290 (open_target): Adjust to use target_factories.
9291 (add_target_with_completer): Rename to ...
9292 (add_target): ... this. Change prototype. Register target_info
9293 and open callback in target_factories. Register target_info in
9294 command context instead of target_ops.
9295 (add_target): Delete old implementation.
9296 (add_deprecated_target_alias): Change prototype. Adjust.
9297 (the_native_target): New.
9298 (set_native_target, get_native_target): New.
9299 (find_default_run_target): Use the_native_target.
9300 (find_attach_target, find_run_target): Simplify.
9301 (target_ops::open): Delete.
9302 (dummy_target_info): New.
9303 (dummy_target::shortname, dummy_target::longname)
9304 (dummy_target::doc): Delete.
9305 (dummy_target::info): New.
9306 (debug_target::shortname, debug_target::longname)
9307 (debug_target::doc): Delete.
9308 (debug_target::info): New.
9309 * target.h (struct target_info): New.
9310 (target_ops::~target_ops): Add comment.
9311 (target_ops::info): New.
9312 (target_ops::shortname, target_ops::longname, target_ops::doc): No
9313 longer virtual. Implement in terms of target_info.
9314 (set_native_target, get_native_target): Declare.
9315 (target_open_ftype): New.
9316 (add_target, add_target_with_completer)
9317 (add_deprecated_target_alias): Change prototype.
9318 (test_target) <shortname, longname, doc>: Delete.
9319 <info>: New.
9320 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9321 add_inf_child_target.
9322 * tracefile-tfile.c (tfile_target_info): New.
9323 (tfile_target) <shortname, longname, doc>: Delete.
9324 <info>: New.
9325 (tfile_target::open): Rename to ...
9326 (tfile_target_open): ... this.
9327 (_initialize_tracefile_tfile): Adjust.
9328 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9329 add_inf_child_target.
9330 * windows-nat.c (_initialize_windows_nat): Use
9331 add_inf_child_target.
9332 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9333 add_inf_child_target.
9334
9335 2018-05-02 Pedro Alves <palves@redhat.com>
9336
9337 * linux-nat.h (linux_nat_target) <low_new_thread,
9338 low_delete_thread, low_new_fork, low_forget_process,
9339 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9340 New virtual methods.
9341 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9342 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9343 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9344 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9345 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9346 Delete.
9347 * linux-fork.c (delete_fork): Adjust to call low method.
9348 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9349 (linux_nat_new_fork, linux_nat_forget_process_hook)
9350 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9351 (linux_nat_status_is_event):
9352 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9353 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9354 to call low method.
9355 (sigtrap_is_event): Rename to ...
9356 (linux_nat_target::low_status_is_event): ... this.
9357 (linux_nat_set_status_is_event): Delete.
9358 (save_stop_reason, linux_nat_wait_1)
9359 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9360 low methods.
9361 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9362 (linux_nat_set_new_fork, linux_nat_set_forget_process)
9363 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9364 (linux_nat_set_prepare_to_resume): Delete.
9365 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9366 low virtual methods.
9367 * amd64-linux-nat.c: Likewise.
9368 * arm-linux-nat.c: Likewise.
9369 * i386-linux-nat.c: Likewise.
9370 * ia64-linux-nat.c: Likewise.
9371 * mips-linux-nat.c: Likewise.
9372 * ppc-linux-nat.c: Likewise.
9373 * s390-linux-nat.c: Likewise.
9374 * sparc64-linux-nat.c: Likewise.
9375 * x86-linux-nat.c: Likewise.
9376 * x86-linux-nat.h: Include "nat/x86-linux.h".
9377 (x86_linux_nat_target) <low_new_fork, low_forget_process,
9378 low_prepare_to_resume, low_new_thread, low_delete_thread>:
9379 Override methods.
9380
9381 2018-05-02 Pedro Alves <palves@redhat.com>
9382
9383 * target.h (target_ops)
9384 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9385 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9386 stopped_by_watchpoint, have_continuable_watchpoint,
9387 stopped_data_address, watchpoint_addr_within_range,
9388 can_accel_watchpoint_condition, can_run, thread_alive,
9389 has_all_memory, has_memory, has_stack, has_registers,
9390 has_execution, can_async_p, is_async_p, supports_non_stop,
9391 always_non_stop_p, can_execute_reverse, supports_multi_process,
9392 supports_enable_disable_tracepoint,
9393 supports_disable_randomization, supports_string_tracing,
9394 supports_evaluation_of_breakpoint_conditions,
9395 can_run_breakpoint_commands, filesystem_is_local,
9396 can_download_tracepoint, get_trace_state_variable_value,
9397 set_trace_notes, get_tib_address, use_agent, can_use_agent,
9398 record_is_replaying, record_will_replay,
9399 augmented_libraries_svr4_read>: Adjust to return bool.
9400 * aarch64-linux-nat.c: All implementations adjusted.
9401 * aix-thread.c: All implementations adjusted.
9402 * arm-linux-nat.c: All implementations adjusted.
9403 * breakpoint.c: All implementations adjusted.
9404 * bsd-kvm.c: All implementations adjusted.
9405 * bsd-uthread.c: All implementations adjusted.
9406 * corelow.c: All implementations adjusted.
9407 * ctf.c: All implementations adjusted.
9408 * darwin-nat.c: All implementations adjusted.
9409 * darwin-nat.h: All implementations adjusted.
9410 * exec.c: All implementations adjusted.
9411 * fbsd-nat.c: All implementations adjusted.
9412 * fbsd-nat.h: All implementations adjusted.
9413 * gnu-nat.c: All implementations adjusted.
9414 * gnu-nat.h: All implementations adjusted.
9415 * go32-nat.c: All implementations adjusted.
9416 * ia64-linux-nat.c: All implementations adjusted.
9417 * inf-child.c: All implementations adjusted.
9418 * inf-child.h: All implementations adjusted.
9419 * inf-ptrace.c: All implementations adjusted.
9420 * inf-ptrace.h: All implementations adjusted.
9421 * linux-nat.c: All implementations adjusted.
9422 * linux-nat.h: All implementations adjusted.
9423 * mips-linux-nat.c: All implementations adjusted.
9424 * nto-procfs.c: All implementations adjusted.
9425 * ppc-linux-nat.c: All implementations adjusted.
9426 * procfs.c: All implementations adjusted.
9427 * ravenscar-thread.c: All implementations adjusted.
9428 * record-btrace.c: All implementations adjusted.
9429 * record-full.c: All implementations adjusted.
9430 * remote-sim.c: All implementations adjusted.
9431 * remote.c: All implementations adjusted.
9432 * s390-linux-nat.c: All implementations adjusted.
9433 * sol-thread.c: All implementations adjusted.
9434 * spu-multiarch.c: All implementations adjusted.
9435 * target-delegates.c: All implementations adjusted.
9436 * target.c: All implementations adjusted.
9437 * target.h: All implementations adjusted.
9438 * tracefile-tfile.c: All implementations adjusted.
9439 * tracefile.c: All implementations adjusted.
9440 * tracefile.h: All implementations adjusted.
9441 * windows-nat.c: All implementations adjusted.
9442 * x86-linux-nat.h: All implementations adjusted.
9443 * x86-nat.h: All implementations adjusted.
9444
9445 2018-05-02 Pedro Alves <palves@redhat.com>
9446
9447 * make-target-delegates (scan_target_h): Don't trim lines here.
9448 Replace sequences of tabs and/or whitespace with a single
9449 whitespace.
9450 (top level, parsing methods): Trim each line before processing it
9451 here.
9452
9453 2018-05-02 Pedro Alves <palves@redhat.com>
9454 John Baldwin <jhb@freebsd.org>
9455
9456 * target.h (enum strata) <debug_stratum>: New.
9457 (struct target_ops) <all delegation methods>: Replace by C++
9458 virtual methods, and drop "to_" prefix. All references updated
9459 throughout.
9460 <to_shortname, to_longname, to_doc, to_data,
9461 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9462 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9463 virtual methods. All references updated throughout.
9464 <can_attach, supports_terminal_ours, can_create_inferior,
9465 get_thread_control_capabilities, attach_no_wait>: New
9466 virtual methods.
9467 <insert_breakpoint, remove_breakpoint>: Now
9468 TARGET_DEFAULT_NORETURN methods.
9469 <info_proc>: Now returns bool.
9470 <to_magic>: Delete.
9471 (OPS_MAGIC): Delete.
9472 (current_target): Delete. All references replaced by references
9473 to ...
9474 (target_stack): ... this. New.
9475 (target_shortname, target_longname): Adjust.
9476 (target_can_run): Now a function declaration.
9477 (default_child_has_all_memory, default_child_has_memory)
9478 (default_child_has_stack, default_child_has_registers)
9479 (default_child_has_execution): Remove target_ops parameter.
9480 (complete_target_initialization): Delete.
9481 (memory_breakpoint_target): New template class.
9482 (test_target_ops): Refactor as a C++ class with virtual methods.
9483 * make-target-delegates (NAME_PART): Tighten.
9484 (POINTER_PART, CP_SYMBOL): New.
9485 (SIMPLE_RETURN_PART): Reimplement.
9486 (VEC_RETURN_PART): Expect less.
9487 (RETURN_PART, VIRTUAL_PART): New.
9488 (METHOD): Adjust to C++ virtual methods.
9489 (scan_target_h): Remove reference to C99.
9490 (dname): Output "target_ops::" prefix.
9491 (write_function_header): Adjust to output a C++ class method.
9492 (write_declaration): New.
9493 (write_delegator): Adjust to output a C++ class method.
9494 (tdname): Output "dummy_target::" prefix.
9495 (write_tdefault, write_debugmethod): Adjust to output a C++ class
9496 method.
9497 (tdefault_names, debug_names): Delete.
9498 (return_types, tdefaults, styles, argtypes_array): New.
9499 (top level): All methods are delegators.
9500 (print_class): New.
9501 (top level): Print dummy_target and debug_target classes.
9502 * target-delegates.c: Regenerate.
9503 * target-debug.h (target_debug_print_enum_info_proc_what)
9504 (target_debug_print_thread_control_capabilities)
9505 (target_debug_print_thread_info_p): New.
9506 * target.c (dummy_target): Delete.
9507 (the_dummy_target, the_debug_target): New.
9508 (target_stack): Now extern.
9509 (set_targetdebug): Push/unpush debug target.
9510 (default_child_has_all_memory, default_child_has_memory)
9511 (default_child_has_stack, default_child_has_registers)
9512 (default_child_has_execution): Remove target_ops parameter.
9513 (complete_target_initialization): Delete.
9514 (add_target_with_completer): No longer call
9515 complete_target_initialization.
9516 (target_supports_terminal_ours): Use regular delegation.
9517 (update_current_target): Delete.
9518 (push_target): No longer check magic number. Don't call
9519 update_current_target.
9520 (unpush_target): Don't call update_current_target.
9521 (target_is_pushed): No longer check magic number.
9522 (target_require_runnable): Skip for all stratums over
9523 process_stratum.
9524 (target_ops::info_proc): New.
9525 (target_info_proc): Use find_target_at and
9526 find_default_run_target.
9527 (target_supports_disable_randomization): Use regular delegation.
9528 (target_get_osdata): Use find_target_at.
9529 (target_ops::open, target_ops::close, target_ops::can_attach)
9530 (target_ops::attach, target_ops::can_create_inferior)
9531 (target_ops::create_inferior, target_ops::can_run)
9532 (target_can_run): New.
9533 (default_fileio_target): Use regular delegation.
9534 (target_ops::fileio_open, target_ops::fileio_pwrite)
9535 (target_ops::fileio_pread, target_ops::fileio_fstat)
9536 (target_ops::fileio_close, target_ops::fileio_unlink)
9537 (target_ops::fileio_readlink): New.
9538 (target_fileio_open_1, target_fileio_unlink)
9539 (target_fileio_readlink): Always call the target method. Handle
9540 FILEIO_ENOSYS.
9541 (return_zero, return_zero_has_execution): Delete.
9542 (init_dummy_target): Delete.
9543 (dummy_target::dummy_target, dummy_target::shortname)
9544 (dummy_target::longname, dummy_target::doc)
9545 (debug_target::debug_target, debug_target::shortname)
9546 (debug_target::longname, debug_target::doc): New.
9547 (target_supports_delete_record): Use regular delegation.
9548 (setup_target_debug): Delete.
9549 (maintenance_print_target_stack): Skip debug_stratum.
9550 (initialize_targets): Instantiate the_dummy_target and
9551 the_debug_target.
9552 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
9553 use target_stack.
9554 (target_auxv_search, fprint_target_auxv): Adjust.
9555 (info_auxv_command): Adjust to use target_stack.
9556 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9557 * exceptions.c (print_flush): Handle a NULL target_stack.
9558 * regcache.c (target_ops_no_register): Refactor as class with
9559 virtual methods.
9560
9561 * exec.c (exec_target): New class.
9562 (exec_ops): Now an exec_target.
9563 (exec_open, exec_close_1, exec_get_section_table)
9564 (exec_xfer_partial, exec_files_info, exec_has_memory)
9565 (exec_make_note_section): Refactor as exec_target methods.
9566 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9567 Delete.
9568 (exec_target::find_memory_regions): New.
9569 (_initialize_exec): Don't call init_exec_ops.
9570 * gdbcore.h (exec_file_clear): Delete.
9571
9572 * corefile.c (core_target): Delete.
9573 (core_file_command): Adjust.
9574 * corelow.c (core_target): New class.
9575 (the_core_target): New.
9576 (core_close): Remove target_ops parameter.
9577 (core_close_cleanup): Adjust.
9578 (core_target::close): New.
9579 (core_open, core_detach, get_core_registers, core_files_info)
9580 (core_xfer_partial, core_thread_alive, core_read_description)
9581 (core_pid_to_str, core_thread_name, core_has_memory)
9582 (core_has_stack, core_has_registers, core_info_proc): Rework as
9583 core_target methods.
9584 (ignore, core_remove_breakpoint, init_core_ops): Delete.
9585 (_initialize_corelow): Initialize the_core_target.
9586 * gdbcore.h (core_target): Delete.
9587 (the_core_target): New.
9588
9589 * ctf.c: (ctf_target): New class.
9590 (ctf_ops): Now a ctf_target.
9591 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9592 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9593 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9594 methods.
9595 (init_ctf_ops): Delete.
9596 (_initialize_ctf): Don't call it.
9597 * tracefile-tfile.c (tfile_target): New class.
9598 (tfile_ops): Now a tfile_target.
9599 (tfile_open, tfile_close, tfile_files_info)
9600 (tfile_get_tracepoint_status, tfile_trace_find)
9601 (tfile_fetch_registers, tfile_xfer_partial)
9602 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9603 Refactor as tfile_target methods.
9604 (tfile_xfer_partial_features): Remove target_ops parameter.
9605 (init_tfile_ops): Delete.
9606 (_initialize_tracefile_tfile): Don't call it.
9607 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9608 (tracefile_has_stack, tracefile_has_registers)
9609 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9610 tracefile_target methods.
9611 (init_tracefile_ops): Delete.
9612 (tracefile_target::tracefile_target): New.
9613 * tracefile.h: Include "target.h".
9614 (tracefile_target): New class.
9615 (init_tracefile_ops): Delete.
9616
9617 * spu-multiarch.c (spu_multiarch_target): New class.
9618 (spu_ops): Now a spu_multiarch_target.
9619 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9620 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9621 (spu_search_memory, spu_mourn_inferior): Refactor as
9622 spu_multiarch_target methods.
9623 (init_spu_ops): Delete.
9624 (_initialize_spu_multiarch): Remove references to init_spu_ops,
9625 complete_target_initialization.
9626
9627 * ravenscar-thread.c (ravenscar_thread_target): New class.
9628 (ravenscar_ops): Now a ravenscar_thread_target.
9629 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9630 (ravenscar_thread_alive, ravenscar_pid_to_str)
9631 (ravenscar_fetch_registers, ravenscar_store_registers)
9632 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9633 (ravenscar_stopped_by_hw_breakpoint)
9634 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9635 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9636 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9637 methods.
9638 (init_ravenscar_thread_ops): Delete.
9639 (_initialize_ravenscar): Remove references to
9640 init_ravenscar_thread_ops and complete_target_initialization.
9641
9642 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9643 (bsd_uthread_target): New class.
9644 (bsd_uthread_ops): Now a bsd_uthread_target.
9645 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9646 (bsd_uthread_close, bsd_uthread_mourn_inferior)
9647 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9648 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9649 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9650 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9651 (bsd_uthread_target): Delete function.
9652 (_initialize_bsd_uthread): Remove reference to
9653 complete_target_initialization.
9654
9655 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
9656 (target_bfd): ... this new class.
9657 (target_bfd_xfer_partial, target_bfd_get_section_table)
9658 (target_bfd_close): Refactor as target_bfd methods.
9659 (target_bfd::~target_bfd): New.
9660 (target_bfd_reopen): Adjust.
9661 (target_bfd::close): New.
9662
9663 * record-btrace.c (record_btrace_target): New class.
9664 (record_btrace_ops): Now a record_btrace_target.
9665 (record_btrace_open, record_btrace_stop_recording)
9666 (record_btrace_disconnect, record_btrace_close)
9667 (record_btrace_async, record_btrace_info)
9668 (record_btrace_insn_history, record_btrace_insn_history_range)
9669 (record_btrace_insn_history_from, record_btrace_call_history)
9670 (record_btrace_call_history_range)
9671 (record_btrace_call_history_from, record_btrace_record_method)
9672 (record_btrace_is_replaying, record_btrace_will_replay)
9673 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9674 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9675 (record_btrace_store_registers, record_btrace_prepare_to_store)
9676 (record_btrace_to_get_unwinder)
9677 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9678 (record_btrace_commit_resume, record_btrace_wait)
9679 (record_btrace_stop, record_btrace_can_execute_reverse)
9680 (record_btrace_stopped_by_sw_breakpoint)
9681 (record_btrace_supports_stopped_by_sw_breakpoint)
9682 (record_btrace_stopped_by_hw_breakpoint)
9683 (record_btrace_supports_stopped_by_hw_breakpoint)
9684 (record_btrace_update_thread_list, record_btrace_thread_alive)
9685 (record_btrace_goto_begin, record_btrace_goto_end)
9686 (record_btrace_goto, record_btrace_stop_replaying_all)
9687 (record_btrace_execution_direction)
9688 (record_btrace_prepare_to_generate_core)
9689 (record_btrace_done_generating_core): Refactor as
9690 record_btrace_target methods.
9691 (init_record_btrace_ops): Delete.
9692 (_initialize_record_btrace): Remove reference to
9693 init_record_btrace_ops.
9694 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9695 the execution_direction global.
9696 (record_full_base_target, record_full_target)
9697 (record_full_core_target): New classes.
9698 (record_full_ops): Now a record_full_target.
9699 (record_full_core_ops): Now a record_full_core_target.
9700 (record_full_target::detach, record_full_target::disconnect)
9701 (record_full_core_target::disconnect)
9702 (record_full_target::mourn_inferior, record_full_target::kill):
9703 New.
9704 (record_full_open, record_full_close, record_full_async): Refactor
9705 as methods of the record_full_base_target class.
9706 (record_full_resume, record_full_commit_resume): Refactor
9707 as methods of the record_full_target class.
9708 (record_full_wait, record_full_stopped_by_watchpoint)
9709 (record_full_stopped_data_address)
9710 (record_full_stopped_by_sw_breakpoint)
9711 (record_full_supports_stopped_by_sw_breakpoint)
9712 (record_full_stopped_by_hw_breakpoint)
9713 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9714 methods of the record_full_base_target class.
9715 (record_full_store_registers, record_full_xfer_partial)
9716 (record_full_insert_breakpoint, record_full_remove_breakpoint):
9717 Refactor as methods of the record_full_target class.
9718 (record_full_can_execute_reverse, record_full_get_bookmark)
9719 (record_full_goto_bookmark, record_full_execution_direction)
9720 (record_full_record_method, record_full_info, record_full_delete)
9721 (record_full_is_replaying, record_full_will_replay)
9722 (record_full_goto_begin, record_full_goto_end, record_full_goto)
9723 (record_full_stop_replaying): Refactor as methods of the
9724 record_full_base_target class.
9725 (record_full_core_resume, record_full_core_kill)
9726 (record_full_core_fetch_registers)
9727 (record_full_core_prepare_to_store)
9728 (record_full_core_store_registers, record_full_core_xfer_partial)
9729 (record_full_core_insert_breakpoint)
9730 (record_full_core_remove_breakpoint)
9731 (record_full_core_has_execution): Refactor
9732 as methods of the record_full_core_target class.
9733 (record_full_base_target::supports_delete_record): New.
9734 (init_record_full_ops): Delete.
9735 (init_record_full_core_ops): Delete.
9736 (record_full_save): Refactor as method of the
9737 record_full_base_target class.
9738 (_initialize_record_full): Remove references to
9739 init_record_full_ops and init_record_full_core_ops.
9740
9741 * remote.c (remote_target, extended_remote_target): New classes.
9742 (remote_ops): Now a remote_target.
9743 (extended_remote_ops): Now an extended_remote_target.
9744 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9745 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9746 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9747 (remote_pass_signals, remote_set_syscall_catchpoint)
9748 (remote_program_signals, )
9749 (remote_thread_always_alive): Remove target_ops parameter.
9750 (remote_thread_alive, remote_thread_name)
9751 (remote_update_thread_list, remote_threads_extra_info)
9752 (remote_static_tracepoint_marker_at)
9753 (remote_static_tracepoint_markers_by_strid)
9754 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9755 (remote_open): Refactor as methods of remote_target.
9756 (extended_remote_open, extended_remote_detach)
9757 (extended_remote_attach, extended_remote_post_attach):
9758 (extended_remote_supports_disable_randomization)
9759 (extended_remote_create_inferior): : Refactor as method of
9760 extended_remote_target.
9761 (remote_set_permissions, remote_open_1, remote_detach)
9762 (remote_follow_fork, remote_follow_exec, remote_disconnect)
9763 (remote_resume, remote_commit_resume, remote_stop)
9764 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9765 (remote_terminal_ours, remote_wait, remote_fetch_registers)
9766 (remote_prepare_to_store, remote_store_registers)
9767 (remote_flash_erase, remote_flash_done, remote_files_info)
9768 (remote_kill, remote_mourn, remote_insert_breakpoint)
9769 (remote_remove_breakpoint, remote_insert_watchpoint)
9770 (remote_watchpoint_addr_within_range)
9771 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9772 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9773 (remote_supports_stopped_by_sw_breakpoint)
9774 (remote_stopped_by_hw_breakpoint)
9775 (remote_supports_stopped_by_hw_breakpoint)
9776 (remote_stopped_by_watchpoint, remote_stopped_data_address)
9777 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9778 (remote_verify_memory): Refactor as methods of remote_target.
9779 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9780 parameter.
9781 (remote_xfer_partial, remote_get_memory_xfer_limit)
9782 (remote_search_memory, remote_rcmd, remote_memory_map)
9783 (remote_pid_to_str, remote_get_thread_local_address)
9784 (remote_get_tib_address, remote_read_description): Refactor as
9785 methods of remote_target.
9786 (remote_target::fileio_open, remote_target::fileio_pwrite)
9787 (remote_target::fileio_pread, remote_target::fileio_close): New.
9788 (remote_hostio_readlink, remote_hostio_fstat)
9789 (remote_filesystem_is_local, remote_can_execute_reverse)
9790 (remote_supports_non_stop, remote_supports_disable_randomization)
9791 (remote_supports_multi_process, remote_supports_cond_breakpoints)
9792 (remote_supports_enable_disable_tracepoint)
9793 (remote_supports_string_tracing)
9794 (remote_can_run_breakpoint_commands, remote_trace_init)
9795 (remote_download_tracepoint, remote_can_download_tracepoint)
9796 (remote_download_trace_state_variable, remote_enable_tracepoint)
9797 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9798 (remote_trace_start, remote_get_trace_status)
9799 (remote_get_tracepoint_status, remote_trace_stop)
9800 (remote_trace_find, remote_get_trace_state_variable_value)
9801 (remote_save_trace_data, remote_get_raw_trace_data)
9802 (remote_set_disconnected_tracing, remote_core_of_thread)
9803 (remote_set_circular_trace_buffer, remote_traceframe_info)
9804 (remote_get_min_fast_tracepoint_insn_len)
9805 (remote_set_trace_buffer_size, remote_set_trace_notes)
9806 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9807 (remote_disable_btrace, remote_teardown_btrace)
9808 (remote_read_btrace, remote_btrace_conf)
9809 (remote_augmented_libraries_svr4_read, remote_load)
9810 (remote_pid_to_exec_file, remote_can_do_single_step)
9811 (remote_execution_direction, remote_thread_handle_to_thread_info):
9812 Refactor as methods of remote_target.
9813 (init_remote_ops, init_extended_remote_ops): Delete.
9814 (remote_can_async_p, remote_is_async_p, remote_async)
9815 (remote_thread_events, remote_upload_tracepoints)
9816 (remote_upload_trace_state_variables): Refactor as methods of
9817 remote_target.
9818 (_initialize_remote): Remove references to init_remote_ops and
9819 init_extended_remote_ops.
9820
9821 * remote-sim.c (gdbsim_target): New class.
9822 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9823 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9824 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9825 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9826 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9827 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9828 Refactor as methods of gdbsim_target.
9829 (gdbsim_ops): Now a gdbsim_target.
9830 (init_gdbsim_ops): Delete.
9831 (gdbsim_cntrl_c): Adjust.
9832 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9833
9834 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9835 (the_amd64_linux_nat_target): New.
9836 (amd64_linux_fetch_inferior_registers)
9837 (amd64_linux_store_inferior_registers): Refactor as methods of
9838 amd64_linux_nat_target.
9839 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
9840 * i386-linux-nat.c: Don't include "linux-nat.h".
9841 (i386_linux_nat_target): New class.
9842 (the_i386_linux_nat_target): New.
9843 (i386_linux_fetch_inferior_registers)
9844 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9845 as methods of i386_linux_nat_target.
9846 (_initialize_i386_linux_nat): Adjust. Set linux_target.
9847 * inf-child.c (inf_child_ops): Delete.
9848 (inf_child_fetch_inferior_registers)
9849 (inf_child_store_inferior_registers): Delete.
9850 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9851 methods of inf_child_target.
9852 (inf_child_target::supports_terminal_ours)
9853 (inf_child_target::terminal_init)
9854 (inf_child_target::terminal_inferior)
9855 (inf_child_target::terminal_ours_for_output)
9856 (inf_child_target::terminal_ours, inf_child_target::interrupt)
9857 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9858 New.
9859 (inf_child_open, inf_child_disconnect, inf_child_close)
9860 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9861 (inf_child_post_startup_inferior, inf_child_can_run)
9862 (inf_child_pid_to_exec_file): Refactor as methods of
9863 inf_child_target.
9864 (inf_child_follow_fork): Delete.
9865 (inf_child_target::can_create_inferior)
9866 (inf_child_target::can_attach): New.
9867 (inf_child_target::has_all_memory, inf_child_target::has_memory)
9868 (inf_child_target::has_stack, inf_child_target::has_registers)
9869 (inf_child_target::has_execution): New.
9870 (inf_child_fileio_open, inf_child_fileio_pwrite)
9871 (inf_child_fileio_pread, inf_child_fileio_fstat)
9872 (inf_child_fileio_close, inf_child_fileio_unlink)
9873 (inf_child_fileio_readlink, inf_child_use_agent)
9874 (inf_child_can_use_agent): Refactor as methods of
9875 inf_child_target.
9876 (return_zero, inf_child_target): Delete.
9877 (inf_child_target::inf_child_target): New.
9878 * inf-child.h: Include "target.h".
9879 (inf_child_target): Delete function prototype.
9880 (inf_child_target): New class.
9881 (inf_child_open_target, inf_child_mourn_inferior)
9882 (inf_child_maybe_unpush_target): Delete.
9883 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9884 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9885 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9886 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9887 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9888 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9889 (inf_ptrace_wait, inf_ptrace_xfer_partial)
9890 (inf_ptrace_thread_alive, inf_ptrace_files_info)
9891 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9892 methods of inf_ptrace_target.
9893 (inf_ptrace_target): Delete function.
9894 * inf-ptrace.h: Include "inf-child.h".
9895 (inf_ptrace_target): Delete function declaration.
9896 (inf_ptrace_target): New class.
9897 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9898 * linux-nat.c (linux_target): New.
9899 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9900 (linux_nat_target::~linux_nat_target): New.
9901 (linux_child_post_attach, linux_child_post_startup_inferior)
9902 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9903 (linux_child_remove_fork_catchpoint)
9904 (linux_child_insert_vfork_catchpoint)
9905 (linux_child_remove_vfork_catchpoint)
9906 (linux_child_insert_exec_catchpoint)
9907 (linux_child_remove_exec_catchpoint)
9908 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9909 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9910 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9911 (linux_nat_stopped_data_address)
9912 (linux_nat_stopped_by_sw_breakpoint)
9913 (linux_nat_supports_stopped_by_sw_breakpoint)
9914 (linux_nat_stopped_by_hw_breakpoint)
9915 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9916 (linux_nat_kill, linux_nat_mourn_inferior)
9917 (linux_nat_xfer_partial, linux_nat_thread_alive)
9918 (linux_nat_update_thread_list, linux_nat_pid_to_str)
9919 (linux_nat_thread_name, linux_child_pid_to_exec_file)
9920 (linux_child_static_tracepoint_markers_by_strid)
9921 (linux_nat_is_async_p, linux_nat_can_async_p)
9922 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9923 (linux_nat_supports_multi_process)
9924 (linux_nat_supports_disable_randomization, linux_nat_async)
9925 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9926 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9927 (linux_nat_fileio_open, linux_nat_fileio_readlink)
9928 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9929 methods of linux_nat_target.
9930 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9931 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9932 parameter.
9933 (check_stopped_by_watchpoint): Adjust.
9934 (linux_xfer_partial): Delete.
9935 (linux_target_install_ops, linux_target, linux_nat_add_target):
9936 Delete.
9937 (linux_nat_target::linux_nat_target): New.
9938 * linux-nat.h: Include "inf-ptrace.h".
9939 (linux_nat_target): New.
9940 (linux_target, linux_target_install_ops, linux_nat_add_target):
9941 Delete function declarations.
9942 (linux_target): Declare global.
9943 * linux-thread-db.c (thread_db_target): New.
9944 (thread_db_target::thread_db_target): New.
9945 (thread_db_ops): Delete.
9946 (the_thread_db_target): New.
9947 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9948 (thread_db_update_thread_list, thread_db_pid_to_str)
9949 (thread_db_extra_thread_info)
9950 (thread_db_thread_handle_to_thread_info)
9951 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9952 (thread_db_resume): Refactor as methods of thread_db_target.
9953 (init_thread_db_ops): Delete.
9954 (_initialize_thread_db): Remove reference to init_thread_db_ops.
9955 * x86-linux-nat.c: Don't include "linux-nat.h".
9956 (super_post_startup_inferior): Delete.
9957 (x86_linux_nat_target::~x86_linux_nat_target): New.
9958 (x86_linux_child_post_startup_inferior)
9959 (x86_linux_read_description, x86_linux_enable_btrace)
9960 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9961 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9962 methods of x86_linux_nat_target.
9963 (x86_linux_create_target): Delete. Bits folded ...
9964 (x86_linux_add_target): ... here. Now takes a linux_nat_target
9965 pointer.
9966 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9967 (x86_linux_nat_target): New class.
9968 (x86_linux_create_target): Delete.
9969 (x86_linux_add_target): Now takes a linux_nat_target pointer.
9970 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9971 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9972 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9973 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9974 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9975 make extern.
9976 (x86_use_watchpoints): Delete.
9977 * x86-nat.h: Include "breakpoint.h" and "target.h".
9978 (x86_use_watchpoints): Delete.
9979 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9980 (x86_stopped_by_watchpoint, x86_stopped_data_address)
9981 (x86_insert_watchpoint, x86_remove_watchpoint)
9982 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9983 (x86_stopped_by_hw_breakpoint): New declarations.
9984 (x86_nat_target): New template class.
9985
9986 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9987 (the_ppc_linux_nat_target): New.
9988 (ppc_linux_fetch_inferior_registers)
9989 (ppc_linux_can_use_hw_breakpoint)
9990 (ppc_linux_region_ok_for_hw_watchpoint)
9991 (ppc_linux_ranged_break_num_registers)
9992 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9993 (ppc_linux_insert_mask_watchpoint)
9994 (ppc_linux_remove_mask_watchpoint)
9995 (ppc_linux_can_accel_watchpoint_condition)
9996 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9997 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9998 (ppc_linux_watchpoint_addr_within_range)
9999 (ppc_linux_masked_watch_num_registers)
10000 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10001 (ppc_linux_read_description): Refactor as methods of
10002 ppc_linux_nat_target.
10003 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
10004
10005 * procfs.c (procfs_xfer_partial): Delete forward declaration.
10006 (procfs_target): New class.
10007 (the_procfs_target): New.
10008 (procfs_target): Delete function.
10009 (procfs_auxv_parse, procfs_attach, procfs_detach)
10010 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10011 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10012 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10013 (procfs_create_inferior, procfs_update_thread_list)
10014 (procfs_thread_alive, procfs_pid_to_str)
10015 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10016 (procfs_stopped_data_address, procfs_insert_watchpoint)
10017 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10018 (proc_find_memory_regions, procfs_info_proc)
10019 (procfs_make_note_section): Refactor as methods of procfs_target.
10020 (_initialize_procfs): Adjust.
10021 * sol-thread.c (sol_thread_target): New class.
10022 (sol_thread_ops): Now a sol_thread_target.
10023 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10024 (sol_thread_fetch_registers, sol_thread_store_registers)
10025 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10026 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10027 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10028 (init_sol_thread_ops): Delete.
10029 (_initialize_sol_thread): Adjust. Remove references to
10030 init_sol_thread_ops and complete_target_initialization.
10031
10032 * windows-nat.c (windows_nat_target): New class.
10033 (windows_fetch_inferior_registers)
10034 (windows_store_inferior_registers, windows_resume, windows_wait)
10035 (windows_attach, windows_detach, windows_pid_to_exec_file)
10036 (windows_files_info, windows_create_inferior)
10037 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10038 (windows_close, windows_pid_to_str, windows_xfer_partial)
10039 (windows_get_tib_address, windows_get_ada_task_ptid)
10040 (windows_thread_name, windows_thread_alive): Refactor as
10041 windows_nat_target methods.
10042 (do_initial_windows_stuff): Adjust.
10043 (windows_target): Delete function.
10044 (_initialize_windows_nat): Adjust.
10045
10046 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10047 (darwin_mourn_inferior, darwin_kill_inferior)
10048 (darwin_create_inferior, darwin_attach, darwin_detach)
10049 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10050 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10051 (darwin_supports_multi_process): Refactor as darwin_nat_target
10052 methods.
10053 (darwin_resume_to, darwin_files_info): Delete.
10054 (_initialize_darwin_inferior): Rename to ...
10055 (_initialize_darwin_nat): ... this. Adjust to C++ification.
10056 * darwin-nat.h: Include "inf-child.h".
10057 (darwin_nat_target): New class.
10058 (darwin_complete_target): Delete.
10059 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10060 (darwin_target): New.
10061 (i386_darwin_fetch_inferior_registers)
10062 (i386_darwin_store_inferior_registers): Refactor as methods of
10063 darwin_nat_target.
10064 (darwin_complete_target): Delete, with ...
10065 (_initialize_i386_darwin_nat): ... bits factored out here.
10066
10067 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10068 (the_alpha_linux_nat_target): New.
10069 (alpha_linux_register_u_offset): Refactor as
10070 alpha_linux_nat_target method.
10071 (_initialize_alpha_linux_nat): Adjust.
10072 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10073 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10074 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10075 methods of linux_nat_trad_target.
10076 (linux_trad_target): Delete.
10077 * linux-nat-trad.h (linux_trad_target): Delete function.
10078 (linux_nat_trad_target): New class.
10079 * mips-linux-nat.c (mips_linux_nat_target): New class.
10080 (super_fetch_registers, super_store_registers, super_close):
10081 Delete.
10082 (the_mips_linux_nat_target): New.
10083 (mips64_linux_regsets_fetch_registers)
10084 (mips64_linux_regsets_store_registers)
10085 (mips64_linux_fetch_registers, mips64_linux_store_registers)
10086 (mips_linux_register_u_offset, mips_linux_read_description)
10087 (mips_linux_can_use_hw_breakpoint)
10088 (mips_linux_stopped_by_watchpoint)
10089 (mips_linux_stopped_data_address)
10090 (mips_linux_region_ok_for_hw_watchpoint)
10091 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10092 (mips_linux_close): Refactor as methods of mips_linux_nat.
10093 (_initialize_mips_linux_nat): Adjust to C++ification.
10094
10095 * aix-thread.c (aix_thread_target): New class.
10096 (aix_thread_ops): Now an aix_thread_target.
10097 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10098 (aix_thread_fetch_registers, aix_thread_store_registers)
10099 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10100 (aix_thread_thread_alive, aix_thread_pid_to_str)
10101 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10102 Refactor as methods of aix_thread_target.
10103 (init_aix_thread_ops): Delete.
10104 (_initialize_aix_thread): Remove references to init_aix_thread_ops
10105 and complete_target_initialization.
10106 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10107 (rs6000_nat_target): New class.
10108 (the_rs6000_nat_target): New.
10109 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10110 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10111 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10112 (super_create_inferior): Delete.
10113 (_initialize_rs6000_nat): Adjust to C++ification.
10114
10115 * arm-linux-nat.c (arm_linux_nat_target): New class.
10116 (the_arm_linux_nat_target): New.
10117 (arm_linux_fetch_inferior_registers)
10118 (arm_linux_store_inferior_registers, arm_linux_read_description)
10119 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10120 (arm_linux_remove_hw_breakpoint)
10121 (arm_linux_region_ok_for_hw_watchpoint)
10122 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10123 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10124 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10125 arm_linux_nat_target.
10126 (_initialize_arm_linux_nat): Adjust to C++ification.
10127
10128 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10129 (the_aarch64_linux_nat_target): New.
10130 (aarch64_linux_fetch_inferior_registers)
10131 (aarch64_linux_store_inferior_registers)
10132 (aarch64_linux_child_post_startup_inferior)
10133 (aarch64_linux_read_description)
10134 (aarch64_linux_can_use_hw_breakpoint)
10135 (aarch64_linux_insert_hw_breakpoint)
10136 (aarch64_linux_remove_hw_breakpoint)
10137 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10138 (aarch64_linux_region_ok_for_hw_watchpoint)
10139 (aarch64_linux_stopped_data_address)
10140 (aarch64_linux_stopped_by_watchpoint)
10141 (aarch64_linux_watchpoint_addr_within_range)
10142 (aarch64_linux_can_do_single_step): Refactor as methods of
10143 aarch64_linux_nat_target.
10144 (super_post_startup_inferior): Delete.
10145 (_initialize_aarch64_linux_nat): Adjust to C++ification.
10146
10147 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10148 (the_hppa_linux_nat_target): New.
10149 (hppa_linux_fetch_inferior_registers)
10150 (hppa_linux_store_inferior_registers): Refactor as methods of
10151 hppa_linux_nat_target.
10152 (_initialize_hppa_linux_nat): Adjust to C++ification.
10153
10154 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10155 (the_ia64_linux_nat_target): New.
10156 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10157 (ia64_linux_stopped_data_address)
10158 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10159 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10160 ia64_linux_nat_target methods.
10161 (super_xfer_partial): Delete.
10162 (_initialize_ia64_linux_nat): Adjust to C++ification.
10163
10164 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10165 (the_m32r_linux_nat_target): New.
10166 (m32r_linux_fetch_inferior_registers)
10167 (m32r_linux_store_inferior_registers): Refactor as
10168 m32r_linux_nat_target methods.
10169 (_initialize_m32r_linux_nat): Adjust to C++ification.
10170
10171 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10172 (the_m68k_linux_nat_target): New.
10173 (m68k_linux_fetch_inferior_registers)
10174 (m68k_linux_store_inferior_registers): Refactor as
10175 m68k_linux_nat_target methods.
10176 (_initialize_m68k_linux_nat): Adjust to C++ification.
10177
10178 * s390-linux-nat.c (s390_linux_nat_target): New class.
10179 (the_s390_linux_nat_target): New.
10180 (s390_linux_fetch_inferior_registers)
10181 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10182 (s390_insert_watchpoint, s390_remove_watchpoint)
10183 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10184 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10185 (s390_auxv_parse, s390_read_description): Refactor as methods of
10186 s390_linux_nat_target.
10187 (_initialize_s390_nat): Adjust to C++ification.
10188
10189 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10190 (the_sparc_linux_nat_target): New.
10191 (_initialize_sparc_linux_nat): Adjust to C++ification.
10192 * sparc-nat.c (sparc_fetch_inferior_registers)
10193 (sparc_store_inferior_registers): Remove target_ops parameter.
10194 * sparc-nat.h (sparc_fetch_inferior_registers)
10195 (sparc_store_inferior_registers): Remove target_ops parameter.
10196 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10197 (the_sparc64_linux_nat_target): New.
10198 (_initialize_sparc64_linux_nat): Adjust to C++ification.
10199
10200 * spu-linux-nat.c (spu_linux_nat_target): New class.
10201 (the_spu_linux_nat_target): New.
10202 (spu_child_post_startup_inferior, spu_child_post_attach)
10203 (spu_child_wait, spu_fetch_inferior_registers)
10204 (spu_store_inferior_registers, spu_xfer_partial)
10205 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10206 methods.
10207 (_initialize_spu_nat): Adjust to C++ification.
10208
10209 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10210 (the_tilegx_linux_nat_target): New.
10211 (fetch_inferior_registers, store_inferior_registers):
10212 Refactor as methods.
10213 (_initialize_tile_linux_nat): Adjust to C++ification.
10214
10215 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10216 (the_xtensa_linux_nat_target): New.
10217 (xtensa_linux_fetch_inferior_registers)
10218 (xtensa_linux_store_inferior_registers): Refactor as
10219 xtensa_linux_nat_target methods.
10220 (_initialize_xtensa_linux_nat): Adjust to C++ification.
10221
10222 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10223 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10224 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10225 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10226 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10227 (fbsd_stopped_by_sw_breakpoint)
10228 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10229 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10230 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10231 (fbsd_post_startup_inferior, fbsd_post_attach)
10232 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10233 (fbsd_set_syscall_catchpoint)
10234 (super_xfer_partial, super_resume, super_wait)
10235 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10236 (fbsd_handle_debug_trap): Remove target_ops parameter.
10237 (fbsd_nat_add_target): Delete.
10238 * fbsd-nat.h: Include "inf-ptrace.h".
10239 (fbsd_nat_add_target): Delete.
10240 (USE_SIGTRAP_SIGINFO): Define.
10241 (fbsd_nat_target): New class.
10242
10243 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10244 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10245 (amd64bsd_target): Delete.
10246 * amd64-bsd-nat.h: New file.
10247 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10248 "x86-bsd-nat.h".
10249 (amd64_fbsd_nat_target): New class.
10250 (the_amd64_fbsd_nat_target): New.
10251 (amd64fbsd_read_description): Refactor as method of
10252 amd64_fbsd_nat_target.
10253 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10254 (_initialize_amd64fbsd_nat): Adjust to C++ification.
10255 * amd64-nat.h (amd64bsd_target): Delete function declaration.
10256 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10257 (i386bsd_store_inferior_registers): Remove target_ops parameter.
10258 (i386bsd_target): Delete.
10259 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10260 (i386bsd_fetch_inferior_registers)
10261 (i386bsd_store_inferior_registers): Declare.
10262 (i386_bsd_nat_target): New class.
10263 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10264 (the_i386_fbsd_nat_target): New.
10265 (i386fbsd_resume, i386fbsd_read_description): Refactor as
10266 i386_fbsd_nat_target methods.
10267 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10268 (_initialize_i386fbsd_nat): Adjust to C++ification.
10269 * x86-bsd-nat.c (super_mourn_inferior): Delete.
10270 (x86bsd_mourn_inferior, x86bsd_target): Delete.
10271 (_initialize_x86_bsd_nat): Adjust to C++ification.
10272 * x86-bsd-nat.h: Include "x86-nat.h".
10273 (x86bsd_target): Delete declaration.
10274 (x86bsd_nat_target): New class.
10275
10276 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10277 (the_aarch64_fbsd_nat_target): New.
10278 (aarch64_fbsd_fetch_inferior_registers)
10279 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10280 aarch64_fbsd_nat_target.
10281 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10282 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10283 (the_alpha_bsd_nat_target): New.
10284 (alphabsd_fetch_inferior_registers)
10285 (alphabsd_store_inferior_registers): Refactor as
10286 alpha_bsd_nat_target methods.
10287 (_initialize_alphabsd_nat): Refactor as methods of
10288 alpha_bsd_nat_target.
10289 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10290 (the_amd64_nbsd_nat_target): New.
10291 (_initialize_amd64nbsd_nat): Adjust to C++ification.
10292 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10293 (the_amd64_obsd_nat_target): New.
10294 (_initialize_amd64obsd_nat): Adjust to C++ification.
10295 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10296 (the_arm_fbsd_nat_target): New.
10297 (arm_fbsd_fetch_inferior_registers)
10298 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10299 (_initialize_arm_fbsd_nat): Refactor as methods of
10300 arm_fbsd_nat_target.
10301 (_initialize_arm_fbsd_nat): Adjust to C++ification.
10302 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10303 (the_arm_netbsd_nat_target): New.
10304 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10305 arm_netbsd_nat_target.
10306 (_initialize_arm_netbsd_nat): Adjust to C++ification.
10307 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10308 (the_hppa_nbsd_nat_target): New.
10309 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10310 hppa_nbsd_nat_target methods.
10311 (_initialize_hppanbsd_nat): Adjust to C++ification.
10312 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10313 (the_hppa_obsd_nat_target): New.
10314 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10315 methods of hppa_obsd_nat_target.
10316 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
10317 add_target.
10318 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10319 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
10320 add_target.
10321 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10322 (_initialize_i386obsd_nat): Use add_target.
10323 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10324 (the_m68k_bsd_nat_target): New.
10325 (m68kbsd_fetch_inferior_registers)
10326 (m68kbsd_store_inferior_registers): Refactor as methods of
10327 m68k_bsd_nat_target.
10328 (_initialize_m68kbsd_nat): Adjust to C++ification.
10329 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10330 (the_mips_fbsd_nat_target): New.
10331 (mips_fbsd_fetch_inferior_registers)
10332 (mips_fbsd_store_inferior_registers): Refactor as methods of
10333 mips_fbsd_nat_target.
10334 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
10335 add_target.
10336 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10337 (the_mips_nbsd_nat_target): New.
10338 (mipsnbsd_fetch_inferior_registers)
10339 (mipsnbsd_store_inferior_registers): Refactor as methods of
10340 mips_nbsd_nat_target.
10341 (_initialize_mipsnbsd_nat): Adjust to C++ification.
10342 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10343 (the_mips64_obsd_nat_target): New.
10344 (mips64obsd_fetch_inferior_registers)
10345 (mips64obsd_store_inferior_registers): Refactor as methods of
10346 mips64_obsd_nat_target.
10347 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
10348 add_target.
10349 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10350 nbsd_nat_target.
10351 * nbsd-nat.h: Include "inf-ptrace.h".
10352 (nbsd_nat_target): New class.
10353 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10354 (obsd_wait): Refactor as methods of obsd_nat_target.
10355 (obsd_add_target): Delete.
10356 * obsd-nat.h: Include "inf-ptrace.h".
10357 (obsd_nat_target): New class.
10358 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10359 (the_ppc_fbsd_nat_target): New.
10360 (ppcfbsd_fetch_inferior_registers)
10361 (ppcfbsd_store_inferior_registers): Refactor as methods of
10362 ppc_fbsd_nat_target.
10363 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
10364 add_target.
10365 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10366 (the_ppc_nbsd_nat_target): New.
10367 (ppcnbsd_fetch_inferior_registers)
10368 (ppcnbsd_store_inferior_registers): Refactor as methods of
10369 ppc_nbsd_nat_target.
10370 (_initialize_ppcnbsd_nat): Adjust to C++ification.
10371 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10372 (the_ppc_obsd_nat_target): New.
10373 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10374 methods of ppc_obsd_nat_target.
10375 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
10376 add_target.
10377 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10378 (the_sh_nbsd_nat_target): New.
10379 (shnbsd_fetch_inferior_registers)
10380 (shnbsd_store_inferior_registers): Refactor as methods of
10381 sh_nbsd_nat_target.
10382 (_initialize_shnbsd_nat): Adjust to C++ification.
10383 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10384 (inf_ptrace_xfer_partial): Delete.
10385 (sparc_xfer_partial, sparc_target): Delete.
10386 * sparc-nat.h (sparc_fetch_inferior_registers)
10387 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10388 (sparc_target): Delete function declaration.
10389 (sparc_target): New template class.
10390 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10391 (_initialize_sparcnbsd_nat): Adjust to C++ification.
10392 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10393 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
10394 add_target.
10395 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10396 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10397 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10398 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
10399 add_target.
10400 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10401 (the_vax_bsd_nat_target): New.
10402 (vaxbsd_fetch_inferior_registers)
10403 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10404 methods.
10405 (_initialize_vaxbsd_nat): Adjust to C++ification.
10406
10407 * bsd-kvm.c (bsd_kvm_target): New class.
10408 (bsd_kvm_ops): Now a bsd_kvm_target.
10409 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10410 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10411 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10412 bsd_kvm_target.
10413 (bsd_kvm_return_one): Delete.
10414 (bsd_kvm_add_target): Adjust to C++ification.
10415
10416 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10417 (nto_procfs_target_procfs): New classes.
10418 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10419 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10420 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10421 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10422 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10423 (procfs_remove_hw_breakpoint, procfs_resume)
10424 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10425 (procfs_kill_inferior, procfs_store_registers)
10426 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10427 as methods of nto_procfs_target.
10428 (nto_procfs_ops): Now an nto_procfs_target_procfs.
10429 (nto_native_ops): Delete.
10430 (procfs_open, procfs_native_open): Delete.
10431 (nto_native_ops): Now an nto_procfs_target_native.
10432 (init_procfs_targets): Adjust to C++ification.
10433 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10434 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10435 Refactor as methods of nto_procfs_target.
10436
10437 * go32-nat.c (go32_nat_target): New class.
10438 (the_go32_nat_target): New.
10439 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10440 (go32_store_registers, go32_xfer_partial, go32_files_info)
10441 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10442 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10443 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10444 (go32_pid_to_str): Refactor as methods of go32_nat_target.
10445 (go32_target): Delete.
10446 (_initialize_go32_nat): Adjust to C++ification.
10447
10448 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10449 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10450 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10451 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10452 gnu_nat_target.
10453 (gnu_target): Delete.
10454 * gnu-nat.h (gnu_target): Delete.
10455 (gnu_nat_target): New class.
10456 * i386-gnu-nat.c (gnu_base_target): New.
10457 (i386_gnu_nat_target): New class.
10458 (the_i386_gnu_nat_target): New.
10459 (_initialize_i386gnu_nat): Adjust to C++ification.
10460
10461 2018-05-02 Pedro Alves <palves@redhat.com>
10462
10463 * bfd-target.c (target_bfd_xclose): Rename to ...
10464 (target_bfd_close): ... this.
10465 (target_bfd_reopen): Adjust.
10466 * target.c (target_close): Remove references to to_xclose.
10467 * target.h (target_ops::to_xclose): Delete.
10468 (target_ops::to_close): Update comments.
10469
10470 2018-05-02 Pedro Alves <palves@redhat.com>
10471
10472 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10473 "linux-nat.h".
10474 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10475 * inf-ptrace.c (inf_ptrace_register_u_offset)
10476 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10477 (inf_ptrace_store_register, inf_ptrace_store_registers)
10478 (inf_ptrace_trad_target): Move to ...
10479 * linux-nat-trad.c: ... this new file.
10480 * linux-nat-trad.h: New file.
10481 * linux-nat.c (linux_target_install_ops): Make extern.
10482 (linux_trad_target): Delete.
10483 * linux-nat.h (linux_trad_target): Delete declaration.
10484 (linux_target_install_ops): Declare.
10485 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10486 "linux-nat.h".
10487
10488 2018-05-02 Pedro Alves <palves@redhat.com>
10489
10490 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10491 procfs_target/add_target here.
10492 * procfs.c (procfs_target): Make static.
10493 (_initialize_procfs): Call add_target here.
10494 * procfs.h (struct target_ops): Remove forward declaration.
10495 (procfs_target): Remove declaration.
10496 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10497
10498 2018-05-02 Pedro Alves <palves@redhat.com>
10499
10500 * procfs.c (procfs_stopped_by_watchpoint)
10501 (procfs_insert_watchpoint, procfs_remove_watchpoint)
10502 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10503 Forward declare.
10504 (procfs_use_watchpoints): Delete, move contents...
10505 (procfs_target): ... here.
10506 * procfs.h (procfs_use_watchpoints): Delete declaration.
10507 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10508 procfs_use_watchpoints.
10509 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10510 procfs_use_watchpoints.
10511
10512 2018-05-02 Tom Tromey <tom@tromey.com>
10513
10514 PR python/20084:
10515 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10516 and var_zuinteger_unlimited.
10517 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10518 and PARAM_ZUINTEGER_UNLIMITED.
10519 (set_parameter_value): Handle var_zuinteger and
10520 var_zuinteger_unlimited.
10521 (add_setshow_generic): Likewise.
10522 (parmpy_init): Likewise.
10523
10524 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
10525
10526 PR rust/23124
10527 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10528 pointer is not null before dereferencing it.
10529
10530 2018-04-30 Tom Tromey <tom@tromey.com>
10531
10532 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10533 is_mi_like_p.
10534
10535 2018-04-30 Tom Tromey <tom@tromey.com>
10536
10537 * breakpoint.c (mention): Remove use of is_mi_like_p.
10538 (print_mention_ranged_breakpoint): Likewise.
10539 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10540 of is_mi_like_p.
10541
10542 2018-04-30 Tom Tromey <tom@tromey.com>
10543
10544 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10545
10546 2018-04-30 Tom Tromey <tom@tromey.com>
10547
10548 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10549 (info_spu_event_command): Remove some uses of is_mi_like_p.
10550
10551 2018-04-30 Tom Tromey <tom@tromey.com>
10552
10553 * python/py-framefilter.c (py_print_single_arg)
10554 (enumerate_locals, py_print_args, py_print_frame): Remove some
10555 uses of is_mi_like_p.
10556
10557 2018-04-30 Tom Tromey <tom@tromey.com>
10558
10559 * ui-out.c: Update.
10560 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10561 * ui-out.h (ui_out::is_mi_like_p): Now const.
10562 (ui_out::do_is_mi_like_p): Now const.
10563 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10564
10565 2018-04-30 Tom Tromey <tom@tromey.com>
10566
10567 * varobj.c (varobj_set_visualizer): Use new_reference.
10568 * python/python.c (gdbpy_decode_line): Use new_reference.
10569 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10570 new_reference.
10571
10572 2018-04-30 Tom Tromey <tom@tromey.com>
10573
10574 * varobj.c (install_new_value): Use new_reference.
10575 * value.h (value_incref): Return void. Swap intro comment with
10576 value_decref.
10577 * value.c (set_value_parent): Use new_reference.
10578 (value_incref): Return void. Update intro comment.
10579 (release_value): Use new_reference.
10580 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10581
10582 2018-04-30 Tom Tromey <tom@tromey.com>
10583
10584 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10585 * gdb_bfd.h (new_bfd_ref): Remove.
10586 (gdb_bfd_open): Update comment.
10587 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10588 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10589 (gdb_bfd_fdopenr): Use new_reference.
10590 * exec.c (exec_file_attach): Use new_reference.
10591
10592 2018-04-30 Tom Tromey <tom@tromey.com>
10593
10594 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10595 method.
10596
10597 2018-04-30 Tom Tromey <tom@tromey.com>
10598
10599 * jit.c (jit_read_code_entry): Use type_align.
10600 * i386-tdep.c (i386_gdbarch_init): Don't call
10601 set_gdbarch_long_long_align_bit.
10602 * gdbarch.sh: Remove long_long_align_bit.
10603 * gdbarch.c, gdbarch.h: Rebuild.
10604 * arc-tdep.c (arc_type_align): New function.
10605 (arc_gdbarch_init): Use arc_type_align. Don't call
10606 set_gdbarch_long_long_align_bit.
10607
10608 2018-04-30 Tom Tromey <tom@tromey.com>
10609
10610 * rust-lang.c (rust_type_alignment): Remove.
10611 (rust_composite_type): Use type_align.
10612
10613 2018-04-30 Tom Tromey <tom@tromey.com>
10614
10615 * NEWS: Mention Type.align.
10616 * python/py-type.c (typy_get_alignof): New function.
10617 (type_object_getset): Add "alignof".
10618
10619 2018-04-30 Tom Tromey <tom@tromey.com>
10620
10621 PR exp/17095:
10622 * NEWS: Update.
10623 * std-operator.def (UNOP_ALIGNOF): New operator.
10624 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10625 New.
10626 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10627 * c-lang.c (c_op_print_tab): Add alignof.
10628 * c-exp.y (ALIGNOF): New token.
10629 (exp): Add "ALIGNOF" production.
10630 (ident_tokens): Add _Alignof and alignof.
10631
10632 2018-04-30 Tom Tromey <tom@tromey.com>
10633
10634 * i386-tdep.c (i386_type_align): New function.
10635 (i386_gdbarch_init): Update.
10636 * gdbarch.sh (type_align): New method.
10637 * gdbarch.c, gdbarch.h: Rebuild.
10638 * arch-utils.h (default_type_align): Declare.
10639 * arch-utils.c (default_type_align): New function.
10640 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10641 (struct type) <align_log2>: New field.
10642 <instance_flags>: Now a bitfield.
10643 (TYPE_RAW_ALIGN): New macro.
10644 (type_align, type_raw_align, set_type_align): Declare.
10645 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10646 functions.
10647 * dwarf2read.c (quirk_rust_enum): Set type alignment.
10648 (get_alignment, maybe_set_alignment): New functions.
10649 (read_structure_type, read_enumeration_type, read_array_type)
10650 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10651 (read_subrange_type, read_base_type): Set type alignment.
10652
10653 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
10654
10655 * dwarf2read.c (read_index_from_section): Use bool.
10656
10657 2018-04-29 Fabian Groffen <grobian@gentoo.org>
10658
10659 PR gdb/22950
10660 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10661 with #ifdef.
10662
10663 2018-04-29 John Reiser <jreiser@BitWagon.com>
10664
10665 PR build/22873
10666 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10667 last step, and do it atomically.
10668
10669 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
10670
10671 * compile/compile-c-types.c (convert_int, convert_float):
10672 Update for C FE v1.
10673
10674 2018-04-27 Tom Tromey <tom@tromey.com>
10675
10676 PR rust/22545:
10677 * rust-lang.c (rust_inclusive_range_type_p): New function.
10678 (rust_range): Handle inclusive ranges.
10679 (rust_compute_range): Likewise.
10680 * rust-exp.y (struct rust_op) <inclusive>: New field.
10681 (DOTDOTEQ): New constant.
10682 (range_expr): Add "..=" productions.
10683 (operator_tokens): Add "..=" token.
10684 (ast_range): Add "inclusive" parameter.
10685 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10686 ranges.
10687 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10688 bounds values.
10689 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10690 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10691 Update comments.
10692 * expprint.c (print_subexp_standard): Handle new bounds values.
10693 (dump_subexp_body_standard): Likewise.
10694
10695 2018-04-27 Tom Tromey <tom@tromey.com>
10696
10697 * configure: Rebuild.
10698 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10699 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10700 "OVERRIDE".
10701 (class symbol_needs_eval_context): Likewise.
10702 * dwarf2read.c (mock_mapped_index::symbol_name_count)
10703 (mock_mapped_index::symbol_name_at): Use "override". Remove
10704 "virtual".
10705 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10706 "override".
10707 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10708 * aarch64-tdep.c (instruction_reader::read): Use "override".
10709 (instruction_reader_test::read): Likewise.
10710 * arm-tdep.c (instruction_reader::read): Use "override".
10711 (instruction_reader_thumb::read): Likewise.
10712
10713 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
10714
10715 PR remote/9665
10716 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10717 instead of remote_send.
10718 (remote_send): Remove.
10719
10720 2018-04-26 Pedro Alves <palves@redhat.com>
10721
10722 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10723 find_function_start_sal instead of find_pc_line.
10724
10725 2018-04-26 Pedro Alves <palves@redhat.com>
10726
10727 * breakpoint.c (set_breakpoint_location_function): Handle
10728 mst_data_gnu_ifunc.
10729 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10730 * elfread.c (elf_symtab_read): Give data symbols with
10731 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10732 (elf_rel_plt_read): Update comment.
10733 * linespec.c (convert_linespec_to_sals): Handle
10734 mst_data_gnu_ifunc.
10735 (minsym_found): Handle mst_data_gnu_ifunc.
10736 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10737 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10738 * parse.c (find_minsym_type_and_address): Handle
10739 mst_data_gnu_ifunc.
10740 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10741 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10742 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10743 comment.
10744 <mst_data_gnu_ifunc>: New enumerator.
10745
10746 2018-04-26 Pedro Alves <palves@redhat.com>
10747
10748 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10749 (lookup_minimal_symbol_by_pc_section): ... this. Replace
10750 'want_trampoline' parameter by a lookup_msym_prefer parameter.
10751 Handle it.
10752 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10753 (lookup_minimal_symbol_by_pc): Adjust.
10754 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10755 (lookup_solib_trampoline_symbol_by_pc): Adjust.
10756 * minsyms.h (lookup_msym_prefer): New enum.
10757 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10758 parameter by a lookup_msym_prefer parameter.
10759
10760 2018-04-26 Pedro Alves <palves@redhat.com>
10761
10762 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10763 ends in "@plt" instead of looking at the symbol's section.
10764
10765 2018-04-26 Pedro Alves <palves@redhat.com>
10766
10767 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
10768 all references.
10769 (find_pc_partial_function_gnu_ifunc): Rename to ...
10770 (find_pc_partial_function): ... this, and remove references to
10771 'is_gnu_ifunc_p'.
10772 (find_pc_partial_function): Delete old implementation.
10773 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10774
10775 2018-04-26 Pedro Alves <palves@redhat.com>
10776
10777 * linespec.c (struct bound_minimal_symbol_search_key): New.
10778 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
10779 skip first line if we found a GNU ifunc minimal symbol by name.
10780 (compare_msymbols): Change parameters to work with a destructured
10781 lhs minsym.
10782 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10783 functions.
10784
10785 2018-04-26 Pedro Alves <palves@redhat.com>
10786
10787 * breakpoint.c (set_breakpoint_location_function): Don't resolve
10788 ifunc targets here. Instead, if we have an ifunc minsym, use its
10789 address/name.
10790 (add_location_to_breakpoint): Store the minsym and the objfile in
10791 the breakpoint location.
10792 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10793 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10794 Record the minsym in the sal.
10795 * symtab.h (symtab_and_line) <msymbol>: New field.
10796
10797 2018-04-26 Pedro Alves <palves@redhat.com>
10798
10799 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10800 unless we actually resolved the ifunc.
10801
10802 2018-04-26 Pedro Alves <palves@redhat.com>
10803
10804 * c-exp.y (variable production): Prefer ifunc minsyms over
10805 regular function symbols.
10806 * symtab.c (find_gnu_ifunc): New function.
10807 * minsyms.h (lookup_msym_prefer): New enum.
10808 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10809 parameter by a lookup_msym_prefer parameter.
10810 * symtab.h (find_gnu_ifunc): New declaration.
10811
10812 2018-04-26 Pedro Alves <palves@redhat.com>
10813
10814 * blockframe.c (find_gnu_ifunc_target_type): New function.
10815 (find_function_type): New.
10816 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10817 return a value with a memory address.
10818 (eval_call): For calls to GNU ifunc functions, try to find the
10819 type of the target function from the type that the resolver
10820 returns.
10821 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10822 symbols.
10823 * infcall.c (find_function_return_type): Delete.
10824 (find_function_addr): Add 'function_type' parameter. For calls to
10825 GNU ifunc functions, try to find the type of the target function
10826 from the type that the resolver returns, and return it via
10827 FUNCTION_TYPE.
10828 (call_function_by_hand_dummy): Adjust to use the function type
10829 returned by find_function_addr.
10830 (find_function_addr): Add 'function_type' parameter and move
10831 description here.
10832 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10833 declarations.
10834
10835 2018-04-26 Pedro Alves <palves@redhat.com>
10836
10837 * c-exp.y (variable production): Skip finding an alias for ifunc
10838 symbols.
10839
10840 2018-04-26 Pedro Alves <palves@redhat.com>
10841
10842 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10843
10844 2018-04-25 Pedro Alves <palves@redhat.com>
10845
10846 * infcmd.c (kill_command): Print the pid as string, not the whole
10847 thread's ptid. Add comment. s/has been killed/killed/ in output
10848 message.
10849 * remote.c (remote_detach_1): Print the pid as string, not the
10850 whole thread's ptid.
10851
10852 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10853 Sergio Durigan Junior <sergiodj@redhat.com>
10854 Pedro Alves <palves@redhat.com>
10855
10856 * infcmd.c (kill_command): Print message when inferior has
10857 been killed.
10858 * inferior.c (print_inferior_events): Remove 'static'. Set as
10859 '1'.
10860 (add_inferior): Improve message printed when
10861 'print_inferior_events' is on.
10862 (exit_inferior): Remove message printed when
10863 'print_inferior_events' is on.
10864 (detach_inferior): Improve message printed when
10865 'print_inferior_events' is on.
10866 (initialize_inferiors): Use 'add_inferior_silent' to set
10867 'current_inferior_'.
10868 * inferior.h (print_inferior_events): Declare here as
10869 'extern'.
10870 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10871 '[Detaching...]' messages when 'print_inferior_events' is on.
10872 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
10873 as prefix/suffix for messages. Remove periods. Fix erroneous
10874 'Detaching after fork from child...', replace it by '... from
10875 parent...'.
10876 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10877 prefix/suffix when printing 'Detaching...' messages. Print
10878 them when 'print_inferior_events' is on.
10879 * remote.c (remote_detach_1): Print message when detaching
10880 from inferior and '!is_fork_parent'.
10881
10882 2018-04-24 Tom Tromey <tom@tromey.com>
10883
10884 * cli-out.h: Reindent.
10885
10886 2018-04-24 Tom Tromey <tom@tromey.com>
10887
10888 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10889 (cli_ui_out::do_field_string): Use fputs_filtered.
10890 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10891
10892 2018-04-23 Tom Tromey <tom@tromey.com>
10893
10894 * guile/scm-frame.c (gdbscm_frame_read_var): Use
10895 gdb::unique_xmalloc_ptr.
10896
10897 2018-04-23 Tom Tromey <tom@tromey.com>
10898
10899 * configure: Rebuild.
10900
10901 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
10902
10903 PR gdb/23095
10904 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10905 prepare_for_testing. Set normal_bp to r_debug_state if target
10906 is bsd.
10907
10908 2018-04-21 Pedro Alves <palves@redhat.com>
10909 Rajendra SY <rajendra.sy@gmail.com>
10910
10911 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10912 * remote.c (extended_remote_attach): In all-stop mode, mark the
10913 thread as executing.
10914
10915 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10916
10917 * thread.c (thread_apply_all_command): Fix comment.
10918 (thread_command): Fix comment.
10919
10920 2018-04-10 Alan Hayward <alan.hayward@arm.com>
10921
10922 * common/tdesc.h (tdesc_create_feature): Remove xml filename
10923 parameter.
10924 * features/aarch64-core.c (create_feature_aarch64_core):
10925 Regenerate.
10926 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10927 Likewise.
10928 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10929 Likewise.
10930 * features/i386/32bit-avx512.c
10931 (create_feature_i386_32bit_avx512): Likewise.
10932 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10933 Likewise.
10934 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10935 Likewise.
10936 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10937 Likewise.
10938 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10939 Likewise.
10940 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10941 Likewise.
10942 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10943 Likewise.
10944 * features/i386/64bit-avx512.c
10945 (create_feature_i386_64bit_avx512): Likewise.
10946 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10947 Likewise.
10948 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10949 Likewise.
10950 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10951 Likewise.
10952 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10953 Likewise.
10954 * features/i386/64bit-segments.c
10955 (create_feature_i386_64bit_segments): Likewise.
10956 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10957 Likewise.
10958 * features/i386/x32-core.c
10959 (create_feature_i386_x32_core): Likewise.
10960 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10961 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10962 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10963 * target-descriptions.c: In generated code, don't pass xml
10964 filename.
10965
10966 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10967
10968 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10969 (print_xml_feature::visit_post): Likewise.
10970 (print_xml_feature::visit): Likewise.
10971 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10972 (print_xml_feature): Add new class.
10973 * regformats/regdat.sh: Null xmltarget on feature targets.
10974 * target-descriptions.c (struct target_desc): Add xmltarget.
10975 (maintenance_check_tdesc_xml_convert): Add unittest function.
10976 (tdesc_get_features_xml): Add function to get xml.
10977 (maintenance_check_xml_descriptions): Test xml generation.
10978 * xml-tdesc.c (string_read_description_xml): Add function.
10979 * xml-tdesc.h (string_read_description_xml): Add declaration.
10980
10981 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10982
10983 * features/Makefile: Add feature marker to targets with new style
10984 target descriptions.
10985 * regformats/aarch64.dat: Regenerate.
10986 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10987 * regformats/i386/amd64-avx-linux.dat: Likewise.
10988 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10989 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10990 * regformats/i386/amd64-linux.dat: Likewise.
10991 * regformats/i386/amd64-mpx-linux.dat: Likewise.
10992 * regformats/i386/amd64.dat: Likewise.
10993 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10994 * regformats/i386/i386-avx-linux.dat: Likewise.
10995 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10996 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10997 * regformats/i386/i386-linux.dat: Likewise.
10998 * regformats/i386/i386-mmx-linux.dat: Likewise.
10999 * regformats/i386/i386-mpx-linux.dat: Likewise.
11000 * regformats/i386/i386.dat: Likewise.
11001 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11002 * regformats/i386/x32-avx-linux.dat: Likewise.
11003 * regformats/i386/x32-linux.dat: Likewise.
11004 * regformats/tic6x-c62x-linux.dat: Likewise.
11005 * regformats/tic6x-c64x-linux.dat: Likewise.
11006 * regformats/tic6x-c64xp-linux.dat: Likewise.
11007 * regformats/regdat.sh: Parse feature marker.
11008
11009 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11010
11011 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11012 (tdesc_osabi_name): Likewise.
11013 * target-descriptions.c (tdesc_architecture_name): Add new
11014 function.
11015 (tdesc_osabi_name): Likewise.
11016
11017 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11018
11019 * common/tdesc.c (tdesc_predefined_type): Move to here.
11020 (tdesc_named_type): Likewise.
11021 (tdesc_create_vector): Likewise.
11022 (tdesc_create_struct): Likewise.
11023 (tdesc_set_struct_size): Likewise.
11024 (tdesc_create_union): Likewise.
11025 (tdesc_create_flags): Likewise.
11026 (tdesc_create_enum): Likewise.
11027 (tdesc_add_field): Likewise.
11028 (tdesc_add_typed_bitfield): Likewise.
11029 (tdesc_add_bitfield): Likewise.
11030 (tdesc_add_flag): Likewise.
11031 (tdesc_add_enum_value): Likewise.
11032 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11033 (struct tdesc_type_vector): Likewise.
11034 (struct tdesc_type_field): Likewise.
11035 (struct tdesc_type_with_fields): Likewise.
11036 (tdesc_create_enum): Add declaration.
11037 (tdesc_add_typed_bitfield): Likewise.
11038 (tdesc_add_enum_value): Likewise.
11039 * target-descriptions.c (tdesc_type_field): Move from here.
11040 (tdesc_type_builtin): Likewise.
11041 (tdesc_type_vector): Likewise.
11042 (tdesc_type_with_fields): Likewise.
11043 (tdesc_predefined_types): Likewise.
11044 (tdesc_named_type): Likewise.
11045 (tdesc_create_vector): Likewise.
11046 (tdesc_create_struct): Likewise.
11047 (tdesc_set_struct_size): Likewise.
11048 (tdesc_create_union): Likewise.
11049 (tdesc_create_flags): Likewise.
11050 (tdesc_create_enum): Likewise.
11051 (tdesc_add_field): Likewise.
11052 (tdesc_add_typed_bitfield): Likewise.
11053 (tdesc_add_bitfield): Likewise.
11054 (tdesc_add_flag): Likewise.
11055 (tdesc_add_enum_value): Likewise.
11056 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11057 (tdesc_add_typed_bitfield): Likewise.
11058 (tdesc_add_enum_value): Likewise.
11059
11060 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11061
11062 * common/tdesc.c (tdesc_feature::accept): Move to here.
11063 (tdesc_feature::operator==): Likewise.
11064 (tdesc_create_reg): Likewise.
11065 * common/tdesc.h (tdesc_type_kind): Likewise.
11066 (struct tdesc_type): Likewise.
11067 (struct tdesc_feature): Likewise.
11068 * regformats/regdat.sh: Create a feature.
11069 * target-descriptions.c (tdesc_type_kind): Move from here.
11070 (tdesc_type): Likewise.
11071 (tdesc_type_up): Likewise.
11072 (tdesc_feature): Likewise.
11073 (tdesc_create_reg): Likewise.
11074
11075 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11076
11077 * Makefile.in: Add arch/tdesc.c
11078 * common/tdesc.c: New file.
11079 * common/tdesc.h (tdesc_element_visitor): Move to here.
11080 (tdesc_element): Likewise.
11081 (tdesc_reg): Likewise.
11082 (tdesc_reg_up): Likewise.
11083 * regformats/regdef.h (reg): Add offset to constructors.
11084 * target-descriptions.c (tdesc_element_visitor): Move from here.
11085 (tdesc_element): Likewise.
11086 (tdesc_reg): Likewise.
11087 (tdesc_reg_up): Likewise.
11088
11089 2018-04-17 Tom Tromey <tom@tromey.com>
11090
11091 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11092 discriminant field.
11093
11094 2018-04-17 Tom Tromey <tom@tromey.com>
11095
11096 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11097
11098 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
11099
11100 * symtab.c (print_symbol_info): Skip printing filename and line
11101 number when `last' is NULL.
11102 (symtab_symbol_info): Use empty string instead of NULL for first
11103 invocation of print_symbol_info.
11104 (rbreak_command): Pass NULL to `last' parameter of
11105 print_symbol_info.
11106
11107 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
11108
11109 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11110 instead of nullptr.
11111
11112 2018-04-16 Pedro Alves <palves@redhat.com>
11113
11114 * MAINTAINERS (sh): Remove.
11115 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11116 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11117 (ALLDEPFILES): Remove sh64-tdep.c.
11118 * NEWS: Mentions that support for SH-5/SH64 is removed.
11119 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11120 (sh*-*-openbsd*): Ditto.
11121 (sh64-*-elf*): Remove.
11122 (sh*): Remove.
11123 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11124 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11125 * sh-tdep.c: No longer include "sh64-tdep.h".
11126 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11127 * sh64-tdep.c, sh64-tdep.h: Remove files.
11128
11129 2018-04-16 Pedro Alves <palves@redhat.com>
11130
11131 * MAINTAINERS: Remove m88k.
11132 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11133 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11134 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11135 * NEWS: Mention that support for m88k was removed.
11136 * configure.host (m88*-*-*): Remove support.
11137 * configure.nat (m88k-*-*): Remove support.
11138 * configure.tgt (m88*-*-openbsd*): Remove.
11139 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11140
11141 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
11142
11143 * configure.tgt (x86_tobjs): New variable.
11144 (amd64_tobjs, i386_tobjs): Use it.
11145
11146 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11147
11148 * symtab.c (print_symbol_info): Precede the symbol definition by
11149 the line number when available.
11150 * NEWS: Advertise this enhancement.
11151
11152 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11153
11154 * NEWS (New options): announce set/show record btrace cpu.
11155 * btrace.c: Include record-btrace.h.
11156 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11157 the vendor is unknown.
11158 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
11159 Maybe overwrite the btrace configuration's cpu.
11160 (btrace_compute_ftrace): Add cpu parameter. Update callers.
11161 (btrace_fetch): Add cpu parameter. Update callers.
11162 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11163 Maybe overwrite the btrace configuration's cpu. Skip enabling
11164 errata workarounds if the vendor is unknown.
11165 * python/py-record-btrace.c: Include record-btrace.h.
11166 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11167 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11168 * record-btrace.c (record_btrace_cpu_state_kind): New.
11169 (record_btrace_cpu): New.
11170 (set_record_btrace_cpu_cmdlist): New.
11171 (record_btrace_get_cpu): New.
11172 (require_btrace_thread, record_btrace_info)
11173 (record_btrace_resume_thread): Call record_btrace_get_cpu.
11174 (cmd_set_record_btrace_cpu_none): New.
11175 (cmd_set_record_btrace_cpu_auto): New.
11176 (cmd_set_record_btrace_cpu): New.
11177 (cmd_show_record_btrace_cpu): New.
11178 (_initialize_record_btrace): Initialize set/show record btrace cpu
11179 commands.
11180 * record-btrace.h (record_btrace_get_cpu): New.
11181
11182 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11183
11184 * record.c (set_record_command): Fix typo in message.
11185
11186 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11187
11188 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11189
11190 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11191
11192 * infrun.c (process_event_stop_test): Call
11193 gdbarch_in_indirect_branch_thunk.
11194 * gdbarch.sh (in_indirect_branch_thunk): New.
11195 * gdbarch.c: Regenerated.
11196 * gdbarch.h: Regenerated.
11197 * x86-tdep.h: New.
11198 * x86-tdep.c: New.
11199 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11200 (HFILES_NO_SRCDIR): Add x86-tdep.h.
11201 (ALLDEPFILES): Add x86-tdep.c.
11202 * arch-utils.h (default_in_indirect_branch_thunk): New.
11203 * arch-utils.c (default_in_indirect_branch_thunk): New.
11204 * i386-tdep: Include x86-tdep.h.
11205 (i386_in_indirect_branch_thunk): New.
11206 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11207 function.
11208 * amd64-tdep: Include x86-tdep.h.
11209 (amd64_in_indirect_branch_thunk): New.
11210 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11211
11212 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11213
11214 PR gdb/23053
11215 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11216 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11217 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11218 regression.
11219
11220 2018-04-12 Tom Tromey <tom@tromey.com>
11221
11222 * rust-lang.c (rust_print_struct_def): Remove univariant code.
11223 (rust_evaluate_subexp): Likewise.
11224
11225 2018-04-12 Pedro Alves <palves@redhat.com>
11226
11227 * procfs.c (procfs_detach): Make forward declaration's prototype
11228 match definition's protototype.
11229 (proc_get_LDT_entry): Remove stale do_cleanups call.
11230
11231 2018-04-12 Pedro Alves <palves@redhat.com>
11232
11233 * target.h (target_ops::to_has_exited): Delete.
11234 (target_has_exited): Delete.
11235 * target-delegates.c: Regenerate.
11236
11237 2018-04-11 Pedro Alves <palves@redhat.com>
11238
11239 * target.c (fileio_fh_t::t): Add comment.
11240 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11241 (target_fileio_close): Handle a NULL target.
11242 (invalidate_fileio_fh): New.
11243 (target_close): Call it.
11244 * remote.c (remote_hostio_send_command): No longer check whether
11245 remote_desc is open.
11246
11247 2018-04-11 Pedro Alves <palves@redhat.com>
11248
11249 * target.c (fileio_fh_t): Make it a named struct instead of a
11250 typedef.
11251 (fileio_fh_t::is_closed): New method.
11252 (DEF_VEC_O (fileio_fh_t)): Remove.
11253 (fileio_fhandles): Now a std::vector.
11254 (is_closed_fileio_fh): Delete.
11255 (acquire_fileio_fd): Adjust. Rename parameters.
11256 (release_fileio_fd): Adjust.
11257 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11258 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11259 (target_fileio_close): Adjust.
11260
11261 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
11262
11263 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11264 index.
11265
11266 2018-04-10 Pedro Alves <palves@redhat.com>
11267
11268 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11269 (scoped_finish_thread_state): New class.
11270 * infcmd.c (run_command_1): Use it instead of finish_thread_state
11271 cleanup.
11272 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11273 (fetch_inferior_event, normal_stop): Likewise.
11274 * thread.c (finish_thread_state_cleanup): Delete.
11275
11276 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11277 Pedro Alves <palves@redhat.com>
11278
11279 * value.c: Include "selftest.h" and "common/array-view.h".
11280 (struct range) <operator ==>: New.
11281 (test_ranges_contain): New.
11282 (check_ranges_vector): New.
11283 (test_insert_into_bit_range_vector): New.
11284 (_initialize_values): Register selftests.
11285 * common/array-view.h (operator==, operator!=): New.
11286
11287 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11288
11289 * common/gdb_vecs.h (unordered_remove): Add overload that takes
11290 an iterator.
11291 * inline-frame.c: Include <algorithm>.
11292 (struct inline_state): Add constructor.
11293 (inline_state_s): Remove.
11294 (DEF_VEC_O(inline_state_s)): Remove.
11295 (inline_states): Change type to std::vector.
11296 (find_inline_frame_state): Adjust to std::vector.
11297 (allocate_inline_frame_state): Remove.
11298 (clear_inline_frame_state): Adjust to std::vector.
11299 (skip_inline_frames): Adjust to std::vector.
11300
11301 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11302
11303 * tracepoint.h (struct trace_state_variable): Add constructor.
11304 <name>: Change type to std::string.
11305 * tracepoint.c (tsv_s): Remove.
11306 (DEF_VEC_O(tsv_s)): Remove.
11307 (tvariables): Change to std::vector.
11308 (create_trace_state_variable): Adjust to std::vector.
11309 (find_trace_state_variable): Likewise.
11310 (find_trace_state_variable_by_number): Likewise.
11311 (delete_trace_state_variable): Likewise.
11312 (trace_variable_command): Adjust to std::string.
11313 (delete_trace_variable_command): Likewise.
11314 (tvariables_info_1): Adjust to std::vector.
11315 (save_trace_state_variables): Likewise.
11316 (start_tracing): Likewise.
11317 (merge_uploaded_trace_state_variables): Adjust to std::vector
11318 and std::string.
11319 * target.h (struct target_ops)
11320 <to_download_trace_state_variable>: Pass reference to
11321 trace_state_variable.
11322 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11323 * target-delegates.c: Re-generate.
11324 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11325 (mi_tsv_deleted): Likewise.
11326 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11327 * remote.c (remote_download_trace_state_variable): Change
11328 pointer to reference and adjust.
11329 * make-target-delegates (parse_argtypes): Handle references.
11330 (write_function_header): Likewise.
11331 (munge_type): Likewise.
11332
11333 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11334
11335 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11336 string_view-selftests.c.
11337 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11338 testsuite.
11339 * unittests/basic_string_view/cons/char/1.cc: Likewise.
11340 * unittests/basic_string_view/cons/char/2.cc: Likewise.
11341 * unittests/basic_string_view/cons/char/3.cc: Likewise.
11342 * unittests/basic_string_view/element_access/char/1.cc:
11343 Likewise.
11344 * unittests/basic_string_view/element_access/char/empty.cc:
11345 Likewise.
11346 * unittests/basic_string_view/element_access/char/front_back.cc:
11347 Likewise.
11348 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11349 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11350 Likewise.
11351 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11352 Likewise.
11353 * unittests/basic_string_view/modifiers/swap/char/1.cc:
11354 Likewise.
11355 * unittests/basic_string_view/operations/compare/char/1.cc:
11356 Likewise.
11357 * unittests/basic_string_view/operations/compare/char/13650.cc:
11358 Likewise.
11359 * unittests/basic_string_view/operations/copy/char/1.cc:
11360 Likewise.
11361 * unittests/basic_string_view/operations/data/char/1.cc:
11362 Likewise.
11363 * unittests/basic_string_view/operations/find/char/1.cc:
11364 Likewise.
11365 * unittests/basic_string_view/operations/find/char/2.cc:
11366 Likewise.
11367 * unittests/basic_string_view/operations/find/char/3.cc:
11368 Likewise.
11369 * unittests/basic_string_view/operations/find/char/4.cc:
11370 Likewise.
11371 * unittests/basic_string_view/operations/rfind/char/1.cc:
11372 Likewise.
11373 * unittests/basic_string_view/operations/rfind/char/2.cc:
11374 Likewise.
11375 * unittests/basic_string_view/operations/rfind/char/3.cc:
11376 Likewise.
11377 * unittests/basic_string_view/operations/substr/char/1.cc:
11378 Likewise.
11379 * unittests/basic_string_view/operators/char/2.cc: Likewise.
11380 * unittests/string_view-selftests.c: New file.
11381
11382 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11383
11384 * unittests/basic_string_view/capacity/1.cc: New file.
11385 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11386 * unittests/basic_string_view/cons/char/1.cc: New file.
11387 * unittests/basic_string_view/cons/char/2.cc: New file.
11388 * unittests/basic_string_view/cons/char/3.cc: New file.
11389 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11390 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11391 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11392 * unittests/basic_string_view/element_access/char/1.cc: New file.
11393 * unittests/basic_string_view/element_access/char/2.cc: New file.
11394 * unittests/basic_string_view/element_access/char/empty.cc: New file.
11395 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11396 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11397 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11398 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11399 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11400 * unittests/basic_string_view/include.cc: New file.
11401 * unittests/basic_string_view/inserters/char/1.cc: New file.
11402 * unittests/basic_string_view/inserters/char/2.cc: New file.
11403 * unittests/basic_string_view/inserters/char/3.cc: New file.
11404 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11405 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11406 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11407 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11408 * unittests/basic_string_view/literals/types.cc: New file.
11409 * unittests/basic_string_view/literals/values.cc: New file.
11410 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11411 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11412 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11413 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11414 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11415 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11416 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11417 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11418 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11419 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11420 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11421 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11422 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11423 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11424 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11425 * unittests/basic_string_view/operations/data/char/1.cc: New file.
11426 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11427 * unittests/basic_string_view/operations/find/char/1.cc: New file.
11428 * unittests/basic_string_view/operations/find/char/2.cc: New file.
11429 * unittests/basic_string_view/operations/find/char/3.cc: New file.
11430 * unittests/basic_string_view/operations/find/char/4.cc: New file.
11431 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11432 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11433 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11434 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11435 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11436 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11437 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11438 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11439 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11440 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11441 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11442 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11443 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11444 * unittests/basic_string_view/operators/char/2.cc: New file.
11445 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11446 * unittests/basic_string_view/range_access/char/1.cc: New file.
11447 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11448 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11449 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11450 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11451 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11452 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11453 * unittests/basic_string_view/requirements/typedefs.cc: New file.
11454 * unittests/basic_string_view/typedefs.cc: New file.
11455 * unittests/basic_string_view/types/1.cc: New file.
11456
11457 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11458
11459 * common/gdb_string_view.h: Remove libstdc++ implementation
11460 details, adjust to gdb reality.
11461 * common/gdb_string_view.tcc: Likewise.
11462 * cli/cli-script.c (struct string_view): Remove.
11463 (user_args) <m_args>: Change element type to gdb::string_view.
11464 (user_args::insert_args): Adjust.
11465
11466 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11467
11468 * common/gdb_string_view.h: New file.
11469 * common/gdb_string_view.tcc: New file.
11470
11471 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11472
11473 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11474 * configure: Re-generate.
11475
11476 2018-04-09 Pedro Alves <palves@redhat.com>
11477
11478 * gdbarch.sh: Include "observable.h" instead of "observer.h".
11479 (set_target_gdbarch): Call
11480 gdb::observers::architecture_changed.notify instead of
11481 observer_notify_architecture_changed.
11482
11483 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11484
11485 * tracepoint.c (struct current_traceframe_cleanup): Remove.
11486 (do_restore_current_traceframe_cleanup): Remove.
11487 (restore_current_traceframe_cleanup_dtor): Remove.
11488 (make_cleanup_restore_current_traceframe): Remove.
11489 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11490 New.
11491 * tracepoint.h (struct scoped_restore_current_traceframe): New.
11492 * infrun.c (fetch_inferior_event): Use
11493 scoped_restore_current_traceframe.
11494
11495 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11496
11497 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11498 Remove.
11499 <n_allocated_type_units>: Remove.
11500 <all_type_units>: Change to std::vector.
11501 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11502 to std::vector change.
11503 (dwarf2_per_objfile::get_cutu): Likewise.
11504 (dwarf2_per_objfile::get_tu): Likewise.
11505 (create_signatured_type_table_from_index): Likewise.
11506 (create_signatured_type_table_from_debug_names): Likewise.
11507 (dw2_symtab_iter_next): Likewise.
11508 (dw2_print_stats): Likewise.
11509 (dw2_expand_all_symtabs): Likewise.
11510 (dw2_expand_marked_cus): Likewise.
11511 (dw2_debug_names_iterator::next): Likewise.
11512 (dwarf2_initialize_objfile): Likewise.
11513 (add_signatured_type_cu_to_table): Likewise.
11514 (create_all_type_units): Likewise.
11515 (add_type_unit): Likewise.
11516 (struct tu_abbrev_offset): Add constructor.
11517 (build_type_psymtabs_1): Adjust to std::vector change.
11518 (print_tu_stats): Likewise.
11519 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11520 (write_debug_names): Likewise.
11521
11522 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11523
11524 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11525 Make an std::vector.
11526 <n_comp_units>: Remove.
11527 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11528 to std::vector change.
11529 (dwarf2_per_objfile::get_cutu): Likewise.
11530 (dwarf2_per_objfile::get_cu): Likewise.
11531 (create_cus_from_index): Likewise.
11532 (create_addrmap_from_index): Likewise.
11533 (create_addrmap_from_aranges): Likewise.
11534 (dwarf2_read_index): Likewise.
11535 (dw2_find_last_source_symtab): Likewise.
11536 (dw2_map_symtabs_matching_filename): Likewise.
11537 (dw2_symtab_iter_next): Likewise.
11538 (dw2_print_stats): Likewise.
11539 (dw2_expand_all_symtabs): Likewise.
11540 (dw2_expand_symtabs_with_fullname): Likewise.
11541 (dw2_expand_marked_cus): Likewise.
11542 (dw2_map_symbol_filenames): Likewise.
11543 (create_cus_from_debug_names): Likewise.
11544 (dwarf2_read_debug_names): Likewise.
11545 (dw2_debug_names_iterator::next): Likewise.
11546 (dwarf2_initialize_objfile): Likewise.
11547 (set_partial_user): Likewise.
11548 (dwarf2_build_psymtabs_hard): Likewise.
11549 (read_comp_units_from_section): Remove arguments, adjust to
11550 std::vector change.
11551 (create_all_comp_units): Adjust to std::vector and
11552 read_comp_units_from_section changes.
11553 (dwarf2_find_containing_comp_unit): Adjust to std::vector
11554 change.
11555 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11556 (psyms_seen_size): Likewise.
11557 (write_gdbindex): Likewise.
11558 (write_debug_names): Likewise.
11559
11560 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11561
11562 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11563 with dwarf2_per_objfile.
11564 (create_cus_from_index): Likewise.
11565 (create_signatured_type_table_from_index): Likewise.
11566 (dwarf2_read_index): Likewise.
11567 (dwarf2_initialize_objfile): Likewise.
11568 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
11569 per_cu rather than get_dwarf2_per_objfile.
11570
11571 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11572
11573 * dwarf2read.h (struct signatured_type): Forward declare.
11574 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11575 New methods.
11576 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11577 (dw2_get_cutu): ...this.
11578 (dwarf2_per_objfile::get_cu): Rename from...
11579 (dw2_get_cu): ...this.
11580 (dwarf2_per_objfile::get_tu): New.
11581 (create_addrmap_from_index): Adjust.
11582 (create_addrmap_from_aranges): Adjust.
11583 (dw2_find_last_source_symtab): Adjust.
11584 (dw2_map_symtabs_matching_filename): Adjust.
11585 (dw2_symtab_iter_next): Adjust.
11586 (dw2_print_stats): Adjust.
11587 (dw2_expand_all_symtabs): Adjust.
11588 (dw2_expand_symtabs_with_fullname): Adjust.
11589 (dw2_expand_marked_cus): Adjust.
11590 (dw_expand_symtabs_matching_file_matcher): Adjust.
11591 (dw2_map_symbol_filenames): Adjust.
11592 (dw2_debug_names_iterator::next): Adjust.
11593 (dwarf2_initialize_objfile): Adjust.
11594 (set_partial_user): Adjust.
11595 (dwarf2_build_psymtabs_hard): Adjust.
11596
11597 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11598
11599 * dwarf2read.c (create_signatured_type_table_from_debug_names):
11600 Remove unused variables.
11601 (dw2_map_symtabs_matching_filename): Likewise.
11602 (dwarf2_record_block_ranges): Likewise.
11603 (dwarf2_read_addr_index): Likewise.
11604 (follow_die_offset): Likewise.
11605
11606 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11607
11608 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11609 to symbol_file_add_main.
11610
11611 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11612
11613 PR mi/22299
11614 * mi/mi-console.c (do_fputc_async_safe): New.
11615 (mi_console_file::write_async_safe): New.
11616 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11617 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11618 New.
11619 * ui-file.c (ui_file::putstrn): Adjust call to
11620 fputstrn_unfiltered.
11621 * utils.c (printchar): Replace do_fputs and do_fprintf
11622 parameters by do_fputc.
11623 (fputstr_filtered): Adjust call to printchar.
11624 (fputstr_unfiltered): Likewise.
11625 (fputstrn_filtered): Likewise.
11626 (fputstrn_unfiltered): Add do_fputc parameter, pass to
11627 printchar.
11628 * utils.h (do_fputc_ftype): New typedef.
11629 (fputstrn_unfiltered): Add do_fputc parameter.
11630
11631 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11632
11633 * regformats/i386/i386-avx.dat: Remove.
11634
11635 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11636
11637 PR gdb/22979
11638 * amd64-tdep.c (amd64_none_init_abi): New function.
11639 (amd64_x32_none_init_abi): New function.
11640 (_initialize_amd64_tdep): Register handlers for x86-64 and
11641 x64_32 with GDB_OSABI_NONE.
11642 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11643 GDB_OSABI_NONE osabi.
11644
11645 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11646
11647 PR gdb/22980
11648 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11649 GDB_OSABI_NONE.
11650 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11651 * osabi.c (gdb_osabi_names): Add "unknown" entry.
11652
11653 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11654
11655 * common/byte-vector.h (char_vector): New type.
11656 * target.h (target_read_alloc): Return
11657 gdb::optional<byte_vector>.
11658 (target_read_stralloc): Return gdb::optional<char_vector>.
11659 (target_get_osdata): Return gdb::optional<char_vector>.
11660 * target.c (target_read_alloc_1): Templatize. Replacement
11661 manual memory management with vector.
11662 (target_read_alloc): Change return type, adjust.
11663 (target_read_stralloc): Change return type, adjust.
11664 (target_get_osdata): Change return type, adjust.
11665 * auxv.c (struct auxv_info) <length>: Remove.
11666 <data>: Change type to gdb::optional<byte_vector>.
11667 (auxv_inferior_data_cleanup): Free auxv_info with delete.
11668 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11669 (target_auxv_search): Adjust.
11670 (fprint_target_auxv): Adjust.
11671 * avr-tdep.c (avr_io_reg_read_command): Adjust.
11672 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11673 (linux_make_corefile_notes): Adjust.
11674 * osdata.c (get_osdata): Adjust.
11675 * remote.c (remote_get_threads_with_qxfer): Adjust.
11676 (remote_memory_map): Adjust.
11677 (remote_traceframe_info): Adjust.
11678 (btrace_read_config): Adjust.
11679 (remote_read_btrace): Adjust.
11680 (remote_pid_to_exec_file): Adjust.
11681 * solib-aix.c (solib_aix_get_library_list): Adjust.
11682 * solib-dsbt.c (decode_loadmap): Don't free buf.
11683 (dsbt_get_initial_loadmaps): Adjust.
11684 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11685 * solib-target.c (solib_target_current_sos): Adjust.
11686 * tracepoint.c (sdata_make_value): Adjust.
11687 * xml-support.c (xinclude_start_include): Adjust.
11688 (xml_fetch_content_from_file): Adjust.
11689 * xml-support.h (xml_fetch_another): Change return type.
11690 (xml_fetch_content_from_file): Change return type.
11691 * xml-syscall.c (xml_init_syscalls_info): Adjust.
11692 * xml-tdesc.c (file_read_description_xml): Adjust.
11693 (fetch_available_features_from_target): Change return type.
11694 (target_fetch_description_xml): Adjust.
11695 (target_read_description_xml): Adjust.
11696
11697 2018-04-06 Tom Tromey <tom@tromey.com>
11698
11699 * value.c (~value): Update.
11700 (struct value) <contents>: Now unique_xmalloc_ptr.
11701 (value_contents_bits_eq, allocate_value_contents)
11702 (value_contents_raw, value_contents_all_raw)
11703 (value_contents_for_printing, value_contents_for_printing_const)
11704 (set_value_enclosing_type): Update.
11705
11706 2018-04-06 Tom Tromey <tom@tromey.com>
11707
11708 * value.c (range_s): Remove typedef, VEC.
11709 (struct range): Add operator<.
11710 (range_lessthan): Remove.
11711 (ranges_contain): Change type.
11712 (~value): Update.
11713 (struct value) <unavailable, optimized_out>: Now std::vector.
11714 (value_entirely_available)
11715 (value_entirely_covered_by_range_vector)
11716 (value_entirely_unavailable, value_entirely_optimized_out):
11717 Update.
11718 (insert_into_bit_range_vector): Change argument type.
11719 (find_first_range_overlap): Likewise.
11720 (struct ranges_and_idx, value_contents_bits_eq)
11721 (require_not_optimized_out, require_available): Update.
11722 (ranges_copy_adjusted): Change argument types.
11723 (value_optimized_out, value_copy, value_fetch_lazy): Update.
11724
11725 2018-04-06 Tom Tromey <tom@tromey.com>
11726
11727 * value.c (~value): Update.
11728 (struct value) <parent>: Now a value_ref_ptr.
11729 (value_parent, set_value_parent, value_address, value_copy):
11730 Update.
11731
11732 2018-04-06 Tom Tromey <tom@tromey.com>
11733
11734 * value.c (struct value): Add constructor, destructor, and member
11735 initializers.
11736 (allocate_value_lazy, value_decref): Update.
11737
11738 2018-04-06 Tom Tromey <tom@tromey.com>
11739
11740 * value.c (struct value) <released, next>: Remove.
11741 (all_values): Now a std::vector.
11742 (allocate_value_lazy): Update.
11743 (value_next): Remove.
11744 (value_mark, value_free_to_mark, release_value)
11745 (value_release_to_mark): Update.
11746
11747 2018-04-06 Tom Tromey <tom@tromey.com>
11748
11749 * value.h (fetch_subexp_value, value_release_to_mark): Update.
11750 (free_value_chain): Remove.
11751 * value.c (free_value_chain): Remove.
11752 (value_release_to_mark): Return a std::vector.
11753 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11754 std::vector.
11755 (check_condition): Update.
11756 * eval.c (fetch_subexp_value): Change "val_chain" to a
11757 std::vector.
11758 * breakpoint.c (update_watchpoint): Update.
11759 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11760
11761 2018-04-06 Tom Tromey <tom@tromey.com>
11762
11763 * value.h (free_all_values): Remove.
11764 * value.c (free_all_values): Remove.
11765
11766 2018-04-06 Tom Tromey <tom@tromey.com>
11767
11768 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11769 (value_history_chain, value_history_count): Remove.
11770 (value_history): New global.
11771 (record_latest_value, access_value_history, show_values)
11772 (preserve_values): Update.
11773
11774 2018-04-06 Tom Tromey <tom@tromey.com>
11775
11776 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11777 * varobj.c (varobj_set_display_format, varobj_set_value)
11778 (install_default_visualizer, construct_visualizer)
11779 (install_new_value, ~varobj, varobj_get_value_type)
11780 (my_value_of_variable, varobj_editable_p): Update.
11781 * c-varobj.c (c_describe_child, c_value_of_variable)
11782 (cplus_number_of_children, cplus_describe_child): Update.
11783 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11784 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11785 (ada_value_of_variable, ada_value_is_changeable_p): Update.
11786
11787 2018-04-06 Tom Tromey <tom@tromey.com>
11788
11789 * printcmd.c (last_examine_address): Change type to
11790 value_ref_ptr.
11791 (do_examine, x_command): Update.
11792
11793 2018-04-06 Tom Tromey <tom@tromey.com>
11794
11795 * value.c (release_value): Update.
11796 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11797 (struct bpstats) <val>: Now a value_ref_ptr.
11798 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11799 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11800 (~watchpoint, print_it_watchpoint, watch_command_1)
11801 (invalidate_bp_value_on_memory_change): Update.
11802
11803 2018-04-06 Tom Tromey <tom@tromey.com>
11804
11805 * varobj.c (varobj_clear_saved_item)
11806 (update_dynamic_varobj_children, install_new_value, ~varobj):
11807 Update.
11808 * value.h (value_incref): Move declaration earlier.
11809 (value_decref): Rename from value_free.
11810 (struct value_ref_policy): New.
11811 (value_ref_ptr): New typedef.
11812 (struct value_deleter): Remove.
11813 (gdb_value_up): Remove typedef.
11814 (release_value): Change return type.
11815 (release_value_or_incref): Remove.
11816 * value.c (set_value_parent): Update.
11817 (value_incref): Change return type.
11818 (value_decref): Rename from value_free.
11819 (value_free_to_mark, free_all_values, free_value_chain): Update.
11820 (release_value): Return value_ref_ptr.
11821 (release_value_or_incref): Remove.
11822 (record_latest_value, set_internalvar, clear_internalvar):
11823 Update.
11824 * stack.c (info_frame_command): Don't call value_free.
11825 * python/py-value.c (valpy_dealloc, valpy_new)
11826 (value_to_value_object): Update.
11827 * printcmd.c (do_examine): Update.
11828 * opencl-lang.c (lval_func_free_closure): Update.
11829 * mi/mi-main.c (register_changed_p): Don't call value_free.
11830 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11831 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11832 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11833 value_free.
11834 * guile/scm-value.c (vlscm_free_value_smob)
11835 (vlscm_scm_from_value): Update.
11836 * frame.c (frame_register_unwind, frame_unwind_register_signed)
11837 (frame_unwind_register_unsigned, get_frame_register_bytes)
11838 (put_frame_register_bytes): Don't call value_free.
11839 * findvar.c (address_from_register): Don't call value_free.
11840 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11841 * dwarf2loc.c (entry_data_value_free_closure)
11842 (value_of_dwarf_reg_entry, free_pieced_value_closure)
11843 (dwarf2_evaluate_loc_desc_full): Update.
11844 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11845 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11846 (~watchpoint, watch_command_1)
11847 (invalidate_bp_value_on_memory_change): Update.
11848 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11849
11850 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
11851
11852 PR gdb/23022
11853 * warning.m4: Add -Wno-error=deprecated-register.
11854 * configure: Re-generate.
11855
11856 2018-04-05 Tom Tromey <tom@tromey.com>
11857
11858 * linespec.h: Remove include of "vec.h".
11859
11860 2018-04-05 Tom Tromey <tom@tromey.com>
11861
11862 * linespec.c (typep): Remove typedef.
11863 (find_methods, find_superclass_methods): Take a std::vector.
11864 (find_method): Use std::vector.
11865
11866 2018-04-05 Tom Tromey <tom@tromey.com>
11867
11868 * utils.c (compare_strings): Remove.
11869 * utils.h (compare_strings): Remove.
11870 * objc-lang.h (find_imps): Update.
11871 * objc-lang.c (find_methods): Take a std::vector.
11872 (uniquify_strings, find_imps): Likewise.
11873 * linespec.c (find_methods): Take a std::vector.
11874 (decode_objc): Use std::vector.
11875 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11876 a std::vector.
11877 (find_method, find_function_symbols): Use std::vector.
11878
11879 2018-04-05 Tom Tromey <tom@tromey.com>
11880
11881 * completer.c (completion_tracker::completion_tracker): Remove
11882 cast.
11883 (completion_tracker::discard_completions): Likewise.
11884 * breakpoint.c (ambiguous_names_p): Remove cast.
11885 * ada-lang.c (_initialize_ada_language): Remove cast.
11886 * utils.h (streq): Update.
11887 (streq_hash): Add new declaration.
11888 * utils.c (streq): Return bool.
11889 (streq_hash): New function.
11890
11891 2018-04-05 Tom Tromey <tom@tromey.com>
11892
11893 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11894 Remove a string copy.
11895
11896 2018-04-05 Tom Tromey <tom@tromey.com>
11897
11898 * linespec.c (filter_results): Use std::vector.
11899 (decode_line_2, decode_line_full): Update.
11900
11901 2018-04-05 Tom Tromey <tom@tromey.com>
11902
11903 * linespec.c (canonical_to_fullform): Return std::string.
11904 (filter_results): Update.
11905 (struct decode_line_2_item): Add constructor.
11906 <fullform, displayform>: Now std::string.
11907 (decode_line_2_compare_items): Now a std::sort comparator.
11908 (decode_line_2): Update.
11909
11910 2018-04-05 Tom Tromey <tom@tromey.com>
11911
11912 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11913 (unexpected_linespec_error): Update.
11914 (linespec_parse_basic, parse_linespec): Update.
11915
11916 2018-04-05 Tom Tromey <tom@tromey.com>
11917
11918 * linespec.c (linespec_parse_basic): Reindent.
11919
11920 2018-04-05 Tom Tromey <tom@tromey.com>
11921
11922 * minsyms.h (iterate_over_minimal_symbols): Update.
11923 * minsyms.c (iterate_over_minimal_symbols): Take a
11924 gdb::function_view.
11925 * linespec.c (struct collect_minsyms): Remove.
11926 (compare_msyms): Now a std::sort comparator.
11927 (add_minsym): Add parameters.
11928 (search_minsyms_for_name): Update. Use std::vector.
11929
11930 2018-04-03 Tom Tromey <tom@tromey.com>
11931
11932 * mipsread.c (read_alphacoff_dynamic_symtab): Use
11933 gdb::byte_vector.
11934
11935 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11936
11937 * MAINTAINERS (Write After Approval): Add Weimin Pan.
11938
11939 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11940
11941 PR gdb/16959
11942 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
11943 printing static type.
11944
11945 2018-04-01 Tom Tromey <tom@tromey.com>
11946
11947 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11948 (rs6000_xfer_shared_libraries): Update.
11949
11950 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
11951
11952 * common/gdb_vecs.h (char_ptr): Remove.
11953 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11954
11955 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11956
11957 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11958 with std::vector.
11959 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11960
11961 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11962
11963 * tracepoint.h (struct uploaded_tp): Initialize fields.
11964 <actions, step_actions, cmd_strings>: Change type to
11965 std::vector<char *>.
11966 * tracepoint.c (get_uploaded_tp): Allocate with new.
11967 (free_uploaded_tps): Free with delete.
11968 (parse_tracepoint_definition): Adjust to std::vector change.
11969 * breakpoint.c (read_uploaded_action): Likewise.
11970 (create_tracepoint_from_upload): Likewise.
11971 * ctf.c (ctf_write_uploaded_tp): Likewise.
11972 (SET_ARRAY_FIELD): Likewise.
11973 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11974
11975 2018-03-30 Tom Tromey <tom@tromey.com>
11976
11977 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
11978 std::unique_ptr.
11979 (svr4_keep_data_in_core): Update.
11980 (svr4_read_so_list): Update.
11981
11982 2018-03-30 Tom Tromey <tom@tromey.com>
11983
11984 * windows-nat.c (handle_output_debug_string, handle_exception):
11985 Update.
11986 * target.h (target_read_string): Update.
11987 * target.c (target_read_string): Change "string" to
11988 unique_xmalloc_ptr.
11989 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11990 Update.
11991 * solib-frv.c (frv_current_sos): Update.
11992 * solib-dsbt.c (dsbt_current_sos): Update.
11993 * solib-darwin.c (darwin_current_sos): Update.
11994 * linux-thread-db.c (inferior_has_bug): Update.
11995 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11996 Update. Remove alloca.
11997 * ada-lang.c (ada_main_name): Update.
11998
11999 2018-03-30 Tom Tromey <tom@tromey.com>
12000
12001 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12002 (struct dwo_file_deleter): New.
12003 (dwo_file_up): New typedef.
12004 (open_and_init_dwo_file): Use dwo_file_up.
12005 (free_dwo_file_cleanup): Remove.
12006
12007 2018-03-30 Tom Tromey <tom@tromey.com>
12008
12009 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12010 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12011
12012 2018-03-30 Tom Tromey <tom@tromey.com>
12013
12014 * dwarf2read.c (class free_cached_comp_units): New class.
12015 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12016 (free_cached_comp_units): Remove function.
12017
12018 2018-03-30 Tom Tromey <tom@tromey.com>
12019
12020 * utils.h (make_cleanup_unpush_target): Remove.
12021 * inf-ptrace.c (struct target_unpusher): New.
12022 (target_unpush_up) New typedef.
12023 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12024 target_unpush_up.
12025 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12026
12027 2018-03-27 Tom Tromey <tom@tromey.com>
12028
12029 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12030
12031 2018-03-27 Pedro Alves <palves@redhat.com>
12032 Tom Tromey <tom@tromey.com>
12033
12034 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12035 destructor. Now a class.
12036 (gdb_readline_wrapper_cleanup): Remove function.
12037 (gdb_readline_wrapper): Remove cleanups.
12038
12039 2018-03-27 Tom Tromey <tom@tromey.com>
12040
12041 * typeprint.h (struct type_print_options) <local_typedefs,
12042 global_typedefs>: Remove "struct" keyword.
12043 (class typedef_hash_table): New class.
12044 (recursively_update_typedef_hash, add_template_parameters)
12045 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12046 (find_typedef_in_hash): Don't declare.
12047 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12048 (typedef_hash_table::recursively_update): Rename from
12049 recursively_update_typedef_hash. Now a member.
12050 (typedef_hash_table::add_template_parameters): Rename from
12051 add_template_parameters. Now a member.
12052 (typedef_hash_table::typedef_hash_table): Now a constructor;
12053 rename from create_typedef_hash.
12054 (typedef_hash_table::~typedef_hash_table): Now a destructor;
12055 rename from free_typedef_hash.
12056 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12057 (do_free_global_table): Remove.
12058 (typedef_hash_table::typedef_hash_table): New constructor; renamed
12059 from copy_type_recursive.
12060 (create_global_typedef_table): Remove.
12061 (typedef_hash_table::find_global_typedef): Now a member of
12062 typedef_hash_table.
12063 (typedef_hash_table::find_typedef): Rename from
12064 find_typedef_in_hash; now a member.
12065 (whatis_exp): Update.
12066 * extension.h (struct ext_lang_type_printers): Add constructor and
12067 destructor.
12068 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12069 declare.
12070 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12071 Now a constructor; rename from start_ext_lang_type_printers.
12072 (ext_lang_type_printers): Now a destructor; rename from
12073 free_ext_lang_type_printers.
12074 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12075 Update.
12076 (c_type_print_base_struct_union): Update. Remove cleanups.
12077
12078 2018-03-27 Tom Tromey <tom@tromey.com>
12079
12080 * dwarf-index-write.c: Include <cmath>.
12081
12082 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12083
12084 * NEWS: Add entry describing new "set|show varsize-limit" command.
12085 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12086 command.
12087 * printcmd.c (_initialize_printcmd): Add "set var" alias of
12088 "set variable".
12089
12090 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
12091
12092 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12093 dwarf-index-write.c
12094 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12095 * dwarf-index-common.c: New file.
12096 * dwarf-index-common.h: New file.
12097 * dwarf-index-write.c: New file.
12098 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12099 (struct dwarf2_section_info): Move from here.
12100 (dwarf2_section_info_def): Likewise.
12101 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12102 (offset_type): Likewise.
12103 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12104 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12105 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12106 (byte_swap): Likewise.
12107 (MAYBE_SWAP): Likewise.
12108 (dwarf2_per_cu_ptr): Likewise.
12109 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12110 (struct tu_stats): Likewise.
12111 (struct dwarf2_per_objfile): Likewise.
12112 (struct dwarf2_per_cu_data): Likewise.
12113 (struct signatured_type): Likewise.
12114 (sig_type_ptr): Likewise.
12115 (DEF_VEC_P (sig_type_ptr)): Likewise.
12116 (INDEX4_SUFFIX): Likewise.
12117 (INDEX5_SUFFIX): Likewise.
12118 (DEBUG_STR_SUFFIX): Likewise.
12119 (dwarf2_read_section): Make non-static.
12120 (mapped_index_string_hash): Move from here.
12121 (dwarf5_djb_hash): Likewise.
12122 (file_write): Likewise.
12123 (class data_buf): Likewise.
12124 (struct symtab_index_entry): Likewise.
12125 (struct mapped_symtab): Likewise.
12126 (find_slot): Likewise.
12127 (hash_expand): Likewise.
12128 (add_index_entry): Likewise.
12129 (uniquify_cu_indices): Likewise.
12130 (class c_str_view): Likewise.
12131 (class c_str_view_hasher): Likewise.
12132 (class vector_hasher): Likewise.
12133 (write_hash_table): Likewise.
12134 (psym_index_map): Likewise.
12135 (struct addrmap_index_data): Likewise.
12136 (add_address_entry): Likewise.
12137 (add_address_entry_worker): Likewise.
12138 (write_address_map): Likewise.
12139 (symbol_kind): Likewise.
12140 (write_psymbols): Likewise.
12141 (struct signatured_type_index_data): Likewise.
12142 (write_one_signatured_type): Likewise.
12143 (recursively_count_psymbols): Likewise.
12144 (recursively_write_psymbols): Likewise.
12145 (class debug_names): Likewise.
12146 (check_dwarf64_offsets): Likewise.
12147 (psyms_seen_size): Likewise.
12148 (write_gdbindex): Likewise.
12149 (write_debug_names): Likewise.
12150 (assert_file_size): Likewise.
12151 (write_psymtabs_to_index): Likewise.
12152 (save_gdb_index_command): Likewise.
12153 (_initialize_dwarf2_read): Don't register the "save gdb-index"
12154 command.
12155 * dwarf2read.h: New file.
12156
12157 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12158
12159 PR gdb/22670
12160 * dwarf2read.c (dwarf2_physname): Do not return the demangled
12161 symbol name if the CU's language stores symbol names in linkage
12162 format.
12163 * language.h (struct language_defn)
12164 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
12165 all instances of this struct.
12166
12167 2018-03-26 Tom Tromey <tom@tromey.com>
12168
12169 * stack.c (backtrace_command_1): Remove verbose code.
12170
12171 2018-03-26 Tom Tromey <tom@tromey.com>
12172
12173 * python/py-framefilter.c (py_print_type): Don't catch
12174 exceptions. Return void.
12175 (py_print_value): Likewise.
12176 (py_print_single_arg): Likewise.
12177 (enumerate_args): Don't catch exceptions.
12178 (py_print_args): Likewise.
12179 (py_print_frame): Likewise.
12180 (gdbpy_apply_frame_filter): Catch exceptions here.
12181
12182 2018-03-26 Tom Tromey <tom@tromey.com>
12183
12184 * stack.c (_initialize_stack): Remove trailing newlines from help
12185 text. Add "Usage" line to "backtrace" help.
12186
12187 2018-03-26 Tom Tromey <tom@tromey.com>
12188
12189 PR python/16486:
12190 * python/py-framefilter.c (py_print_args): Call wrap_hint.
12191
12192 2018-03-26 Tom Tromey <tom@tromey.com>
12193
12194 * python/py-framefilter.c (py_print_single_arg): Return
12195 EXT_LANG_BT_ERROR from catch.
12196
12197 2018-03-26 Tom Tromey <tom@tromey.com>
12198
12199 PR backtrace/15584:
12200 * stack.c (backtrace_command_1): Move some code into no-filters
12201 "if".
12202
12203 2018-03-26 Tom Tromey <tom@tromey.com>
12204
12205 * python/py-framefilter.c (throw_quit_or_print_exception): New
12206 function.
12207 (gdbpy_apply_frame_filter): Use it.
12208
12209 2018-03-26 Tom Tromey <tom@tromey.com>
12210
12211 PR cli/17716:
12212 * python/py-framefilter.c (py_print_type, py_print_value)
12213 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12214 RETURN_MASK_ERROR.
12215
12216 2018-03-26 Tom Tromey <tom@tromey.com>
12217
12218 * python/py-framefilter.c (enumerate_args): Use
12219 gdb::unique_xmalloc_ptr.
12220
12221 2018-03-26 Tom Tromey <tom@tromey.com>
12222
12223 * python/py-framefilter.c (py_print_frame): Return
12224 EXT_LANG_BT_OK.
12225 (gdbpy_apply_frame_filter): Update comment.
12226 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12227 Remove.
12228 <EXT_LANG_BT_NO_FILTERS>: Change value.
12229
12230 2018-03-26 Tom Tromey <tom@tromey.com>
12231
12232 PR backtrace/15582:
12233 * stack.c (backtrace_command): Parse "hide" argument.
12234 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12235 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12236 constant.
12237
12238 2018-03-26 Tom Tromey <tom@tromey.com>
12239
12240 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12241 add "flags".
12242 (backtrace_command): Remove "fulltrace", add "flags".
12243
12244 2018-03-26 Tom Tromey <tom@tromey.com>
12245
12246 * stack.c (backtrace_command): Rewrite command line parsing.
12247
12248 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12249
12250 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12251
12252 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12253
12254 * filename-seen-cache.h: Add include guard.
12255
12256 2018-03-26 Keith Seitz <keiths@redhat.com>
12257
12258 * symfile.c (place_section): Remove "struct" from section_addr_info
12259 in comment.
12260 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12261 "struct" keyword from section_addr_info.
12262
12263 2018-03-26 Alan Hayward <alan.hayward@arm.com>
12264
12265 * regformats/regdef.h (reg): Add constructors.
12266
12267 2018-03-25 Pedro Alves <palves@redhat.com>
12268
12269 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12270 if then/else bodies in var_func_name extraction.
12271
12272 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
12273
12274 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12275 lookup_minimal_symbol() to find symbol entry.
12276 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12277
12278 2018-03-23 Keith Seitz <keiths@redhat.com>
12279
12280 PR c++/22968
12281 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12282 nested type definitions for C++, too.
12283
12284 2018-03-23 Tom Tromey <tom@tromey.com>
12285
12286 * machoread.c (struct oso_el): Add a constructor. Don't define as
12287 a typedef.
12288 (macho_register_oso): Remove.
12289 (macho_symtab_read): Take a std::vector.
12290 (oso_el_compare_name): Now a std::sort comparator.
12291 (macho_symfile_read_all_oso): Take a std::vector.
12292 (macho_symfile_read): Use std::vector. Remove cleanups.
12293
12294 2018-03-22 Tom Tromey <tom@tromey.com>
12295
12296 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12297 (record_full_goto_bookmark): Use std::string.
12298
12299 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12300
12301 PR tdep/18295
12302 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12303 a single mask.
12304
12305 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12306
12307 * rs6000-tdep.c (store_insn_p): New function.
12308 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12309 and cr_reg to their unshifted values. Use store_insn_p to
12310 match LR saves using either R1 or fdata->alloca_reg. Use
12311 store_insn_p to match CR saves. Set alloca_reg_offset
12312 when alloca_reg and framep are set. Remove lr_reg shift
12313 when assigning to fdata->lr_register.
12314
12315 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
12316
12317 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12318 command line args instead of emitting a warning.
12319
12320 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12321
12322 * tracepoint.h (struct static_tracepoint_marker): Initialize
12323 fields, define default constructor, move constructor and move
12324 assignment, disable the rest.
12325 <str_id, extra>: Make std::string.
12326 (release_static_tracepoint_marker): Remove.
12327 (free_current_marker): Remove.
12328 * tracepoint.c (free_current_marker): Remove.
12329 (parse_static_tracepoint_marker_definition): Adjust to
12330 std::string, use new hex2str overload.
12331 (release_static_tracepoint_marker): Remove.
12332 (print_one_static_tracepoint_marker): Get marker by reference
12333 and adjust to std::string.
12334 (info_static_tracepoint_markers_command): Adjust to std::vector
12335 changes
12336 * target.h (static_tracepoint_marker_p): Remove typedef.
12337 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12338 (struct target_ops) <to_static_tracepoint_marker_at>: Return
12339 bool.
12340 <to_static_tracepoint_markers_by_strid>: Return std::vector.
12341 * target-debug.h
12342 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12343 (target_debug_print_std_vector_static_tracepoint_marker): New.
12344 (target_debug_print_struct_static_tracepoint_marker_p): Rename
12345 to...
12346 (target_debug_print_static_tracepoint_marker_p): ... this.
12347 * target-delegates.c: Re-generate.
12348 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12349 Make std::string.
12350 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12351 (decode_static_tracepoint_spec): Adjust to std::vector.
12352 (tracepoint_print_one_detail): Adjust to std::string.
12353 (strace_marker_decode_location): Adjust to std::string.
12354 (update_static_tracepoint): Adjust to std::string, remove call
12355 to release_static_tracepoint_marker.
12356 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12357 Adjust to std::vector.
12358 * remote.c (remote_static_tracepoint_marker_at): Return bool.
12359 (remote_static_tracepoint_markers_by_strid): Adjust to
12360 std::vector.
12361 * common/rsp-low.h (hex2str): New overload with explicit count
12362 of bytes.
12363 * common/rsp-low.c (hex2str): New overload with explicit count
12364 of bytes.
12365 * unittests/rsp-low-selftests.c (test_hex2str): New function.
12366 (_initialize_rsp_low_selftests): Add test_hex2str test.
12367 * unittests/tracepoint-selftests.c
12368 (test_parse_static_tracepoint_marker_definition): Adjust to
12369 std::string.
12370
12371 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12372
12373 * tracepoint.c (parse_static_tracepoint_marker_definition):
12374 Consider case where the definition is followed by more
12375 definitions.
12376 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12377 tracepoint-selftests.c.
12378 * unittests/tracepoint-selftests.c: New.
12379
12380 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12381
12382 * MAINTAINERS (Write After Approval): Add Pedro Franco de
12383 Carvalho.
12384
12385 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12386
12387 * symtab.c (find_pc_sect_line): fixed indentation.
12388
12389 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12390
12391 * symtab.c (find_pc_sect_line): now uses binary search.
12392
12393 2018-03-19 Tom Tromey <tom@tromey.com>
12394
12395 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12396 "IDENT" production.
12397
12398 2018-03-19 Pedro Alves <palves@redhat.com>
12399 Tom Tromey <tom@tromey.com>
12400
12401 * unittests/observable-selftests.c: New file.
12402 * common/observable.h: New file.
12403 * observable.h: New file.
12404 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12405 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12406 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12407 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12408 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12409 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12410 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12411 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12412 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12413 python/py-breakpoint.c, python/py-finishbreakpoint.c,
12414 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12415 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12416 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12417 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12418 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12419 tui/tui-interp.c, valops.c: Update all users.
12420 * tui/tui-hooks.c (tui_bp_created_observer)
12421 (tui_bp_deleted_observer, tui_bp_modified_observer)
12422 (tui_inferior_exit_observer, tui_before_prompt_observer)
12423 (tui_normal_stop_observer, tui_register_changed_observer):
12424 Remove.
12425 (tui_observers_token): New global.
12426 (attach_or_detach, tui_attach_detach_observers): New functions.
12427 (tui_install_hooks, tui_remove_hooks): Use
12428 tui_attach_detach_observers.
12429 * record-btrace.c (record_btrace_thread_observer): Remove.
12430 (record_btrace_thread_observer_token): New global.
12431 * observer.sh: Remove.
12432 * observer.c: Rename to observable.c.
12433 * observable.c (namespace gdb_observers): Define new objects.
12434 (observer_debug): Move into gdb_observers namespace.
12435 (struct observer, struct observer_list, xalloc_observer_list_node)
12436 (xfree_observer_list_node, generic_observer_attach)
12437 (generic_observer_detach, generic_observer_notify): Remove.
12438 (_initialize_observer): Update.
12439 Don't include observer.inc.
12440 * Makefile.in (generated_files): Remove observer.h, observer.inc.
12441 (clean mostlyclean): Likewise.
12442 (observer.h, observer.inc): Remove targets.
12443 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12444 (COMMON_SFILES): Use observable.c, not observer.c.
12445 * .gitignore: Remove observer.h.
12446
12447 2018-03-18 Tom Tromey <tom@tromey.com>
12448
12449 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12450 gdb::def_vector.
12451 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12452
12453 2018-03-17 Tom Tromey <tom@tromey.com>
12454
12455 * auto-load.c (auto_load_objfile_script_1): Use std::string.
12456
12457 2018-03-17 Tom Tromey <tom@tromey.com>
12458
12459 * target.c (class scoped_target_fd): New.
12460 (target_fileio_close_cleanup): Remove.
12461 (target_fileio_read_alloc_1): Use scoped_target_fd.
12462
12463 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
12464
12465 * silent-rules.mk: New.
12466 * Makefile.in: Include silent-rules.mk
12467 (srcdir, VPATH, top_srcdir): Move up.
12468 (COMPILE): Add ECHO_CXX.
12469 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12470 (init.c): Add ECHO_INIT_C.
12471 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12472 (version.c): Add ECHO_GEN.
12473 (printcmd.o): Add ECHO_CXX.
12474 (target-float.o): Add ECHO_CXX.
12475 (ada-exp.o): Add ECHO_CXX.
12476 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12477 (insight$(EXEEXT)): Add ECHO_CXXLD.
12478 * gnulib/configure.ac: Add AM_SILENT_RULES.
12479 * gnulib/aclocal.m4: Re-generate.
12480 * gnulib/configure: Re-generate.
12481 * gnulib/import/Makefile.in: Re-generate.
12482
12483 2018-03-16 Tom Tromey <tom@tromey.com>
12484
12485 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12486 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12487 * utils.c (do_free_section_addr_info)
12488 (make_cleanup_free_section_addr_info): Remove.
12489 * symfile.h (struct other_sections): Add constructor.
12490 (struct section_addr_info): Remove.
12491 (section_addr_info): New typedef.
12492 (struct sym_fns) <sym_offsets>: Change type of parameter.
12493 (build_section_addr_info_from_objfile)
12494 (relative_addr_info_to_section_offsets, addr_info_make_relative)
12495 (default_symfile_offsets, symbol_file_add)
12496 (symbol_file_add_from_bfd)
12497 (build_section_addr_info_from_section_table): Update.
12498 (alloc_section_addr_info, free_section_addr_info): Don't declare.
12499 * symfile.c (alloc_section_addr_info): Remove.
12500 (build_section_addr_info_from_section_table): Change return type.
12501 Update.
12502 (build_section_addr_info_from_bfd)
12503 (build_section_addr_info_from_objfile): Likewise.
12504 (free_section_addr_info): Remove.
12505 (relative_addr_info_to_section_offsets): Change type of "addrs".
12506 (addrs_section_compar): Now a std::sort comparator.
12507 (addrs_section_sort): Change return type.
12508 (addr_info_make_relative): Change type of "addrs". Update.
12509 (default_symfile_offsets, syms_from_objfile_1)
12510 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12511 (symbol_file_add_separate): Update.
12512 (symbol_file_add): Change type of "addrs". Update.
12513 (add_symbol_file_command): Update. Remove cleanups.
12514 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
12515 cleanups.
12516 * symfile-debug.c (debug_sym_offsets): Change type of "info".
12517 * solib.c (solib_read_symbols): Update.
12518 * objfiles.c (objfile_relocate): Update. Remove cleanups.
12519 * machoread.c (macho_symfile_offsets): Update.
12520 * jit.c (jit_bfd_try_read_symtab): Update.
12521
12522 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
12523
12524 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12525 unittests/utils-selftests.c.
12526 * unittests/utils-selftests.c: New file.
12527
12528 2018-03-14 Tom Tromey <tom@tromey.com>
12529
12530 PR cli/14977:
12531 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12532 for NULL.
12533
12534 2018-03-14 Tom Tromey <tom@tromey.com>
12535
12536 PR cli/19918:
12537 * printcmd.c (printf_pointer): Allow "-" in format.
12538
12539 2018-03-14 Tom Tromey <tom@tromey.com>
12540
12541 * printcmd.c (_initialize_printcmd): Add usage to printf.
12542
12543 2018-03-14 Yao Qi <qiyao@sourceware.org>
12544
12545 * MAINTAINERS: Update my email address.
12546
12547 2018-03-13 Tom Tromey <tom@tromey.com>
12548
12549 * machoread.c (macho_check_dsym): Change filenamep to a
12550 std::string*.
12551 (macho_symfile_read): Update.
12552 * symfile.c (load_command): Use std::string.
12553
12554 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
12555
12556 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12557 to error message string.
12558 (riscv_register_name): Use xsnprintf instead of sprintf.
12559 (riscv_insn::fetch_instruction): Use gdb_assert instead of
12560 internal_error.
12561 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12562 error.
12563 (riscv_push_dummy_call): Likewise.
12564
12565 2018-03-12 Tom Tromey <tom@tromey.com>
12566
12567 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12568 Use gdb::byte_vector.
12569 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12570
12571 2018-03-12 Yao Qi <yao.qi@linaro.org>
12572
12573 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12574 parameter type to readable_regcache.
12575 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12576 the declaration.
12577
12578 2018-03-11 Tom Tromey <tom@tromey.com>
12579
12580 * dwarf2read.c (struct nextfield): Add initializers.
12581 (struct nextfnfield): Remove.
12582 (struct fnfieldlist): Add initializers. Remove "length" and
12583 "head", use std::vector.
12584 (struct decl_field_list): Remove.
12585 (struct field_info): Add initializers.
12586 <fields, baseclasses>: Now std::vector.
12587 <nbaseclasses, nfnfields, typedef_field_list_count,
12588 nested_types_list_count>: Remove.
12589 (dwarf2_add_field, dwarf2_add_type_defn)
12590 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12591 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12592 (process_structure_scope): Update.
12593
12594 2018-03-11 Tom Tromey <tom@tromey.com>
12595
12596 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12597 for use by std::sort.
12598 (build_type_psymtabs_1): Use std::vector.
12599
12600 2018-03-09 Eli Zaretskii <eliz@gnu.org>
12601
12602 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12603 and LIBMPFR in the printed configuration.
12604
12605 2018-03-08 Tom Tromey <tom@tromey.com>
12606
12607 * source.c (get_filename_and_charpos): Use scoped_fd.
12608 * nto-procfs.c (procfs_open_1): Use scoped_fd.
12609 (procfs_pidlist): Likewise.
12610 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12611 (iterate_over_mappings): Likewise.
12612
12613 2018-03-08 Tom Tromey <tom@tromey.com>
12614
12615 * infcall.c (struct call_return_meta_info)
12616 <stack_temporaries_enabled>: Remove.
12617 (get_call_return_value, call_function_by_hand_dummy): Update.
12618 * thread.c (disable_thread_stack_temporaries): Remove.
12619 (enable_thread_stack_temporaries): Remove.
12620 (thread_stack_temporaries_enabled_p): Return bool.
12621 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12622 (get_last_thread_stack_temporary): Update.
12623 * eval.c (evaluate_subexp): Update.
12624 * gdbthread.h (class enable_thread_stack_temporaries): Now a
12625 class, not a function.
12626 (value_ptr, value_vec): Remove typedefs.
12627 (class thread_info) <stack_temporaries_enabled>: Now bool.
12628 <stack_temporaries>: Now a std::vector.
12629 (thread_stack_temporaries_enabled_p)
12630 (value_in_thread_stack_temporaries): Return bool.
12631
12632 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
12633
12634 * remote.c (putpkt_binary): Fix omitted bytes reporting.
12635 (getpkt_or_notif_sane_1): Likewise.
12636
12637 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12638
12639 * build-id.c (build_id_to_debug_bfd): Use std::string.
12640
12641 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12642
12643 * build-id.c (find_separate_debug_file_by_buildid): Return
12644 std::string.
12645 * build-id.h (find_separate_debug_file_by_buildid): Return
12646 std::string.
12647 * coffread.c (coff_symfile_read): Adjust to std::string.
12648 * elfread.c (elf_symfile_read): Adjust to std::string.
12649 * symfile.c (separate_debug_file_exists): Change parameter to
12650 std::string.
12651 (find_separate_debug_file): Return std::string.
12652 (find_separate_debug_file_by_debuglink): Return std::string.
12653 * symfile.h (find_separate_debug_file_by_debuglink): Return
12654 std::string.
12655
12656 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12657
12658 * common/xml-utils.c (xml_escape_text): Move code to...
12659 (xml_escape_text_append): ... this new function.
12660 * common/xml-utils.h (xml_escape_text_append): New declaration.
12661 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12662 New function.
12663 (_initialize_xml_utils): register test_xml_escape_text_append as
12664 a selftest.
12665
12666 2018-03-07 Alan Hayward <alan.hayward@arm.com>
12667
12668 * defs.h: Remove MAX_REGISTER_SIZE.
12669 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12670 asserts.
12671 * python/py-unwind.c (pyuw_sniffer): Likewise.
12672
12673 2018-03-07 Tom Tromey <tom@tromey.com>
12674
12675 * linux-tdep.c (linux_info_proc): Update.
12676 * target.h (struct target_ops) <to_fileio_readlink>: Return
12677 optional<string>.
12678 (target_fileio_readlink): Return optional<string>.
12679 * remote.c (remote_hostio_readlink): Return optional<string>.
12680 * inf-child.c (inf_child_fileio_readlink): Return
12681 optional<string>.
12682 * target.c (target_fileio_readlink): Return optional<string>.
12683
12684 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
12685
12686 * regcache.c (cooked_read_test): Add riscv to the list of
12687 architectures that have a save_reggroup.
12688
12689 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
12690
12691 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12692 value is not a dynamic class object.
12693
12694 2018-03-06 Tom Tromey <tom@tromey.com>
12695
12696 * rust-exp.y: Formatting fixes.
12697
12698 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12699
12700 * riscv-tdep.c (riscv_register_name): Remove target description
12701 support.
12702 (riscv_gdbarch_init): Remove target description check.
12703
12704 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12705
12706 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12707 comment.
12708 * riscv-tdep.h: Likewise.
12709
12710 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12711
12712 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12713 (riscv_pseudo_register_write): Delete.
12714 (riscv_gdbarch_init): Remove all use of pseudo registers.
12715
12716 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12717
12718 * record-btrace.c (btrace_print_lines): Replace cleanup
12719 parameter with RAII equivalents.
12720 (btrace_insn_history): Replace cleanup with RAII equivalents.
12721 * ui-out.h (make_cleanup_ui_out_list_begin_end,
12722 make_cleanup_ui_out_tuple_begin_end): Remove.
12723 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12724 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12725 make_cleanup_ui_out_list_begin_end): Remove.
12726
12727 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12728
12729 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12730 parameter types to std::vector. Use bool.
12731 (record_btrace_wait): Replace VEC(tp_t) with
12732 std::vector<thread_info *>.
12733 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12734
12735 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12736
12737 * record-btrace.c (record_btrace_disable_callback): Remove.
12738 (struct scoped_btrace_disable): New.
12739 (record_btrace_open): Use scoped_btrace_disable.
12740
12741 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12742
12743 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12744 reading values from registers.
12745
12746 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12747
12748 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12749 where appropriate.
12750
12751 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12752
12753 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12754 change parameter type. Use GDB's print functions, and use
12755 core_addr_to_string where appropriate.
12756 (riscv_push_dummy_call): Use core_addr_to_string where
12757 appropriate, update call to riscv_print_arg_location, and reindent
12758 a few lines.
12759 (riscv_return_value): Update call to riscv_print_arg_location.
12760
12761 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12762 Tim Newsome <tim@sifive.com>
12763 Albert Ou <a0u@eecs.berkeley.edu>
12764 Darius Rad <darius@bluespec.com>
12765
12766 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12767 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12768 (ALLDEPFILES): Add riscv-tdep.c
12769 * configure.tgt: Add riscv support.
12770 * riscv-tdep.c: New file.
12771 * riscv-tdep.h: New file.
12772 * NEWS: Mention new target.
12773 * MAINTAINERS: Add entry for riscv.
12774
12775 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12776
12777 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12778 fields within aggregates.
12779
12780 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
12781
12782 * record-btrace.c (btrace_print_lines): Change type of flags to
12783 gdb_disassembly_flags.
12784
12785 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12786
12787 * fbsd-nat.c: Include "inf-ptrace.h".
12788 (USE_SIGTRAP_SIGINFO): Conditionally define.
12789 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12790 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12791 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12792 function.
12793 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12794 Likewise.
12795 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12796 Likewise.
12797 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12798 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12799 "supports_stopped_by_hw_breakpoint" target methods.
12800
12801 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12802
12803 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12804 * fbsd-nat.c (debug_fbsd_nat): New variable.
12805 (show_fbsd_nat_debug): New function.
12806 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12807 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12808
12809 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12810
12811 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12812 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12813 prototype.
12814 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12815 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12816 method.
12817
12818 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12819
12820 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12821 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12822
12823 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12824
12825 * charset.c (struct charset_vector): New.
12826 (charsets): Change type to charset_vector.
12827 (find_charset_names): Adjust.
12828 (add_one): Adjust.
12829 (_initialize_charset): Adjust.
12830
12831 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12832
12833 * progspace.h (struct program_space) <deleted_solibs>: Change
12834 type to std::vector<std::string>.
12835 * progspace.c (clear_program_space_solib_cache): Adjust.
12836 * breakpoint.c (print_solib_event): Adjust.
12837 (check_status_catch_solib): Adjust.
12838 * solib.c (update_solib_list): Adjust.
12839 * ui-out.h (class ui_out) <field_string>: New overload.
12840 * ui-out.c (ui_out::field_string): New overload.
12841
12842 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12843
12844 * progspace.h (struct program_space): Add constructor and
12845 destructor, initialize fields.
12846 (add_program_space): Remove.
12847 * progspace.c (add_program_space): Rename to...
12848 (program_space::program_space): ... this.
12849 (release_program_space): Rename to...
12850 (program_space::~program_space): ... this.
12851 (delete_program_space): Use delete to delete program_space.
12852 (initialize_progspace): Use new to allocate program_space.
12853 * inferior.c (add_inferior_with_spaces): Likewise.
12854 (clone_inferior_command): Likewise.
12855 * infrun.c (follow_fork_inferior): Likewise.
12856 (handle_vfork_child_exec_or_exit): Likewise.
12857
12858 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12859
12860 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12861 (delim_string_to_char_ptr_vec): Return std::vector of
12862 gdb::unique_xmalloc_ptr.
12863 (dirnames_to_char_ptr_vec_append): Take std::vector of
12864 gdb::unique_xmalloc_ptr.
12865 (dirnames_to_char_ptr_vec): Return std::vector of
12866 gdb::unique_xmalloc_ptr.
12867 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12868 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12869 (delim_string_to_char_ptr_vec): Return an std::vector of
12870 gdb::unique_xmalloc_ptr, adjust the code.
12871 (dirnames_to_char_ptr_vec_append): Take an std::vector of
12872 gdb::unique_xmalloc_ptr, adjust the code.
12873 (dirnames_to_char_ptr_vec): Return an std::vector of
12874 gdb::unique_xmalloc_ptr, adjust the code.
12875 * auto-load.c (auto_load_safe_path_vec): Change type to
12876 std::vector of gdb::unique_xmalloc_ptr.
12877 (auto_load_expand_dir_vars): Return an std::vector of
12878 gdb::unique_xmalloc_ptr, adjust the code.
12879 (auto_load_safe_path_vec_update): Adjust.
12880 (filename_is_in_auto_load_safe_path_vec): Adjust.
12881 (auto_load_objfile_script_1): Adjust.
12882 * build-id.c (build_id_to_debug_bfd): Adjust.
12883 * linux-thread-db.c (thread_db_load_search): Adjust.
12884 * source.c (add_path): Adjust.
12885 (openp): Adjust.
12886 * symfile.c (find_separate_debug_file): Adjust.
12887 * utils.c (do_free_char_ptr_vec): Remove.
12888 (make_cleanup_free_char_ptr_vec): Remove.
12889
12890 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
12891
12892 PR gdb/22907
12893 * common/pathstuff.c: Conditionally include "<windows.h>".
12894
12895 2018-03-01 Georg Sauthoff <mail@georg.so>
12896
12897 PR gdb/22888
12898 * gcore.in: Quote variables and switch interpreter to bash.
12899
12900 2018-03-01 Tom Tromey <tom@tromey.com>
12901
12902 * dwarf2read.c (alloc_discriminant_info): Fix default_index
12903 assertion. Add assertion for discriminant_index.
12904 (quirk_rust_enum): Use correct base type name in univariant case.
12905
12906 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
12907
12908 * record.c (get_call_history_modifiers): Return a
12909 record_print_flags.
12910 (cmd_record_call_history): Adjust.
12911 * record-btrace.c (record_btrace_call_history): Adjust.
12912 (record_btrace_call_history_range): Adjust.
12913 (record_btrace_call_history_from): Adjust.
12914 * target-debug.h (target_debug_print_record_print_flags): New.
12915 * target-delegates.c: Re-generate.
12916 * target.c (target_call_history): Change flags type.
12917 (target_call_history_from): Likewise.
12918 (target_call_history_range): Likewise.
12919 * target.h (struct target_ops) <target_call_history>: Likewise.
12920 (target_call_history_from): Likewise.
12921 (target_call_history_range): Likewise.
12922
12923 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12924 Simon Marchi <simon.marchi@polymtl.ca>
12925
12926 * common/common-utils.c: Include "sys/stat.h".
12927 (is_regular_file): Move here from "source.c"; change return
12928 type to "bool".
12929 * common/common-utils.h (is_regular_file): New prototype.
12930 * common/pathstuff.c (contains_dir_separator): New function.
12931 * common/pathstuff.h (contains_dir_separator): New prototype.
12932 * source.c: Don't include "sys/stat.h".
12933 (is_regular_file): Move to "common/common-utils.c".
12934
12935 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12936
12937 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12938 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12939 * auto-load.c: Include "common/pathstuff.h".
12940 * common/common-def.h (current_directory): Move here.
12941 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12942 function.
12943 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12944 prototype.
12945 * common/pathstuff.c: New file.
12946 * common/pathstuff.h: New file.
12947 * compile/compile.c: Include "common/pathstuff.h".
12948 * defs.h (current_directory): Move to "common/common-defs.h".
12949 * dwarf2read.c: Include "common/pathstuff.h".
12950 * exec.c: Likewise.
12951 * guile/scm-safe-call.c: Likewise.
12952 * linux-thread-db.c: Likewise.
12953 * main.c: Likewise.
12954 * nto-tdep.c: Likewise.
12955 * objfiles.c: Likewise.
12956 * source.c: Likewise.
12957 * symtab.c: Likewise.
12958 * utils.c: Include "common/pathstuff.h".
12959 (gdb_realpath): Move to "common/pathstuff.c".
12960 (gdb_realpath_keepfile): Likewise.
12961 (gdb_abspath): Likewise.
12962 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12963 (gdb_realpath_keepfile): Likewise.
12964 (gdb_abspath): Likewise.
12965
12966 2018-02-28 John Baldwin <jhb@FreeBSD.org>
12967
12968 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12969 wildcard process pid for super_resume for kernels with a
12970 specific bug.
12971
12972 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
12973
12974 * compile/compile.c (get_args): Add additional comments
12975 explaining function.
12976
12977 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
12978 Tom Tromey <tom@tromey.com>
12979
12980 * target.h (memory_write_request_s): Remove typedef. Don't define
12981 VEC.
12982 (target_write_memory_blocks): Change argument to std::vector.
12983 (struct memory_write_request): Add constructor.
12984 * target-memory.c (compare_block_starting_address): Return bool.
12985 Change argument types.
12986 (claim_memory): Change arguments to use std::vector.
12987 (split_regular_and_flash_blocks, blocks_to_erase)
12988 (compute_garbled_blocks): Likewise.
12989 (cleanup_request_data, cleanup_write_requests_vector): Remove.
12990 (target_write_memory_blocks): Change argument to std::vector.
12991 * symfile.c (struct load_section_data): Add constructor and
12992 destructor. Use std::vector for "requests".
12993 (struct load_progress_data): Add initializers.
12994 (load_section_callback): Update. Use "new".
12995 (clear_memory_write_data): Remove.
12996 (generic_load): Update.
12997
12998 2018-02-27 Alan Hayward <alan.hayward@arm.com>
12999
13000 * arch/aarch64.h: Use common/tdesc.h.
13001
13002 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13003
13004 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13005 architecture with a 64-bit ABI.
13006
13007 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13008
13009 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13010 ahead of target description loading.
13011
13012 2018-02-26 Tom Tromey <tom@tromey.com>
13013
13014 * stack.c (backtrace_command_1): Update.
13015 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13016 of "flags".
13017 * python/py-framefilter.c (py_print_frame)
13018 (gdbpy_apply_frame_filter): Change type of "flags".
13019 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13020 of "flags".
13021 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13022 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13023 * extension.h (enum frame_filter_flag): Rename from
13024 frame_filter_flags.
13025 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13026 (apply_ext_lang_frame_filter): Change type of "flags".
13027 * extension.c (apply_ext_lang_frame_filter): Change type of
13028 "flags".
13029 * extension-priv.h (struct extension_language_ops)
13030 <apply_frame_filter>: Change type of "flags".
13031
13032 2018-02-26 Tom Tromey <tom@tromey.com>
13033
13034 PR python/16497:
13035 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
13036 off-by-one in py_end computation.
13037 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13038 PRINT_MORE_FRAMES.
13039 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13040 constant.
13041
13042 2018-02-26 Tom Tromey <tom@tromey.com>
13043
13044 * dwarf2read.c (struct variant_field): New.
13045 (struct nextfield) <variant>: New field.
13046 (dwarf2_add_field): Handle DW_TAG_variant_part.
13047 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13048 discriminated union.
13049 (read_structure_type): Handle DW_TAG_variant_part.
13050 (handle_struct_member_die): New function, extracted from
13051 process_structure_scope. Handle DW_TAG_variant.
13052 (process_structure_scope): Handle discriminated unions. Call
13053 handle_struct_member_die.
13054
13055 2018-02-26 Tom Tromey <tom@tromey.com>
13056
13057 * rust-lang.h (rust_last_path_segment): Declare.
13058 * rust-lang.c (rust_last_path_segment): Now public. Change
13059 contract.
13060 (struct disr_info): Remove.
13061 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13062 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13063 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13064 (rust_enum_p, rust_enum_variant): New function.
13065 (rust_underscore_fields): Remove "offset" parameter.
13066 (rust_print_enum): New function.
13067 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13068 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13069 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
13070 enums.
13071 (rust_internal_print_type): New function, from rust_print_type.
13072 Remove enum code.
13073 (rust_print_type): Call rust_internal_print_type.
13074 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13075 Update enum handling.
13076 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13077 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13078 (rust_union_quirks): New functions.
13079 (process_full_comp_unit, process_full_type_unit): Call
13080 rust_union_quirks.
13081 (process_structure_scope): Update rust_unions if necessary.
13082
13083 2018-02-26 Tom Tromey <tom@tromey.com>
13084
13085 * value.h (value_union_variant): Declare.
13086 * valops.c (value_union_variant): New function.
13087 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13088 (struct discriminant_info): New.
13089 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13090 enumerator.
13091 (struct main_type) <flag_discriminated_union>: New field.
13092
13093 2018-02-26 Tom Tromey <tom@tromey.com>
13094
13095 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13096 unittests/unpack-selftests.c.
13097 * unittests/unpack-selftests.c: New file.
13098 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13099
13100 2018-02-26 Yao Qi <yao.qi@linaro.org>
13101
13102 * dwarf2read.c (struct partial_die_info) <read>: New method.
13103 (read_partial_die): Remove the declaration.
13104 (load_partial_dies): Update.
13105 (partial_die_info::partial_die_info):
13106 (read_partial_die): Change it to partial_die_info::read.
13107
13108 2018-02-26 Yao Qi <yao.qi@linaro.org>
13109
13110 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13111 (fixup_partial_die): Remove declaration.
13112 (scan_partial_symbols): Update.
13113 (partial_die_parent_scope): Likewise.
13114 (partial_die_full_name): Likewise.
13115 (fixup_partial_die): Change it to partial_die_info::fixup.
13116
13117 2018-02-26 Yao Qi <yao.qi@linaro.org>
13118
13119 * dwarf2read.c (read_partial_die): Update the declaration.
13120 (load_partial_dies): Caller update.
13121 (read_partial_die): Remove one argument abbrev_len.
13122
13123 2018-02-26 Yao Qi <yao.qi@linaro.org>
13124
13125 * dwarf2read.c (struct partial_die_info): Add ctor, delete
13126 assignment operator.
13127 (load_partial_dies): Use ctor and copy ctor.
13128 (read_partial_die): Update.
13129 (dwarf2_cu::find_partial_die): Use ctor.
13130
13131 2018-02-26 Yao Qi <yao.qi@linaro.org>
13132
13133 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13134 (find_partial_die_in_comp_unit): Change it to
13135 dwarf2_cu::find_partial_die.
13136 (find_partial_die): Update.
13137
13138 2018-02-26 Yao Qi <yao.qi@linaro.org>
13139
13140 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13141 is NULL.
13142
13143 2018-02-26 Yao Qi <yao.qi@linaro.org>
13144
13145 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13146
13147 2018-02-26 Alan Hayward <alan.hayward@arm.com>
13148
13149 * arch/amd64.h: Use common/tdesc.h.
13150 * arch/i386.c: Likewise.
13151 * arch/i386.h: Likewise.
13152 * arch/tic6x.c: Likewise.
13153 * arch/tdesc.h: Move file from here...
13154 * common/tdesc.h: ...to here.
13155 * features/aarch64-core.c: Regenerate.
13156 * features/aarch64-fpu.c: Regenerate.
13157 * features/i386/32bit-avx.c: Regenerate.
13158 * features/i386/32bit-avx512.c: Regenerate.
13159 * features/i386/32bit-core.c: Regenerate.
13160 * features/i386/32bit-linux.c: Regenerate.
13161 * features/i386/32bit-mpx.c: Regenerate.
13162 * features/i386/32bit-pkeys.c: Regenerate.
13163 * features/i386/32bit-sse.c: Regenerate.
13164 * features/i386/64bit-avx.c: Regenerate.
13165 * features/i386/64bit-avx512.c: Regenerate.
13166 * features/i386/64bit-core.c: Regenerate.
13167 * features/i386/64bit-linux.c: Regenerate.
13168 * features/i386/64bit-mpx.c: Regenerate.
13169 * features/i386/64bit-pkeys.c: Regenerate.
13170 * features/i386/64bit-segments.c: Regenerate.
13171 * features/i386/64bit-sse.c: Regenerate.
13172 * features/i386/x32-core.c: Regenerate.
13173 * features/tic6x-c6xp.c: Regenerate.
13174 * features/tic6x-core.c: Regenerate.
13175 * features/tic6x-gp.c: Regenerate.
13176 * target-descriptions.c: Use common/tdesc.h.
13177 * target-descriptions.h: Likewise.
13178
13179 2018-02-24 Tom Tromey <tom@tromey.com>
13180
13181 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13182 (try_thread_db_load_from_dir, thread_db_load_search): Use
13183 std::string.
13184 (info_auto_load_libthread_db_compare): Return bool. Change
13185 argument types.
13186 (info_auto_load_libthread_db): Use std::vector, std::string.
13187 Remove cleanups.
13188
13189 2018-02-24 Tom Tromey <tom@tromey.com>
13190
13191 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13192 std::string.
13193 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13194 std::string*.
13195 * gdbarch.c: Rebuild.
13196 * gdbarch.h: Rebuild.
13197 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13198 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13199 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13200 std::string*.
13201
13202 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
13203
13204 * gdbtypes.h (sect_offset): Change type to uint64_t.
13205 (sect_offset_str): New function.
13206 * dwarf2read.c (create_addrmap_from_aranges): Use
13207 sect_offset_str.
13208 (error_check_comp_unit_head): Likewise.
13209 (create_debug_type_hash_table): Likewise.
13210 (read_cutu_die_from_dwo): Likewise.
13211 (init_cutu_and_read_dies): Likewise.
13212 (init_cutu_and_read_dies_no_follow): Likewise.
13213 (process_psymtab_comp_unit_reader): Likewise.
13214 (partial_die_parent_scope): Likewise.
13215 (peek_die_abbrev): Likewise.
13216 (process_queue): Likewise.
13217 (dwarf2_physname): Likewise.
13218 (read_namespace_alias): Likewise.
13219 (read_import_statement): Likewise.
13220 (create_dwo_cu_reader): Likewise.
13221 (create_cus_hash_table): Likewise.
13222 (lookup_dwo_cutu): Likewise.
13223 (inherit_abstract_dies): Likewise.
13224 (read_func_scope): Likewise.
13225 (read_call_site_scope): Likewise.
13226 (dwarf2_add_member_fn): Likewise.
13227 (read_common_block): Likewise.
13228 (read_module_type): Likewise.
13229 (read_typedef): Likewise.
13230 (read_subrange_type): Likewise.
13231 (load_partial_dies): Likewise.
13232 (read_partial_die): Likewise.
13233 (find_partial_die): Likewise.
13234 (read_str_index): Likewise.
13235 (dwarf2_string_attr): Likewise.
13236 (build_error_marker_type): Likewise.
13237 (lookup_die_type): Likewise.
13238 (dump_die_shallow): Likewise.
13239 (follow_die_ref): Likewise.
13240 (dwarf2_fetch_die_loc_sect_off): Likewise.
13241 (dwarf2_fetch_constant_bytes): Likewise.
13242 (follow_die_sig): Likewise.
13243 (get_signatured_type): Likewise.
13244 (get_DW_AT_signature_type): Likewise.
13245 (dwarf2_find_containing_comp_unit): Likewise.
13246 (set_die_type): Likewise.
13247
13248 2018-02-21 John Baldwin <jhb@FreeBSD.org>
13249
13250 * arch/aarch64.c: Include "common-defs.h".
13251 * arch/amd64.c: Likewise.
13252 * arch/i386.c: Likewise.
13253
13254 2018-02-21 Tom Tromey <tom@tromey.com>
13255
13256 * value.h: (extract_field_op): Update.
13257 * eval.c (extract_field_op): Return a const char *.
13258 * expression.h (parse_expression_for_completion): Update.
13259 * completer.c (complete_expression): Update.
13260 (add_struct_fields): Make fieldname const.
13261 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13262 (mark_completion_tag, parse_exp_in_context_1): Update.
13263 (parse_expression_for_completion): Change "name" to
13264 unique_xmalloc_ptr*.
13265
13266 2018-02-21 Tom Tromey <tom@tromey.com>
13267
13268 * infcall.c (call_function_by_hand_dummy): Use std::vector.
13269
13270 2018-02-21 Yao Qi <yao.qi@linaro.org>
13271
13272 * avr-tdep.c (avr_read_pc): Change parameter type to
13273 readable_regcache.
13274 * gdbarch.sh (read_pc): Likewise.
13275 * gdbarch.c: Re-generated.
13276 * gdbarch.h: Re-generated.
13277 * hppa-tdep.c (hppa_read_pc): Change parameter type to
13278 readable_regcache.
13279 * ia64-tdep.c (ia64_read_pc): Likewise.
13280 * mips-tdep.c (mips_read_pc): Likewise.
13281 * spu-tdep.c (spu_read_pc): Likewise.
13282
13283 2018-02-21 Yao Qi <yao.qi@linaro.org>
13284
13285 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13286 * regcache-dump.c: New file.
13287 * regcache.c: Move register_dump to regcache-dump.c.
13288 (maintenance_print_registers): Likewise.
13289 (maintenance_print_raw_registers): Likewise.
13290 (maintenance_print_cooked_registers): Likewise.
13291 (maintenance_print_register_groups): Likewise.
13292 (maintenance_print_remote_registers): Likewise.
13293 (_initialize_regcache): Likewise.
13294 * regcache.h (register_dump): Moved from regcache.c.
13295
13296 2018-02-21 Yao Qi <yao.qi@linaro.org>
13297
13298 * regcache.c (regcache::regcache): Update.
13299 (regcache::invalidate): Move it to detached_regcache::invalidate.
13300 (get_thread_arch_aspace_regcache): Update.
13301 (regcache::raw_update): Update.
13302 (regcache::cooked_read): Remove some code.
13303 (regcache::cooked_read_value): Likewise.
13304 (regcache::raw_write): Remove assert on m_readonly_p.
13305 (regcache::raw_supply_integer): Move it to
13306 detached_regcache::raw_supply_integer.
13307 (regcache::raw_supply_zeroed): Likewise.
13308 * regcache.h (detached_regcache) <raw_supply_integer>: New
13309 declaration.
13310 <raw_supply_zeroed, invalidate>: Likewise.
13311 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13312 <invalidate>: Likewise.
13313 <m_readonly_p>: Removed.
13314
13315 2018-02-21 Yao Qi <yao.qi@linaro.org>
13316
13317 * infcmd.c (get_return_value): Let stop_regs point to
13318 get_current_regcache.
13319 * regcache.c (regcache::regcache): Remove.
13320 (register_dump_reg_buffer): New class.
13321 (regcache_print): Adjust.
13322 * regcache.h (regcache): Remove constructors.
13323
13324 2018-02-21 Yao Qi <yao.qi@linaro.org>
13325
13326 * regcache.c (class register_dump): New class.
13327 (register_dump_regcache, register_dump_none): New class.
13328 (register_dump_remote, register_dump_groups): New class.
13329 (regcache_print): Update.
13330 * regcache.h (regcache_dump_what): Move it to regcache.c.
13331 (regcache) <dump>: Remove.
13332
13333 2018-02-21 Yao Qi <yao.qi@linaro.org>
13334
13335 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13336 reg_buffer_rw *.
13337 (jit_unwind_reg_set_impl): Call raw_supply.
13338 (jit_frame_sniffer): Use reg_buffer_rw.
13339 * record-full.c (record_full_core_regbuf): Change its type.
13340 (record_full_core_open_1): Use reg_buffer_rw.
13341 (record_full_close): Likewise.
13342 (record_full_core_fetch_registers): Use regcache->raw_supply.
13343 (record_full_core_store_registers): Likewise.
13344 * regcache.c (regcache::get_register_status): Move it to
13345 reg_buffer.
13346 (regcache_raw_set_cached_value): Remove.
13347 (regcache::raw_set_cached_value): Remove.
13348 (regcache::raw_write): Call raw_supply.
13349 (regcache::raw_supply): Move it to reg_buffer_rw.
13350 * regcache.h (regcache_raw_set_cached_value): Remove.
13351 (reg_buffer_rw): New class.
13352
13353 2018-02-21 Yao Qi <yao.qi@linaro.org>
13354
13355 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13356 readonly_detached_regcache.
13357 (dummy_frame_prev_register): Use regcache->cooked_read.
13358 * frame.c (frame_save_as_regcache): Change return type.
13359 (frame_pop): Update.
13360 * frame.h (frame_save_as_regcache): Update declaration.
13361 * inferior.h (get_infcall_suspend_state_regcache): Update
13362 declaration.
13363 * infrun.c (infcall_suspend_state) <registers>: use
13364 readonly_detached_regcache.
13365 (save_infcall_suspend_state): Don't use regcache_dup.
13366 (get_infcall_suspend_state_regcache): Change return type.
13367 * linux-fork.c (struct fork_info) <savedregs>: Change to
13368 readonly_detached_regcache.
13369 <pc>: New field.
13370 (fork_save_infrun_state): Don't use regcache_dup.
13371 (info_checkpoints_command): Adjust.
13372 * mi/mi-main.c (register_changed_p): Update declaration.
13373 (mi_cmd_data_list_changed_registers): Use
13374 readonly_detached_regcache.
13375 (register_changed_p): Change parameter type to
13376 readonly_detached_regcache.
13377 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13378 readonly_detached_regcache.
13379 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13380 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13381 New.
13382 (regcache::save): Move it to reg_buffer.
13383 (regcache::restore): Change parameter type.
13384 (regcache_dup): Remove.
13385 * regcache.h (reg_buffer) <save>: New method.
13386 (readonly_detached_regcache): New class.
13387 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13388 readonly_detached_regcache.
13389 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13390
13391 2018-02-21 Yao Qi <yao.qi@linaro.org>
13392
13393 * frame.c (frame_save_as_regcache): Use regcache method save.
13394 (frame_pop): Use regcache method restore.
13395 * infrun.c (restore_infcall_suspend_state): Likewise.
13396 * linux-fork.c (fork_load_infrun_state): Likewise.
13397 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13398 save.
13399 * regcache.c (regcache_save): Remove.
13400 (regcache::restore): More asserts.
13401 (regcache_cpy): Remove.
13402 * regcache.h (regcache_save): Remove the declaration.
13403 (regcache::restore): Move from private to public.
13404 Remove the friend declaration of regcache_cpy.
13405 (regcache_cpy): Remove declaration.
13406
13407 2018-02-21 Yao Qi <yao.qi@linaro.org>
13408
13409 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13410 parameter type to 'readable_regcache *'.
13411 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13412 * arm-tdep.c (arm_neon_quad_read): Likewise.
13413 (arm_pseudo_read): Likewise.
13414 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13415 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13416 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13417 * gdbarch.c: Re-generated.
13418 * gdbarch.h: Re-generated.
13419 * gdbarch.sh (pseudo_register_read): Change parameter type to
13420 'readable_regcache *'.
13421 (pseudo_register_read_value): Likewise.
13422 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13423 (h8300_pseudo_register_read): Likewise.
13424 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13425 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13426 (i386_pseudo_register_read_into_value): Likewise.
13427 (i386_pseudo_register_read_value): Likewise.
13428 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13429 declaration.
13430 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13431 * m32c-tdep.c (m32c_raw_read): Likewise.
13432 (m32c_read_flg): Likewise.
13433 (m32c_banked_register): Likewise.
13434 (m32c_banked_read): Likewise.
13435 (m32c_sb_read): Likewise.
13436 (m32c_part_read): Likewise.
13437 (m32c_cat_read): Likewise.
13438 (m32c_r3r2r1r0_read): Likewise.
13439 (m32c_pseudo_register_read): Likewise.
13440 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13441 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13442 (mep_pseudo_cr64_read): Likewise.
13443 (mep_pseudo_register_read): Likewise.
13444 * mips-tdep.c (mips_pseudo_register_read): Likewise.
13445 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13446 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13447 * regcache.c (regcache::raw_read): Move it to readable_regcache.
13448 (regcache::cooked_read): Likewise.
13449 (regcache::cooked_read_value): Likewise.
13450 (regcache_cooked_read_signed):
13451 (regcache::cooked_read): Likewise.
13452 * regcache.h (readable_regcache): New class.
13453 (regcache): Inherit readable_regcache. Move some methods to
13454 readable_regcache.
13455 * rl78-tdep.c (rl78_pseudo_register_read): Change
13456 parameter type to 'readable_regcache *'.
13457 * rs6000-tdep.c (do_regcache_raw_read): Remove.
13458 (e500_pseudo_register_read): Change parameter type to
13459 'readable_regcache *'.
13460 (dfp_pseudo_register_read): Likewise.
13461 (vsx_pseudo_register_read): Likewise.
13462 (efpr_pseudo_register_read): Likewise.
13463 * s390-tdep.c (s390_pseudo_register_read): Likewise.
13464 * sh-tdep.c (sh_pseudo_register_read): Likewise.
13465 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13466 (sh64_pseudo_register_read): Likewise.
13467 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13468 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13469 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13470 (spu_pseudo_register_read): Likewise.
13471 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13472 (xtensa_pseudo_register_read): Likewise.
13473
13474 2018-02-21 Yao Qi <yao.qi@linaro.org>
13475
13476 * regcache.c (regcache::regcache): Call reg_buffer ctor.
13477 (regcache::arch): Move it to reg_buffer::arch.
13478 (regcache::register_buffer): Likewise.
13479 (regcache::assert_regnum): Likewise.
13480 (regcache::num_raw_registers): Likewise.
13481 * regcache.h (reg_buffer): New class.
13482 (regcache): Inherit reg_buffer.
13483
13484 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
13485
13486 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13487 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13488
13489 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
13490
13491 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13492
13493 2018-02-19 Alan Hayward <alan.hayward@arm.com>
13494
13495 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13496 (SFILES): Remove common/*.c files.
13497 (COMMON_OBS): Remove some *.o files built from common/*.c files.
13498 * common/common.host: Add common reference.
13499 * configure.ac: Likewise.
13500 * configure: Regenerate.
13501
13502 2018-02-16 Yao Qi <yao.qi@linaro.org>
13503
13504 * block.c (block_namespace_info): Inherit allocate_on_obstack.
13505 (block_initialize_namespace): Use new.
13506 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13507 (dwarf2_free_objfile): Use delete.
13508 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13509 (copy_type_recursive): Use new.
13510 * gdb_obstack.h (allocate_on_obstack): New.
13511
13512 2018-02-15 Yao Qi <yao.qi@linaro.org>
13513
13514 PR gdb/22849
13515 * inferior.c (exit_inferior_1): Reset inf->control.
13516
13517 2018-02-15 Joel Brobecker <brobecker@adacore.com>
13518
13519 * ada-lang.c (ada_to_fixed_value_create): Delete advance
13520 declaration.
13521
13522 2018-02-14 Pedro Alves <palves@redhat.com>
13523
13524 * frame-unwind.c (frame_unwind_try_unwinder): Always call
13525 frame_cleanup_after_sniffer on exception.
13526
13527 2018-02-14 Tom Tromey <tom@tromey.com>
13528
13529 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13530 const.
13531 (solib_bfd_open): Make pathname const.
13532 * solib.c (solib_bfd_open): Make pathname const.
13533 * solib-spu.c (spu_bfd_fopen): Make name const.
13534 (spu_bfd_open): Make pathname const.
13535 * solib-darwin.c (darwin_bfd_open): Make pathname const.
13536 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13537
13538 2018-02-14 Tom Tromey <tom@tromey.com>
13539
13540 * symfile.c (symfile_bfd_open): Update.
13541 * source.h (openp, source_full_path_of, find_and_open_source):
13542 Change argument type to unique_xmalloc_ptr.
13543 * source.c (openp): Take a unique_xmalloc_ptr.
13544 (source_full_path_of, find_and_open_source): Likewise.
13545 (open_source_file, symtab_to_fullname): Update.
13546 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13547 unique_xmalloc_ptr.
13548 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13549 (exec_file_find): Update.
13550 * psymtab.c (psymtab_to_fullname): Update.
13551 * nto-tdep.h (nto_find_and_open_solib): Update.
13552 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13553 unique_xmalloc_ptr.
13554 * exec.c (exec_file_attach): Update.
13555 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13556 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13557
13558 2018-02-14 Tom Tromey <tom@tromey.com>
13559
13560 * solib.c: Include source.h.
13561 * nto-tdep.c: Include source.h.
13562 * mi/mi-cmd-env.c: Include source.h.
13563 * infcmd.c: Include source.h.
13564 * exec.c: Include source.h.
13565 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13566 (add_path, directory_switch, source_path, init_source_path): Move
13567 declarations...
13568 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13569 (add_path, directory_switch, source_path, init_source_path):
13570 ...here.
13571
13572 2018-02-14 Tom Tromey <tom@tromey.com>
13573
13574 * solist.h (exec_file_find, solib_find): Return
13575 unique_xmalloc_ptr.
13576 (solib_bfd_fopen): Take a const char *.
13577 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13578 (exec_file_find, solib_find): Likewise.
13579 (solib_bfd_fopen): Do not take ownership of "pathname".
13580 (solib_bfd_open): Use unique_xmalloc_ptr.
13581 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13582 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13583 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13584 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13585
13586 2018-02-14 Joel Brobecker <brobecker@adacore.com>
13587
13588 * ada-lang.c (name_match_type_from_name): Remove reference to
13589 ada_name_for_lookup in function's documentation.
13590 * ada-lang.h (ada_name_for_lookup): Delete declaration.
13591
13592 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13593
13594 * defs.h (enum openp_flags): New enum.
13595 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13596 Move to enum openp_flags.
13597 (openp_flags): New enum flags.
13598 (openp): Change parameter type to openp_flags.
13599 * source.c (openp): Change parameter type to openp_flags.
13600 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13601 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13602
13603 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13604
13605 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13606 per-command.
13607
13608 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
13609
13610 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13611 into...
13612 (class dwarf2_queue_guard): ...the destructor of this new class.
13613 (dw2_do_instantiate_symtab): Create instance of the new class
13614 dwarf2_queue_guard, remove cleanup.
13615
13616 2018-02-09 Tom Tromey <tom@tromey.com>
13617
13618 * source.c (find_source_lines): Don't reference past the end of
13619 the vector.
13620
13621 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13622
13623 * remote.c (remote_btrace_maybe_reopen): Change error message.
13624 * btrace.c (btrace_enable): Likewise.
13625 (parse_xml_btrace): Likewise.
13626 (parse_xml_btrace_conf): Likewise.
13627
13628 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13629
13630 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13631 (linux_enable_pt, linux_enable_bts): Call
13632 diagnose_perf_event_open_fail.
13633
13634 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13635
13636 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13637 Remove parameter and change return type. Update callers. Move it.
13638 (linux_enable_bts, linux_enable_pt): Improve error message.
13639 (linux_enable_pt): Remove zero buffer size check.
13640 (linux_enable_btrace): Improve error messages. Remove NULL return
13641 check.
13642
13643 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13644
13645 * btrace.c (btrace_enable): Remove target_supports_btrace call.
13646 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13647 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13648 (linux_supports_pt, linux_supports_btrace): Remove.
13649 (linux_enable_bts): Call cpu_supports_bts.
13650 * nat/linux-btrace.h (linux_supports_btrace): Remove.
13651 * remote.c (remote_supports_btrace): Remove.
13652 (init_remote_ops): Remove remote_supports_btrace.
13653 * target-delegates.c: Regenerated.
13654 * target.c (target_supports_btrace): Remove.
13655 * target.h (target_ops) <to_supports_btrace>: Remove
13656 (target_supports_btrace): Remove.
13657 * x86-linux-nat.c (x86_linux_create_target): Remove
13658 linux_supports_btrace.
13659
13660 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13661
13662 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13663 btrace failed.
13664 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13665 exception and use message in own exception.
13666
13667 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13668
13669 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13670 (perf_event_pt_event_type): Use gdb_file_up.
13671 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13672 scoped_fd, and scoped_mmap.
13673
13674 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13675
13676 * common/scoped_mmap.h: New.
13677 * unittests/scoped_mmap-selftest.c: New.
13678 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13679 unittests/scoped_mmap-selftest.c.
13680
13681 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13682
13683 * common/scoped_fd.h: New.
13684 * unittests/scoped_fd-selftest.c: New.
13685 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13686 unittests/scoped_fd-selftest.c.
13687
13688 2018-02-09 Tom Tromey <tom@tromey.com>
13689
13690 * auto-load.c (auto_load_section_scripts): Use
13691 gdb::unique_xmalloc_ptr.
13692
13693 2018-02-09 Tom Tromey <tom@tromey.com>
13694
13695 * auto-load.c (execute_script_contents): Use std::string.
13696
13697 2018-02-09 Joel Brobecker <brobecker@adacore.com>
13698
13699 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13700 Python function, rather than a new command.
13701
13702 2018-02-08 Tom Tromey <tom@tromey.com>
13703
13704 * solib.c (solib_find_1): Use std::string.
13705 (solib_bfd_fopen): Use unique_xmalloc_ptr.
13706
13707 2018-02-08 Tom Tromey <tom@tromey.com>
13708
13709 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13710
13711 2018-02-08 Tom Tromey <tom@tromey.com>
13712
13713 * source.c (find_source_lines): Use gdb::def_vector.
13714
13715 2018-02-08 Tom Tromey <tom@tromey.com>
13716
13717 * macrocmd.c (struct temporary_macro_definition): New.
13718 (macro_define_command): Use temporary_macro_definition. Remove
13719 cleanups.
13720 (free_macro_definition_ptr): Remove.
13721
13722 2018-02-08 Tom Tromey <tom@tromey.com>
13723
13724 * macroexp.c (maybe_expand): Use std::string.
13725
13726 2018-02-08 Tom Tromey <tom@tromey.com>
13727
13728 * macroexp.c (struct macro_buffer): Add initializers for some
13729 members.
13730 (init_buffer, init_shared_buffer, free_buffer)
13731 (free_buffer_return_text): Remove.
13732 (macro_buffer): New constructors.
13733 (~macro_buffer): New destructor.
13734 (macro_buffer::set_shared): New method.
13735 (macro_buffer::resize_buffer, macro_buffer::appendc)
13736 (macro_buffer::appendmem): Now methods, not free functions.
13737 (set_token, append_tokens_without_splicing, stringify)
13738 (macro_stringify): Update.
13739 (gather_arguments): Change return type. Remove argc_p argument,
13740 add args_ptr argument. Use std::vector.
13741 (substitute_args): Remove argc argument. Accept std::vector.
13742 (expand): Update. Use std::vector.
13743 (scan, macro_expand, macro_expand_next): Update.
13744
13745 2018-02-08 Tom Tromey <tom@tromey.com>
13746
13747 * symtab.c (default_collect_symbol_completion_matches_break_on):
13748 Use unique_xmalloc_ptr.
13749 * macroscope.h: (sal_macro_scope, user_macro_scope)
13750 (default_macro_scope): Return unique_xmalloc_ptr.
13751 * macroscope.c (sal_macro_scope, user_macro_scope)
13752 (default_macro_scope): Return unique_xmalloc_ptr.
13753 * macroexp.h (macro_expand, macro_expand_once): Return
13754 unique_xmalloc_ptr.
13755 * macroexp.c (macro_expand, macro_expand_once): Return
13756 unique_xmalloc_ptr.
13757 * macrocmd.c (macro_expand_command, macro_expand_once_command)
13758 (info_macro_command, info_macros_command): Use
13759 unique_xmalloc_ptr.
13760 * compile/compile-c-support.c (write_macro_definitions): Use
13761 unique_xmalloc_ptr.
13762 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13763
13764 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
13765
13766 * value.c (value_static_field): Assign field type instead of
13767 containing type when returning an optimized out value.
13768
13769 2018-02-06 Yao Qi <yao.qi@linaro.org>
13770
13771 * ft32-tdep.c (ft32_read_pc): Remove.
13772 (ft32_write_pc): Remove.
13773 (ft32_gdbarch_init): Update.
13774 * m32r-tdep.c (m32r_read_pc): Remove.
13775 (m32r_gdbarch_init): Update.
13776 * mep-tdep.c (mep_read_pc): Remove.
13777 (mep_gdbarch_init): Update.
13778 * microblaze-tdep.c (microblaze_write_pc): Remove.
13779 (microblaze_gdbarch_init): Update.
13780 * mn10300-tdep.c (mn10300_read_pc): Remove.
13781 (mn10300_write_pc): Remove.
13782 (mn10300_gdbarch_init): Update.
13783 * moxie-tdep.c (moxie_read_pc): Remove.
13784 (moxie_write_pc): Remove.
13785 (moxie_gdbarch_init): Update.
13786
13787 2018-02-06 Yao Qi <yao.qi@linaro.org>
13788
13789 * expprint.c (print_subexp_standard): Handle
13790 OP_F77_UNDETERMINED_ARGLIST.
13791 (dump_subexp_body_standard): Likewise.
13792
13793 2018-02-05 Alan Hayward <alan.hayward@arm.com>
13794
13795 * target-descriptions.c (tdesc_element_visitor) Add empty
13796 implementations.
13797 (tdesc_type): Move make_gdb_type from here.
13798 (tdesc_type_builtin): Likewise.
13799 (tdesc_type_vector): Likewise.
13800 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13801 (make_gdb_type_struct): Move from tdesc_type_with_fields.
13802 (make_gdb_type_union): Likewise.
13803 (make_gdb_type_flags): Likewise.
13804 (make_gdb_type_enum): Likewise.
13805 (make_gdb_type): New function.
13806 (tdesc_register_type): Use static make_gdb_type.
13807
13808 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
13809
13810 * infcmd.c (default_print_one_register_info): Align natural-format
13811 column values consistently one under another.
13812 (pad_to_column): New function.
13813
13814 2018-02-05 Joel Brobecker <brobecker@adacore.com>
13815
13816 * dwarf2read.c (dwarf2_physname): Move commment.
13817
13818 2018-02-01 Leszek Swirski <leszeks@google.com>
13819
13820 * varobj.c (varobj_formatted_print_options): Allow recursive
13821 pretty printing if pretty printing is enabled.
13822
13823 2018-02-01 Leszek Swirski <leszeks@google.com>
13824
13825 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13826 names after a structop as a filename.
13827
13828 2018-02-01 Yao Qi <yao.qi@linaro.org>
13829
13830 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13831 (arm_record_coproc_data_proc): Likewise.
13832
13833 2018-02-01 Yao Qi <yao.qi@linaro.org>
13834
13835 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13836
13837 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
13838
13839 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13840 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13841
13842 2018-01-31 Pedro Alves <palves@redhat.com>
13843
13844 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13845 * inflow.c (child_terminal_save_inferior): Wrap reference to
13846 tcgetpgrp in HAVE_TERMIOS_H.
13847 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13848 _WIN32.
13849 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13850 always iterate over all inferiors.
13851 (gdbsim_cntrl_c): Adjust.
13852 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13853
13854 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13855
13856 * gdbtypes.c (lookup_array_range_type): Make sure the array's
13857 index type is objfile-owned if the element type is as well.
13858
13859 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13860
13861 GDB 8.1 released.
13862
13863 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
13864
13865 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13866 "features/s390x-linux64.c".
13867 (_initialize_s390_linux_tdep): Remove initialization of tdescs
13868 s390_linux32 and s390x_linux64.
13869 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13870 default tdesc.
13871 * s390-tdep.c: Include "features/s390-linux32.c" and
13872 "features/s390x-linux64.c".
13873 (s390_tdesc_valid): Add check for tdesc_has_registers.
13874 (s390_gdbarch_init): Make sure there is always a valid tdesc.
13875 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13876 tdesc_s390x_linux64.
13877 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13878 tdesc_s390x_linux64 to...
13879 * s390-tdep.h: ...here.
13880
13881 2018-01-30 Pedro Alves <palves@redhat.com>
13882
13883 PR gdb/13211
13884 * config.in, configure: Regenerate.
13885 * configure.ac: Check for getpgid.
13886 * go32-nat.c (go32_pass_ctrlc): New.
13887 (go32_target): Install it.
13888 * inf-child.c (inf_child_target): Install
13889 child_terminal_save_inferior, child_pass_ctrlc and
13890 child_interrupt.
13891 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13892 (inf_ptrace_target): No longer install it.
13893 * infcmd.c (interrupt_target_1): Adjust.
13894 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13895 (child_interrupt): Declare.
13896 (inferior::terminal_state): New.
13897 * inflow.c (struct terminal_info): Update comments.
13898 (inferior_process_group): Delete.
13899 (terminal_is_ours): Delete.
13900 (gdb_tty_state): New.
13901 (child_terminal_init): Adjust.
13902 (is_gdb_terminal, sharing_input_terminal_1)
13903 (sharing_input_terminal): New functions.
13904 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
13905 Set the process's actual process group in the foreground if
13906 possible. Handle is_ours_for_output/is_ours distinction. Don't
13907 mark terminal as the inferior's if not sharing GDB's terminal.
13908 Don't check attach_flag.
13909 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13910 pass down a target_terminal_state.
13911 (child_terminal_save_inferior): New, factored out from ...
13912 (child_terminal_ours_1): ... this. Handle
13913 target_terminal_state::is_ours_for_output.
13914 (child_interrupt, child_pass_ctrlc): New.
13915 (inflow_inferior_exit): Clear the inferior's terminal_state.
13916 (copy_terminal_info): Copy the inferior's terminal state.
13917 (_initialize_inflow): Remove reference to terminal_is_ours.
13918 * inflow.h (inferior_process_group): Delete.
13919 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13920 * procfs.c (procfs_target): Don't install procfs_interrupt.
13921 (procfs_interrupt): Delete.
13922 * remote.c (remote_serial_quit_handler): Adjust.
13923 (remote_interrupt): Remove ptid parameter. Adjust.
13924 * target-delegates.c: Regenerate.
13925 * target.c: Include "terminal.h".
13926 (target_terminal::terminal_state): Rename to ...
13927 (target_terminal::m_terminal_state): ... this.
13928 (target_terminal::init): Adjust.
13929 (target_terminal::inferior): Adjust to per-inferior
13930 terminal_state.
13931 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13932 (target_terminal::ours, target_terminal::ours_for_output): Use
13933 target_terminal_is_ours_kind.
13934 (target_interrupt): Remove ptid parameter. Adjust.
13935 (default_target_pass_ctrlc): Adjust.
13936 * target.h (target_ops::to_terminal_save_inferior): New field.
13937 (target_ops::to_interrupt): Remove ptid_t parameter.
13938 (target_interrupt): Remove ptid_t parameter. Update comment.
13939 (target_pass_ctrlc): Update comment.
13940 * target/target.h (target_terminal_state): New scoped enum,
13941 factored out of ...
13942 (target_terminal::terminal_state): ... here.
13943 (target_terminal::inferior): Update comments.
13944 (target_terminal::restore_inferior): New.
13945 (target_terminal::is_inferior, target_terminal::is_ours)
13946 (target_terminal::is_ours_for_output): Adjust.
13947 (target_terminal::scoped_restore_terminal_state): Adjust to
13948 rename, and call restore_inferior() instead of inferior().
13949 (target_terminal::scoped_restore_terminal_state::m_state): Change
13950 type.
13951 (target_terminal::terminal_state): Rename to ...
13952 (target_terminal::m_terminal_state): ... this and change type.
13953
13954 2018-01-30 Pedro Alves <palves@redhat.com>
13955
13956 * linux-nat.c (wait_for_signal): New function.
13957 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13958 directly.
13959 (async_terminal_is_ours)
13960 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13961 (linux_nat_add_target): Don't override
13962 to_terminal_inferior/to_terminal_ours.
13963
13964 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
13965
13966 * remote.c (remote_follow_fork): Don't call "detach_inferior".
13967
13968 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
13969
13970 * dwarf2read.c (free_dwo_files): Add forward-declaration.
13971 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13972 dwarf2_per_objfile_free here.
13973 (dwarf2_per_objfile_free): Remove.
13974 (_initialize_dwarf2_read): Don't register
13975 dwarf2_per_objfile_free as a registry cleanup.
13976
13977 2018-01-27 Eli Zaretskii <eliz@gnu.org>
13978
13979 Avoid compilation errors in MinGW native builds
13980
13981 The error is triggered by including python-internal.h, and the
13982 error message is:
13983
13984 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13985 from build-gnulib/import/math.h:27,
13986 from d:/usr/Python26/include/pyport.h:235,
13987 from d:/usr/Python26/include/Python.h:58,
13988 from python/python-internal.h:94,
13989 from python/py-arch.c:24:
13990 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13991 using ::hypot;
13992 ^~~~~
13993
13994 This happens because Python headers define 'hypot' to expand t
13995 '_hypot' in the Windows builds.
13996 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13997 'hypoth'. This avoids a compilation error.
13998
13999 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14000
14001 * MAINTAINERS (Write After Approval): Fix ordering.
14002
14003 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14004
14005 * MAINTAINERS (Write After Approval): Add Alan Hayward.
14006
14007 2018-01-26 Alan Modra <amodra@gmail.com>
14008
14009 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14010 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14011 Remove nop. Make const. Comment.
14012 (powerpc32_plt_stub_so_2): New.
14013 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14014 Correct count. Update uses.
14015 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14016 Move common code reading PLT entry word. Correct
14017 powerpc32_plt_stub PLT address calculation.
14018 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14019 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14020 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14021 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14022 (ppc64_standard_linkage8): Likewise.
14023 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14024 Correct insns description.
14025 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14026
14027 2018-01-24 Pedro Alves <palves@redhat.com>
14028
14029 GCC PR libstdc++/83906
14030 * gdbtypes.c (operator==(const dynamic_prop &,
14031 const dynamic_prop &)): New.
14032 (operator==(const range_bounds &, const range_bounds &)): New.
14033 (check_types_equal): Use them instead of memcmp.
14034 * gdbtypes.h (operator==(const dynamic_prop &,
14035 const dynamic_prop &)): Declare.
14036 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14037 (operator==(const range_bounds &, const range_bounds &)): Declare.
14038 (operator!=(const range_bounds &, const range_bounds &)): Declare.
14039
14040 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14041
14042 * s390-linux-tdep.c (s390_record_address_mask)
14043 (s390_record_calc_disp_common, s390_record_calc_disp)
14044 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14045 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14046 (s390_process_record): Move to s390-tdep.c.
14047 (s390_linux_init_abi_any): Adjust.
14048 * s390-tdep.c (s390_record_address_mask)
14049 (s390_record_calc_disp_common, s390_record_calc_disp)
14050 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14051 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14052 (s390_process_record): Moved from s390-linux-tdep.c
14053 (s390_gdbarch_init): Adjust.
14054
14055 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14056
14057 * s390-linux-nat.c (s390-tdep.h): New include.
14058 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14059 (HFILES_NO_SRCDIR): Add s390-tdep.h.
14060 (ALLDEPFILES): Add s390-tdep.c.
14061 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14062 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14063 * s390-tdep.h: ...this. New file.
14064 * s390-linux-tdep.c (s390-tdep.h): New include.
14065 (_initialize_s390_tdep): Rename to...
14066 (_initialize_s390_linux_tdep): ...this and adjust.
14067 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14068 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14069 s390-tdep.h.
14070 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14071 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14072 (s390_is_partial_instruction, s390_software_single_step)
14073 (is_non_branch_ril, s390_displaced_step_copy_insn)
14074 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14075 (s390_prologue_data, s390_addr, s390_store, s390_load)
14076 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14077 (s390_register_call_saved, s390_guess_tracepoint_registers)
14078 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14079 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14080 (s390_pseudo_register_name, s390_pseudo_register_type)
14081 (s390_pseudo_register_read, s390_pseudo_register_write)
14082 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14083 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14084 (s390_addr_bits_remove, s390_address_class_type_flags)
14085 (s390_address_class_type_flags_to_name)
14086 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14087 (s390_function_arg_float, s390_function_arg_vector)
14088 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14089 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14090 (s390_frame_align, s390_register_return_value, s390_return_value)
14091 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14092 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14093 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14094 (s390_trad_frame_prev_register, s390_unwind_cache)
14095 (s390_prologue_frame_unwind_cache)
14096 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14097 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14098 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14099 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14100 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14101 (s390_frame_base_address, s390_local_base_address)
14102 (s390_frame_base, s390_gcc_target_options)
14103 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14104 (s390_validate_reg_range, s390_tdesc_valid)
14105 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14106 * s390-tdep.c: ...this. New file.
14107
14108 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14109
14110 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14111 (s390_process_record, s390_gdbarch_tdep_alloc)
14112 (s390_linux_init_abi_any): Use/set new hook.
14113
14114 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14115
14116 * s390-linux-tdep.c (osabi.h): New include.
14117 (s390_linux_init_abi_31, s390_linux_init_abi_64)
14118 (s390_linux_init_abi_any): New functions.
14119 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14120
14121 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14122
14123 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14124 tdesc_has_registers check
14125
14126 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14127
14128 * s390-linux-tdep.c (s390_tdesc_valid): New function.
14129 (s390_validate_reg_range): New macro.
14130 (s390_gdbarch_init): Adjust.
14131
14132 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14133
14134 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14135 (s390_gdbarch_tdep_alloc): Adjust.
14136 (s390_gdbarch_init): Adjust.
14137
14138 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14139
14140 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14141 <have_tdb>: Change type to bool.
14142 (s390_gdbarch_tdep_alloc): Adjust.
14143 (s390_gdbarch_init): Adjust.
14144
14145 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14146
14147 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14148 (gdbarch_tdep) <have_upper, have_vx>: New fields.
14149 (s390_gdbarch_tdep_alloc): New function.
14150 (s390_gdbarch_init): Allocate tdep at start and use its fields
14151 instead of separate variables.
14152
14153 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14154
14155 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14156 when looking for cached gdbarch and add comment for remaining.
14157
14158 2018-01-22 Pedro Alves <palves@redhat.com>
14159 Sergio Durigan Junior <sergiodj@redhat.com>
14160
14161 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14162 case.
14163
14164 2018-01-22 Maciej W. Rozycki <macro@mips.com>
14165
14166 * MAINTAINERS: Update my company e-mail address.
14167
14168 2018-01-22 Yao Qi <yao.qi@linaro.org>
14169
14170 * regcache.c (cooked_write_test): New function.
14171 (_initialize_regcache): Register the test.
14172
14173 2018-01-22 Yao Qi <yao.qi@linaro.org>
14174
14175 * ia64-tdep.c (ia64_pseudo_register_read): Call
14176 regcache->cooked_read instead of regcache_cooked_read_unsigned.
14177 * m32c-tdep.c (m32c_cat_read): Likewise.
14178 (m32c_r3r2r1r0_read): Likewise.
14179 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14180 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14181
14182 2018-01-22 Yao Qi <yao.qi@linaro.org>
14183
14184 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14185 method raw_read instead of regcache_raw_read.
14186 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14187 * arm-tdep.c (arm_neon_quad_read): Likewise.
14188 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14189 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14190 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14191 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14192 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14193 (i386_pseudo_register_read_into_value): Likewise.
14194 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14195 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14196 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14197 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14198 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14199 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14200 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14201 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14202 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14203
14204 2018-01-22 Yao Qi <yao.qi@linaro.org>
14205
14206 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14207 * configure.tgt: Remove target mt.
14208 * mt-tdep.c: Remove.
14209 * regcache.c (cooked_read_test): Remove the check for mt.
14210
14211 2018-01-22 Yao Qi <yao.qi@linaro.org>
14212
14213 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14214 instead of gdbarch_pseudo_register_read_value.
14215
14216 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14217
14218 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14219 language is Ada.
14220
14221 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14222
14223 * linespec.c (create_sals_line_offset): Remove code that preserved
14224 the symtab_and_line's line number.
14225
14226 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14227
14228 * varobj.c (varobj_create): Don't set valid_block when creating a
14229 floating varobj.
14230
14231 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14232
14233 * varobj.c (varobj_create): Remove out of date comment.
14234
14235 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14236
14237 PR mi/20395
14238 * ada-exp.y (write_var_from_sym): Pass extra parameter when
14239 updating innermost block.
14240 * parse.c (innermost_block_tracker::update): Take extra type
14241 parameter, and check types match before updating innermost block.
14242 (write_dollar_variable): Update innermost block for registers.
14243 * parser-defs.h (enum innermost_block_tracker_type): New enum.
14244 (innermost_block_tracker::innermost_block_tracker): Initialise
14245 m_types member.
14246 (innermost_block_tracker::reset): Take type parameter.
14247 (innermost_block_tracker::update): Take type parameter, and pass
14248 type through as needed.
14249 (innermost_block_tracker::m_types): New member.
14250 * varobj.c (varobj_create): Pass type when reseting innermost
14251 block.
14252
14253 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14254
14255 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14256 * ada-lang.c (resolve_subexp): Likewise.
14257 * breakpoint.c (set_breakpoint_condition) Likewise.
14258 (watch_command_1) Likewise.
14259 * c-exp.y (variable): Likewise.
14260 * d-exp.y (PrimaryExpression): Likewise.
14261 * f-exp.y (variable): Likewise.
14262 * go-exp.y (variable): Likewise.
14263 * m2-exp.y (variable): Likewise.
14264 * objfiles.c (objfile::~objfile): Likewise.
14265 * p-exp.y (variable): Likewise.
14266 * parse.c (innermost_block): Change type.
14267 * parser-defs.h (class innermost_block_tracker): New.
14268 (innermost_block): Change to innermost_block_tracker.
14269 * printcmd.c (display_command): Switch to innermost_block API.
14270 (do_one_display): Likewise.
14271 * rust-exp.y (do_one_display): Likewise.
14272 * symfile.c (clear_symtab_users): Likewise.
14273 * varobj.c (varobj_create): Switch to innermost_block API, replace
14274 use of innermost_block with block stored on varobj object.
14275
14276 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14277
14278 * expression.h (innermost_block): Remove declaration.
14279 * varobj.c: Add 'parser-defs.h' include.
14280
14281 2018-01-19 Tom Tromey <tom@tromey.com>
14282
14283 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14284 symbols in the static and global blocks.
14285
14286 2018-01-19 James Clarke <jrtc27@jrtc27.com>
14287
14288 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14289 gdb_ptrace.h, and move including gdb_wait.h ...
14290 * nat/linux-ptrace.h: ... to here.
14291
14292 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14293
14294 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14295 inf_ptrace_detach_success.
14296 (inf_ptrace_detach_success): Add inferior parameter, use it
14297 instead of inferior_ptid, pass it to detach_inferior.
14298 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14299 parameter.
14300 * inferior.c (detach_inferior): Add overload that takes an
14301 inferior object.
14302 * inferior.h (detach_inferior): Likewise.
14303 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14304 use inferior_ptid, adjust call to inf_ptrace_detach_success.
14305 * linux-thread-db.c (thread_db_detach): Use inf parameter.
14306
14307 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14308
14309 * target.h (struct target_ops) <to_detach>: Add inferior
14310 parameter.
14311 (target_detach): Likewise.
14312 * target.c (dispose_inferior): Pass inferior down.
14313 (target_detach): Pass inferior down. Assert that it is equal to
14314 the current inferior.
14315 * aix-thread.c (aix_thread_detach): Pass inferior down.
14316 * corefile.c (core_file_command): Pass current_inferior() down.
14317 * corelow.c (core_detach): Add inferior parameter.
14318 * darwin-nat.c (darwin_detach): Likewise.
14319 * gnu-nat.c (gnu_detach): Likewise.
14320 * inf-ptrace.c (inf_ptrace_detach): Likewise.
14321 * infcmd.c (detach_command): Pass current_inferior() down to
14322 target_detach.
14323 * infrun.c (follow_fork_inferior): Pass parent_inf to
14324 target_detach.
14325 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14326 target_detach.
14327 * linux-nat.c (linux_nat_detach): Add inferior parameter.
14328 * linux-thread-db.c (thread_db_detach): Likewise.
14329 * nto-procfs.c (procfs_detach): Likewise.
14330 * procfs.c (procfs_detach): Likewise.
14331 * record.c (record_detach): Likewise.
14332 * record.h (struct inferior): Forward-declare.
14333 (record_detach): Add inferior parameter.
14334 * remote-sim.c (gdbsim_detach): Likewise.
14335 * remote.c (remote_detach_1): Likewise.
14336 (remote_detach): Likewise.
14337 (extended_remote_detach): Likewise.
14338 * sol-thread.c (sol_thread_detach): Likewise.
14339 * target-debug.h (target_debug_print_inferior_p): New macro.
14340 * target-delegates.c: Re-generate.
14341 * top.c (kill_or_detach): Pass inferior down to target_detach.
14342 * windows-nat.c (windows_detach): Add inferior parameter.
14343
14344 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14345
14346 * target.h (struct target_ops) <to_detach>: Remove args
14347 parameter.
14348 (target_detach): Likewise.
14349 * target.c (dispose_inferior): Adjust.
14350 (target_detach): Remove args parameter, adjust.
14351 * aix-thread.c (aix_thread_detach): Adjust.
14352 * corefile.c (core_file_command): Adjust.
14353 * corelow.c (core_detach): Adjust.
14354 * darwin-nat.c (darwin_detach): Adjust.
14355 * gnu-nat.c (gnu_detach): Adjust.
14356 * inf-ptrace.c (inf_ptrace_detach): Adjust.
14357 * infcmd.c (detach_command): Adjust
14358 * infrun.c (follow_fork_inferior): Adjust.
14359 (handle_vfork_child_exec_or_exit): Adjust.
14360 * linux-fork.c (linux_fork_detach): Remove args parameter.
14361 * linux-fork.h (linux_fork_detach): Likewise.
14362 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14363 * linux-thread-db.c (thread_db_detach): Likewise.
14364 * nto-procfs.c (procfs_detach): Likewise.
14365 * procfs.c (procfs_detach): Likewise.
14366 (do_detach): Remove signo parameter.
14367 * record.c (record_detach): Remove args parameter.
14368 * record.h (record_detach): Likewise.
14369 * remote-sim.c (gdbsim_detach): Likewise.
14370 * remote.c (remote_detach_1): Likewise.
14371 (remote_detach): Likewise.
14372 (extended_remote_detach): Likewise.
14373 * sol-thread.c (sol_thread_detach): Likewise.
14374 * target-delegates.c: Re-generate.
14375 * top.c (struct qt_args) <args>: Remove field.
14376 (kill_or_detach): Don't pass args.
14377 (quit_force): Don't set args.
14378 * windows-nat.c (windows_detach): Remove args parameter.
14379
14380 2018-01-19 Yao Qi <yao.qi@linaro.org>
14381
14382 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14383 (arm_linux_init_abi): Install it.
14384
14385 2018-01-19 Yao Qi <yao.qi@linaro.org>
14386
14387 * osabi.c (gdb_osabi_names): Extend the regexp for
14388 arm-linux-gnueabihf.
14389
14390 2018-01-18 Yao Qi <yao.qi@linaro.org>
14391
14392 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14393 m_abbrevs.
14394 (abbrev_table::add_abbrev): Update.
14395 (abbrev_table::lookup_abbrev): Update.
14396
14397 2018-01-18 Yao Qi <yao.qi@linaro.org>
14398
14399 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14400
14401 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
14402
14403 * compile/compile.c (compile_to_object): Convert "triplet_rx"
14404 to "std::string".
14405
14406 2018-01-17 Tom Tromey <tom@tromey.com>
14407
14408 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
14409
14410 2018-01-17 Tom Tromey <tom@tromey.com>
14411
14412 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14413 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14414 (create_array_type_with_stride): Update.
14415 * dwarf2read.c (set_die_type): Update.
14416
14417 2018-01-17 Tom Tromey <tom@tromey.com>
14418
14419 * dwarf2read.c (delayed_method_info): Remove typedef.
14420 (dwarf2_cu::method_info): Now a std::vector.
14421 (add_to_method_list): Update.
14422 (free_delayed_list): Remove.
14423 (compute_delayed_physnames): Update.
14424 (process_full_comp_unit, process_full_type_unit): Clear the method
14425 list. Remove cleanups.
14426 (psymtab_include_file_name): Add name_holder parameter. Use
14427 unique_xmalloc_ptr.
14428 (dwarf_decode_lines): Update.
14429
14430 2018-01-17 Tom Tromey <tom@tromey.com>
14431 Simon Marchi <simon.marchi@ericsson.com>
14432
14433 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14434 (dwarf2_per_objfile::free_cached_comp_units)
14435 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14436 (init_cutu_and_read_dies_no_follow): Update.
14437 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14438 (dwarf2_cu::~dwarf2_cu): New.
14439 (free_heap_comp_unit, free_stack_comp_unit): Remove.
14440 (age_cached_comp_units, free_one_cached_comp_unit): Update.
14441
14442 2018-01-17 Tom Tromey <tom@tromey.com>
14443 Simon Marchi <simon.marchi@ericsson.com>
14444
14445 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14446 (struct die_reader_specs) <abbrev_table>: New member.
14447 (struct abbrev_table): Add constructor.
14448 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14449 <abbrev_obstack>: Now an auto_obstack.
14450 (abbrev_table_up): New typedef.
14451 (init_cu_die_reader): Add abbrev_table parameter.
14452 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14453 Add result_dwo_abbrev_table.
14454 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14455 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14456 Update.
14457 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14458 parameter.
14459 (skip_children): Update.
14460 (abbrev_table::alloc_abbrev): Rename from
14461 abbrev_table_alloc_abbrev.
14462 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14463 (abbrev_table::lookup_abbrev): Rename from
14464 abbrev_table_lookup_abbrev.
14465 (abbrev_table_read_table): Return abbrev_table_up.
14466 (abbrev_table_free, abbrev_table_free_cleanup)
14467 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14468 (load_partial_dies): Update.
14469
14470 2018-01-17 Tom Tromey <tom@tromey.com>
14471
14472 * dwarf2read.c (dwarf2_compute_name): Update comment.
14473 (read_func_scope, read_variable): Update.
14474 (new_symbol): Remove.
14475 (new_symbol_full): Rename to new_symbol.
14476
14477 2018-01-17 Mike Gulick <mgulick@mathworks.com>
14478
14479 PR gdb/16577
14480 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14481 a warning instead of throwing an error, set section size to 0 and return
14482 NULL.
14483 * gdb_bfd.h (gdb_bfd_map_section): Update description.
14484
14485 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14486
14487 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14488 std::string.
14489 (linux_ptrace_attach_fail_reason_string): Likewise.
14490 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14491 Likewise.
14492 (linux_ptrace_attach_fail_reason_string): Likewise.
14493 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14494
14495 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14496
14497 * linux-nat.c (linux_nat_attach): Remove xstrdup.
14498
14499 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
14500
14501 PR gdb/21559
14502 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14503 checking for fs_base/gs_base fields in struct user_regs_struct.
14504 * configure: Regenerate.
14505
14506 2018-01-17 Yao Qi <yao.qi@linaro.org>
14507
14508 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14509 function.
14510 (aarch64_linux_init_abi): Install it to gdbarch hook
14511 gcc_target_options.
14512
14513 2018-01-15 Pedro Alves <palves@redhat.com>
14514
14515 * common/signals-state-save-restore.c
14516 (save_original_signals_state): Fix typos.
14517
14518 2017-01-12 Tom Tromey <tom@tromey.com>
14519 Sergio Durigan Junior <sergiodj@redhat.com>
14520
14521 * Makefile.in (install-only): Install gdb-add-index.
14522
14523 2018-01-12 John Baldwin <jhb@FreeBSD.org>
14524
14525 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14526
14527 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
14528
14529 * infrun.c (keep_going_pass_signal): Clear step-over info when
14530 insert_breakpoints fails.
14531
14532 2018-01-11 Pedro Alves <palves@redhat.com>
14533
14534 PR gdb/22583
14535 * infrun.c (resume): Rename to ...
14536 (resume_1): ... this.
14537 (resume): Reimplement as wrapper around resume_1.
14538
14539 2018-01-11 Pedro Alves <palves@redhat.com>
14540
14541 PR remote/22597
14542 * remote.c (remote_parse_stop_reply): Default to the last-set
14543 general thread instead of to 'magic_null_ptid'.
14544
14545 2018-01-10 Pedro Alves <palves@redhat.com>
14546
14547 * language.h (language_get_symbol_name_matcher): Rename ...
14548 (get_symbol_name_matcher): ... this.
14549 * language.c (language_get_symbol_name_matcher): Ditto.
14550 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14551 callers adjusted.
14552
14553 2018-01-10 Pedro Alves <palves@redhat.com>
14554
14555 PR gdb/22670
14556 * dwarf2read.c
14557 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14558 Adjust to use language_get_symbol_name_matcher instead of
14559 language_defn::la_get_symbol_name_matcher.
14560 * language.c (language_get_symbol_name_matcher): If in Ada mode
14561 and the lookup name is a verbatim match, return Ada's matcher.
14562 * language.h (language_get_symbol_name_matcher): Adjust comment.
14563 (ada_lookup_name_info::verbatim_p):: New method.
14564
14565 2018-01-10 Pedro Alves <palves@redhat.com>
14566
14567 PR gdb/22670
14568 * ada-lang.c (ada_collect_symbol_completion_matches): If the
14569 minsym's language is language_auto or language_cplus, pass down
14570 language_ada instead.
14571 * symtab.c (compare_symbol_name): Don't frob symbol language here.
14572
14573 2018-01-10 Pedro Alves <palves@redhat.com>
14574
14575 PR gdb/22670
14576 * minsyms.c (linkage_name_str): New function.
14577 (iterate_over_minimal_symbols): Use it.
14578
14579 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14580
14581 * NEWS: Document that 'info proc' now works on FreeBSD.
14582
14583 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14584
14585 * configure.ac: Check for kinfo_getfile in libutil.
14586 * configure: Regenerate.
14587 * config.in: Regenerate.
14588 * fbsd-nat.c: Include "fbsd-tdep.h".
14589 (fbsd_fetch_cmdline): New.
14590 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14591 rather than calling error.
14592 (fbsd_info_proc): New.
14593 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14594 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14595 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14596
14597 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14598
14599 * fbsd-nat.c (struct free_deleter): Remove.
14600 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14601
14602 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14603
14604 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14605 NULL for an empty pathname.
14606
14607 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14608
14609 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14610 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14611 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14612 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14613 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14614 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14615 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14616 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14617 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14618 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14619 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14620 (fbsd_core_fetch_timeval, fbsd_print_sigset)
14621 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14622 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
14623 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14624
14625 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
14626
14627 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14628 (gnu_xfer_auxv): New function.
14629 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14630 TARGET_OBJECT_AUXV.
14631
14632 2018-01-08 Yao Qi <yao.qi@linaro.org>
14633 Simon Marchi <simon.marchi@ericsson.com>
14634
14635 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14636 common/selftest.c.
14637 (COMMON_OBS): Remove selftest.o.
14638 * configure.ac: Append selftest-arch.c and common/selftest.c to
14639 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
14640 * configure: Re-generated.
14641 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14642 GDB_SELF_TEST.
14643 (maintenance_info_selftests): Likewise.
14644
14645 2018-01-08 Xavier Roirand <roirand@adacore.com>
14646
14647 * ada-valprint.c (val_print_packed_array_elements): Use
14648 proper number of elements when printing an array indexed
14649 by an enumeration type.
14650
14651 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14652
14653 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14654 (dw2_get_file_names_reader): Adjust.
14655 (lookup_dwo_signatured_type): Adjust.
14656 (lookup_dwp_signatured_type): Adjust.
14657 (lookup_signatured_type): Adjust.
14658 (create_type_unit_group): Adjust.
14659 (get_type_unit_group): Adjust.
14660 (process_psymtab_comp_unit_reader): Adjust.
14661 (build_type_psymtabs_reader): Adjust.
14662 (scan_partial_symbols): Adjust.
14663 (add_partial_symbol): Adjust.
14664 (add_partial_subprogram): Adjust.
14665 (peek_die_abbrev): Adjust.
14666 (fixup_go_packaging): Adjust.
14667 (process_imported_unit_die): Adjust.
14668 (dwarf2_compute_name): Adjust.
14669 (dwarf2_physname): Adjust.
14670 (read_import_statement): Adjust.
14671 (handle_DW_AT_stmt_list): Adjust.
14672 (read_file_scope): Adjust.
14673 (read_func_scope): Adjust.
14674 (read_lexical_block_scope): Adjust.
14675 (read_call_site_scope): Adjust.
14676 (read_variable): Adjust.
14677 (dwarf2_rnglists_process): Adjust.
14678 (dwarf2_ranges_process): Adjust.
14679 (dwarf2_ranges_read): Adjust.
14680 (dwarf2_get_pc_bounds): Adjust.
14681 (dwarf2_record_block_ranges): Adjust.
14682 (dwarf2_add_field): Adjust.
14683 (dwarf2_add_member_fn): Adjust.
14684 (read_structure_type): Adjust.
14685 (process_structure_scope): Adjust.
14686 (read_enumeration_type): Adjust.
14687 (read_array_type): Adjust.
14688 (mark_common_block_symbol_computed): Adjust.
14689 (read_common_block): Adjust.
14690 (read_namespace_type): Adjust.
14691 (read_namespace): Adjust.
14692 (read_module_type): Adjust.
14693 (read_tag_pointer_type): Adjust.
14694 (read_tag_ptr_to_member_type): Adjust.
14695 (read_tag_string_type): Adjust.
14696 (read_subroutine_type): Adjust.
14697 (read_typedef): Adjust.
14698 (read_base_type): Adjust.
14699 (attr_to_dynamic_prop): Adjust.
14700 (read_subrange_type): Adjust.
14701 (read_unspecified_type): Adjust.
14702 (dwarf2_read_abbrevs): Adjust.
14703 (load_partial_dies): Adjust.
14704 (read_partial_die): Adjust.
14705 (find_partial_die): Adjust.
14706 (guess_partial_die_structure_name): Adjust.
14707 (fixup_partial_die): Adjust.
14708 (read_attribute_value): Adjust.
14709 (read_addr_index): Adjust.
14710 (read_addr_index_from_leb128): Adjust.
14711 (read_str_index): Adjust.
14712 (dwarf2_string_attr): Adjust.
14713 (get_debug_line_section): Adjust.
14714 (dwarf_decode_line_header): Adjust.
14715 (lnp_state_machine::check_line_address): Adjust.
14716 (dwarf_decode_lines_1): Adjust.
14717 (dwarf_decode_lines): Adjust.
14718 (dwarf2_start_symtab): Adjust.
14719 (var_decode_location): Adjust.
14720 (new_symbol_full): Adjust.
14721 (dwarf2_const_value_data): Adjust.
14722 (dwarf2_const_value_attr): Adjust.
14723 (dwarf2_const_value): Adjust.
14724 (die_type): Adjust.
14725 (die_containing_type): Adjust.
14726 (build_error_marker_type): Adjust.
14727 (lookup_die_type): Adjust.
14728 (guess_full_die_structure_name): Adjust.
14729 (anonymous_struct_prefix): Adjust.
14730 (determine_prefix): Adjust.
14731 (dwarf2_name): Adjust.
14732 (follow_die_ref_or_sig): Adjust.
14733 (follow_die_offset): Adjust.
14734 (follow_die_ref): Adjust.
14735 (follow_die_sig_1): Adjust.
14736 (follow_die_sig): Adjust.
14737 (get_signatured_type): Adjust.
14738 (get_DW_AT_signature_type): Adjust.
14739 (decode_locdesc): Adjust.
14740 (dwarf_decode_macros): Adjust.
14741 (cu_debug_loc_section): Adjust.
14742 (fill_in_loclist_baton): Adjust.
14743 (dwarf2_symbol_mark_computed): Adjust.
14744 (init_one_comp_unit): Don't assign
14745 dwarf2_cu::dwarf2_per_objfile.
14746 (set_die_type): Adjust.
14747
14748 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14749
14750 * dwarf2read.c (struct mapped_debug_names): Add constructor.
14751 <dwarf2_per_objfile>: New field.
14752 (dwarf2_per_objfile): Remove global.
14753 (get_dwarf2_per_objfile): New function.
14754 (set_dwarf2_per_objfile): New function.
14755 (dwarf2_build_psymtabs_hard): Change objfile parameter to
14756 dwarf2_per_objfile.
14757 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14758 (read_abbrev_offset): Likewise.
14759 (read_indirect_string): Likewise.
14760 (read_indirect_line_string): Likewise.
14761 (read_indirect_string_at_offset): Likewise.
14762 (read_indirect_string_from_dwz): Likewise.
14763 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14764 dwarf2_per_objfile.
14765 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14766 (create_all_comp_units): Change objfile parameter to
14767 dwarf2_per_objfile.
14768 (create_all_type_units): Likewise.
14769 (process_queue): Add dwarf2_per_objfile parameter.
14770 (read_and_check_comp_unit_head): Likewise.
14771 (lookup_dwo_unit_in_dwp): Likewise.
14772 (get_dwp_file): Likewise.
14773 (process_cu_includes): Likewise.
14774 (struct free_dwo_file_cleanup_data): New struct.
14775 (dwarf2_has_info): Use get_dwarf2_per_objfile and
14776 set_dwarf2_per_objfile.
14777 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14778 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14779 context, adjust calls.
14780 (dw2_instantiate_symtab): Likewise.
14781 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14782 (dw2_get_cu): Likewise.
14783 (create_cu_from_index_list): Change objfile parameter to
14784 dwarf2_per_objfile.
14785 (create_cus_from_index_list): Get dwarf2_per_objfile from
14786 context, adjust calls.
14787 (create_cus_from_index): Likewise.
14788 (create_signatured_type_table_from_index): Change objfile
14789 parameter to dwarf2_per_objfile.
14790 (create_signatured_type_table_from_debug_names): Change objfile
14791 parameter to dwarf2_per_objfile.
14792 (create_addrmap_from_index): Likewise.
14793 (create_addrmap_from_aranges): Likewise.
14794 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14795 (dw2_setup): Remove.
14796 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14797 context.
14798 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14799 get_dwarf2_per_objfile.
14800 (dw2_forget_cached_source_info): Likewise.
14801 (dw2_map_symtabs_matching_filename): Likewise.
14802 (struct dw2_symtab_iterator) <index>: Remove.
14803 <dwarf2_per_objfile>: New field.
14804 (dw2_symtab_iter_init): Replace index parameter with
14805 dwarf2_per_objfile.
14806 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14807 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14808 (dw2_print_stats): Likewise.
14809 (dw2_dump): Likewise.
14810 (dw2_expand_symtabs_for_function): Likewise.
14811 (dw2_expand_all_symtabs): Likewise.
14812 (dw2_expand_symtabs_with_fullname): Likewise.
14813 (dw2_expand_marked_cus): Replace index and objfile parameters
14814 with dwarf2_per_objfile.
14815 (dw_expand_symtabs_matching_file_matcher): Add
14816 dwarf2_per_objfile parameter and adjust calls.
14817 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14818 adjust calls.
14819 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14820 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14821 adjust calls.
14822 (create_cus_from_debug_names_list): Replace objfile parameter
14823 with dwarf2_per_objfile and adjust calls.
14824 (create_cus_from_debug_names): Likewise.
14825 (dwarf2_read_debug_names): Likewise.
14826 (mapped_debug_names::namei_to_name): Adjust call.
14827 (dw2_debug_names_iterator::next): Likewise.
14828 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14829 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14830 (dw2_debug_names_dump): Likewise.
14831 (dw2_debug_names_expand_symtabs_for_function): Likewise.
14832 (dw2_debug_names_expand_symtabs_matching): Likewise.
14833 (dwarf2_initialize_objfile): Likewise.
14834 (dwarf2_build_psymtabs): Likewise.
14835 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14836 this_cu.
14837 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14838 (read_and_check_comp_unit_head): Likewise.
14839 (read_abbrev_offset): Likewise.
14840 (create_debug_type_hash_table): Likewise.
14841 (create_debug_types_hash_table): Likewise.
14842 (create_all_type_units): Replace objfile parameter with
14843 dwarf2_per_objfile.
14844 (add_type_unit): Add dwarf2_per_objfile parameter.
14845 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14846 with dwarf2_per_objfile.
14847 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14848 (lookup_dwp_signatured_type): Likewise.
14849 (lookup_signatured_type): Likewise.
14850 (read_cutu_die_from_dwo): Likewise.
14851 (init_tu_and_read_dwo_dies): Likewise.
14852 (init_cutu_and_read_dies): Likewise.
14853 (init_cutu_and_read_dies_no_follow): Likewise.
14854 (allocate_type_unit_groups_table): Add objfile parameter.
14855 (create_type_unit_group): Use dwarf2_per_objfile from cu.
14856 (get_type_unit_group): Likewise.
14857 (process_psymtab_comp_unit): Update call.
14858 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14859 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14860 (print_tu_stats): Likewise.
14861 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14862 in void* parameter.
14863 (build_type_psymtabs): Change objfile parameter to
14864 dwarf2_per_objfile.
14865 (process_skeletonless_type_unit): Use dwarf2_per_objfile
14866 passed in void* parameter.
14867 (process_skeletonless_type_units): Change objfile parameter to
14868 dwarf2_per_objfile.
14869 (set_partial_user): Likewise.
14870 (dwarf2_build_psymtabs_hard): Likewise.
14871 (read_comp_units_from_section): Likewise.
14872 (create_all_comp_units): Likewise.
14873 (scan_partial_symbols): Update calls.
14874 (add_partial_symbol): Likewise.
14875 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14876 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14877 (process_queue): Add dwarf2_per_objfile parameter.
14878 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14879 (compute_compunit_symtab_includes): Likewise.
14880 (process_cu_includes): Add dwarf2_per_objfile parameter.
14881 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14882 (process_full_type_unit): Likewise.
14883 (process_imported_unit_die): Update call.
14884 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14885 (read_file_scope): Likewise.
14886 (allocate_dwo_file_hash_table): Add objfile parameter.
14887 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14888 (create_cus_hash_table): Likewise.
14889 (create_dwp_hash_table): Likewise.
14890 (create_dwo_unit_in_dwp_v1): Likewise.
14891 (create_dwp_v2_section): Likewise.
14892 (create_dwo_unit_in_dwp_v2): Likewise.
14893 (lookup_dwo_unit_in_dwp): Likewise.
14894 (try_open_dwop_file): Likewise.
14895 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14896 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14897 cleanup to include a reference to dwarf2_per_objfile.
14898 (open_dwp_file): Add dwarf2_per_objfile parameter.
14899 (open_and_init_dwp_file): Likewise.
14900 (get_dwp_file): Likewise.
14901 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14902 (queue_and_load_all_dwo_tus): Update call.
14903 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14904 data.
14905 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14906 (dwarf2_ranges_process): Likewise.
14907 (dwarf2_get_pc_bounds): Likewise.
14908 (mark_common_block_symbol_computed): Likewise.
14909 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14910 (dwarf2_read_abbrevs): Update call.
14911 (read_partial_die): Use dwarf2_per_objfile from cu.
14912 (find_partial_die): Likewise.
14913 (fixup_partial_die): Likewise.
14914 (read_attribute_value): Likewise.
14915 (read_indirect_string_at_offset_from): Add objfile parameter.
14916 (read_indirect_string_at_offset): Add dwarf2_per_objfile
14917 parameter.
14918 (read_indirect_string_from_dwz): Add objfile parameter.
14919 (read_indirect_string): Add objfile parameter.
14920 (read_addr_index_1): Add dwarf2_per_objfile parameter.
14921 (read_addr_index): Use dwarf2_per_objfile from cu.
14922 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14923 call dw2_setup.
14924 (read_str_index): Use dwarf2_per_objfile from cu.
14925 (get_debug_line_section): Likewise.
14926 (read_formatted_entries): Add dwarf2_per_objfile parameter.
14927 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14928 (new_symbol_full): Use dwarf2_per_objfile from cu.
14929 (build_error_marker_type): Likewise.
14930 (lookup_die_type): Likewise.
14931 (determine_prefix): Likewise.
14932 (follow_die_offset): Likewise.
14933 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14934 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14935 (dwarf2_fetch_die_type_sect_off): Likewise.
14936 (dwarf2_get_die_type): Likewise.
14937 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14938 (get_signatured_type): Likewise.
14939 (get_DW_AT_signature_type): Likewise.
14940 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14941 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14942 (cu_debug_loc_section): Likewise.
14943 (fill_in_loclist_baton): Likewise.
14944 (dwarf2_symbol_mark_computed): Likewise.
14945 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14946 dwarf2_per_objfile.
14947 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14948 parameter.
14949 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14950 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14951 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14952 (set_die_type): Use dwarf2_free_objfile from cu.
14953 (get_die_type_at_offset): Likewise.
14954 (dwarf2_per_objfile_free): Don't assign global variable.
14955 (debug_names) <constructor>: Add dwarf2_per_objfile
14956 parameter, update m_debugstrlookup construction.
14957 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14958 parameter.
14959 <m_dwarf2_per_objfile>: New field.
14960 <lookup>: Use m_dwarf2_per_objfile.
14961 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14962 (psyms_seen_size): Likewise.
14963 (write_gdbindex): Replace objfile parameter with
14964 dwarf2_per_objfile.
14965 (write_debug_names): Likewise.
14966 (write_psymtabs_to_index): Likewise.
14967 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14968 calls.
14969
14970 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14971
14972 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14973 <dwarf2_per_objfile>: New field.
14974 (struct dwarf2_per_cu_data) <objfile>: Remove.
14975 <dwarf2_per_objfile>: New field.
14976 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14977 of objfile.
14978 (create_signatured_type_table_from_index): Likewise.
14979 (create_debug_type_hash_table): Likewise.
14980 (fill_in_sig_entry_from_dwo_entry): Likewise.
14981 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14982 (create_type_unit_group): Assign dwarf2_per_objfile instead of
14983 objfile.
14984 (create_partial_symtab): Access objfile through
14985 dwarf2_per_objfile.
14986 (process_psymtab_comp_unit_reader): Likewise.
14987 (read_comp_units_from_section): Likewise.
14988 (scan_partial_symbols): Likewise.
14989 (add_partial_symbol): Likewise.
14990 (add_partial_subprogram): Likewise.
14991 (peek_die_abbrev): Likewise.
14992 (fixup_go_packaging): Likewise.
14993 (process_full_comp_unit): Likewise.
14994 (process_full_type_unit): Likewise.
14995 (process_imported_unit_die): Likewise.
14996 (dwarf2_compute_name): Likewise.
14997 (dwarf2_physname): Likewise.
14998 (read_import_statement): Likewise.
14999 (create_cus_hash_table): Assign dwarf2_physname instead of
15000 objfile.
15001 (read_func_scope): Access objfile through dwarf2_per_objfile.
15002 (read_lexical_block_scope): Likewise.
15003 (read_call_site_scope): Likewise.
15004 (read_variable): Likewise.
15005 (dwarf2_rnglists_process): Likewise.
15006 (dwarf2_ranges_process): Likewise.
15007 (dwarf2_ranges_read): Likewise.
15008 (dwarf2_record_block_ranges): Likewise.
15009 (dwarf2_add_field): Likewise.
15010 (dwarf2_add_member_fn): Likewise.
15011 (read_structure_type): Likewise.
15012 (process_structure_scope): Likewise.
15013 (read_enumeration_type): Likewise.
15014 (read_array_type): Likewise.
15015 (read_common_block): Likewise.
15016 (read_namespace_type): Likewise.
15017 (read_namespace): Likewise.
15018 (read_module_type): Likewise.
15019 (read_tag_pointer_type): Likewise.
15020 (read_tag_ptr_to_member_type): Likewise.
15021 (read_tag_string_type): Likewise.
15022 (read_subroutine_type): Likewise.
15023 (read_typedef): Likewise.
15024 (read_base_type): Likewise.
15025 (attr_to_dynamic_prop): Likewise.
15026 (read_subrange_type): Likewise.
15027 (read_unspecified_type): Likewise.
15028 (load_partial_dies): Likewise.
15029 (read_partial_die): Likewise.
15030 (find_partial_die): Likewise.
15031 (guess_partial_die_structure_name): Likewise.
15032 (fixup_partial_die): Likewise.
15033 (read_attribute_value): Likewise.
15034 (read_addr_index_from_leb128): Likewise.
15035 (dwarf2_read_addr_index): Likewise.
15036 (dwarf2_string_attr): Likewise.
15037 (lnp_state_machine::check_line_address): Likewise.
15038 (dwarf_decode_lines_1): Likewise.
15039 (dwarf_decode_lines): Likewise.
15040 (dwarf2_start_symtab): Likewise.
15041 (var_decode_location): Likewise.
15042 (new_symbol_full): Likewise.
15043 (dwarf2_const_value_data): Likewise.
15044 (dwarf2_const_value_attr): Likewise.
15045 (dwarf2_const_value): Likewise.
15046 (die_type): Likewise.
15047 (die_containing_type): Likewise.
15048 (lookup_die_type): Likewise.
15049 (guess_full_die_structure_name): Likewise.
15050 (anonymous_struct_prefix): Likewise.
15051 (dwarf2_name): Likewise.
15052 (follow_die_ref_or_sig): Likewise.
15053 (follow_die_offset): Likewise.
15054 (follow_die_ref): Likewise.
15055 (dwarf2_fetch_die_loc_sect_off): Likewise.
15056 (dwarf2_fetch_constant_bytes): Likewise.
15057 (dwarf2_fetch_die_type_sect_off): Likewise.
15058 (dwarf2_get_die_type): Likewise.
15059 (follow_die_sig): Likewise.
15060 (decode_locdesc): Likewise.
15061 (dwarf2_per_cu_objfile): Likewise.
15062 (dwarf2_per_cu_text_offset): Likewise.
15063 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15064 objfile.
15065 (set_die_type): Access objfile through
15066 dwarf2_per_objfile.
15067
15068 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15069
15070 * valprint.c (converted_character_d): Remove typedef.
15071 (DEF_VEC_O (converted_character_d)): Remove.
15072 (count_next_character): Use std::vector.
15073 (print_converted_chars_to_obstack): Likewise.
15074 (generic_printstr): Likewise.
15075
15076 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15077
15078 * xml-support.h (struct gdb_xml_value): Add constructor.
15079 <value>: Change type to unique_xmalloc_ptr.
15080 (gdb_xml_value_s): Remove typedef.
15081 (DEF_VEC_O (gdb_xml_value_s)): Remove.
15082 (gdb_xml_element_start_handler): Change parameter type to
15083 std::vector.
15084 (xml_find_attribute): Likewise.
15085 * xml-support.c (xml_find_attribute): Change parameter type to
15086 std::vector and adjust.
15087 (gdb_xml_values_cleanup): Remove.
15088 (gdb_xml_parser::start_element): Adjust to std::vector.
15089 (xinclude_start_include): Change paraeter type to std::vector
15090 and adjust.
15091 * btrace.c (check_xml_btrace_version): Likewise.
15092 (parse_xml_btrace_block): Likewise.
15093 (parse_xml_btrace_pt_config_cpu): Likewise.
15094 (parse_xml_btrace_pt): Likewise.
15095 (parse_xml_btrace_conf_bts): Likewise.
15096 (parse_xml_btrace_conf_pt): Likewise.
15097 * memory-map.c (memory_map_start_memory): Likewise.
15098 (memory_map_start_property): Likewise.
15099 * osdata.c (osdata_start_osdata): Likewise.
15100 (osdata_start_item): Likewise.
15101 (osdata_start_column): Likewise.
15102 * remote.c (start_thread): Likewise.
15103 * solib-aix.c (library_list_start_library): Likewise.
15104 (library_list_start_list): Likewise.
15105 * solib-svr4.c (library_list_start_library): Likewise.
15106 (svr4_library_list_start_list): Likewise.
15107 * solib-target.c (library_list_start_segment): Likewise.
15108 (library_list_start_section): Likewise.
15109 (library_list_start_library): Likewise.
15110 (library_list_start_list): Likewise.
15111 * tracepoint.c (traceframe_info_start_memory): Likewise.
15112 (traceframe_info_start_tvar): Likewise.
15113 * xml-syscall.c (syscall_start_syscall): Likewise.
15114 * xml-tdesc.c (tdesc_start_target): Likewise.
15115 (tdesc_start_feature): Likewise.
15116 (tdesc_start_reg): Likewise.
15117 (tdesc_start_union): Likewise.
15118 (tdesc_start_struct): Likewise.
15119 (tdesc_start_flags): Likewise.
15120 (tdesc_start_enum): Likewise.
15121 (tdesc_start_field): Likewise.
15122 (tdesc_start_enum_value): Likewise.
15123 (tdesc_start_vector): Likewise.
15124
15125 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15126
15127 * extension.h (struct xmethod_worker) <clone>: Remove.
15128 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15129 Remove.
15130 (python_xmethod_worker::clone): Remove.
15131 * valops.c (find_overload_match): Use std::move instead of
15132 clone.
15133
15134 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15135
15136 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15137 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15138 <free_xmethod_worker_data>: Remove.
15139 <get_matching_xmethod_workers>: Chance VEC to std::vector.
15140 <get_xmethod_arg_types>: Remove.
15141 <get_xmethod_result_type>: Remove.
15142 <invoke_xmethod>: Remove.
15143 * extension.c (new_xmethod_worker): Remove.
15144 (clone_xmethod_worker): Remove.
15145 (get_matching_xmethod_workers): Return void, pass std::vector by
15146 pointer.
15147 (get_xmethod_arg_types): Rename to...
15148 (xmethod_worker::get_arg_types): ... this, and adjust.
15149 (get_xmethod_result_type): Rename to...
15150 (xmethod_worker::get_result_type): ... this, and adjust.
15151 (invoke_xmethod): Remove.
15152 (free_xmethod_worker): Remove.
15153 (free_xmethod_worker_vec): Remove.
15154 * extension.h (enum ext_lang_rc): Move here from
15155 extension-priv.h.
15156 (struct xmethod_worker): Add constructor and destructor.
15157 <data>: Remove.
15158 <value>: Remove.
15159 <invoke, clone, do_get_result_type, do_get_arg_types>: New
15160 virtual pure methods.
15161 <get_arg_types, get_result_type>: New methods.
15162 (xmethod_worker_ptr): Remove typedef.
15163 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15164 (xmethod_worker_vec): Remove typedef.
15165 (xmethod_worker_up): New typedef.
15166 (invoke_xmethod): Remove.
15167 (clone_xmethod_worker): Remove.
15168 (free_xmethod_worker): Remove.
15169 (free_xmethod_worker_vec): Remove.
15170 (get_xmethod_arg_types): Remove.
15171 (get_xmethod_result_type): Remove.
15172 * valops.c (find_method_list): Use std::vector, don't use
15173 intermediate vector.
15174 (value_find_oload_method_list): Use std::vector.
15175 (find_overload_match): Use std::vector.
15176 (find_oload_champ): Use std::vector.
15177 * value.c (value_free): Use operator delete.
15178 (value_of_xmethod): Rename to...
15179 (value_from_xmethod): ... this. Don't assign
15180 xmethod_worker::value, take rvalue-reference.
15181 (result_type_of_xmethod): Adjust.
15182 (call_xmethod): Adjust.
15183 * value.h: Include extension.h.
15184 (struct xmethod_worker): Don't forward-declare.
15185 (value_of_xmethod): Rename to...
15186 (value_from_xmethod): ... this, take rvalue-reference.
15187 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15188 (struct python_xmethod_worker): ... this, add constructor and
15189 destructor.
15190 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15191 (gdbpy_free_xmethod_worker_data): Rename to...
15192 (python_xmethod_worker::~python_xmethod_worker): ... this and
15193 adjust.
15194 (gdbpy_clone_xmethod_worker_data): Rename to...
15195 (python_xmethod_worker::clone): ... this and adjust.
15196 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15197 temporary vector.
15198 (gdbpy_get_xmethod_arg_types): Rename to...
15199 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15200 (gdbpy_get_xmethod_result_type): Rename to...
15201 (python_xmethod_worker::do_get_result_type): ... this and
15202 adjust.
15203 (gdbpy_invoke_xmethod): Rename to...
15204 (python_xmethod_worker::invoke): ... this and adjust.
15205 (new_python_xmethod_worker): Rename to...
15206 (python_xmethod_worker::python_xmethod_worker): ... this and
15207 adjust.
15208 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15209 Remove.
15210 (gdbpy_free_xmethod_worker_data): Remove.
15211 (gdbpy_get_matching_xmethod_workers): Use std::vector.
15212 (gdbpy_get_xmethod_arg_types): Remove.
15213 (gdbpy_get_xmethod_result_type): Remove.
15214 (gdbpy_invoke_xmethod): Remove.
15215 * python/python.c (python_extension_ops): Remove obsolete
15216 callbacks.
15217
15218 2018-01-05 Pedro Alves <palves@redhat.com>
15219
15220 PR gdb/18653
15221 * common/signals-state-save-restore.c
15222 (save_original_signals_state): New parameter 'quiet'. Warn if we
15223 find a custom handler preinstalled, instead of internal erroring.
15224 But only warn if !quiet.
15225 * common/signals-state-save-restore.h
15226 (save_original_signals_state): New parameter 'quiet'.
15227 * main.c (captured_main_1): Move save_original_signals_state call
15228 after option handling, and pass QUIET.
15229
15230 2018-01-05 Pedro Alves <palves@redhat.com>
15231
15232 * spu-tdep.c (spu_catch_start): Pass
15233 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15234
15235 2018-01-05 Pedro Alves <palves@redhat.com>
15236
15237 PR gdb/22670
15238 * ada-lang.c (literal_symbol_name_matcher): New function.
15239 (ada_get_symbol_name_matcher): Use it for
15240 symbol_name_match_type::SEARCH_NAME.
15241 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
15242 it down instead of assuming symbol_name_match_type::FULL.
15243 * block.h (block_lookup_symbol): New parameter 'match_type'.
15244 * c-valprint.c (print_unpacked_pointer): Use
15245 lookup_symbol_search_name instead of lookup_symbol.
15246 * compile/compile-object-load.c (get_out_value_type): Pass down
15247 symbol_name_match_type::SEARCH_NAME.
15248 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15249 symbol_name_match_type::FULL.
15250 * cp-support.c (cp_get_symbol_name_matcher): Handle
15251 symbol_name_match_type::SEARCH_NAME.
15252 * infrun.c (insert_exception_resume_breakpoint): Use
15253 lookup_symbol_search_name.
15254 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15255 * psymtab.c (maintenance_check_psymtabs): Use
15256 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15257 * stack.c (print_frame_args): Use lookup_symbol_search_name and
15258 SYMBOL_SEARCH_NAME.
15259 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15260 if symbol_name_match_type::SEARCH_NAME.
15261 (lookup_symbol_in_language): Pass down
15262 symbol_name_match_type::FULL.
15263 (lookup_symbol_search_name): New.
15264 (lookup_language_this): Pass down
15265 symbol_name_match_type::SEARCH_NAME.
15266 (lookup_symbol_aux, lookup_local_symbol): New parameter
15267 'match_type'. Pass it down.
15268 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15269 (lookup_symbol_search_name): New declaration.
15270 (lookup_symbol_in_block): New 'match_type' parameter.
15271
15272 2018-01-05 Pedro Alves <palves@redhat.com>
15273
15274 PR gdb/22670
15275 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15276 ada_lookup_symbol.
15277 (ada_lookup_symbol): Reimplement in terms of
15278 ada_lookup_symbol_list, bits factored out from
15279 ada_lookup_encoded_symbol.
15280
15281 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15282
15283 * ada-exp.y (write_object_renaming): When subscripting an array
15284 using a symbol as the index, pass the block in call to
15285 ada_lookup_encoded_symbol when looking that symbol up.
15286
15287 2018-01-05 Jerome Guitton <guitton@adacore.com>
15288
15289 * ada-lang.c (ada_array_length): Use ada_index_type instead of
15290 TYPE_INDEX_TYPE.
15291
15292 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15293
15294 * ada-lang.c (ada_to_fixed_value_create): Add handling of
15295 the case where VALUE_LVAL (val0) is not lval_memory.
15296
15297 2018-01-05 Xavier Roirand <roirand@adacore.com>
15298
15299 * ada-valprint.c (print_optional_low_bound): Handle
15300 character-indexed array printing like boolean-indexed array
15301 printing.
15302
15303 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15304
15305 * NEWS: Create a new section for the next release branch.
15306 Rename the section of the current branch, now that it has
15307 been cut.
15308
15309 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15310
15311 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15312 * version.in: Bump version to 8.1.50.DATE-git.
15313
15314 2018-01-03 Xavier Roirand <roirand@adacore.com>
15315
15316 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15317 Add field.
15318 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15319 Add field.
15320 (default_exception_support_info) <catch_handlers_sym>: Add field.
15321 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15322 (ada_exception_name_addr_1): Add "catch handlers" handling.
15323 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15324 Update all callers.
15325 (create_excep_cond_exprs) <ex>: Add parameter.
15326 (re_set_exception): Update create_excep_cond_exprs call.
15327 (print_it_exception, print_one_exception, print_mention_exception)
15328 (print_recreate_exception): Add "catch handler" handling.
15329 (allocate_location_catch_handlers, re_set_catch_handlers)
15330 (check_status_catch_handlers, print_it_catch_handlers)
15331 (print_one_catch_handlers, print_mention_catch_handlers)
15332 (print_recreate_catch_handlers): New function.
15333 (catch_handlers_breakpoint_ops): New variable.
15334 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15335 Add parameter. Add "catch handler" handling.
15336 (ada_exception_sym_name, ada_exception_breakpoint_ops):
15337 Add "catch handler" handling.
15338 (ada_exception_catchpoint_cond_string): Add "catch handler"
15339 handling.
15340 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15341 call.
15342 (catch_ada_handlers_command): New function.
15343 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15344 operations structure.
15345 (_initialize_ada_language): Add "catch handlers" command entry.
15346 * NEWS: Document "catch handlers" feature.
15347
15348 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15349
15350 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15351 account when creating the array type of the slice.
15352 (ada_value_slice): Likewise.
15353
15354 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15355
15356 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15357 New enum value.
15358 (create_array_type_with_stride): Add byte_stride_prop parameter.
15359 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15360 New parameter. Update all callers in this file.
15361 (array_type_has_dynamic_stride): New function.
15362 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15363 of arrays with dynamic byte strides.
15364 * dwarf2read.c (read_array_type): Add support for dynamic
15365 DW_AT_byte_stride attributes.
15366
15367 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15368
15369 * dwarf2read.c (read_unspecified_type): Treat
15370 DW_TAG_enumeration_type DIEs from Ada units as stubs.
15371
15372 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15373
15374 Update copyright year range in all GDB files.
15375
15376 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
15377
15378 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15379 and gdb/testsuite/gdb.base/step-line.c.
15380
15381 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15382
15383 * copyright.py (main): Dump the contents of
15384 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15385 even if BY_HAND is empty.
15386
15387 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15388
15389 * top.c (print_gdb_version): Update Copyright year in version
15390 message.
15391
15392 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15393
15394 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15395
15396 For older changes see ChangeLog-2017.
15397 \f
15398 Local Variables:
15399 mode: change-log
15400 left-margin: 8
15401 fill-column: 74
15402 version-control: never
15403 coding: utf-8
15404 End:
This page took 0.359399 seconds and 5 git commands to generate.